text:
using gax = Google.Api.Gax;
using gaxgrpc = Google.Api.Gax.Grpc;
using lro = Google.LongRunning;
using proto = Google.Protobuf;
using grpccore = Grpc.Core;
using grpcinter = Grpc.Core.Interceptors;
using mel = Microsoft.Extensions.Logging;
using sys = System;
using sc = System.Collections;
using scg = System.Collections.Generic;
using sco = System.Collections.ObjectModel;
using st = System.Threading;
using stt = System.Threading.Tasks;

namespace Google.Cloud.Compute.V1
{
    /// Settings for <see cref="TargetVpnGatewaysClient"/> instances.
    public sealed partial class TargetVpnGatewaysSettings : gaxgrpc::ServiceSettingsBase
    {
        /// Get a new instance of the default <see cref="TargetVpnGatewaysSettings"/>.
        /// <returns>A new instance of the default <see cref="TargetVpnGatewaysSettings"/>.</returns>
        public static TargetVpnGatewaysSettings GetDefault() => new TargetVpnGatewaysSettings();

        /// Constructs a new <see cref="TargetVpnGatewaysSettings"/> object with default settings.
        public TargetVpnGatewaysSettings()
        {
        }

        private TargetVpnGatewaysSettings(TargetVpnGatewaysSettings existing) : base(existing)
        {
            gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
            AggregatedListSettings = existing.AggregatedListSettings;
            DeleteSettings = existing.DeleteSettings;
            DeleteOperationsSettings = existing.DeleteOperationsSettings.Clone();
            GetSettings = existing.GetSettings;
            InsertSettings = existing.InsertSettings;
            InsertOperationsSettings = existing.InsertOperationsSettings.Clone();
            ListSettings = existing.ListSettings;
            SetLabelsSettings = existing.SetLabelsSettings;
            SetLabelsOperationsSettings = existing.SetLabelsOperationsSettings.Clone();
            OnCopy(existing);
        }

        partial void OnCopy(TargetVpnGatewaysSettings existing);

