Exemple #1
0
        // TEST_START
        public RoutingHeadersClientImpl(RoutingHeaders.RoutingHeadersClient grpcClient, RoutingHeadersSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            RoutingHeadersSettings effectiveSettings = settings ?? RoutingHeadersSettings.GetDefault();
            gaxgrpc::ClientHelper  clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            _callNoUrlMethod = clientHelper.BuildApiCall <SimpleRequest, Response>("NoUrlMethod", grpcClient.NoUrlMethodAsync, grpcClient.NoUrlMethod, effectiveSettings.NoUrlMethodSettings);
            Modify_ApiCall(ref _callNoUrlMethod);
            Modify_NoUrlMethodApiCall(ref _callNoUrlMethod);
            _callGetMethod = clientHelper.BuildApiCall <SimpleRequest, Response>("GetMethod", grpcClient.GetMethodAsync, grpcClient.GetMethod, effectiveSettings.GetMethodSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetMethod);
            Modify_GetMethodApiCall(ref _callGetMethod);
            _callPostMethod = clientHelper.BuildApiCall <SimpleRequest, Response>("PostMethod", grpcClient.PostMethodAsync, grpcClient.PostMethod, effectiveSettings.PostMethodSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callPostMethod);
            Modify_PostMethodApiCall(ref _callPostMethod);
            _callPutMethod = clientHelper.BuildApiCall <SimpleRequest, Response>("PutMethod", grpcClient.PutMethodAsync, grpcClient.PutMethod, effectiveSettings.PutMethodSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callPutMethod);
            Modify_PutMethodApiCall(ref _callPutMethod);
            _callPatchMethod = clientHelper.BuildApiCall <SimpleRequest, Response>("PatchMethod", grpcClient.PatchMethodAsync, grpcClient.PatchMethod, effectiveSettings.PatchMethodSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callPatchMethod);
            Modify_PatchMethodApiCall(ref _callPatchMethod);
            _callDeleteMethod = clientHelper.BuildApiCall <SimpleRequest, Response>("DeleteMethod", grpcClient.DeleteMethodAsync, grpcClient.DeleteMethod, effectiveSettings.DeleteMethodSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callDeleteMethod);
            Modify_DeleteMethodApiCall(ref _callDeleteMethod);
            _callGetNoTemplateMethod = clientHelper.BuildApiCall <SimpleRequest, Response>("GetNoTemplateMethod", grpcClient.GetNoTemplateMethodAsync, grpcClient.GetNoTemplateMethod, effectiveSettings.GetNoTemplateMethodSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetNoTemplateMethod);
            Modify_GetNoTemplateMethodApiCall(ref _callGetNoTemplateMethod);
            _callNestedMultiMethod = clientHelper.BuildApiCall <NestedRequest, Response>("NestedMultiMethod", grpcClient.NestedMultiMethodAsync, grpcClient.NestedMultiMethod, effectiveSettings.NestedMultiMethodSettings).WithGoogleRequestParam("nest1.nest2.name", request => request.Nest1?.Nest2?.Name).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callNestedMultiMethod);
            Modify_NestedMultiMethodApiCall(ref _callNestedMultiMethod);
            _callServerStreamingMethod = clientHelper.BuildApiCall <SimpleRequest, Response>("ServerStreamingMethod", grpcClient.ServerStreamingMethod, effectiveSettings.ServerStreamingMethodSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callServerStreamingMethod);
            Modify_ServerStreamingMethodApiCall(ref _callServerStreamingMethod);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        // TEST_END

        public BasicServerStreamingClientImpl(BasicServerStreaming.BasicServerStreamingClient grpcClient, mel::ILogger logger)
        {
            BasicServerStreamingSettings effectiveSettings = null;
            gaxgrpc::ClientHelper        clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            // TEST_START
            _callMethodServer = clientHelper.BuildApiCall <Request, Response>("MethodServer", grpcClient.MethodServer, effectiveSettings.MethodServerSettings);
            // TEST_END
        }
