< Summary

Class:Azure.ResourceManager.Resources.Models.ManagementLockOwner
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ManagementLockOwner.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ManagementLockOwner.Serialization.cs
Covered lines:0
Uncovered lines:18
Coverable lines:18
Total lines:72
Line coverage:0% (0 of 18)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_ApplicationId()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeManagementLockOwner(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ManagementLockOwner.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.ResourceManager.Resources.Models
 9{
 10    /// <summary> Lock owner properties. </summary>
 11    public partial class ManagementLockOwner
 12    {
 13        /// <summary> Initializes a new instance of ManagementLockOwner. </summary>
 014        public ManagementLockOwner()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ManagementLockOwner. </summary>
 19        /// <param name="applicationId"> The application ID of the lock owner. </param>
 020        internal ManagementLockOwner(string applicationId)
 21        {
 022            ApplicationId = applicationId;
 023        }
 24
 25        /// <summary> The application ID of the lock owner. </summary>
 026        public string ApplicationId { get; set; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ManagementLockOwner.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.ResourceManager.Resources.Models
 12{
 13    public partial class ManagementLockOwner : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (ApplicationId != null)
 19            {
 020                writer.WritePropertyName("applicationId");
 021                writer.WriteStringValue(ApplicationId);
 22            }
 023            writer.WriteEndObject();
 024        }
 25
 26        internal static ManagementLockOwner DeserializeManagementLockOwner(JsonElement element)
 27        {
 028            string applicationId = default;
 029            foreach (var property in element.EnumerateObject())
 30            {
 031                if (property.NameEquals("applicationId"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    applicationId = property.Value.GetString();
 38                    continue;
 39                }
 40            }
 041            return new ManagementLockOwner(applicationId);
 42        }
 43    }
 44}