        ///
        /// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to
        /// <c>TargetVpnGatewaysClient.AggregatedList</c> and <c>TargetVpnGatewaysClient.AggregatedListAsync</c>.
        ///
        /// <remarks>
        /// <list type="bullet">
        /// <item><description>Initial retry delay: 100 milliseconds.</description></item>
        /// <item><description>Retry delay multiplier: 1.3</description></item>
        /// <item><description>Retry maximum delay: 60000 milliseconds.</description></item>
        /// <item><description>Maximum attempts: Unlimited</description></item>
        /// <item>
        /// <description>
        /// Retriable status codes: <see cref="grpccore::StatusCode.DeadlineExceeded"/>,
        /// <see cref="grpccore::StatusCode.Unavailable"/>.
        /// </description>
        /// </item>
        /// <item><description>Timeout: 600 seconds.</description></item>
        /// </list>
        /// </remarks>
        public gaxgrpc::CallSettings AggregatedListSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.DeadlineExceeded, grpccore::StatusCode.Unavailable)));

        ///
        /// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to
        /// <c>TargetVpnGatewaysClient.Delete</c> and <c>TargetVpnGatewaysClient.DeleteAsync</c>.
        ///
        /// <remarks>
        /// <list type="bullet">
        /// <item><description>This call will not be retried.</description></item>
        /// <item><description>Timeout: 600 seconds.</description></item>
        /// </list>
        /// </remarks>
        public gaxgrpc::CallSettings DeleteSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000)));

        ///
        /// Long Running Operation settings for calls to <c>TargetVpnGatewaysClient.Delete</c> and
        /// <c>TargetVpnGatewaysClient.DeleteAsync</c>.
        ///
        /// <remarks>
        /// Uses default <see cref="gax::PollSettings"/> of:
        /// <list type="bullet">
        /// <item><description>Initial delay: 20 seconds.</description></item>
        /// <item><description>Delay multiplier: 1.5</description></item>
        /// <item><description>Maximum delay: 45 seconds.</description></item>
        /// <item><description>Total timeout: 24 hours.</description></item>
        /// </list>
        /// </remarks>
        public lro::OperationsSettings DeleteOperationsSettings { get; set; } = new lro::OperationsSettings
        {
            DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)),
        };

        ///
        /// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to <c>TargetVpnGatewaysClient.Get</c>
        ///  and <c>TargetVpnGatewaysClient.GetAsync</c>.
        ///
        /// <remarks>
        /// <list type="bullet">
        /// <item><description>Initial retry delay: 100 milliseconds.</description></item>
        /// <item><description>Retry delay multiplier: 1.3</description></item>
        /// <item><description>Retry maximum delay: 60000 milliseconds.</description></item>
        /// <item><description>Maximum attempts: Unlimited</description></item>
        /// <item>
        /// <description>
        /// Retriable status codes: <see cref="grpccore::StatusCode.DeadlineExceeded"/>,
        /// <see cref="grpccore::StatusCode.Unavailable"/>.
        /// </description>
        /// </item>
        /// <item><description>Timeout: 600 seconds.</description></item>
        /// </list>
        /// </remarks>
        public gaxgrpc::CallSettings GetSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.DeadlineExceeded, grpccore::StatusCode.Unavailable)));

        ///
        /// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to
        /// <c>TargetVpnGatewaysClient.Insert</c> and <c>TargetVpnGatewaysClient.InsertAsync</c>.
        ///
        /// <remarks>
        /// <list type="bullet">
        /// <item><description>This call will not be retried.</description></item>
        /// <item><description>Timeout: 600 seconds.</description></item>
        /// </list>
        /// </remarks>
        public gaxgrpc::CallSettings InsertSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000)));

        ///
        /// Long Running Operation settings for calls to <c>TargetVpnGatewaysClient.Insert</c> and
        /// <c>TargetVpnGatewaysClient.InsertAsync</c>.
        ///
        /// <remarks>
        /// Uses default <see cref="gax::PollSettings"/> of:
        /// <list type="bullet">
        /// <item><description>Initial delay: 20 seconds.</description></item>
        /// <item><description>Delay multiplier: 1.5</description></item>
        /// <item><description>Maximum delay: 45 seconds.</description></item>
        /// <item><description>Total timeout: 24 hours.</description></item>
        /// </list>
        /// </remarks>
        public lro::OperationsSettings InsertOperationsSettings { get; set; } = new lro::OperationsSettings
        {
            DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)),
        };

        ///
        /// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to
        /// <c>TargetVpnGatewaysClient.List</c> and <c>TargetVpnGatewaysClient.ListAsync</c>.
        ///
        /// <remarks>
        /// <list type="bullet">
        /// <item><description>Initial retry delay: 100 milliseconds.</description></item>
        /// <item><description>Retry delay multiplier: 1.3</description></item>
        /// <item><description>Retry maximum delay: 60000 milliseconds.</description></item>
        /// <item><description>Maximum attempts: Unlimited</description></item>
        /// <item>
        /// <description>
        /// Retriable status codes: <see cref="grpccore::StatusCode.DeadlineExceeded"/>,
        /// <see cref="grpccore::StatusCode.Unavailable"/>.
        /// </description>
        /// </item>
        /// <item><description>Timeout: 600 seconds.</description></item>
        /// </list>
        /// </remarks>
        public gaxgrpc::CallSettings ListSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.DeadlineExceeded, grpccore::StatusCode.Unavailable)));

        ///
        /// <see cref="gaxgrpc::CallSettings"/> for synchronous and asynchronous calls to
        /// <c>TargetVpnGatewaysClient.SetLabels</c> and <c>TargetVpnGatewaysClient.SetLabelsAsync</c>.
        ///
        /// <remarks>
        /// <list type="bullet">
        /// <item><description>This call will not be retried.</description></item>
        /// <item><description>Timeout: 600 seconds.</description></item>
        /// </list>
        /// </remarks>
        public gaxgrpc::CallSettings SetLabelsSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000)));

        ///
        /// Long Running Operation settings for calls to <c>TargetVpnGatewaysClient.SetLabels</c> and
        /// <c>TargetVpnGatewaysClient.SetLabelsAsync</c>.
        ///
        /// <remarks>
        /// Uses default <see cref="gax::PollSettings"/> of:
        /// <list type="bullet">
        /// <item><description>Initial delay: 20 seconds.</description></item>
        /// <item><description>Delay multiplier: 1.5</description></item>
        /// <item><description>Maximum delay: 45 seconds.</description></item>
        /// <item><description>Total timeout: 24 hours.</description></item>
        /// </list>
        /// </remarks>
        public lro::OperationsSettings SetLabelsOperationsSettings { get; set; } = new lro::OperationsSettings
        {
            DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)),
        };

        /// Creates a deep clone of this object, with all the same property values.
        /// <returns>A deep clone of this <see cref="TargetVpnGatewaysSettings"/> object.</returns>
        public TargetVpnGatewaysSettings Clone() => new TargetVpnGatewaysSettings(this);
    }

    ///
    /// Builder class for <see cref="TargetVpnGatewaysClient"/> to provide simple configuration of credentials, endpoint
    /// etc.
    ///
    public sealed partial class TargetVpnGatewaysClientBuilder : gaxgrpc::ClientBuilderBase<TargetVpnGatewaysClient>
    {
        /// The settings to use for RPCs, or <c>null</c> for the default settings.
        public TargetVpnGatewaysSettings Settings { get; set; }

        /// Creates a new builder with default settings.
        public TargetVpnGatewaysClientBuilder() : base(TargetVpnGatewaysClient.ServiceMetadata)
        {
        }

        partial void InterceptBuild(ref TargetVpnGatewaysClient client);

        partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task<TargetVpnGatewaysClient> task);

        /// Builds the resulting client.
        public override TargetVpnGatewaysClient Build()
        {
            TargetVpnGatewaysClient client = null;
            InterceptBuild(ref client);
            return client ?? BuildImpl();
        }

        /// Builds the resulting client asynchronously.
        public override stt::Task<TargetVpnGatewaysClient> BuildAsync(st::CancellationToken cancellationToken = default)
        {
            stt::Task<TargetVpnGatewaysClient> task = null;
            InterceptBuildAsync(cancellationToken, ref task);
            return task ?? BuildAsyncImpl(cancellationToken);
        }

        private TargetVpnGatewaysClient BuildImpl()
        {
            Validate();
            grpccore::CallInvoker callInvoker = CreateCallInvoker();
            return TargetVpnGatewaysClient.Create(callInvoker, Settings, Logger);
        }

        private async stt::Task<TargetVpnGatewaysClient> BuildAsyncImpl(st::CancellationToken cancellationToken)
        {
            Validate();
            grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false);
            return TargetVpnGatewaysClient.Create(callInvoker, Settings, Logger);
        }

        /// Returns the channel pool to use when no other options are specified.
        protected override gaxgrpc::ChannelPool GetChannelPool() => TargetVpnGatewaysClient.ChannelPool;
    }

    /// TargetVpnGateways client wrapper, for convenient use.
    /// <remarks>
    /// The TargetVpnGateways API.
    /// </remarks>
    public abstract partial class TargetVpnGatewaysClient
    {
        ///
        /// The default endpoint for the TargetVpnGateways service, which is a host of "compute.googleapis.com" and a
        /// port of 443.
        ///
        public static string DefaultEndpoint { get; } = "compute.googleapis.com:443";

        /// The default TargetVpnGateways scopes.
        /// <remarks>
        /// The default TargetVpnGateways scopes are:
        /// <list type="bullet">
        /// <item><description>https://www.googleapis.com/auth/compute</description></item>
        /// <item><description>https://www.googleapis.com/auth/cloud-platform</description></item>
        /// </list>
        /// </remarks>
        public static scg::IReadOnlyList<string> DefaultScopes { get; } = new sco::ReadOnlyCollection<string>(new string[]
        {
            "https://www.googleapis.com/auth/compute",
            "https://www.googleapis.com/auth/cloud-platform",
        });

        /// The service metadata associated with this client type.
        public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(TargetVpnGateways.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Rest, PackageApiMetadata.ApiMetadata);

        internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(ServiceMetadata);

        ///
        /// Asynchronously creates a <see cref="TargetVpnGatewaysClient"/> using the default credentials, endpoint and
        /// settings. To specify custom credentials or other settings, use <see cref="TargetVpnGatewaysClientBuilder"/>.
        ///
        /// <param name="cancellationToken">
        /// The <see cref="st::CancellationToken"/> to use while creating the client.
        /// </param>
        /// <returns>The task representing the created <see cref="TargetVpnGatewaysClient"/>.</returns>
        public static stt::Task<TargetVpnGatewaysClient> CreateAsync(st::CancellationToken cancellationToken = default) =>
            new TargetVpnGatewaysClientBuilder().BuildAsync(cancellationToken);

        ///
        /// Synchronously creates a <see cref="TargetVpnGatewaysClient"/> using the default credentials, endpoint and
        /// settings. To specify custom credentials or other settings, use <see cref="TargetVpnGatewaysClientBuilder"/>.
        ///
        /// <returns>The created <see cref="TargetVpnGatewaysClient"/>.</returns>
        public static TargetVpnGatewaysClient Create() => new TargetVpnGatewaysClientBuilder().Build();

        ///
        /// Creates a <see cref="TargetVpnGatewaysClient"/> which uses the specified call invoker for remote operations.
        ///
        /// <param name="callInvoker">
        /// The <see cref="grpccore::CallInvoker"/> for remote operations. Must not be null.
        /// </param>
        /// <param name="settings">Optional <see cref="TargetVpnGatewaysSettings"/>.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/>.</param>
        /// <returns>The created <see cref="TargetVpnGatewaysClient"/>.</returns>
        internal static TargetVpnGatewaysClient Create(grpccore::CallInvoker callInvoker, TargetVpnGatewaysSettings settings = null, mel::ILogger logger = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;
            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            TargetVpnGateways.TargetVpnGatewaysClient grpcClient = new TargetVpnGateways.TargetVpnGatewaysClient(callInvoker);
            return new TargetVpnGatewaysClientImpl(grpcClient, settings, logger);
        }

        ///
        /// Shuts down any channels automatically created by <see cref="Create()"/> and
        /// <see cref="CreateAsync(st::CancellationToken)"/>. Channels which weren't automatically created are not
        /// affected.
        ///
        /// <remarks>
        /// After calling this method, further calls to <see cref="Create()"/> and
        /// <see cref="CreateAsync(st::CancellationToken)"/> will create new channels, which could in turn be shut down
        /// by another call to this method.
        /// </remarks>
        /// <returns>A task representing the asynchronous shutdown operation.</returns>
        public static stt::Task ShutdownDefaultChannelsAsync() => ChannelPool.ShutdownChannelsAsync();

        /// The underlying gRPC TargetVpnGateways client
        public virtual TargetVpnGateways.TargetVpnGatewaysClient GrpcClient => throw new sys::NotImplementedException();

        ///
        /// Retrieves an aggregated list of target VPN gateways.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A pageable sequence of <see cref="scg::KeyValuePair{TKey,TValue}"/> resources.</returns>
        public virtual gax::PagedEnumerable<TargetVpnGatewayAggregatedList, scg::KeyValuePair<string, TargetVpnGatewaysScopedList>> AggregatedList(AggregatedListTargetVpnGatewaysRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Retrieves an aggregated list of target VPN gateways.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>
        /// A pageable asynchronous sequence of <see cref="scg::KeyValuePair{TKey,TValue}"/> resources.
        /// </returns>
        public virtual gax::PagedAsyncEnumerable<TargetVpnGatewayAggregatedList, scg::KeyValuePair<string, TargetVpnGatewaysScopedList>> AggregatedListAsync(AggregatedListTargetVpnGatewaysRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Retrieves an aggregated list of target VPN gateways.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="pageToken">
        /// The token returned from the previous request. A value of <c>null</c> or an empty string retrieves the first
        /// page.
        /// </param>
        /// <param name="pageSize">
        /// The size of page to request. The response will not be larger than this, but may be smaller. A value of
        /// <c>null</c> or <c>0</c> uses a server-defined page size.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A pageable sequence of <see cref="scg::KeyValuePair{TKey,TValue}"/> resources.</returns>
        public virtual gax::PagedEnumerable<TargetVpnGatewayAggregatedList, scg::KeyValuePair<string, TargetVpnGatewaysScopedList>> AggregatedList(string project, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
            AggregatedList(new AggregatedListTargetVpnGatewaysRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                PageToken = pageToken ?? "",
                PageSize = pageSize ?? 0,
            }, callSettings);

        ///
        /// Retrieves an aggregated list of target VPN gateways.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="pageToken">
        /// The token returned from the previous request. A value of <c>null</c> or an empty string retrieves the first
        /// page.
        /// </param>
        /// <param name="pageSize">
        /// The size of page to request. The response will not be larger than this, but may be smaller. A value of
        /// <c>null</c> or <c>0</c> uses a server-defined page size.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>
        /// A pageable asynchronous sequence of <see cref="scg::KeyValuePair{TKey,TValue}"/> resources.
        /// </returns>
        public virtual gax::PagedAsyncEnumerable<TargetVpnGatewayAggregatedList, scg::KeyValuePair<string, TargetVpnGatewaysScopedList>> AggregatedListAsync(string project, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
            AggregatedListAsync(new AggregatedListTargetVpnGatewaysRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                PageToken = pageToken ?? "",
                PageSize = pageSize ?? 0,
            }, callSettings);

        ///
        /// Deletes the specified target VPN gateway.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public virtual lro::Operation<Operation, Operation> Delete(DeleteTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Deletes the specified target VPN gateway.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> DeleteAsync(DeleteTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Deletes the specified target VPN gateway.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> DeleteAsync(DeleteTargetVpnGatewayRequest request, st::CancellationToken cancellationToken) =>
            DeleteAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));

        /// The long-running operations client for <c>Delete</c>.
        public virtual lro::OperationsClient DeleteOperationsClient => throw new sys::NotImplementedException();

        ///
        /// Poll an operation once, using an <c>operationName</c> from a previous invocation of <c>Delete</c>.
        ///
        /// <param name="operationName">
        /// The name of a previously invoked operation. Must not be <c>null</c> or empty.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The result of polling the operation.</returns>
        public virtual lro::Operation<Operation, Operation> PollOnceDelete(string operationName, gaxgrpc::CallSettings callSettings = null) =>
            lro::Operation<Operation, Operation>.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), DeleteOperationsClient, callSettings);

        ///
        /// Asynchronously poll an operation once, using an <c>operationName</c> from a previous invocation of <c>Delete</c>
        /// .
        ///
        /// <param name="operationName">
        /// The name of a previously invoked operation. Must not be <c>null</c> or empty.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A task representing the result of polling the operation.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, gaxgrpc::CallSettings callSettings = null) =>
            lro::Operation<Operation, Operation>.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), DeleteOperationsClient, callSettings);

        ///
        /// Deletes the specified target VPN gateway.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="targetVpnGateway">
        /// Name of the target VPN gateway to delete.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public virtual lro::Operation<Operation, Operation> Delete(string project, string region, string targetVpnGateway, gaxgrpc::CallSettings callSettings = null) =>
            Delete(new DeleteTargetVpnGatewayRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                Region = gax::GaxPreconditions.CheckNotNullOrEmpty(region, nameof(region)),
                TargetVpnGateway = gax::GaxPreconditions.CheckNotNullOrEmpty(targetVpnGateway, nameof(targetVpnGateway)),
            }, callSettings);

        ///
        /// Deletes the specified target VPN gateway.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="targetVpnGateway">
        /// Name of the target VPN gateway to delete.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> DeleteAsync(string project, string region, string targetVpnGateway, gaxgrpc::CallSettings callSettings = null) =>
            DeleteAsync(new DeleteTargetVpnGatewayRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                Region = gax::GaxPreconditions.CheckNotNullOrEmpty(region, nameof(region)),
                TargetVpnGateway = gax::GaxPreconditions.CheckNotNullOrEmpty(targetVpnGateway, nameof(targetVpnGateway)),
            }, callSettings);

        ///
        /// Deletes the specified target VPN gateway.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="targetVpnGateway">
        /// Name of the target VPN gateway to delete.
        /// </param>
        /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> DeleteAsync(string project, string region, string targetVpnGateway, st::CancellationToken cancellationToken) =>
            DeleteAsync(project, region, targetVpnGateway, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));

        ///
        /// Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public virtual TargetVpnGateway Get(GetTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<TargetVpnGateway> GetAsync(GetTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<TargetVpnGateway> GetAsync(GetTargetVpnGatewayRequest request, st::CancellationToken cancellationToken) =>
            GetAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));

        ///
        /// Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="targetVpnGateway">
        /// Name of the target VPN gateway to return.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public virtual TargetVpnGateway Get(string project, string region, string targetVpnGateway, gaxgrpc::CallSettings callSettings = null) =>
            Get(new GetTargetVpnGatewayRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                Region = gax::GaxPreconditions.CheckNotNullOrEmpty(region, nameof(region)),
                TargetVpnGateway = gax::GaxPreconditions.CheckNotNullOrEmpty(targetVpnGateway, nameof(targetVpnGateway)),
            }, callSettings);

        ///
        /// Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="targetVpnGateway">
        /// Name of the target VPN gateway to return.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<TargetVpnGateway> GetAsync(string project, string region, string targetVpnGateway, gaxgrpc::CallSettings callSettings = null) =>
            GetAsync(new GetTargetVpnGatewayRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                Region = gax::GaxPreconditions.CheckNotNullOrEmpty(region, nameof(region)),
                TargetVpnGateway = gax::GaxPreconditions.CheckNotNullOrEmpty(targetVpnGateway, nameof(targetVpnGateway)),
            }, callSettings);

        ///
        /// Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="targetVpnGateway">
        /// Name of the target VPN gateway to return.
        /// </param>
        /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<TargetVpnGateway> GetAsync(string project, string region, string targetVpnGateway, st::CancellationToken cancellationToken) =>
            GetAsync(project, region, targetVpnGateway, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));

        ///
        /// Creates a target VPN gateway in the specified project and region using the data included in the request.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public virtual lro::Operation<Operation, Operation> Insert(InsertTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Creates a target VPN gateway in the specified project and region using the data included in the request.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> InsertAsync(InsertTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Creates a target VPN gateway in the specified project and region using the data included in the request.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> InsertAsync(InsertTargetVpnGatewayRequest request, st::CancellationToken cancellationToken) =>
            InsertAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));

        /// The long-running operations client for <c>Insert</c>.
        public virtual lro::OperationsClient InsertOperationsClient => throw new sys::NotImplementedException();

        ///
        /// Poll an operation once, using an <c>operationName</c> from a previous invocation of <c>Insert</c>.
        ///
        /// <param name="operationName">
        /// The name of a previously invoked operation. Must not be <c>null</c> or empty.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The result of polling the operation.</returns>
        public virtual lro::Operation<Operation, Operation> PollOnceInsert(string operationName, gaxgrpc::CallSettings callSettings = null) =>
            lro::Operation<Operation, Operation>.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), InsertOperationsClient, callSettings);

        ///
        /// Asynchronously poll an operation once, using an <c>operationName</c> from a previous invocation of <c>Insert</c>
        /// .
        ///
        /// <param name="operationName">
        /// The name of a previously invoked operation. Must not be <c>null</c> or empty.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A task representing the result of polling the operation.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> PollOnceInsertAsync(string operationName, gaxgrpc::CallSettings callSettings = null) =>
            lro::Operation<Operation, Operation>.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), InsertOperationsClient, callSettings);

        ///
        /// Creates a target VPN gateway in the specified project and region using the data included in the request.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="targetVpnGatewayResource">
        /// The body resource for this request
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public virtual lro::Operation<Operation, Operation> Insert(string project, string region, TargetVpnGateway targetVpnGatewayResource, gaxgrpc::CallSettings callSettings = null) =>
            Insert(new InsertTargetVpnGatewayRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                Region = gax::GaxPreconditions.CheckNotNullOrEmpty(region, nameof(region)),
                TargetVpnGatewayResource = gax::GaxPreconditions.CheckNotNull(targetVpnGatewayResource, nameof(targetVpnGatewayResource)),
            }, callSettings);

        ///
        /// Creates a target VPN gateway in the specified project and region using the data included in the request.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="targetVpnGatewayResource">
        /// The body resource for this request
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> InsertAsync(string project, string region, TargetVpnGateway targetVpnGatewayResource, gaxgrpc::CallSettings callSettings = null) =>
            InsertAsync(new InsertTargetVpnGatewayRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                Region = gax::GaxPreconditions.CheckNotNullOrEmpty(region, nameof(region)),
                TargetVpnGatewayResource = gax::GaxPreconditions.CheckNotNull(targetVpnGatewayResource, nameof(targetVpnGatewayResource)),
            }, callSettings);

        ///
        /// Creates a target VPN gateway in the specified project and region using the data included in the request.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="targetVpnGatewayResource">
        /// The body resource for this request
        /// </param>
        /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> InsertAsync(string project, string region, TargetVpnGateway targetVpnGatewayResource, st::CancellationToken cancellationToken) =>
            InsertAsync(project, region, targetVpnGatewayResource, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));

        ///
        /// Retrieves a list of target VPN gateways available to the specified project and region.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A pageable sequence of <see cref="TargetVpnGateway"/> resources.</returns>
        public virtual gax::PagedEnumerable<TargetVpnGatewayList, TargetVpnGateway> List(ListTargetVpnGatewaysRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Retrieves a list of target VPN gateways available to the specified project and region.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A pageable asynchronous sequence of <see cref="TargetVpnGateway"/> resources.</returns>
        public virtual gax::PagedAsyncEnumerable<TargetVpnGatewayList, TargetVpnGateway> ListAsync(ListTargetVpnGatewaysRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Retrieves a list of target VPN gateways available to the specified project and region.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="pageToken">
        /// The token returned from the previous request. A value of <c>null</c> or an empty string retrieves the first
        /// page.
        /// </param>
        /// <param name="pageSize">
        /// The size of page to request. The response will not be larger than this, but may be smaller. A value of
        /// <c>null</c> or <c>0</c> uses a server-defined page size.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A pageable sequence of <see cref="TargetVpnGateway"/> resources.</returns>
        public virtual gax::PagedEnumerable<TargetVpnGatewayList, TargetVpnGateway> List(string project, string region, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
            List(new ListTargetVpnGatewaysRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                Region = gax::GaxPreconditions.CheckNotNullOrEmpty(region, nameof(region)),
                PageToken = pageToken ?? "",
                PageSize = pageSize ?? 0,
            }, callSettings);

        ///
        /// Retrieves a list of target VPN gateways available to the specified project and region.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// Name of the region for this request.
        /// </param>
        /// <param name="pageToken">
        /// The token returned from the previous request. A value of <c>null</c> or an empty string retrieves the first
        /// page.
        /// </param>
        /// <param name="pageSize">
        /// The size of page to request. The response will not be larger than this, but may be smaller. A value of
        /// <c>null</c> or <c>0</c> uses a server-defined page size.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A pageable asynchronous sequence of <see cref="TargetVpnGateway"/> resources.</returns>
        public virtual gax::PagedAsyncEnumerable<TargetVpnGatewayList, TargetVpnGateway> ListAsync(string project, string region, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
            ListAsync(new ListTargetVpnGatewaysRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                Region = gax::GaxPreconditions.CheckNotNullOrEmpty(region, nameof(region)),
                PageToken = pageToken ?? "",
                PageSize = pageSize ?? 0,
            }, callSettings);

        ///
        /// Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public virtual lro::Operation<Operation, Operation> SetLabels(SetLabelsTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> SetLabelsAsync(SetLabelsTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null) =>
            throw new sys::NotImplementedException();

        ///
        /// Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> SetLabelsAsync(SetLabelsTargetVpnGatewayRequest request, st::CancellationToken cancellationToken) =>
            SetLabelsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));

        /// The long-running operations client for <c>SetLabels</c>.
        public virtual lro::OperationsClient SetLabelsOperationsClient => throw new sys::NotImplementedException();

        ///
        /// Poll an operation once, using an <c>operationName</c> from a previous invocation of <c>SetLabels</c>.
        ///
        /// <param name="operationName">
        /// The name of a previously invoked operation. Must not be <c>null</c> or empty.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The result of polling the operation.</returns>
        public virtual lro::Operation<Operation, Operation> PollOnceSetLabels(string operationName, gaxgrpc::CallSettings callSettings = null) =>
            lro::Operation<Operation, Operation>.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), SetLabelsOperationsClient, callSettings);

        ///
        /// Asynchronously poll an operation once, using an <c>operationName</c> from a previous invocation of
        /// <c>SetLabels</c>.
        ///
        /// <param name="operationName">
        /// The name of a previously invoked operation. Must not be <c>null</c> or empty.
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A task representing the result of polling the operation.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> PollOnceSetLabelsAsync(string operationName, gaxgrpc::CallSettings callSettings = null) =>
            lro::Operation<Operation, Operation>.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), SetLabelsOperationsClient, callSettings);

        ///
        /// Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// The region for this request.
        /// </param>
        /// <param name="resource">
        /// Name or id of the resource for this request.
        /// </param>
        /// <param name="regionSetLabelsRequestResource">
        /// The body resource for this request
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public virtual lro::Operation<Operation, Operation> SetLabels(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, gaxgrpc::CallSettings callSettings = null) =>
            SetLabels(new SetLabelsTargetVpnGatewayRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                Region = gax::GaxPreconditions.CheckNotNullOrEmpty(region, nameof(region)),
                RegionSetLabelsRequestResource = gax::GaxPreconditions.CheckNotNull(regionSetLabelsRequestResource, nameof(regionSetLabelsRequestResource)),
                Resource = gax::GaxPreconditions.CheckNotNullOrEmpty(resource, nameof(resource)),
            }, callSettings);

        ///
        /// Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// The region for this request.
        /// </param>
        /// <param name="resource">
        /// Name or id of the resource for this request.
        /// </param>
        /// <param name="regionSetLabelsRequestResource">
        /// The body resource for this request
        /// </param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> SetLabelsAsync(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, gaxgrpc::CallSettings callSettings = null) =>
            SetLabelsAsync(new SetLabelsTargetVpnGatewayRequest
            {
                Project = gax::GaxPreconditions.CheckNotNullOrEmpty(project, nameof(project)),
                Region = gax::GaxPreconditions.CheckNotNullOrEmpty(region, nameof(region)),
                RegionSetLabelsRequestResource = gax::GaxPreconditions.CheckNotNull(regionSetLabelsRequestResource, nameof(regionSetLabelsRequestResource)),
                Resource = gax::GaxPreconditions.CheckNotNullOrEmpty(resource, nameof(resource)),
            }, callSettings);

        ///
        /// Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
        ///
        /// <param name="project">
        /// Project ID for this request.
        /// </param>
        /// <param name="region">
        /// The region for this request.
        /// </param>
        /// <param name="resource">
        /// Name or id of the resource for this request.
        /// </param>
        /// <param name="regionSetLabelsRequestResource">
        /// The body resource for this request
        /// </param>
        /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public virtual stt::Task<lro::Operation<Operation, Operation>> SetLabelsAsync(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, st::CancellationToken cancellationToken) =>
            SetLabelsAsync(project, region, resource, regionSetLabelsRequestResource, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
    }

    /// TargetVpnGateways client wrapper implementation, for convenient use.
    /// <remarks>
    /// The TargetVpnGateways API.
    /// </remarks>
    public sealed partial class TargetVpnGatewaysClientImpl : TargetVpnGatewaysClient
    {
        private readonly gaxgrpc::ApiCall<AggregatedListTargetVpnGatewaysRequest, TargetVpnGatewayAggregatedList> _callAggregatedList;

        private readonly gaxgrpc::ApiCall<DeleteTargetVpnGatewayRequest, Operation> _callDelete;

        private readonly gaxgrpc::ApiCall<GetTargetVpnGatewayRequest, TargetVpnGateway> _callGet;

        private readonly gaxgrpc::ApiCall<InsertTargetVpnGatewayRequest, Operation> _callInsert;

        private readonly gaxgrpc::ApiCall<ListTargetVpnGatewaysRequest, TargetVpnGatewayList> _callList;

        private readonly gaxgrpc::ApiCall<SetLabelsTargetVpnGatewayRequest, Operation> _callSetLabels;

        ///
        /// Constructs a client wrapper for the TargetVpnGateways service, with the specified gRPC client and settings.
        ///
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="TargetVpnGatewaysSettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public TargetVpnGatewaysClientImpl(TargetVpnGateways.TargetVpnGatewaysClient grpcClient, TargetVpnGatewaysSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            TargetVpnGatewaysSettings effectiveSettings = settings ?? TargetVpnGatewaysSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings, logger);
            DeleteOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClientForRegionOperations(), effectiveSettings.DeleteOperationsSettings, logger);
            InsertOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClientForRegionOperations(), effectiveSettings.InsertOperationsSettings, logger);
            SetLabelsOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClientForRegionOperations(), effectiveSettings.SetLabelsOperationsSettings, logger);
            _callAggregatedList = clientHelper.BuildApiCall<AggregatedListTargetVpnGatewaysRequest, TargetVpnGatewayAggregatedList>("AggregatedList", grpcClient.AggregatedListAsync, grpcClient.AggregatedList, effectiveSettings.AggregatedListSettings).WithGoogleRequestParam("project", request => request.Project);
            Modify_ApiCall(ref _callAggregatedList);
            Modify_AggregatedListApiCall(ref _callAggregatedList);
            _callDelete = clientHelper.BuildApiCall<DeleteTargetVpnGatewayRequest, Operation>("Delete", grpcClient.DeleteAsync, grpcClient.Delete, effectiveSettings.DeleteSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region).WithGoogleRequestParam("target_vpn_gateway", request => request.TargetVpnGateway);
            Modify_ApiCall(ref _callDelete);
            Modify_DeleteApiCall(ref _callDelete);
            _callGet = clientHelper.BuildApiCall<GetTargetVpnGatewayRequest, TargetVpnGateway>("Get", grpcClient.GetAsync, grpcClient.Get, effectiveSettings.GetSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region).WithGoogleRequestParam("target_vpn_gateway", request => request.TargetVpnGateway);
            Modify_ApiCall(ref _callGet);
            Modify_GetApiCall(ref _callGet);
            _callInsert = clientHelper.BuildApiCall<InsertTargetVpnGatewayRequest, Operation>("Insert", grpcClient.InsertAsync, grpcClient.Insert, effectiveSettings.InsertSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region);
            Modify_ApiCall(ref _callInsert);
            Modify_InsertApiCall(ref _callInsert);
            _callList = clientHelper.BuildApiCall<ListTargetVpnGatewaysRequest, TargetVpnGatewayList>("List", grpcClient.ListAsync, grpcClient.List, effectiveSettings.ListSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region);
            Modify_ApiCall(ref _callList);
            Modify_ListApiCall(ref _callList);
            _callSetLabels = clientHelper.BuildApiCall<SetLabelsTargetVpnGatewayRequest, Operation>("SetLabels", grpcClient.SetLabelsAsync, grpcClient.SetLabels, effectiveSettings.SetLabelsSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region).WithGoogleRequestParam("resource", request => request.Resource);
            Modify_ApiCall(ref _callSetLabels);
            Modify_SetLabelsApiCall(ref _callSetLabels);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }

        partial void Modify_ApiCall<TRequest, TResponse>(ref gaxgrpc::ApiCall<TRequest, TResponse> call) where TRequest : class, proto::IMessage<TRequest> where TResponse : class, proto::IMessage<TResponse>;

        partial void Modify_AggregatedListApiCall(ref gaxgrpc::ApiCall<AggregatedListTargetVpnGatewaysRequest, TargetVpnGatewayAggregatedList> call);

        partial void Modify_DeleteApiCall(ref gaxgrpc::ApiCall<DeleteTargetVpnGatewayRequest, Operation> call);

        partial void Modify_GetApiCall(ref gaxgrpc::ApiCall<GetTargetVpnGatewayRequest, TargetVpnGateway> call);

        partial void Modify_InsertApiCall(ref gaxgrpc::ApiCall<InsertTargetVpnGatewayRequest, Operation> call);

        partial void Modify_ListApiCall(ref gaxgrpc::ApiCall<ListTargetVpnGatewaysRequest, TargetVpnGatewayList> call);

        partial void Modify_SetLabelsApiCall(ref gaxgrpc::ApiCall<SetLabelsTargetVpnGatewayRequest, Operation> call);

        partial void OnConstruction(TargetVpnGateways.TargetVpnGatewaysClient grpcClient, TargetVpnGatewaysSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);

        /// The underlying gRPC TargetVpnGateways client
        public override TargetVpnGateways.TargetVpnGatewaysClient GrpcClient { get; }

        partial void Modify_AggregatedListTargetVpnGatewaysRequest(ref AggregatedListTargetVpnGatewaysRequest request, ref gaxgrpc::CallSettings settings);

        partial void Modify_DeleteTargetVpnGatewayRequest(ref DeleteTargetVpnGatewayRequest request, ref gaxgrpc::CallSettings settings);

        partial void Modify_GetTargetVpnGatewayRequest(ref GetTargetVpnGatewayRequest request, ref gaxgrpc::CallSettings settings);

        partial void Modify_InsertTargetVpnGatewayRequest(ref InsertTargetVpnGatewayRequest request, ref gaxgrpc::CallSettings settings);

        partial void Modify_ListTargetVpnGatewaysRequest(ref ListTargetVpnGatewaysRequest request, ref gaxgrpc::CallSettings settings);

        partial void Modify_SetLabelsTargetVpnGatewayRequest(ref SetLabelsTargetVpnGatewayRequest request, ref gaxgrpc::CallSettings settings);

        ///
        /// Retrieves an aggregated list of target VPN gateways.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A pageable sequence of <see cref="scg::KeyValuePair{TKey,TValue}"/> resources.</returns>
        public override gax::PagedEnumerable<TargetVpnGatewayAggregatedList, scg::KeyValuePair<string, TargetVpnGatewaysScopedList>> AggregatedList(AggregatedListTargetVpnGatewaysRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_AggregatedListTargetVpnGatewaysRequest(ref request, ref callSettings);
            return new gaxgrpc::GrpcPagedEnumerable<AggregatedListTargetVpnGatewaysRequest, TargetVpnGatewayAggregatedList, scg::KeyValuePair<string, TargetVpnGatewaysScopedList>>(_callAggregatedList, request, callSettings);
        }

        ///
        /// Retrieves an aggregated list of target VPN gateways.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>
        /// A pageable asynchronous sequence of <see cref="scg::KeyValuePair{TKey,TValue}"/> resources.
        /// </returns>
        public override gax::PagedAsyncEnumerable<TargetVpnGatewayAggregatedList, scg::KeyValuePair<string, TargetVpnGatewaysScopedList>> AggregatedListAsync(AggregatedListTargetVpnGatewaysRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_AggregatedListTargetVpnGatewaysRequest(ref request, ref callSettings);
            return new gaxgrpc::GrpcPagedAsyncEnumerable<AggregatedListTargetVpnGatewaysRequest, TargetVpnGatewayAggregatedList, scg::KeyValuePair<string, TargetVpnGatewaysScopedList>>(_callAggregatedList, request, callSettings);
        }

        /// The long-running operations client for <c>Delete</c>.
        public override lro::OperationsClient DeleteOperationsClient { get; }

        ///
        /// Deletes the specified target VPN gateway.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public override lro::Operation<Operation, Operation> Delete(DeleteTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_DeleteTargetVpnGatewayRequest(ref request, ref callSettings);
            Operation response = _callDelete.Sync(request, callSettings);
            GetRegionOperationRequest pollRequest = GetRegionOperationRequest.FromInitialResponse(response);
            request.PopulatePollRequestFields(pollRequest);
            return new lro::Operation<Operation, Operation>(response.ToLroResponse(pollRequest.ToLroOperationName()), DeleteOperationsClient);
        }

        ///
        /// Deletes the specified target VPN gateway.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public override async stt::Task<lro::Operation<Operation, Operation>> DeleteAsync(DeleteTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_DeleteTargetVpnGatewayRequest(ref request, ref callSettings);
            Operation response = await _callDelete.Async(request, callSettings).ConfigureAwait(false);
            GetRegionOperationRequest pollRequest = GetRegionOperationRequest.FromInitialResponse(response);
            request.PopulatePollRequestFields(pollRequest);
            return new lro::Operation<Operation, Operation>(response.ToLroResponse(pollRequest.ToLroOperationName()), DeleteOperationsClient);
        }

        ///
        /// Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public override TargetVpnGateway Get(GetTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_GetTargetVpnGatewayRequest(ref request, ref callSettings);
            return _callGet.Sync(request, callSettings);
        }

        ///
        /// Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public override stt::Task<TargetVpnGateway> GetAsync(GetTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_GetTargetVpnGatewayRequest(ref request, ref callSettings);
            return _callGet.Async(request, callSettings);
        }

        /// The long-running operations client for <c>Insert</c>.
        public override lro::OperationsClient InsertOperationsClient { get; }

        ///
        /// Creates a target VPN gateway in the specified project and region using the data included in the request.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public override lro::Operation<Operation, Operation> Insert(InsertTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_InsertTargetVpnGatewayRequest(ref request, ref callSettings);
            Operation response = _callInsert.Sync(request, callSettings);
            GetRegionOperationRequest pollRequest = GetRegionOperationRequest.FromInitialResponse(response);
            request.PopulatePollRequestFields(pollRequest);
            return new lro::Operation<Operation, Operation>(response.ToLroResponse(pollRequest.ToLroOperationName()), InsertOperationsClient);
        }

        ///
        /// Creates a target VPN gateway in the specified project and region using the data included in the request.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public override async stt::Task<lro::Operation<Operation, Operation>> InsertAsync(InsertTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_InsertTargetVpnGatewayRequest(ref request, ref callSettings);
            Operation response = await _callInsert.Async(request, callSettings).ConfigureAwait(false);
            GetRegionOperationRequest pollRequest = GetRegionOperationRequest.FromInitialResponse(response);
            request.PopulatePollRequestFields(pollRequest);
            return new lro::Operation<Operation, Operation>(response.ToLroResponse(pollRequest.ToLroOperationName()), InsertOperationsClient);
        }

        ///
        /// Retrieves a list of target VPN gateways available to the specified project and region.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A pageable sequence of <see cref="TargetVpnGateway"/> resources.</returns>
        public override gax::PagedEnumerable<TargetVpnGatewayList, TargetVpnGateway> List(ListTargetVpnGatewaysRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_ListTargetVpnGatewaysRequest(ref request, ref callSettings);
            return new gaxgrpc::GrpcPagedEnumerable<ListTargetVpnGatewaysRequest, TargetVpnGatewayList, TargetVpnGateway>(_callList, request, callSettings);
        }

        ///
        /// Retrieves a list of target VPN gateways available to the specified project and region.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A pageable asynchronous sequence of <see cref="TargetVpnGateway"/> resources.</returns>
        public override gax::PagedAsyncEnumerable<TargetVpnGatewayList, TargetVpnGateway> ListAsync(ListTargetVpnGatewaysRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_ListTargetVpnGatewaysRequest(ref request, ref callSettings);
            return new gaxgrpc::GrpcPagedAsyncEnumerable<ListTargetVpnGatewaysRequest, TargetVpnGatewayList, TargetVpnGateway>(_callList, request, callSettings);
        }

        /// The long-running operations client for <c>SetLabels</c>.
        public override lro::OperationsClient SetLabelsOperationsClient { get; }

        ///
        /// Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>The RPC response.</returns>
        public override lro::Operation<Operation, Operation> SetLabels(SetLabelsTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_SetLabelsTargetVpnGatewayRequest(ref request, ref callSettings);
            Operation response = _callSetLabels.Sync(request, callSettings);
            GetRegionOperationRequest pollRequest = GetRegionOperationRequest.FromInitialResponse(response);
            request.PopulatePollRequestFields(pollRequest);
            return new lro::Operation<Operation, Operation>(response.ToLroResponse(pollRequest.ToLroOperationName()), SetLabelsOperationsClient);
        }

        ///
        /// Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
        ///
        /// <param name="request">The request object containing all of the parameters for the API call.</param>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <returns>A Task containing the RPC response.</returns>
        public override async stt::Task<lro::Operation<Operation, Operation>> SetLabelsAsync(SetLabelsTargetVpnGatewayRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_SetLabelsTargetVpnGatewayRequest(ref request, ref callSettings);
            Operation response = await _callSetLabels.Async(request, callSettings).ConfigureAwait(false);
            GetRegionOperationRequest pollRequest = GetRegionOperationRequest.FromInitialResponse(response);
            request.PopulatePollRequestFields(pollRequest);
            return new lro::Operation<Operation, Operation>(response.ToLroResponse(pollRequest.ToLroOperationName()), SetLabelsOperationsClient);
        }
    }

    public partial class AggregatedListTargetVpnGatewaysRequest : gaxgrpc::IPageRequest
    {
        /// <inheritdoc/>
        public int PageSize
        {
            get => checked((int)MaxResults);
            set => MaxResults = checked((uint)value);
        }
    }

    public partial class ListTargetVpnGatewaysRequest : gaxgrpc::IPageRequest
    {
        /// <inheritdoc/>
        public int PageSize
        {
            get => checked((int)MaxResults);
            set => MaxResults = checked((uint)value);
        }
    }

    public partial class TargetVpnGatewayAggregatedList : gaxgrpc::IPageResponse<scg::KeyValuePair<string, TargetVpnGatewaysScopedList>>
    {
        /// Returns an enumerator that iterates through the resources in this response.
        public scg::IEnumerator<scg::KeyValuePair<string, TargetVpnGatewaysScopedList>> GetEnumerator() =>
            Items.GetEnumerator();

        sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator();
    }

    public partial class TargetVpnGatewayList : gaxgrpc::IPageResponse<TargetVpnGateway>
    {
        /// Returns an enumerator that iterates through the resources in this response.
        public scg::IEnumerator<TargetVpnGateway> GetEnumerator() => Items.GetEnumerator();

        sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator();
    }

    public static partial class TargetVpnGateways
    {
        public partial class TargetVpnGatewaysClient
        {
            ///
            /// Creates a new instance of <see cref="lro::Operations.OperationsClient"/> using the same call invoker as
            /// this client, delegating to RegionOperations.
            ///
            /// <returns>A new Operations client for the same target as this client.</returns>
            public virtual lro::Operations.OperationsClient CreateOperationsClientForRegionOperations() =>
                RegionOperations.RegionOperationsClient.CreateOperationsClient(CallInvoker);
        }
    }
}


