/// <summary> /// Creates a <see cref="CampaignGroupServiceClient"/> 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="CampaignGroupServiceSettings"/>.</param> /// <returns>The created <see cref="CampaignGroupServiceClient"/>.</returns> public static CampaignGroupServiceClient Create(grpccore::CallInvoker callInvoker, CampaignGroupServiceSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpccore::Interceptors.Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpccore::Interceptors.CallInvokerExtensions.Intercept(callInvoker, interceptor); } CampaignGroupService.CampaignGroupServiceClient grpcClient = new CampaignGroupService.CampaignGroupServiceClient(callInvoker); return(new CampaignGroupServiceClientImpl(grpcClient, settings)); }
/// <summary> /// Constructs a client wrapper for the CampaignGroupService service, with the specified gRPC client and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="CampaignGroupServiceSettings"/> used within this client </param> public CampaignGroupServiceClientImpl(CampaignGroupService.CampaignGroupServiceClient grpcClient, CampaignGroupServiceSettings settings) { GrpcClient = grpcClient; CampaignGroupServiceSettings effectiveSettings = settings ?? CampaignGroupServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callGetCampaignGroup = clientHelper.BuildApiCall <GetCampaignGroupRequest, gagvr::CampaignGroup>( GrpcClient.GetCampaignGroupAsync, GrpcClient.GetCampaignGroup, effectiveSettings.GetCampaignGroupSettings); _callMutateCampaignGroups = clientHelper.BuildApiCall <MutateCampaignGroupsRequest, MutateCampaignGroupsResponse>( GrpcClient.MutateCampaignGroupsAsync, GrpcClient.MutateCampaignGroups, effectiveSettings.MutateCampaignGroupsSettings); Modify_ApiCall(ref _callGetCampaignGroup); Modify_GetCampaignGroupApiCall(ref _callGetCampaignGroup); Modify_ApiCall(ref _callMutateCampaignGroups); Modify_MutateCampaignGroupsApiCall(ref _callMutateCampaignGroups); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
partial void OnConstruction(CampaignGroupService.CampaignGroupServiceClient grpcClient, CampaignGroupServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);