Exemple #3
0
        /// <summary>
        /// Constructs a client wrapper for the FeaturestoreOnlineServingService service, with the specified gRPC client
        /// and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="FeaturestoreOnlineServingServiceSettings"/> used within this client.
        /// </param>
        public FeaturestoreOnlineServingServiceClientImpl(FeaturestoreOnlineServingService.FeaturestoreOnlineServingServiceClient grpcClient, FeaturestoreOnlineServingServiceSettings settings)
        {
            GrpcClient = grpcClient;
            FeaturestoreOnlineServingServiceSettings effectiveSettings = settings ?? FeaturestoreOnlineServingServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callReadFeatureValues = clientHelper.BuildApiCall <ReadFeatureValuesRequest, ReadFeatureValuesResponse>(grpcClient.ReadFeatureValuesAsync, grpcClient.ReadFeatureValues, effectiveSettings.ReadFeatureValuesSettings).WithGoogleRequestParam("entity_type", request => request.EntityType);
            Modify_ApiCall(ref _callReadFeatureValues);
            Modify_ReadFeatureValuesApiCall(ref _callReadFeatureValues);
            _callStreamingReadFeatureValues = clientHelper.BuildApiCall <StreamingReadFeatureValuesRequest, ReadFeatureValuesResponse>(grpcClient.StreamingReadFeatureValues, effectiveSettings.StreamingReadFeatureValuesSettings).WithGoogleRequestParam("entity_type", request => request.EntityType);
            Modify_ApiCall(ref _callStreamingReadFeatureValues);
            Modify_StreamingReadFeatureValuesApiCall(ref _callStreamingReadFeatureValues);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #4
0
        /// <summary>
        /// Constructs a client wrapper for the AdMobApi service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="AdMobApiSettings"/> used within this client.</param>
        public AdMobApiClientImpl(AdMobApi.AdMobApiClient grpcClient, AdMobApiSettings settings)
        {
            GrpcClient = grpcClient;
            AdMobApiSettings      effectiveSettings = settings ?? AdMobApiSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetPublisherAccount = clientHelper.BuildApiCall <GetPublisherAccountRequest, PublisherAccount>(grpcClient.GetPublisherAccountAsync, grpcClient.GetPublisherAccount, effectiveSettings.GetPublisherAccountSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetPublisherAccount);
            Modify_GetPublisherAccountApiCall(ref _callGetPublisherAccount);
            _callListPublisherAccounts = clientHelper.BuildApiCall <ListPublisherAccountsRequest, ListPublisherAccountsResponse>(grpcClient.ListPublisherAccountsAsync, grpcClient.ListPublisherAccounts, effectiveSettings.ListPublisherAccountsSettings);
            Modify_ApiCall(ref _callListPublisherAccounts);
            Modify_ListPublisherAccountsApiCall(ref _callListPublisherAccounts);
            _callGenerateNetworkReport = clientHelper.BuildApiCall <GenerateNetworkReportRequest, GenerateNetworkReportResponse>(grpcClient.GenerateNetworkReport, effectiveSettings.GenerateNetworkReportSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callGenerateNetworkReport);
            Modify_GenerateNetworkReportApiCall(ref _callGenerateNetworkReport);
            _callGenerateMediationReport = clientHelper.BuildApiCall <GenerateMediationReportRequest, GenerateMediationReportResponse>(grpcClient.GenerateMediationReport, effectiveSettings.GenerateMediationReportSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callGenerateMediationReport);
            Modify_GenerateMediationReportApiCall(ref _callGenerateMediationReport);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #5
0
 partial void Modify_ApiCall <TRequest, TResponse>(ref gaxgrpc::ApiServerStreamingCall <TRequest, TResponse> call) where TRequest : class, proto::IMessage <TRequest> where TResponse : class, proto::IMessage <TResponse>;
Exemple #6
0
 partial void Modify_ServerStreamingMethodApiCall(ref gaxgrpc::ApiServerStreamingCall <SimpleRequest, Response> call);
Exemple #7
0
 partial void Modify_StreamingReadFeatureValuesApiCall(ref gaxgrpc::ApiServerStreamingCall <StreamingReadFeatureValuesRequest, ReadFeatureValuesResponse> call);
Exemple #8
0
 partial void Modify_GenerateMediationReportApiCall(ref gaxgrpc::ApiServerStreamingCall <GenerateMediationReportRequest, GenerateMediationReportResponse> call);