text:
package org.apache.karaf.webconsole.osgi.blueprint.view;

import java.util.Arrays;
import java.util.List;

import org.apache.karaf.webconsole.core.table.advanced.AdvancedDataProvider;
import org.apache.karaf.webconsole.core.table.advanced.BaseDataTable;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.osgi.framework.ServiceReference;

/**
 * Table with blueprint containers.
 */
public class BlueprintDataTable extends BaseDataTable<ServiceReference> {

    private static final long serialVersionUID = 1L;

    @SuppressWarnings({"rawtypes", "serial"})
    private static final List COLUMNS = Arrays.asList(
        new DefaultServiceReferencePropertyColumn("Id", "service.id"),
        new DefaultServiceReferencePropertyColumn("Container", "osgi.blueprint.container.symbolicname"),
        new DefaultServiceReferencePropertyColumn("Version", "osgi.blueprint.container.version"),
        new AbstractColumn<ServiceReference, String>(Model.of("Operations")) {
            public void populateItem(Item<ICellPopulator<ServiceReference>> cellItem, String componentId, IModel<ServiceReference> rowModel) {
                cellItem.add(new BlueprintActionsPanel(componentId, rowModel));
            }
        }
    );

    @SuppressWarnings("unchecked")
    public BlueprintDataTable(String id, AdvancedDataProvider<ServiceReference> dataProvider, int rowsPerPage) {
        super(id, COLUMNS, dataProvider, rowsPerPage);
    }

}

