예제 #1
0
        /// <summary>
        /// Constructs a client wrapper for the AdGroupCriterionSimulationService service, with the specified gRPC
        /// client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="AdGroupCriterionSimulationServiceSettings"/> used within this client.
        /// </param>
        public AdGroupCriterionSimulationServiceClientImpl(AdGroupCriterionSimulationService.AdGroupCriterionSimulationServiceClient grpcClient, AdGroupCriterionSimulationServiceSettings settings)
        {
            GrpcClient = grpcClient;
            AdGroupCriterionSimulationServiceSettings effectiveSettings = settings ?? AdGroupCriterionSimulationServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetAdGroupCriterionSimulation = clientHelper.BuildApiCall <GetAdGroupCriterionSimulationRequest, gagvr::AdGroupCriterionSimulation>(grpcClient.GetAdGroupCriterionSimulationAsync, grpcClient.GetAdGroupCriterionSimulation, effectiveSettings.GetAdGroupCriterionSimulationSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetAdGroupCriterionSimulation);
            Modify_GetAdGroupCriterionSimulationApiCall(ref _callGetAdGroupCriterionSimulation);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
예제 #2
0
 partial void OnCopy(AdGroupCriterionSimulationServiceSettings existing);
예제 #3
0
 private AdGroupCriterionSimulationServiceSettings(AdGroupCriterionSimulationServiceSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     GetAdGroupCriterionSimulationSettings = existing.GetAdGroupCriterionSimulationSettings;
     OnCopy(existing);
 }
예제 #4
0
 partial void OnConstruction(AdGroupCriterionSimulationService.AdGroupCriterionSimulationServiceClient grpcClient, AdGroupCriterionSimulationServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
예제 #5
0
        /// <summary>
        /// Creates a <see cref="AdGroupCriterionSimulationServiceClient"/> 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="AdGroupCriterionSimulationServiceSettings"/>.</param>
        /// <returns>The created <see cref="AdGroupCriterionSimulationServiceClient"/>.</returns>
        internal static AdGroupCriterionSimulationServiceClient Create(grpccore::CallInvoker callInvoker, AdGroupCriterionSimulationServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            AdGroupCriterionSimulationService.AdGroupCriterionSimulationServiceClient grpcClient = new AdGroupCriterionSimulationService.AdGroupCriterionSimulationServiceClient(callInvoker);
            return(new AdGroupCriterionSimulationServiceClientImpl(grpcClient, settings));
        }