Skip to content

Commit b2f6da1

Browse files
Polish machinelearning (Azure#32665)
* show serialized names * setp one * a few update * update * final polish * fix compilation error
1 parent e35791a commit b2f6da1

File tree

1,382 files changed

+65981
-55759
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,382 files changed

+65981
-55759
lines changed

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs

Lines changed: 3081 additions & 3101 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System.Text.Json;
7+
using Azure.Core;
8+
9+
namespace Azure.ResourceManager.MachineLearning.Models
10+
{
11+
public partial class MachineLearningPartialManagedServiceIdentity : IUtf8JsonSerializable
12+
{
13+
void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
14+
{
15+
writer.WriteStartObject();
16+
if (Optional.IsDefined(ManagedServiceIdentityType))
17+
{
18+
writer.WritePropertyName("type");
19+
writer.WriteStringValue(ManagedServiceIdentityType.Value.ToString());
20+
}
21+
if (Optional.IsCollectionDefined(UserAssignedIdentities))
22+
{
23+
writer.WritePropertyName("userAssignedIdentities");
24+
writer.WriteStartObject();
25+
foreach (var item in UserAssignedIdentities)
26+
{
27+
writer.WritePropertyName(item.Key);
28+
#if NET6_0_OR_GREATER
29+
writer.WriteRawValue(item.Value);
30+
#else
31+
JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement);
32+
#endif
33+
}
34+
writer.WriteEndObject();
35+
}
36+
writer.WriteEndObject();
37+
}
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using System.Collections.Generic;
8+
using Azure.Core;
9+
10+
[assembly:CodeGenSuppressType("MachineLearningPartialManagedServiceIdentity")]
11+
namespace Azure.ResourceManager.MachineLearning.Models
12+
{
13+
/// <summary>
14+
/// Managed service identity (system assigned and/or user assigned identities)
15+
/// </summary>
16+
public partial class MachineLearningPartialManagedServiceIdentity
17+
{
18+
/// <summary> Initializes a new instance of PartialManagedServiceIdentity. </summary>
19+
public MachineLearningPartialManagedServiceIdentity()
20+
{
21+
UserAssignedIdentities = new ChangeTrackingDictionary<string, BinaryData>();
22+
}
23+
24+
/// <summary>
25+
/// Managed service identity (system assigned and/or user assigned identities)
26+
/// Serialized Name: PartialManagedServiceIdentity.type
27+
/// </summary>
28+
public Azure.ResourceManager.Models.ManagedServiceIdentityType? ManagedServiceIdentityType { get; set; }
29+
/// <summary>
30+
/// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: &apos;/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.
31+
/// Serialized Name: PartialManagedServiceIdentity.userAssignedIdentities
32+
/// <para>
33+
/// To assign an object to the value of this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
34+
/// </para>
35+
/// <para>
36+
/// To assign an already formated json string to this property use <see cref="BinaryData.FromString(string)"/>.
37+
/// </para>
38+
/// <para>
39+
/// Examples:
40+
/// <list type="bullet">
41+
/// <item>
42+
/// <term>BinaryData.FromObjectAsJson("foo")</term>
43+
/// <description>Creates a payload of "foo".</description>
44+
/// </item>
45+
/// <item>
46+
/// <term>BinaryData.FromString("\"foo\"")</term>
47+
/// <description>Creates a payload of "foo".</description>
48+
/// </item>
49+
/// <item>
50+
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
51+
/// <description>Creates a payload of { "key": "value" }.</description>
52+
/// </item>
53+
/// <item>
54+
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
55+
/// <description>Creates a payload of { "key": "value" }.</description>
56+
/// </item>
57+
/// </list>
58+
/// </para>
59+
/// </summary>
60+
public IDictionary<string, BinaryData> UserAssignedIdentities { get; }
61+
}
62+
}

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchDeploymentCollection.cs

Lines changed: 0 additions & 339 deletions
This file was deleted.

sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchDeploymentData.cs

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)