redpajama_set_name: RedPajamaGithub


text:
<?php

class Template {

	protected $variables = array();
	protected $_controller;
	protected $_action;
    protected $_user;
    protected $_pageTitle;
    protected $_includeCss = array();
    protected $_includeJs = array();
    protected $_layout = "layout";
	protected $_view;

	function __construct($controller,$action) {
		$this->_controller = $controller;
		$this->_action = $action;
		$this->_view = $action;
	}

	/** Set Variables **/

	function set($name,$value) {
		$this->variables[$name] = $value;
	}

    /** Set User Variables **/

	function setUser($value) {
		$this->_user = $value;
	}

    function setTitle($title){
        $this->_pageTitle = $title;
    }

    function setLayout($layout){
        $this->_layout = $layout;
    }

	function setView($view){
        $this->_view = $view;
    }

	/** Display Template **/

    function render() {
        if(!$this->_layout)
            return;

        extract($this->variables);

        //set global vars
        $_user = $this->_user;
        $title = $this->_pageTitle;

		//include common view function library
        require_once(ROOT . DS . 'library' . DS . 'framework' . DS .  'view.php');

        $include_header = $this->generateHeader();

        $content_page = ROOT . DS . 'application' . DS . 'views' . DS . $this->_controller . DS . $this->_action . '.php';
        include (ROOT . DS . 'application' . DS . 'views' . DS .'template' . DS . $this->_layout.'.php');
    }

