< Summary

Class:Azure.ResourceManager.KeyVault.Models.PrivateLinkServiceConnectionState
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\PrivateLinkServiceConnectionState.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\PrivateLinkServiceConnectionState.Serialization.cs
Covered lines:0
Uncovered lines:35
Coverable lines:35
Total lines:98
Line coverage:0% (0 of 35)
Covered branches:0
Total branches:14
Branch coverage:0% (0 of 14)

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\keyvault\Azure.ResourceManager.KeyVault\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.KeyVault.Models
 9{
 10    /// <summary> An object that represents the approval state of the private link connection. </summary>
 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 or removed by the key vau
 20        /// <param name="description"> The reason for approval or rejection. </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 or removed by the key vault owner. </
 030        public PrivateEndpointServiceConnectionStatus? Status { get; set; }
 31        /// <summary> The reason for approval or rejection. </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\keyvault\Azure.ResourceManager.KeyVault\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.KeyVault.Models
 12{
 13    public partial class PrivateLinkServiceConnectionState : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Optional.IsDefined(Status))
 19            {
 020                writer.WritePropertyName("status");
 021                writer.WriteStringValue(Status.Value.ToString());
 22            }
 023            if (Optional.IsDefined(Description))
 24            {
 025                writer.WritePropertyName("description");
 026                writer.WriteStringValue(Description);
 27            }
 028            if (Optional.IsDefined(ActionRequired))
 29            {
 030                writer.WritePropertyName("actionRequired");
 031                writer.WriteStringValue(ActionRequired);
 32            }
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static PrivateLinkServiceConnectionState DeserializePrivateLinkServiceConnectionState(JsonElement eleme
 37        {
 038            Optional<PrivateEndpointServiceConnectionStatus> status = default;
 039            Optional<string> description = default;
 040            Optional<string> actionRequired = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("status"))
 44                {
 045                    status = new PrivateEndpointServiceConnectionStatus(property.Value.GetString());
 046                    continue;
 47                }
 048                if (property.NameEquals("description"))
 49                {
 050                    description = property.Value.GetString();
 051                    continue;
 52                }
 053                if (property.NameEquals("actionRequired"))
 54                {
 055                    actionRequired = property.Value.GetString();
 56                    continue;
 57                }
 58            }
 059            return new PrivateLinkServiceConnectionState(Optional.ToNullable(status), description.Value, actionRequired.
 60        }
 61    }
 62}