< Summary

Class:Azure.ResourceManager.Storage.Models.PrivateLinkServiceConnectionState
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\PrivateLinkServiceConnectionState.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\PrivateLinkServiceConnectionState.Serialization.cs
Covered lines:0
Uncovered lines:38
Coverable lines:38
Total lines:110
Line coverage:0% (0 of 38)
Covered branches:0
Total branches:20
Branch coverage:0% (0 of 20)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Status()-0%100%
get_Description()-0%100%
get_ActionRequired()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePrivateLinkServiceConnectionState(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\PrivateLinkServiceConnectionState.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.Storage.Models
 9{
 10    /// <summary> A collection of information about the state of the connection between service consumer and provider. <
 11    public partial class PrivateLinkServiceConnectionState
 12    {
 13        /// <summary> Initializes a new instance of PrivateLinkServiceConnectionState. </summary>
 014        public PrivateLinkServiceConnectionState()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of PrivateLinkServiceConnectionState. </summary>
 19        /// <param name="status"> Indicates whether the connection has been Approved/Rejected/Removed by the owner of th
 20        /// <param name="description"> The reason for approval/rejection of the connection. </param>
 21        /// <param name="actionRequired"> A message indicating if changes on the service provider require any updates on
 022        internal PrivateLinkServiceConnectionState(PrivateEndpointServiceConnectionStatus? status, string description, s
 23        {
 024            Status = status;
 025            Description = description;
 026            ActionRequired = actionRequired;
 027        }
 28
 29        /// <summary> Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. <
 030        public PrivateEndpointServiceConnectionStatus? Status { get; set; }
 31        /// <summary> The reason for approval/rejection of the connection. </summary>
 032        public string Description { get; set; }
 33        /// <summary> A message indicating if changes on the service provider require any updates on the consumer. </sum
 034        public string ActionRequired { get; set; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\PrivateLinkServiceConnectionState.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.Storage.Models
 12{
 13    public partial class PrivateLinkServiceConnectionState : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Status != null)
 19            {
 020                writer.WritePropertyName("status");
 021                writer.WriteStringValue(Status.Value.ToString());
 22            }
 023            if (Description != null)
 24            {
 025                writer.WritePropertyName("description");
 026                writer.WriteStringValue(Description);
 27            }
 028            if (ActionRequired != null)
 29            {
 030                writer.WritePropertyName("actionRequired");
 031                writer.WriteStringValue(ActionRequired);
 32            }
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static PrivateLinkServiceConnectionState DeserializePrivateLinkServiceConnectionState(JsonElement eleme
 37        {
 038            PrivateEndpointServiceConnectionStatus? status = default;
 039            string description = default;
 040            string actionRequired = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("status"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    status = new PrivateEndpointServiceConnectionStatus(property.Value.GetString());
 050                    continue;
 51                }
 052                if (property.NameEquals("description"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    description = property.Value.GetString();
 059                    continue;
 60                }
 061                if (property.NameEquals("actionRequired"))
 62                {
 063                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 067                    actionRequired = property.Value.GetString();
 68                    continue;
 69                }
 70            }
 071            return new PrivateLinkServiceConnectionState(status, description, actionRequired);
 72        }
 73    }
 74}