    /** Add CSS **/
    function addCss($file){
        if(!is_array($file))
            $this->_includeCss[] = $file;
        else
            $this->_includeCss = array_merge($this->_includeCss, $file);
    }

    /** Add JS **/
    function addJs($file){
        if(!is_array($file))
            $this->_includeJs[] = $file;
        else
            $this->_includeJs = array_merge($this->_includeJs, $file);
    }

    /** Generate the dynamic include header **/
    function generateHeader(){
        $headerString = '';

        foreach($this->_includeCss as $file)
            $headerString .= '<link href="'.$file.'" rel="stylesheet" type="text/css" />';

        foreach($this->_includeJs as $file)
            $headerString .= '<script type="text/javascript" src="'. $file .'"></script>';

        return $headerString;
    }

}


text: var application = angular.module('Calorific', []);


text:
(function() {

  var MENU_TIMEOUT = 60000;

  var gameOver = false;

  window.muniverse = {
    init: function() {
      return pollAndWait(MENU_TIMEOUT, function() {
        return window.gameState === 'start';
      }).then(function() {
        window.gameComplete = () => gameOver = true;

        window.faketime.pause();
        window.faketime.advance(100);
        window.butEventHandler('startGame', null);

        window.userInput.removeHitArea("pause");
        var oldHandler = window.butEventHandler;
        window.butEventHandler = function(a, b) {
          if (a !== 'pause') {
            return oldHandler(a, b);
          }
        };

        window.faketime.advance(100);
      });
    },
    step: function(millis) {
      window.faketime.advance(millis);
      return Promise.resolve(gameOver);
    },
    score: function() {
      return Promise.resolve(score || 0);
    }
  };

})();


