// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.VideoAnalyzer
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// Extension methods for OperationResultsOperations.
    /// </summary>
    public static partial class OperationResultsOperationsExtensions
    {
            /// <summary>
            /// Get operation result.
            /// </summary>
            /// <remarks>
            /// Get private endpoint connection operation result.
            /// </remarks>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// The Video Analyzer account name.
            /// </param>
            /// <param name='name'>
            /// Private endpoint connection name.
            /// </param>
            /// <param name='operationId'>
            /// Operation Id.
            /// </param>
            public static PrivateEndpointConnection Get(this IOperationResultsOperations operations, string resourceGroupName, string accountName, string name, string operationId)
            {
                return operations.GetAsync(resourceGroupName, accountName, name, operationId).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Get operation result.
            /// </summary>
            /// <remarks>
            /// Get private endpoint connection operation result.
            /// </remarks>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// The Video Analyzer account name.
            /// </param>
            /// <param name='name'>
            /// Private endpoint connection name.
            /// </param>
            /// <param name='operationId'>
            /// Operation Id.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PrivateEndpointConnection> GetAsync(this IOperationResultsOperations operations, string resourceGroupName, string accountName, string name, string operationId, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, name, operationId, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

    }
}
