< Summary

Class:Azure.Analytics.Synapse.AccessControl.Models.RoleAssignmentDetails
Assembly:Azure.Analytics.Synapse.AccessControl
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\RoleAssignmentDetails.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\RoleAssignmentDetails.Serialization.cs
Covered lines:21
Uncovered lines:2
Coverable lines:23
Total lines:77
Line coverage:91.3% (21 of 23)
Covered branches:8
Total branches:8
Branch coverage:100% (8 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Id()-100%100%
get_RoleId()-100%100%
get_PrincipalId()-100%100%
DeserializeRoleAssignmentDetails(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\RoleAssignmentDetails.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8namespace Azure.Analytics.Synapse.AccessControl.Models
 9{
 10    /// <summary> Role Assignment response details. </summary>
 11    public partial class RoleAssignmentDetails
 12    {
 13        /// <summary> Initializes a new instance of RoleAssignmentDetails. </summary>
 014        internal RoleAssignmentDetails()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of RoleAssignmentDetails. </summary>
 19        /// <param name="id"> Role Assignment ID. </param>
 20        /// <param name="roleId"> Role ID of the Synapse Built-In Role. </param>
 21        /// <param name="principalId"> Object ID of the AAD principal or security-group. </param>
 18422        internal RoleAssignmentDetails(string id, string roleId, string principalId)
 23        {
 18424            Id = id;
 18425            RoleId = roleId;
 18426            PrincipalId = principalId;
 18427        }
 28
 29        /// <summary> Role Assignment ID. </summary>
 18430        public string Id { get; }
 31        /// <summary> Role ID of the Synapse Built-In Role. </summary>
 12432        public string RoleId { get; }
 33        /// <summary> Object ID of the AAD principal or security-group. </summary>
 18434        public string PrincipalId { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\RoleAssignmentDetails.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.Analytics.Synapse.AccessControl.Models
 12{
 13    public partial class RoleAssignmentDetails
 14    {
 15        internal static RoleAssignmentDetails DeserializeRoleAssignmentDetails(JsonElement element)
 16        {
 18417            Optional<string> id = default;
 18418            Optional<string> roleId = default;
 18419            Optional<string> principalId = default;
 147220            foreach (var property in element.EnumerateObject())
 21            {
 55222                if (property.NameEquals("id"))
 23                {
 18424                    id = property.Value.GetString();
 18425                    continue;
 26                }
 36827                if (property.NameEquals("roleId"))
 28                {
 18429                    roleId = property.Value.GetString();
 18430                    continue;
 31                }
 18432                if (property.NameEquals("principalId"))
 33                {
 18434                    principalId = property.Value.GetString();
 35                    continue;
 36                }
 37            }
 18438            return new RoleAssignmentDetails(id.Value, roleId.Value, principalId.Value);
 39        }
 40    }
 41}