< Summary

Class:Azure.ResourceManager.AppConfiguration.PrivateEndpointConnectionsCreateOrUpdateOperation
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\PrivateEndpointConnectionsCreateOrUpdateOperation.cs
Covered lines:8
Uncovered lines:14
Coverable lines:22
Total lines:80
Line coverage:36.3% (8 of 22)
Covered branches:1
Total branches:4
Branch coverage:25% (1 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_Id()-0%100%
get_Value()-0%100%
get_HasCompleted()-0%100%
get_HasValue()-0%100%
GetRawResponse()-0%100%
UpdateStatus(...)-0%100%
UpdateStatusAsync(...)-0%100%
WaitForCompletionAsync(...)-0%100%
WaitForCompletionAsync(...)-100%100%
Azure.Core.IOperationSource<Azure.ResourceManager.AppConfiguration.Models.PrivateEndpointConnection>.CreateResult(...)-0%0%
Azure-Core-IOperationSource<Azure-ResourceManager-AppConfiguration-Models-PrivateEndpointConnection>-CreateResultAsync()-80%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\PrivateEndpointConnectionsCreateOrUpdateOperation.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;
 9using System.Text.Json;
 10using System.Threading;
 11using System.Threading.Tasks;
 12using Azure;
 13using Azure.Core;
 14using Azure.Core.Pipeline;
 15using Azure.ResourceManager.AppConfiguration.Models;
 16
 17namespace Azure.ResourceManager.AppConfiguration
 18{
 19    /// <summary> Update the state of the specified private endpoint connection associated with the configuration store.
 20    public partial class PrivateEndpointConnectionsCreateOrUpdateOperation : Operation<PrivateEndpointConnection>, IOper
 21    {
 22        private readonly ArmOperationHelpers<PrivateEndpointConnection> _operation;
 423        internal PrivateEndpointConnectionsCreateOrUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pip
 24        {
 425            _operation = new ArmOperationHelpers<PrivateEndpointConnection>(this, clientDiagnostics, pipeline, request, 
 426        }
 27        /// <inheritdoc />
 028        public override string Id => _operation.Id;
 29
 30        /// <inheritdoc />
 031        public override PrivateEndpointConnection Value => _operation.Value;
 32
 33        /// <inheritdoc />
 034        public override bool HasCompleted => _operation.HasCompleted;
 35
 36        /// <inheritdoc />
 037        public override bool HasValue => _operation.HasValue;
 38
 39        /// <inheritdoc />
 040        public override Response GetRawResponse() => _operation.GetRawResponse();
 41
 42        /// <inheritdoc />
 043        public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(
 44
 45        /// <inheritdoc />
 046        public override ValueTask<Response> UpdateStatusAsync(CancellationToken cancellationToken = default) => _operati
 47
 48        /// <inheritdoc />
 049        public override ValueTask<Response<PrivateEndpointConnection>> WaitForCompletionAsync(CancellationToken cancella
 50
 51        /// <inheritdoc />
 452        public override ValueTask<Response<PrivateEndpointConnection>> WaitForCompletionAsync(TimeSpan pollingInterval, 
 53
 54        PrivateEndpointConnection IOperationSource<PrivateEndpointConnection>.CreateResult(Response response, Cancellati
 55        {
 056            using var document = JsonDocument.Parse(response.ContentStream);
 057            if (document.RootElement.ValueKind == JsonValueKind.Null)
 58            {
 059                return null;
 60            }
 61            else
 62            {
 063                return PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement);
 64            }
 065        }
 66
 67        async ValueTask<PrivateEndpointConnection> IOperationSource<PrivateEndpointConnection>.CreateResultAsync(Respons
 68        {
 469            using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).Confi
 470            if (document.RootElement.ValueKind == JsonValueKind.Null)
 71            {
 072                return null;
 73            }
 74            else
 75            {
 476                return PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement);
 77            }
 478        }
 79    }
 80}