コード例 #1
0
        /// <summary>
        /// Creates a <see cref="CampaignAssetServiceClient"/> 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="CampaignAssetServiceSettings"/>.</param>
        /// <returns>The created <see cref="CampaignAssetServiceClient"/>.</returns>
        internal static CampaignAssetServiceClient Create(grpccore::CallInvoker callInvoker, CampaignAssetServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            CampaignAssetService.CampaignAssetServiceClient grpcClient = new CampaignAssetService.CampaignAssetServiceClient(callInvoker);
            return(new CampaignAssetServiceClientImpl(grpcClient, settings));
        }
コード例 #2
0
        /// <summary>
        /// Constructs a client wrapper for the CampaignAssetService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="CampaignAssetServiceSettings"/> used within this client.</param>
        public CampaignAssetServiceClientImpl(CampaignAssetService.CampaignAssetServiceClient grpcClient, CampaignAssetServiceSettings settings)
        {
            GrpcClient = grpcClient;
            CampaignAssetServiceSettings effectiveSettings = settings ?? CampaignAssetServiceSettings.GetDefault();
            gaxgrpc::ClientHelper        clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetCampaignAsset = clientHelper.BuildApiCall <GetCampaignAssetRequest, gagvr::CampaignAsset>(grpcClient.GetCampaignAssetAsync, grpcClient.GetCampaignAsset, effectiveSettings.GetCampaignAssetSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetCampaignAsset);
            Modify_GetCampaignAssetApiCall(ref _callGetCampaignAsset);
            _callMutateCampaignAssets = clientHelper.BuildApiCall <MutateCampaignAssetsRequest, MutateCampaignAssetsResponse>(grpcClient.MutateCampaignAssetsAsync, grpcClient.MutateCampaignAssets, effectiveSettings.MutateCampaignAssetsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateCampaignAssets);
            Modify_MutateCampaignAssetsApiCall(ref _callMutateCampaignAssets);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
コード例 #3
0
 partial void OnConstruction(CampaignAssetService.CampaignAssetServiceClient grpcClient, CampaignAssetServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);