/// <summary>
 /// Creates a <see cref="AdGroupAdAssetViewServiceClient"/> which uses the specified call invoker for remote operations.
 /// </summary>
 /// <param name="callInvoker">The <see cref="grpccore::CallInvoker"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="AdGroupAdAssetViewServiceSettings"/>.</param>
 /// <returns>The created <see cref="AdGroupAdAssetViewServiceClient"/>.</returns>
 public static AdGroupAdAssetViewServiceClient Create(grpccore::CallInvoker callInvoker, AdGroupAdAssetViewServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
     grpccore::Interceptors.Interceptor interceptor = settings?.Interceptor;
     if (interceptor != null)
     {
         callInvoker = grpccore::Interceptors.CallInvokerExtensions.Intercept(callInvoker, interceptor);
     }
     AdGroupAdAssetViewService.AdGroupAdAssetViewServiceClient grpcClient = new AdGroupAdAssetViewService.AdGroupAdAssetViewServiceClient(callInvoker);
     return(new AdGroupAdAssetViewServiceClientImpl(grpcClient, settings));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructs a client wrapper for the AdGroupAdAssetViewService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="AdGroupAdAssetViewServiceSettings"/> used within this client.
        /// </param>
        public AdGroupAdAssetViewServiceClientImpl(AdGroupAdAssetViewService.AdGroupAdAssetViewServiceClient grpcClient, AdGroupAdAssetViewServiceSettings settings)
        {
            GrpcClient = grpcClient;
            AdGroupAdAssetViewServiceSettings effectiveSettings = settings ?? AdGroupAdAssetViewServiceSettings.GetDefault();
            gaxgrpc::ClientHelper             clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetAdGroupAdAssetView = clientHelper.BuildApiCall <GetAdGroupAdAssetViewRequest, gagvr::AdGroupAdAssetView>(grpcClient.GetAdGroupAdAssetViewAsync, grpcClient.GetAdGroupAdAssetView, effectiveSettings.GetAdGroupAdAssetViewSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetAdGroupAdAssetView);
            Modify_GetAdGroupAdAssetViewApiCall(ref _callGetAdGroupAdAssetView);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the AdGroupAdAssetViewService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="AdGroupAdAssetViewServiceSettings"/> used within this client </param>
        public AdGroupAdAssetViewServiceClientImpl(AdGroupAdAssetViewService.AdGroupAdAssetViewServiceClient grpcClient, AdGroupAdAssetViewServiceSettings settings)
        {
            GrpcClient = grpcClient;
            AdGroupAdAssetViewServiceSettings effectiveSettings = settings ?? AdGroupAdAssetViewServiceSettings.GetDefault();
            gaxgrpc::ClientHelper             clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetAdGroupAdAssetView = clientHelper.BuildApiCall <GetAdGroupAdAssetViewRequest, gagvr::AdGroupAdAssetView>(
                GrpcClient.GetAdGroupAdAssetViewAsync, GrpcClient.GetAdGroupAdAssetView, effectiveSettings.GetAdGroupAdAssetViewSettings)
                                         .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"resource_name={request.ResourceName}"));
            Modify_ApiCall(ref _callGetAdGroupAdAssetView);
            Modify_GetAdGroupAdAssetViewApiCall(ref _callGetAdGroupAdAssetView);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Ejemplo n.º 4
0
 partial void OnConstruction(AdGroupAdAssetViewService.AdGroupAdAssetViewServiceClient grpcClient, AdGroupAdAssetViewServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);