From 91b5e5fda848567fad52ae9aa76217682f1aba98 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 30 Jun 2022 12:21:14 +0800 Subject: [PATCH] Update `Azure.ResourceManager.MachineLearning` for beta.2 (#29005) * rename one resource * regenerate after merge * update api --- .../CHANGELOG.md | 1 + ...eManager.MachineLearning.netstandard2.0.cs | 58 ++++----- .../src/Generated/DataContainerResource.cs | 16 +-- ...Collection.cs => DataVersionCollection.cs} | 110 +++++++++--------- ...aVersionBaseData.cs => DataVersionData.cs} | 20 ++-- ...BaseResource.cs => DataVersionResource.cs} | 78 ++++++------- .../Extensions/MachineLearningExtensions.cs | 14 +-- ...esourceArmPaginatedResult.Serialization.cs | 6 +- ...taVersionBaseResourceArmPaginatedResult.cs | 6 +- ...on.cs => DataVersionData.Serialization.cs} | 10 +- ...=> DataVersionProperties.Serialization.cs} | 6 +- ...Properties.cs => DataVersionProperties.cs} | 12 +- .../src/Generated/Models/MLTableData.cs | 2 +- .../Generated/Models/UriFileDataVersion.cs | 2 +- .../Generated/Models/UriFolderDataVersion.cs | 2 +- .../DataVersionsRestOperations.cs | 30 ++--- .../src/autorest.md | 4 +- 17 files changed, 189 insertions(+), 188 deletions(-) rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/{DataVersionBaseCollection.cs => DataVersionCollection.cs} (64%) rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/{DataVersionBaseData.cs => DataVersionData.cs} (54%) rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/{DataVersionBaseResource.cs => DataVersionResource.cs} (70%) rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/{DataVersionBaseData.Serialization.cs => DataVersionData.Serialization.cs} (82%) rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/{DataVersionBaseProperties.Serialization.cs => DataVersionProperties.Serialization.cs} (94%) rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/{DataVersionBaseProperties.cs => DataVersionProperties.cs} (72%) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/CHANGELOG.md b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/CHANGELOG.md index cf70021f025f9..225b59884da5d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/CHANGELOG.md +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/CHANGELOG.md @@ -6,6 +6,7 @@ ### Breaking Changes +- Resource/Collection/Data `DataVersionBaseResource` `DataVersionBaseCollection` and `DataVersionBaseData` renamed to `DataVersionResource` `DataVersionCollection` and `DataVersionData`. - Base type of `MachineLearningComputeData` changed to `Azure.ResourceManager.Models.TrackedResourceData`. - Base type of `MachineLearningPrivateEndpointConnectionData` changed to `Azure.ResourceManager.Models.TrackedResourceData`. - Base type of `MachineLearningWorkspaceData` changed to `Azure.ResourceManager.Models.TrackedResourceData`. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs index 453b3c56d7039..883b93bead75a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs @@ -264,9 +264,9 @@ protected DataContainerResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDataVersionBase(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDataVersionBaseAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.DataVersionBaseCollection GetDataVersionBases() { throw null; } + public virtual Azure.Response GetDataVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.DataVersionCollection GetDataVersions() { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -306,39 +306,39 @@ protected DatastoreResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DatastoreData data, bool? skipValidation = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DatastoreData data, bool? skipValidation = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class DataVersionBaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DataVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected DataVersionBaseCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.DataVersionBaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.DataVersionBaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected DataVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.DataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.DataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class DataVersionBaseData : Azure.ResourceManager.Models.ResourceData + public partial class DataVersionData : Azure.ResourceManager.Models.ResourceData { - public DataVersionBaseData(Azure.ResourceManager.MachineLearning.Models.DataVersionBaseProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.DataVersionBaseProperties Properties { get { throw null; } set { } } + public DataVersionData(Azure.ResourceManager.MachineLearning.Models.DataVersionProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.DataVersionProperties Properties { get { throw null; } set { } } } - public partial class DataVersionBaseResource : Azure.ResourceManager.ArmResource + public partial class DataVersionResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected DataVersionBaseResource() { } - public virtual Azure.ResourceManager.MachineLearning.DataVersionBaseData Data { get { throw null; } } + protected DataVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.DataVersionData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DataVersionBaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DataVersionBaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class EnvironmentContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -473,7 +473,7 @@ public static partial class MachineLearningExtensions public static Azure.ResourceManager.MachineLearning.ComponentVersionResource GetComponentVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.DataContainerResource GetDataContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.DatastoreResource GetDatastoreResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.DataVersionBaseResource GetDataVersionBaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.DataVersionResource GetDataVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.EnvironmentContainerResource GetEnvironmentContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.EnvironmentVersionResource GetEnvironmentVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningComputeResource GetMachineLearningComputeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -1800,9 +1800,9 @@ public DatastoreSecrets() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.DataType left, Azure.ResourceManager.MachineLearning.Models.DataType right) { throw null; } public override string ToString() { throw null; } } - public partial class DataVersionBaseProperties : Azure.ResourceManager.MachineLearning.Models.AssetBase + public partial class DataVersionProperties : Azure.ResourceManager.MachineLearning.Models.AssetBase { - public DataVersionBaseProperties(System.Uri dataUri) { } + public DataVersionProperties(System.Uri dataUri) { } public System.Uri DataUri { get { throw null; } set { } } } public partial class DefaultScaleSettings : Azure.ResourceManager.MachineLearning.Models.OnlineScaleSettings @@ -2952,7 +2952,7 @@ public MLFlowModelJobOutput() { } public Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode? Mode { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } } - public partial class MLTableData : Azure.ResourceManager.MachineLearning.Models.DataVersionBaseProperties + public partial class MLTableData : Azure.ResourceManager.MachineLearning.Models.DataVersionProperties { public MLTableData(System.Uri dataUri) : base (default(System.Uri)) { } public System.Collections.Generic.IList ReferencedUris { get { throw null; } set { } } @@ -4358,7 +4358,7 @@ internal UpdateWorkspaceQuotas() { } public Azure.ResourceManager.MachineLearning.Models.QuotaUnit? Unit { get { throw null; } } public string UpdateWorkspaceQuotasType { get { throw null; } } } - public partial class UriFileDataVersion : Azure.ResourceManager.MachineLearning.Models.DataVersionBaseProperties + public partial class UriFileDataVersion : Azure.ResourceManager.MachineLearning.Models.DataVersionProperties { public UriFileDataVersion(System.Uri dataUri) : base (default(System.Uri)) { } } @@ -4374,7 +4374,7 @@ public UriFileJobOutput() { } public Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode? Mode { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } } - public partial class UriFolderDataVersion : Azure.ResourceManager.MachineLearning.Models.DataVersionBaseProperties + public partial class UriFolderDataVersion : Azure.ResourceManager.MachineLearning.Models.DataVersionProperties { public UriFolderDataVersion(System.Uri dataUri) : base (default(System.Uri)) { } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerResource.cs index 2d10eda693d5d..7ad4cb9cd28ce 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerResource.cs @@ -86,11 +86,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of DataVersionBaseResources in the DataContainer. - /// An object representing collection of DataVersionBaseResources and their operations over a DataVersionBaseResource. - public virtual DataVersionBaseCollection GetDataVersionBases() + /// Gets a collection of DataVersionResources in the DataContainer. + /// An object representing collection of DataVersionResources and their operations over a DataVersionResource. + public virtual DataVersionCollection GetDataVersions() { - return GetCachedClient(Client => new DataVersionBaseCollection(Client, Id)); + return GetCachedClient(Client => new DataVersionCollection(Client, Id)); } /// @@ -103,9 +103,9 @@ public virtual DataVersionBaseCollection GetDataVersionBases() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetDataVersionBaseAsync(string version, CancellationToken cancellationToken = default) + public virtual async Task> GetDataVersionAsync(string version, CancellationToken cancellationToken = default) { - return await GetDataVersionBases().GetAsync(version, cancellationToken).ConfigureAwait(false); + return await GetDataVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); } /// @@ -118,9 +118,9 @@ public virtual async Task> GetDataVersionBaseA /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetDataVersionBase(string version, CancellationToken cancellationToken = default) + public virtual Response GetDataVersion(string version, CancellationToken cancellationToken = default) { - return GetDataVersionBases().Get(version, cancellationToken); + return GetDataVersions().Get(version, cancellationToken); } /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionBaseCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionCollection.cs similarity index 64% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionBaseCollection.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionCollection.cs index ae916a899a60d..e145ce6a052bb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionBaseCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionCollection.cs @@ -21,28 +21,28 @@ namespace Azure.ResourceManager.MachineLearning { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDataVersionBases method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataVersions method from an instance of . /// - public partial class DataVersionBaseCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _dataVersionBaseDataVersionsClientDiagnostics; - private readonly DataVersionsRestOperations _dataVersionBaseDataVersionsRestClient; + private readonly ClientDiagnostics _dataVersionClientDiagnostics; + private readonly DataVersionsRestOperations _dataVersionRestClient; - /// Initializes a new instance of the class for mocking. - protected DataVersionBaseCollection() + /// Initializes a new instance of the class for mocking. + protected DataVersionCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal DataVersionBaseCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _dataVersionBaseDataVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", DataVersionBaseResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataVersionBaseResource.ResourceType, out string dataVersionBaseDataVersionsApiVersion); - _dataVersionBaseDataVersionsRestClient = new DataVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataVersionBaseDataVersionsApiVersion); + _dataVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", DataVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataVersionResource.ResourceType, out string dataVersionApiVersion); + _dataVersionRestClient = new DataVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataVersionApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -65,17 +65,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string version, DataVersionBaseData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string version, DataVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(version, nameof(version)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseCollection.CreateOrUpdate"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _dataVersionBaseDataVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionBaseResource(Client, response), response.GetRawResponse())); + var response = await _dataVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -98,17 +98,17 @@ public virtual async Task> CreateOrUpdateA /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string version, DataVersionBaseData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string version, DataVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(version, nameof(version)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseCollection.CreateOrUpdate"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.CreateOrUpdate"); scope.Start(); try { - var response = _dataVersionBaseDataVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionBaseResource(Client, response), response.GetRawResponse())); + var response = _dataVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -129,18 +129,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(version, nameof(version)); - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseCollection.Get"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.Get"); scope.Start(); try { - var response = await _dataVersionBaseDataVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + var response = await _dataVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataVersionBaseResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataVersionResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -158,18 +158,18 @@ public virtual async Task> GetAsync(string ver /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string version, CancellationToken cancellationToken = default) + public virtual Response Get(string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(version, nameof(version)); - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseCollection.Get"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.Get"); scope.Start(); try { - var response = _dataVersionBaseDataVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + var response = _dataVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataVersionBaseResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataVersionResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -192,17 +192,17 @@ public virtual Response Get(string version, Cancellatio /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, string tags = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, string tags = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseCollection.GetAll"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.GetAll"); scope.Start(); try { - var response = await _dataVersionBaseDataVersionsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DataVersionBaseResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _dataVersionRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new DataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -210,14 +210,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseCollection.GetAll"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.GetAll"); scope.Start(); try { - var response = await _dataVersionBaseDataVersionsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DataVersionBaseResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _dataVersionRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new DataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -242,17 +242,17 @@ async Task> NextPageFunc(string nextLink, int? pag /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, string tags = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, string tags = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseCollection.GetAll"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.GetAll"); scope.Start(); try { - var response = _dataVersionBaseDataVersionsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DataVersionBaseResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _dataVersionRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new DataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -260,14 +260,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseCollection.GetAll"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.GetAll"); scope.Start(); try { - var response = _dataVersionBaseDataVersionsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DataVersionBaseResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _dataVersionRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new DataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -291,11 +291,11 @@ public virtual async Task> ExistsAsync(string version, Cancellati { Argument.AssertNotNullOrEmpty(version, nameof(version)); - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseCollection.Exists"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.Exists"); scope.Start(); try { - var response = await _dataVersionBaseDataVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -318,11 +318,11 @@ public virtual Response Exists(string version, CancellationToken cancellat { Argument.AssertNotNullOrEmpty(version, nameof(version)); - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseCollection.Exists"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.Exists"); scope.Start(); try { - var response = _dataVersionBaseDataVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + var response = _dataVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -332,7 +332,7 @@ public virtual Response Exists(string version, CancellationToken cancellat } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -342,7 +342,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionBaseData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionData.cs similarity index 54% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionBaseData.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionData.cs index 1964b78f4db6e..17e51ac67819d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionBaseData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionData.cs @@ -12,17 +12,17 @@ namespace Azure.ResourceManager.MachineLearning { - /// A class representing the DataVersionBase data model. - public partial class DataVersionBaseData : ResourceData + /// A class representing the DataVersion data model. + public partial class DataVersionData : ResourceData { - /// Initializes a new instance of DataVersionBaseData. + /// Initializes a new instance of DataVersionData. /// /// [Required] Additional attributes of the entity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// /// is null. - public DataVersionBaseData(DataVersionBaseProperties properties) + public DataVersionData(DataVersionProperties properties) { if (properties == null) { @@ -32,26 +32,26 @@ public DataVersionBaseData(DataVersionBaseProperties properties) Properties = properties; } - /// Initializes a new instance of DataVersionBaseData. + /// Initializes a new instance of DataVersionData. /// The id. /// The name. /// The resourceType. /// The systemData. /// /// [Required] Additional attributes of the entity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - internal DataVersionBaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataVersionBaseProperties properties) : base(id, name, resourceType, systemData) + internal DataVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataVersionProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// /// [Required] Additional attributes of the entity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - public DataVersionBaseProperties Properties { get; set; } + public DataVersionProperties Properties { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionBaseResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionResource.cs similarity index 70% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionBaseResource.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionResource.cs index b06acf671e8b9..8ccd408982f82 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionBaseResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionResource.cs @@ -17,46 +17,46 @@ namespace Azure.ResourceManager.MachineLearning { /// - /// A Class representing a DataVersionBase along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDataVersionBaseResource method. - /// Otherwise you can get one from its parent resource using the GetDataVersionBase method. + /// A Class representing a DataVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataVersionResource method. + /// Otherwise you can get one from its parent resource using the GetDataVersion method. /// - public partial class DataVersionBaseResource : ArmResource + public partial class DataVersionResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _dataVersionBaseDataVersionsClientDiagnostics; - private readonly DataVersionsRestOperations _dataVersionBaseDataVersionsRestClient; - private readonly DataVersionBaseData _data; + private readonly ClientDiagnostics _dataVersionClientDiagnostics; + private readonly DataVersionsRestOperations _dataVersionRestClient; + private readonly DataVersionData _data; - /// Initializes a new instance of the class for mocking. - protected DataVersionBaseResource() + /// Initializes a new instance of the class for mocking. + protected DataVersionResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DataVersionBaseResource(ArmClient client, DataVersionBaseData data) : this(client, data.Id) + internal DataVersionResource(ArmClient client, DataVersionData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal DataVersionBaseResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _dataVersionBaseDataVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataVersionBaseDataVersionsApiVersion); - _dataVersionBaseDataVersionsRestClient = new DataVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataVersionBaseDataVersionsApiVersion); + _dataVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataVersionApiVersion); + _dataVersionRestClient = new DataVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataVersionApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -70,7 +70,7 @@ internal DataVersionBaseResource(ArmClient client, ResourceIdentifier id) : base /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DataVersionBaseData Data + public virtual DataVersionData Data { get { @@ -92,16 +92,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// Operation Id: DataVersions_Get /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseResource.Get"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Get"); scope.Start(); try { - var response = await _dataVersionBaseDataVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataVersionBaseResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataVersionResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -116,16 +116,16 @@ public virtual async Task> GetAsync(Cancellati /// Operation Id: DataVersions_Get /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseResource.Get"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Get"); scope.Start(); try { - var response = _dataVersionBaseDataVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dataVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataVersionBaseResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataVersionResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -143,11 +143,11 @@ public virtual Response Get(CancellationToken cancellat /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseResource.Delete"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Delete"); scope.Start(); try { - var response = await _dataVersionBaseDataVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataVersionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); var operation = new MachineLearningArmOperation(response); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); @@ -169,11 +169,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseResource.Delete"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Delete"); scope.Start(); try { - var response = _dataVersionBaseDataVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dataVersionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); var operation = new MachineLearningArmOperation(response); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); @@ -195,16 +195,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Version entity to create or update. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataVersionBaseData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseResource.Update"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Update"); scope.Start(); try { - var response = await _dataVersionBaseDataVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionBaseResource(Client, response), response.GetRawResponse())); + var response = await _dataVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -225,16 +225,16 @@ public virtual async Task> UpdateAsync(Wai /// Version entity to create or update. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataVersionBaseData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DataVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _dataVersionBaseDataVersionsClientDiagnostics.CreateScope("DataVersionBaseResource.Update"); + using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Update"); scope.Start(); try { - var response = _dataVersionBaseDataVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionBaseResource(Client, response), response.GetRawResponse())); + var response = _dataVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs index 39aeaef7749fa..9a4f58303c3c8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs @@ -434,20 +434,20 @@ public static DataContainerResource GetDataContainerResource(this ArmClient clie } #endregion - #region DataVersionBaseResource + #region DataVersionResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DataVersionBaseResource GetDataVersionBaseResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataVersionResource GetDataVersionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DataVersionBaseResource.ValidateResourceId(id); - return new DataVersionBaseResource(client, id); + DataVersionResource.ValidateResourceId(id); + return new DataVersionResource(client, id); } ); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.Serialization.cs index 8d9f249ff50c2..2445e509f21dd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.Serialization.cs @@ -17,7 +17,7 @@ internal partial class DataVersionBaseResourceArmPaginatedResult internal static DataVersionBaseResourceArmPaginatedResult DeserializeDataVersionBaseResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static DataVersionBaseResourceArmPaginatedResult DeserializeDataVersion property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DataVersionBaseData.DeserializeDataVersionBaseData(item)); + array.Add(DataVersionData.DeserializeDataVersionData(item)); } value = array; continue; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.cs index 6c92685f5c5da..789ac17e6962a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.cs @@ -17,13 +17,13 @@ internal partial class DataVersionBaseResourceArmPaginatedResult /// Initializes a new instance of DataVersionBaseResourceArmPaginatedResult. internal DataVersionBaseResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of DataVersionBaseResourceArmPaginatedResult. /// The link to the next page of DataVersionBase objects. If null, there are no additional pages. /// An array of objects of type DataVersionBase. - internal DataVersionBaseResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + internal DataVersionBaseResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; @@ -32,6 +32,6 @@ internal DataVersionBaseResourceArmPaginatedResult(string nextLink, IReadOnlyLis /// The link to the next page of DataVersionBase objects. If null, there are no additional pages. public string NextLink { get; } /// An array of objects of type DataVersionBase. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionData.Serialization.cs similarity index 82% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseData.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionData.Serialization.cs index 7a61fd846f2e0..6111721d00179 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.MachineLearning { - public partial class DataVersionBaseData : IUtf8JsonSerializable + public partial class DataVersionData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -22,9 +22,9 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static DataVersionBaseData DeserializeDataVersionBaseData(JsonElement element) + internal static DataVersionData DeserializeDataVersionData(JsonElement element) { - DataVersionBaseProperties properties = default; + DataVersionProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -33,7 +33,7 @@ internal static DataVersionBaseData DeserializeDataVersionBaseData(JsonElement e { if (property.NameEquals("properties")) { - properties = DataVersionBaseProperties.DeserializeDataVersionBaseProperties(property.Value); + properties = DataVersionProperties.DeserializeDataVersionProperties(property.Value); continue; } if (property.NameEquals("id")) @@ -62,7 +62,7 @@ internal static DataVersionBaseData DeserializeDataVersionBaseData(JsonElement e continue; } } - return new DataVersionBaseData(id, name, type, systemData.Value, properties); + return new DataVersionData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.Serialization.cs similarity index 94% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseProperties.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.Serialization.cs index 85b72d628af6e..4f99faaac800d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - public partial class DataVersionBaseProperties : IUtf8JsonSerializable + public partial class DataVersionProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -82,7 +82,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static DataVersionBaseProperties DeserializeDataVersionBaseProperties(JsonElement element) + internal static DataVersionProperties DeserializeDataVersionProperties(JsonElement element) { if (element.TryGetProperty("dataType", out JsonElement discriminator)) { @@ -187,7 +187,7 @@ internal static DataVersionBaseProperties DeserializeDataVersionBaseProperties(J continue; } } - return new DataVersionBaseProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri); + return new DataVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.cs similarity index 72% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseProperties.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.cs index df64171942c0f..2481acaa91c96 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// /// Data version base definition - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - public partial class DataVersionBaseProperties : AssetBase + public partial class DataVersionProperties : AssetBase { - /// Initializes a new instance of DataVersionBaseProperties. + /// Initializes a new instance of DataVersionProperties. /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType. /// is null. - public DataVersionBaseProperties(Uri dataUri) + public DataVersionProperties(Uri dataUri) { if (dataUri == null) { @@ -30,7 +30,7 @@ public DataVersionBaseProperties(Uri dataUri) DataUri = dataUri; } - /// Initializes a new instance of DataVersionBaseProperties. + /// Initializes a new instance of DataVersionProperties. /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. @@ -38,7 +38,7 @@ public DataVersionBaseProperties(Uri dataUri) /// Is the asset archived?. /// [Required] Specifies the type of data. /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType. - internal DataVersionBaseProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, DataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived) + internal DataVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, DataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived) { DataType = dataType; DataUri = dataUri; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableData.cs index 094149d9f7b1a..cd7ce2f7644c7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableData.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// MLTable data definition. - public partial class MLTableData : DataVersionBaseProperties + public partial class MLTableData : DataVersionProperties { /// Initializes a new instance of MLTableData. /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileDataVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileDataVersion.cs index 982a02dc4ceed..10d13fa3b7b57 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileDataVersion.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileDataVersion.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// uri-file data version entity. - public partial class UriFileDataVersion : DataVersionBaseProperties + public partial class UriFileDataVersion : DataVersionProperties { /// Initializes a new instance of UriFileDataVersion. /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderDataVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderDataVersion.cs index ba544ed7db5c5..3043412ea62ef 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderDataVersion.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderDataVersion.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// uri-folder data version entity. - public partial class UriFolderDataVersion : DataVersionBaseProperties + public partial class UriFolderDataVersion : DataVersionProperties { /// Initializes a new instance of UriFolderDataVersion. /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs index 3c72d096b8857..2e69704134124 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs @@ -273,7 +273,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -287,13 +287,13 @@ public async Task> GetAsync(string subscriptionId, { case 200: { - DataVersionBaseData value = default; + DataVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataVersionBaseData.DeserializeDataVersionBaseData(document.RootElement); + value = DataVersionData.DeserializeDataVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DataVersionBaseData)null, message.Response); + return Response.FromValue((DataVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -308,7 +308,7 @@ public async Task> GetAsync(string subscriptionId, /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -322,19 +322,19 @@ public Response Get(string subscriptionId, string resourceG { case 200: { - DataVersionBaseData value = default; + DataVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataVersionBaseData.DeserializeDataVersionBaseData(document.RootElement); + value = DataVersionData.DeserializeDataVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DataVersionBaseData)null, message.Response); + return Response.FromValue((DataVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, DataVersionBaseData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, DataVersionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -372,7 +372,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, DataVersionBaseData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, DataVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -388,9 +388,9 @@ public async Task> CreateOrUpdateAsync(string subs case 200: case 201: { - DataVersionBaseData value = default; + DataVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataVersionBaseData.DeserializeDataVersionBaseData(document.RootElement); + value = DataVersionData.DeserializeDataVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -408,7 +408,7 @@ public async Task> CreateOrUpdateAsync(string subs /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, DataVersionBaseData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, DataVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -424,9 +424,9 @@ public Response CreateOrUpdate(string subscriptionId, strin case 200: case 201: { - DataVersionBaseData value = default; + DataVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataVersionBaseData.DeserializeDataVersionBaseData(document.RootElement); + value = DataVersionData.DeserializeDataVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md index 248464472b483..c0cd5ed12af6c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md @@ -140,8 +140,8 @@ directive: $.DataContainer["x-ms-client-name"] = "DataContainerProperties"; $.DatastoreResource["x-ms-client-name"] = "Datastore"; $.Datastore["x-ms-client-name"] = "DatastoreProperties"; - $.DataVersionBaseResource["x-ms-client-name"] = "DataVersionBase"; - $.DataVersionBase["x-ms-client-name"] = "DataVersionBaseProperties"; + $.DataVersionBaseResource["x-ms-client-name"] = "DataVersion"; + $.DataVersionBase["x-ms-client-name"] = "DataVersionProperties"; $.EnvironmentContainerResource["x-ms-client-name"] = "EnvironmentContainer"; $.EnvironmentContainer["x-ms-client-name"] = "EnvironmentContainerProperties"; $.EnvironmentVersionResource["x-ms-client-name"] = "EnvironmentVersion";