Exemple #1
0
 /// <summary>
 /// Creates a <see cref="ExtensionFeedItemServiceClient"/> 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="ExtensionFeedItemServiceSettings"/>.</param>
 /// <returns>The created <see cref="ExtensionFeedItemServiceClient"/>.</returns>
 public static ExtensionFeedItemServiceClient Create(grpccore::CallInvoker callInvoker, ExtensionFeedItemServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
     grpccore::Interceptors.Interceptor interceptor = settings?.Interceptor;
     if (interceptor != null)
     {
         callInvoker = grpccore::Interceptors.CallInvokerExtensions.Intercept(callInvoker, interceptor);
     }
     ExtensionFeedItemService.ExtensionFeedItemServiceClient grpcClient = new ExtensionFeedItemService.ExtensionFeedItemServiceClient(callInvoker);
     return(new ExtensionFeedItemServiceClientImpl(grpcClient, settings));
 }
Exemple #2
0
        /// <summary>
        /// Constructs a client wrapper for the ExtensionFeedItemService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="ExtensionFeedItemServiceSettings"/> used within this client.
        /// </param>
        public ExtensionFeedItemServiceClientImpl(ExtensionFeedItemService.ExtensionFeedItemServiceClient grpcClient, ExtensionFeedItemServiceSettings settings)
        {
            GrpcClient = grpcClient;
            ExtensionFeedItemServiceSettings effectiveSettings = settings ?? ExtensionFeedItemServiceSettings.GetDefault();
            gaxgrpc::ClientHelper            clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetExtensionFeedItem = clientHelper.BuildApiCall <GetExtensionFeedItemRequest, gagvr::ExtensionFeedItem>(grpcClient.GetExtensionFeedItemAsync, grpcClient.GetExtensionFeedItem, effectiveSettings.GetExtensionFeedItemSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetExtensionFeedItem);
            Modify_GetExtensionFeedItemApiCall(ref _callGetExtensionFeedItem);
            _callMutateExtensionFeedItems = clientHelper.BuildApiCall <MutateExtensionFeedItemsRequest, MutateExtensionFeedItemsResponse>(grpcClient.MutateExtensionFeedItemsAsync, grpcClient.MutateExtensionFeedItems, effectiveSettings.MutateExtensionFeedItemsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateExtensionFeedItems);
            Modify_MutateExtensionFeedItemsApiCall(ref _callMutateExtensionFeedItems);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #3
0
        /// <summary>
        /// Constructs a client wrapper for the ExtensionFeedItemService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="ExtensionFeedItemServiceSettings"/> used within this client </param>
        public ExtensionFeedItemServiceClientImpl(ExtensionFeedItemService.ExtensionFeedItemServiceClient grpcClient, ExtensionFeedItemServiceSettings settings)
        {
            GrpcClient = grpcClient;
            ExtensionFeedItemServiceSettings effectiveSettings = settings ?? ExtensionFeedItemServiceSettings.GetDefault();
            gaxgrpc::ClientHelper            clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetExtensionFeedItem = clientHelper.BuildApiCall <GetExtensionFeedItemRequest, gagvr::ExtensionFeedItem>(
                GrpcClient.GetExtensionFeedItemAsync, GrpcClient.GetExtensionFeedItem, effectiveSettings.GetExtensionFeedItemSettings)
                                        .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"resource_name={request.ResourceName}"));
            _callMutateExtensionFeedItems = clientHelper.BuildApiCall <MutateExtensionFeedItemsRequest, MutateExtensionFeedItemsResponse>(
                GrpcClient.MutateExtensionFeedItemsAsync, GrpcClient.MutateExtensionFeedItems, effectiveSettings.MutateExtensionFeedItemsSettings)
                                            .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"customer_id={request.CustomerId}"));
            Modify_ApiCall(ref _callGetExtensionFeedItem);
            Modify_GetExtensionFeedItemApiCall(ref _callGetExtensionFeedItem);
            Modify_ApiCall(ref _callMutateExtensionFeedItems);
            Modify_MutateExtensionFeedItemsApiCall(ref _callMutateExtensionFeedItems);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #4
0
 partial void OnConstruction(ExtensionFeedItemService.ExtensionFeedItemServiceClient grpcClient, ExtensionFeedItemServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);