Ejemplo n.º 1
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);
        }