text:
package net.glowstone.net.message.play.game;

import com.flowpowered.network.Message;
import lombok.Data;
import lombok.RequiredArgsConstructor;

@Data
@RequiredArgsConstructor
public final class BlockChangeMessage implements Message {

    private final int x;
    private final int y;
    private final int z;
    private final int type;

    /**
     * Creates a message indicating that a block has changed.
     *
     * @param x        the x coordinate
     * @param y        the y coordinate
     * @param z        the z coordinate
     * @param type     the new block ID
     * @param metadata the new block data nibble
     */
    public BlockChangeMessage(int x, int y, int z, int type, int metadata) {
        this(x, y, z, type << 4 | metadata & 0xf);
    }

}


text:
use crate::prelude::*;
use crate::utils::http::{client_response_body_to_file, extract_filename_from_uri};
use futures::compat::*;
use slog::{debug, Logger};

/// A wrapper around a temporary directory where we download and manipulate files.
pub struct Workspace {
    /// The HTTP client for the workspace.
    client: reqwest::r#async::Client,
    /// The app config.
    config: Arc<Config>,
    /// The temporary directory for the task.
    ///
    /// Since [`mktemp::Temp`](mktemp::Temp) implements [`Drop`](Drop) by deleting the
    /// directory, we don't need to worry about leaving files or directories behind.
    temp_dir: mktemp::Temp,
    /// The local logger for the task. This may contain context for more useful logging. The
    /// Workspace will additionally log to a file in the temporary directory.
    logger: Logger,
    /// The directory we will upload to inside the destination S3 bucket.
    s3_dir_name: String,
}

