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 d08d9d1b8fb8d..a95349c11e7ed 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 @@ -543,7 +543,9 @@ protected MachineLearningDatastoreResource() { } 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 GetSecrets(Azure.ResourceManager.MachineLearning.Models.SecretExpiry body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSecretsAsync(Azure.ResourceManager.MachineLearning.Models.SecretExpiry body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1855,7 +1857,9 @@ protected MachineLearningWorkspaceConnectionCollection() { } public virtual System.Threading.Tasks.Task> ExistsAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAll(string target = null, string category = null, bool? includeAll = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string target = null, string category = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAllAsync(string target = null, string category = null, bool? includeAll = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string target = null, string category = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -5821,17 +5825,19 @@ public partial class MachineLearningComputeStartStopSchedule : System.ClientMode { public MachineLearningComputeStartStopSchedule() { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction? Action { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ComputeTriggerType? ComputeTriggerType { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.MachineLearning.Models.CronTrigger Cron { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.ComputeStartStopCronSchedule CronSchedule { get { throw null; } set { } } public string Id { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus? ProvisioningStatus { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public Azure.ResourceManager.MachineLearning.Models.ComputeRecurrenceFrequency Recurrence { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceTrigger Recurrence { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.ComputeStartStopRecurrenceSchedule RecurrenceSchedule { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleBase Schedule { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? Status { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ComputeTriggerType? TriggerType { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType? TriggerType { get { throw null; } } Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeStartStopSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeStartStopSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8741,6 +8747,24 @@ protected MachineLearningTriggerBase() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningTriggerType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningTriggerType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType Cron { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType Recurrence { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType right) { throw null; } + public override string ToString() { throw null; } + } public partial class MachineLearningTritonModelJobInput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MachineLearningTritonModelJobInput(System.Uri uri) { } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDatastoreCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDatastoreCollection.cs index 637372a916a21..ec2a715f351b4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDatastoreCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDatastoreCollection.cs @@ -1,9 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using System.Collections.Generic; -using System.Text; using System.Threading; using Azure.ResourceManager.MachineLearning.Models; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDatastoreResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDatastoreResource.cs new file mode 100644 index 0000000000000..4dc0f3e4beb1b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDatastoreResource.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningDatastore 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 GetMachineLearningDatastoreResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningDatastore method. + /// + public partial class MachineLearningDatastoreResource : ArmResource + { + /// + /// Get datastore secrets. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets + /// + /// + /// Operation Id + /// Datastores_ListSecrets + /// + /// + /// Default Api Version + /// 2024-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetSecretsAsync(CancellationToken cancellationToken = default) + { + var response = await GetSecretsAsync(null, cancellationToken).ConfigureAwait(false); + return response; + } + + /// + /// Get datastore secrets. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets + /// + /// + /// Operation Id + /// Datastores_ListSecrets + /// + /// + /// Default Api Version + /// 2024-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetSecrets(CancellationToken cancellationToken = default) => GetSecrets(null, cancellationToken); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceConnectionCollection.cs new file mode 100644 index 0000000000000..04a159e7aa829 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceConnectionCollection.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +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 GetMachineLearningWorkspaceConnections method from an instance of . + /// + public partial class MachineLearningWorkspaceConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + /// + /// Lists all the available machine learning workspaces connections under the specified workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections + /// + /// + /// Operation Id + /// WorkspaceConnections_List + /// + /// + /// Default Api Version + /// 2024-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Target of the workspace connection. + /// Category of the workspace connection. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string target = null, string category = null, CancellationToken cancellationToken = default) => GetAllAsync(target, category, null, cancellationToken); + + /// + /// Lists all the available machine learning workspaces connections under the specified workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections + /// + /// + /// Operation Id + /// WorkspaceConnections_List + /// + /// + /// Default Api Version + /// 2024-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Target of the workspace connection. + /// Category of the workspace connection. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string target = null, string category = null, CancellationToken cancellationToken = default) => GetAll(target, category, null, cancellationToken); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs index 82ba94d55d417..8bed8efd38c8e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs @@ -12,13 +12,24 @@ public partial class MachineLearningComputeStartStopSchedule { /// Required if triggerType is Recurrence. [EditorBrowsable(EditorBrowsableState.Never)] - public ComputeRecurrenceFrequency Recurrence + public MachineLearningRecurrenceTrigger Recurrence { get { - return new ComputeRecurrenceFrequency(RecurrenceSchedule.Frequency.Value.ToString()); + return new MachineLearningRecurrenceTrigger(new MachineLearningRecurrenceFrequency(RecurrenceSchedule.Frequency.Value.ToString()), RecurrenceSchedule.Interval.Value); } } + + /// Trigger Type for backward compatibility. + [EditorBrowsable(EditorBrowsableState.Never)] + public MachineLearningTriggerType? TriggerType + { + get + { + return new MachineLearningTriggerType(ComputeTriggerType.ToString()); + } + } + /// Required if triggerType is Cron. [EditorBrowsable(EditorBrowsableState.Never)] public CronTrigger Cron diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs index 445b375eb7efc..1bb32beecea87 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs @@ -487,17 +487,17 @@ public virtual NullableResponse GetI IEnumerator IEnumerable.GetEnumerator() { - return GetAll().GetEnumerator(); + return GetAll(null, null, null, default).GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { - return GetAll().GetEnumerator(); + return GetAll(null, null, null, default).GetEnumerator(); } IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + return GetAllAsync(null, null, null, cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs index bbca62bc9960e..f78366990ce2f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs @@ -66,7 +66,7 @@ internal MachineLearningComputeStartStopSchedule(string id, MachineLearningCompu ProvisioningStatus = provisioningStatus; Status = status; Action = action; - TriggerType = triggerType; + ComputeTriggerType = triggerType; RecurrenceSchedule = recurrenceSchedule; CronSchedule = cronSchedule; Schedule = schedule; @@ -82,7 +82,7 @@ internal MachineLearningComputeStartStopSchedule(string id, MachineLearningCompu /// [Required] The compute power action. public MachineLearningComputePowerAction? Action { get; set; } /// [Required] The schedule trigger type. - public ComputeTriggerType? TriggerType { get; set; } + public ComputeTriggerType? ComputeTriggerType { get; set; } /// Required if triggerType is Recurrence. public ComputeStartStopRecurrenceSchedule RecurrenceSchedule { get; set; } /// Required if triggerType is Cron. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerType.cs index be4c7025c4837..dbd3a9b86dc84 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerType.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// The MachineLearningTriggerType. - internal readonly partial struct MachineLearningTriggerType : IEquatable + public readonly partial struct MachineLearningTriggerType : IEquatable { private readonly string _value;