Skip to content

Commit

Permalink
fixing backward compatability issues
Browse files Browse the repository at this point in the history
  • Loading branch information
achauhan-scc committed Aug 21, 2024
1 parent b54bbbe commit 47bd5ed
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,9 @@ protected MachineLearningDatastoreResource() { }
public virtual Azure.Response<Azure.ResourceManager.MachineLearning.MachineLearningDatastoreResource> Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.MachineLearning.MachineLearningDatastoreResource>> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreSecrets> GetSecrets(Azure.ResourceManager.MachineLearning.Models.SecretExpiry body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreSecrets> GetSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreSecrets>> GetSecretsAsync(Azure.ResourceManager.MachineLearning.Models.SecretExpiry body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreSecrets>> GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
void System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
Expand Down Expand Up @@ -1855,7 +1857,9 @@ protected MachineLearningWorkspaceConnectionCollection() { }
public virtual System.Threading.Tasks.Task<Azure.Response<bool>> ExistsAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionResource> Get(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Pageable<Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionResource> 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<Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionResource> GetAll(string target = null, string category = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.AsyncPageable<Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionResource> 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<Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionResource> GetAllAsync(string target = null, string category = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionResource>> GetAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.NullableResponse<Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionResource> GetIfExists(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionResource>> GetIfExistsAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand Down Expand Up @@ -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<Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeStartStopSchedule>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
void System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeStartStopSchedule>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeStartStopSchedule System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeStartStopSchedule>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
Expand Down Expand Up @@ -8741,6 +8747,24 @@ protected MachineLearningTriggerBase() { }
string System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct MachineLearningTriggerType : System.IEquatable<Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType>
{
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<Azure.ResourceManager.MachineLearning.Models.MachineLearningTritonModelJobInput>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.MachineLearning.Models.MachineLearningTritonModelJobInput>
{
public MachineLearningTritonModelJobInput(System.Uri uri) { }
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
/// <summary>
/// A Class representing a MachineLearningDatastore along with the instance operations that can be performed on it.
/// If you have a <see cref="ResourceIdentifier"/> you can construct a <see cref="MachineLearningDatastoreResource"/>
/// from an instance of <see cref="ArmClient"/> using the GetMachineLearningDatastoreResource method.
/// Otherwise you can get one from its parent resource <see cref="MachineLearningWorkspaceResource"/> using the GetMachineLearningDatastore method.
/// </summary>
public partial class MachineLearningDatastoreResource : ArmResource
{
/// <summary>
/// Get datastore secrets.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Datastores_ListSecrets</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2024-07-01-preview</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="MachineLearningDatastoreResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="cancellationToken"> The cancellation token to use. </param>
public virtual async Task<Response<MachineLearningDatastoreSecrets>> GetSecretsAsync(CancellationToken cancellationToken = default)
{
var response = await GetSecretsAsync(null, cancellationToken).ConfigureAwait(false);
return response;
}

/// <summary>
/// Get datastore secrets.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Datastores_ListSecrets</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2024-07-01-preview</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="MachineLearningDatastoreResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="cancellationToken"> The cancellation token to use. </param>
public virtual Response<MachineLearningDatastoreSecrets> GetSecrets(CancellationToken cancellationToken = default) => GetSecrets(null, cancellationToken);
}
}
Original file line number Diff line number Diff line change
@@ -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
{
/// <summary>
/// A class representing a collection of <see cref="MachineLearningWorkspaceConnectionResource"/> and their operations.
/// Each <see cref="MachineLearningWorkspaceConnectionResource"/> in the collection will belong to the same instance of <see cref="MachineLearningWorkspaceResource"/>.
/// To get a <see cref="MachineLearningWorkspaceConnectionCollection"/> instance call the GetMachineLearningWorkspaceConnections method from an instance of <see cref="MachineLearningWorkspaceResource"/>.
/// </summary>
public partial class MachineLearningWorkspaceConnectionCollection : ArmCollection, IEnumerable<MachineLearningWorkspaceConnectionResource>, IAsyncEnumerable<MachineLearningWorkspaceConnectionResource>
{
/// <summary>
/// Lists all the available machine learning workspaces connections under the specified workspace.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>WorkspaceConnections_List</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2024-07-01-preview</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="MachineLearningWorkspaceConnectionResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="target"> Target of the workspace connection. </param>
/// <param name="category"> Category of the workspace connection. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> An async collection of <see cref="MachineLearningWorkspaceConnectionResource"/> that may take multiple service requests to iterate over. </returns>
public virtual AsyncPageable<MachineLearningWorkspaceConnectionResource> GetAllAsync(string target = null, string category = null, CancellationToken cancellationToken = default) => GetAllAsync(target, category, null, cancellationToken);

/// <summary>
/// Lists all the available machine learning workspaces connections under the specified workspace.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>WorkspaceConnections_List</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2024-07-01-preview</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="MachineLearningWorkspaceConnectionResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="target"> Target of the workspace connection. </param>
/// <param name="category"> Category of the workspace connection. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> A collection of <see cref="MachineLearningWorkspaceConnectionResource"/> that may take multiple service requests to iterate over. </returns>
public virtual Pageable<MachineLearningWorkspaceConnectionResource> GetAll(string target = null, string category = null, CancellationToken cancellationToken = default) => GetAll(target, category, null, cancellationToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,24 @@ public partial class MachineLearningComputeStartStopSchedule
{
/// <summary> Required if triggerType is Recurrence. </summary>
[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);
}
}

/// <summary> Trigger Type for backward compatibility. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public MachineLearningTriggerType? TriggerType
{
get
{
return new MachineLearningTriggerType(ComputeTriggerType.ToString());

Check failure on line 29 in sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs

View check run for this annotation

Azure Pipelines / net - machinelearningservices - mgmt - ci (Build Analyze)

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs#L29

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs(29,55): Error CS0120: An object reference is required for the non-static field, method, or property 'ComputeTriggerType.ToString()'

Check failure on line 29 in sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs

View check run for this annotation

Azure Pipelines / net - machinelearningservices - mgmt - ci (Build Analyze)

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs#L29

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs(29,55): Error CS0120: An object reference is required for the non-static field, method, or property 'ComputeTriggerType.ToString()'

Check failure on line 29 in sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs

View check run for this annotation

Azure Pipelines / net - machinelearningservices - mgmt - ci

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs#L29

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs(29,55): Error CS0120: An object reference is required for the non-static field, method, or property 'ComputeTriggerType.ToString()'

Check failure on line 29 in sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs

View check run for this annotation

Azure Pipelines / net - machinelearningservices - mgmt - ci

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs#L29

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs(29,55): Error CS0120: An object reference is required for the non-static field, method, or property 'ComputeTriggerType.ToString()'
}
}

/// <summary> Required if triggerType is Cron. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public CronTrigger Cron
Expand Down
Loading

0 comments on commit 47bd5ed

Please sign in to comment.