impl Workspace {
    /// Construct a `Workspace`. The `base_logger` will be used as a base to construct the file +
    /// stderr logger used in the `Workspace`.
    pub fn new(base_logger: Logger, config: Arc<Config>) -> Result<Self, failure::Error> {
        let temp_dir = mktemp::Temp::new_dir().context("Could not create a temporary directory")?;
        let logger = crate::utils::logging::file_logger(base_logger, &temp_dir.to_path_buf());
        Ok(Workspace {
            config: config.clone(),
            client: reqwest::r#async::Client::new(),
            logger,
            temp_dir,
            s3_dir_name: crate::utils::s3::s3_dir_name(),
        })
    }

    /// Log in the context of the workspace. The workspace logger should always be used when
    /// working in the context of a workspace, so the logs in the right sink, and with the
    /// right context.
    pub fn logger(&self) -> Logger {
        self.logger.clone()
    }

    /// The path to the workspace's temporary directory.
    pub fn temp_dir_path(&self) -> &std::path::Path {
        self.temp_dir.as_ref()
    }

    /// The name of the file will be deduced from the `Content-Disposition` header of the
    /// response or the last segment of `url`.
    pub async fn download_file<'a>(
        &'a self,
        url: &'a hyper::Uri,
    ) -> Result<std::path::PathBuf, failure::Error> {
        self.download_file_impl(url, None).await
    }

    /// Download the file with the `url` and prefix its name with `prefix`.
    pub async fn download_file_with_prefix<'a>(
        &'a self,
        url: &'a hyper::Uri,
        prefix: String,
    ) -> Result<std::path::PathBuf, failure::Error> {
        self.download_file_impl(url, Some(prefix)).await
    }

    /// Shared implementation for `download_file` and `download_file_with_prefix`.
    async fn download_file_impl<'a>(
        &'a self,
        uri: &'a hyper::Uri,
        prefix: Option<String>,
    ) -> Result<std::path::PathBuf, failure::Error> {
        let url = uri.to_string();

        let response = self.client.get(&url).send().compat().await?;

        let filename: String = response
            .filename()
            .or_else(|| extract_filename_from_uri(uri).map(|s| s.to_owned()))
            .ok_or_else(|| format_err!("Could not produce filename for {}", uri))?;

        let filename = if let Some(prefix) = prefix {
            format!("{}-{}", prefix, filename)
        } else {
            filename
        };

        let dest_path = self.temp_dir_path().join(filename);

        debug!(self.logger, "Writing file {:?} as {:?}.", &uri, &dest_path);

        client_response_body_to_file(response, dest_path.clone(), self.config.max_asset_size)
            .await
            .context("Error downloading asset")?;

        Ok(dest_path)
    }

    pub async fn report_success<'a>(
        &'a self,
        presigned_url: String,
        callback_url: &'a str,
    ) -> Result<(), failure::Error> {
        crate::utils::callbacks::report_success(
            self.logger(),
            callback_url,
            self.s3_dir_name.clone(),
            presigned_url,
        )
        .await
    }

    /// Report errors to the callback URL.
    pub async fn report_failure(
        &self,
        error: failure::Error,
        callback_url: String,
    ) -> Result<(), failure::Error> {
        crate::utils::callbacks::report_failure(
            self.logger(),
            error,
            self.s3_dir_name.to_owned(),
            &callback_url,
        )
        .await
    }

    /// Returns a presigned URL to the uploaded file.
    pub async fn upload_to_s3(
        &self,
        file_path: std::path::PathBuf,
    ) -> Result<String, failure::Error> {
        let filename = file_path.file_name().ok_or_else(|| {
            format_err!("missing filename in \"{}\"", file_path.to_string_lossy())
        })?;
        let key = format!("{}/{}", &self.s3_dir_name, filename.to_string_lossy());
        crate::utils::s3::upload_document(&self.config, self.logger(), file_path, key).await
    }

    /// Upload the whole workspace directory to the S3 directory as `workspace.tar`.
    pub async fn upload_workspace(&self) -> Result<(), failure::Error> {
        let workspace_tar_key = format!("{}/{}", &self.s3_dir_name, "workspace.tar");

        crate::utils::s3::upload_workspace(
            &self.config,
            self.logger(),
            self.temp_dir_path(),
            workspace_tar_key,
        )
        .await
    }
}


text:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AvatarDetailsComponent } from './avatar-details.component';
import { AvatarModule } from '../avatar/avatar.module';

@NgModule({
  declarations: [AvatarDetailsComponent],
  imports: [CommonModule, AvatarModule],
  exports: [AvatarDetailsComponent],
})
export class AvatarDetailsModule {}


text:
import {
  GraphQLJSON as _GraphQLJSON,
  GraphQLJSONObject as _GraphQLJSONObject,
} from 'graphql-type-json';
import type { GraphQLScalarType } from '../graphql';
import GraphQLDate from './date';
import GraphQLBuffer from './buffer';

const GraphQLJSON: GraphQLScalarType = _GraphQLJSON;
const GraphQLJSONObject: GraphQLScalarType = _GraphQLJSONObject;

export { GraphQLDate, GraphQLBuffer, GraphQLJSON, GraphQLJSONObject };


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Adventure_Works.Data
{
    public class User
    {
        public string Name { get; set; }

        public string Image { get; set; }
    }
}


text:
#ifndef _HWP_SERVER_H_
#define _HWP_SERVER_H_

int hwp_init(int portNum);
int hwp_server_start(void);
void hwp_server_stop(void);
int hwp_get_available_watchpoint(void);
void hwp_return_watchpoint(int wp);

#endif


text:
unsigned int generatex65599Hash(char* string, size_t len, int shift);
unsigned int generate0xED88320(char* string, size_t len, int shift);
unsigned int generate0xED8832F(char* string, size_t len, int shift);
void replaceAlphabet(unsigned int hash, char* buf, size_t len);

