Exemplo n.º 1
0
        /// <summary>
        /// Creates a <see cref="CampaignSharedSetServiceClient"/> 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="CampaignSharedSetServiceSettings"/>.</param>
        /// <returns>The created <see cref="CampaignSharedSetServiceClient"/>.</returns>
        internal static CampaignSharedSetServiceClient Create(grpccore::CallInvoker callInvoker, CampaignSharedSetServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            CampaignSharedSetService.CampaignSharedSetServiceClient grpcClient = new CampaignSharedSetService.CampaignSharedSetServiceClient(callInvoker);
            return(new CampaignSharedSetServiceClientImpl(grpcClient, settings));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructs a client wrapper for the CampaignSharedSetService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="CampaignSharedSetServiceSettings"/> used within this client.
        /// </param>
        public CampaignSharedSetServiceClientImpl(CampaignSharedSetService.CampaignSharedSetServiceClient grpcClient, CampaignSharedSetServiceSettings settings)
        {
            GrpcClient = grpcClient;
            CampaignSharedSetServiceSettings effectiveSettings = settings ?? CampaignSharedSetServiceSettings.GetDefault();
            gaxgrpc::ClientHelper            clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetCampaignSharedSet = clientHelper.BuildApiCall <GetCampaignSharedSetRequest, gagvr::CampaignSharedSet>(grpcClient.GetCampaignSharedSetAsync, grpcClient.GetCampaignSharedSet, effectiveSettings.GetCampaignSharedSetSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetCampaignSharedSet);
            Modify_GetCampaignSharedSetApiCall(ref _callGetCampaignSharedSet);
            _callMutateCampaignSharedSets = clientHelper.BuildApiCall <MutateCampaignSharedSetsRequest, MutateCampaignSharedSetsResponse>(grpcClient.MutateCampaignSharedSetsAsync, grpcClient.MutateCampaignSharedSets, effectiveSettings.MutateCampaignSharedSetsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateCampaignSharedSets);
            Modify_MutateCampaignSharedSetsApiCall(ref _callMutateCampaignSharedSets);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 3
0
 partial void OnConstruction(CampaignSharedSetService.CampaignSharedSetServiceClient grpcClient, CampaignSharedSetServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);