Skip to content

Commit

Permalink
Polish machinelearning (Azure#32665)
Browse files Browse the repository at this point in the history
* show serialized names

* setp one

* a few update

* update

* final polish

* fix compilation error
  • Loading branch information
ArcturusZhang authored and sofiar-msft committed Dec 7, 2022
1 parent a952fba commit c26e657
Show file tree
Hide file tree
Showing 1,382 changed files with 65,981 additions and 55,759 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.MachineLearning.Models
{
public partial class MachineLearningPartialManagedServiceIdentity : IUtf8JsonSerializable
{
void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
{
writer.WriteStartObject();
if (Optional.IsDefined(ManagedServiceIdentityType))
{
writer.WritePropertyName("type");
writer.WriteStringValue(ManagedServiceIdentityType.Value.ToString());
}
if (Optional.IsCollectionDefined(UserAssignedIdentities))
{
writer.WritePropertyName("userAssignedIdentities");
writer.WriteStartObject();
foreach (var item in UserAssignedIdentities)
{
writer.WritePropertyName(item.Key);
#if NET6_0_OR_GREATER
writer.WriteRawValue(item.Value);
#else
JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement);
#endif
}
writer.WriteEndObject();
}
writer.WriteEndObject();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Collections.Generic;
using Azure.Core;

[assembly:CodeGenSuppressType("MachineLearningPartialManagedServiceIdentity")]
namespace Azure.ResourceManager.MachineLearning.Models
{
/// <summary>
/// Managed service identity (system assigned and/or user assigned identities)
/// </summary>
public partial class MachineLearningPartialManagedServiceIdentity
{
/// <summary> Initializes a new instance of PartialManagedServiceIdentity. </summary>
public MachineLearningPartialManagedServiceIdentity()
{
UserAssignedIdentities = new ChangeTrackingDictionary<string, BinaryData>();
}

/// <summary>
/// Managed service identity (system assigned and/or user assigned identities)
/// Serialized Name: PartialManagedServiceIdentity.type
/// </summary>
public Azure.ResourceManager.Models.ManagedServiceIdentityType? ManagedServiceIdentityType { get; set; }
/// <summary>
/// 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.
/// Serialized Name: PartialManagedServiceIdentity.userAssignedIdentities
/// <para>
/// To assign an object to the value of this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
/// </para>
/// <para>
/// To assign an already formated json string to this property use <see cref="BinaryData.FromString(string)"/>.
/// </para>
/// <para>
/// Examples:
/// <list type="bullet">
/// <item>
/// <term>BinaryData.FromObjectAsJson("foo")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("\"foo\"")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// </list>
/// </para>
/// </summary>
public IDictionary<string, BinaryData> UserAssignedIdentities { get; }
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit c26e657

Please sign in to comment.