#endif


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.nicktardif.seniorproject.goshnaforairlines" >

    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/goshna_airline_logo"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".SettingsActivity"
            android:label="@string/title_activity_settings" >
        </activity>
        <activity
            android:name=".AboutActivity"
            android:label="About Goshna" >
        </activity>
    </application>

</manifest>


text:
using System;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Media;
using TestPlatform.Models;
using TestPlatform.Views;
using TestPlatform.Controllers;
using System.Resources;
using System.Globalization;
using System.IO.Compression;

namespace TestPlatform
{
    public partial class FormShowData : UserControl
    {
        private StroopProgram program = new StroopProgram();
        private string path = StroopProgram.GetResultsPath();
        private SoundPlayer player = new SoundPlayer();
        private ResourceManager LocRM = new ResourceManager("TestPlatform.Resources.Localizations.LocalizedResources", typeof(FormMain).Assembly);
        private CultureInfo currentCulture = CultureInfo.CurrentUICulture;

        public FormShowData()
        {
            InitializeComponent();

            this.Dock = DockStyle.Fill;
            string[] filePaths = null;

            string localizedHeaders = LocRM.GetString("stroopResultHeader", currentCulture);
            string[] separators = { @"\t" };
            string[] headers = localizedHeaders.Split(separators, StringSplitOptions.RemoveEmptyEntries);

            foreach (var columnName in headers)
            {
                dataGridView1.Columns.Add(columnName, columnName); // Configura Cabeçalho na tabela
            }

            if (Directory.Exists(path)) // Preenche comboBox com arquivos do tipo .txt no diretório dado
            {
                filePaths = Directory.GetFiles(path, "*.txt", SearchOption.AllDirectories);
                for (int i = 0; i < filePaths.Length; i++)
                {
                    resultComboBox.Items.Add(Path.GetFileNameWithoutExtension(filePaths[i]));
                }
            }
            else
            {
                MessageBox.Show("{0}"+ LocRM.GetString("invalidPath",currentCulture), path);
            }
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.dataGridView1.DataSource = null;
            this.dataGridView1.Rows.Clear();
            string[] line;
            string[] filePaths = null;
            try
            {
                dataGridView1.Rows.Clear();
                dataGridView1.Refresh();
                line = StroopProgram.readDataFile(path + "/" + resultComboBox.SelectedItem.ToString() + ".txt");
                if (line.Count() > 0)
                {
                    for(int i = 0; i < line.Count(); i++)
                    {
                        string[] cellArray = line[i].Split(new[] { '\t' }, StringSplitOptions.RemoveEmptyEntries);
                        if (cellArray.Length == dataGridView1.Columns.Count) {
                            dataGridView1.Rows.Add(cellArray);
                            for (int j = 5; j < cellArray.Length; j++)
                            {
                                if (Validations.isHexPattern(cellArray[j]))
                                {
                                    dataGridView1.Rows[i].Cells[j].Style.BackColor = ColorTranslator.FromHtml(cellArray[j]);
                                }
                            }
                        }
                        else if (cellArray.Length == (dataGridView1.ColumnCount - 1))
                        {
                            var index = line[i].IndexOf("\t");
                            if (index >= 0)
                            {
                                line[i] = line[i].Insert(index + "\t".Length, "-\t");
                            }
                            cellArray = line[i].Split(new[] { '\t' }, StringSplitOptions.RemoveEmptyEntries);
                            dataGridView1.Rows.Add(cellArray);
                            for (int j = 5; j < cellArray.Length; j++)
                            {

                                if (Validations.isHexPattern(cellArray[j]))
                                {
                                    dataGridView1.Rows[i].Cells[j].Style.BackColor = ColorTranslator.FromHtml(cellArray[j]);
                                }
                            }
                        }
                    }
                }
                // fills audio data grid view with .wav files in directory in case there are any matching the patter on combobox
                if (Directory.Exists(path))
                {
                    if(audioPathDataGridView.RowCount > 0)
                    {
                        audioPathDataGridView.Rows.Clear();
                        audioPathDataGridView.Refresh();
                    }

                    filePaths = Directory.GetFiles(path, "audio_" + resultComboBox.SelectedItem.ToString()+"*", SearchOption.AllDirectories);
                    DGVManipulation.ReadStringListIntoDGV(filePaths, audioPathDataGridView);
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }

        private void exportCVSButton_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();
            string[] lines;

            // salva file on .csv format
            saveFileDialog1.Filter = "Excel CSV (.csv)|*.csv";
            saveFileDialog1.RestoreDirectory = true;
            saveFileDialog1.FileName = resultComboBox.Text;

            // only saves if there is one selected result to save
            if (resultComboBox.SelectedIndex != -1)
            {
                lines = StroopProgram.readDataFile(path + "/" + resultComboBox.SelectedItem.ToString() + ".txt");
                if (saveFileDialog1.ShowDialog() == DialogResult.OK) // abre caixa para salvar
                {
                    using (TextWriter tw = new StreamWriter(saveFileDialog1.FileName))
                    {
                        tw.WriteLine(LocRM.GetString("stroopResultHeader", currentCulture));
                        for (int i = 0; i < lines.Length; i++)
                        {
                            // writing lines on new file
                            tw.WriteLine(lines[i]);
                        }
                        tw.Close();
                        MessageBox.Show(LocRM.GetString("exportedFile", currentCulture));
                    }
                }

            }
            else
            {
                MessageBox.Show(LocRM.GetString("selectDataFile", currentCulture));
            }

        }

        private void helpButton_Click(object sender, EventArgs e)
        {
            FormInstructions infoBox = new FormInstructions(LocRM.GetString("showDataInstructions", currentCulture));
            try { infoBox.Show(); }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }

        private void audioPathDataGridView_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            playCurrentAudio();
        }

        private void playAudioButton_Click(object sender, EventArgs e)
        {
            playCurrentAudio();
        }

        private void playCurrentAudio()
        {
            player.SoundLocation = audioPathDataGridView.CurrentRow.Cells[1].Value.ToString();
            player.Play();
        }

        private void stopAudio_Click(object sender, EventArgs e)
        {
            player.Stop();
        }
        private void closeButton_Click(object sender, EventArgs e)
        {
            player.Stop();
            this.Parent.Controls.Remove(this);
        }

        private void exportAudioButton_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();
            // save file on .WAV format
            saveFileDialog1.Filter = "WAVEform (.wav)|*.wav";
            saveFileDialog1.RestoreDirectory = true;
            // only saves if there is one selected result to save
            if (audioPathDataGridView.CurrentRow != null)
            {
                saveFileDialog1.FileName = audioPathDataGridView.CurrentRow.Cells[0].Value.ToString();
                if (saveFileDialog1.ShowDialog() == DialogResult.OK) // abre caixa para salvar
                {
                    FileManipulation.CopyFile(audioPathDataGridView.CurrentRow.Cells[1].Value.ToString(), saveFileDialog1.FileName, true);
                }

            }
            else
            {
                MessageBox.Show(LocRM.GetString("selectAudioFile", currentCulture));
            }
        }

        private void exportAllAudiosButton_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();
            // save file on .WAV format
            saveFileDialog1.Filter = "Pasta Compactada (.zip)|*.zip";
            saveFileDialog1.RestoreDirectory = true;
            saveFileDialog1.FileName = resultComboBox.Text + "_audios";

            // only saves if there is one selected result to save
            if (audioPathDataGridView.Rows.Count != 0)
            {
                if (saveFileDialog1.ShowDialog() == DialogResult.OK) // abre caixa para salvar
                {
                    string directory = Path.GetDirectoryName(saveFileDialog1.FileName) + "\\" + Path.GetFileNameWithoutExtension(saveFileDialog1.FileName);
                    FileManipulation.CreateFolder(directory);
                    for(int i = 0; i < audioPathDataGridView.Rows.Count; i++)
                    {
                        string audioPath = audioPathDataGridView.Rows[i].Cells[1].Value.ToString();
                        FileManipulation.CopyFile(audioPath, directory + "\\" +Path.GetFileName(audioPath), true);
                    }
                    FileManipulation.CreateZip(directory, saveFileDialog1.FileName);
                    FileManipulation.DeleteFolder(directory);
                }

            }
            else
            {
                MessageBox.Show(LocRM.GetString("selectDataFile", currentCulture));
            }
        }
    }
}


text:
Built using Polymer

Current State of the Website should be
[here](http://afzalarsalan.github.io)