Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish machinelearning #32665

Merged
merged 6 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  

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