/// <summary>
        /// Constructs a client wrapper for the SnapshotService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="SnapshotServiceSettings"/> used within this client </param>
        public SnapshotServiceClientImpl(SnapshotService.SnapshotServiceClient grpcClient, SnapshotServiceSettings settings)
        {
            GrpcClient = grpcClient;
            SnapshotServiceSettings effectiveSettings = settings ?? SnapshotServiceSettings.GetDefault();
            gaxgrpc::ClientHelper   clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            TakeSnapshotOperationsClient = new lro::OperationsClientImpl(
                grpcClient.CreateOperationsClient(), effectiveSettings.TakeSnapshotOperationsSettings);
            _callListSnapshots = clientHelper.BuildApiCall <ListSnapshotsRequest, ListSnapshotsResponse>(
                GrpcClient.ListSnapshotsAsync, GrpcClient.ListSnapshots, effectiveSettings.ListSnapshotsSettings);
            _callGetSnapshot = clientHelper.BuildApiCall <GetSnapshotRequest, GetSnapshotResponse>(
                GrpcClient.GetSnapshotAsync, GrpcClient.GetSnapshot, effectiveSettings.GetSnapshotSettings);
            _callTakeSnapshot = clientHelper.BuildApiCall <TakeSnapshotRequest, lro::Operation>(
                GrpcClient.TakeSnapshotAsync, GrpcClient.TakeSnapshot, effectiveSettings.TakeSnapshotSettings);
            _callUploadSnapshot = clientHelper.BuildApiCall <UploadSnapshotRequest, UploadSnapshotResponse>(
                GrpcClient.UploadSnapshotAsync, GrpcClient.UploadSnapshot, effectiveSettings.UploadSnapshotSettings);
            _callConfirmUpload = clientHelper.BuildApiCall <ConfirmUploadRequest, ConfirmUploadResponse>(
                GrpcClient.ConfirmUploadAsync, GrpcClient.ConfirmUpload, effectiveSettings.ConfirmUploadSettings);
            Modify_ApiCall(ref _callListSnapshots);
            Modify_ListSnapshotsApiCall(ref _callListSnapshots);
            Modify_ApiCall(ref _callGetSnapshot);
            Modify_GetSnapshotApiCall(ref _callGetSnapshot);
            Modify_ApiCall(ref _callTakeSnapshot);
            Modify_TakeSnapshotApiCall(ref _callTakeSnapshot);
            Modify_ApiCall(ref _callUploadSnapshot);
            Modify_UploadSnapshotApiCall(ref _callUploadSnapshot);
            Modify_ApiCall(ref _callConfirmUpload);
            Modify_ConfirmUploadApiCall(ref _callConfirmUpload);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructs a client wrapper for the DeploymentService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="DeploymentServiceSettings"/> used within this client </param>
        public DeploymentServiceClientImpl(DeploymentService.DeploymentServiceClient grpcClient, DeploymentServiceSettings settings)
        {
            GrpcClient = grpcClient;
            DeploymentServiceSettings effectiveSettings = settings ?? DeploymentServiceSettings.GetDefault();
            gaxgrpc::ClientHelper     clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            CreateDeploymentOperationsClient = new lro::OperationsClientImpl(
                grpcClient.CreateOperationsClient(), effectiveSettings.CreateDeploymentOperationsSettings);
            _callListDeployments = clientHelper.BuildApiCall <ListDeploymentsRequest, ListDeploymentsResponse>(
                GrpcClient.ListDeploymentsAsync, GrpcClient.ListDeployments, effectiveSettings.ListDeploymentsSettings);
            _callGetDeployment = clientHelper.BuildApiCall <GetDeploymentRequest, GetDeploymentResponse>(
                GrpcClient.GetDeploymentAsync, GrpcClient.GetDeployment, effectiveSettings.GetDeploymentSettings);
            _callCreateDeployment = clientHelper.BuildApiCall <CreateDeploymentRequest, lro::Operation>(
                GrpcClient.CreateDeploymentAsync, GrpcClient.CreateDeployment, effectiveSettings.CreateDeploymentSettings);
            _callUpdateDeployment = clientHelper.BuildApiCall <UpdateDeploymentRequest, UpdateDeploymentResponse>(
                GrpcClient.UpdateDeploymentAsync, GrpcClient.UpdateDeployment, effectiveSettings.UpdateDeploymentSettings);
            _callStopDeployment = clientHelper.BuildApiCall <StopDeploymentRequest, StopDeploymentResponse>(
                GrpcClient.StopDeploymentAsync, GrpcClient.StopDeployment, effectiveSettings.StopDeploymentSettings);
            Modify_ApiCall(ref _callListDeployments);
            Modify_ListDeploymentsApiCall(ref _callListDeployments);
            Modify_ApiCall(ref _callGetDeployment);
            Modify_GetDeploymentApiCall(ref _callGetDeployment);
            Modify_ApiCall(ref _callCreateDeployment);
            Modify_CreateDeploymentApiCall(ref _callCreateDeployment);
            Modify_ApiCall(ref _callUpdateDeployment);
            Modify_UpdateDeploymentApiCall(ref _callUpdateDeployment);
            Modify_ApiCall(ref _callStopDeployment);
            Modify_StopDeploymentApiCall(ref _callStopDeployment);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the DomainMappings service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="DomainMappingsSettings"/> used within this client.</param>
        public DomainMappingsClientImpl(DomainMappings.DomainMappingsClient grpcClient, DomainMappingsSettings settings)
        {
            GrpcClient = grpcClient;
            DomainMappingsSettings effectiveSettings = settings ?? DomainMappingsSettings.GetDefault();
            gaxgrpc::ClientHelper  clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            CreateDomainMappingOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.CreateDomainMappingOperationsSettings);
            UpdateDomainMappingOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.UpdateDomainMappingOperationsSettings);
            DeleteDomainMappingOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.DeleteDomainMappingOperationsSettings);
            _callListDomainMappings             = clientHelper.BuildApiCall <ListDomainMappingsRequest, ListDomainMappingsResponse>(grpcClient.ListDomainMappingsAsync, grpcClient.ListDomainMappings, effectiveSettings.ListDomainMappingsSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callListDomainMappings);
            Modify_ListDomainMappingsApiCall(ref _callListDomainMappings);
            _callGetDomainMapping = clientHelper.BuildApiCall <GetDomainMappingRequest, DomainMapping>(grpcClient.GetDomainMappingAsync, grpcClient.GetDomainMapping, effectiveSettings.GetDomainMappingSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetDomainMapping);
            Modify_GetDomainMappingApiCall(ref _callGetDomainMapping);
            _callCreateDomainMapping = clientHelper.BuildApiCall <CreateDomainMappingRequest, lro::Operation>(grpcClient.CreateDomainMappingAsync, grpcClient.CreateDomainMapping, effectiveSettings.CreateDomainMappingSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callCreateDomainMapping);
            Modify_CreateDomainMappingApiCall(ref _callCreateDomainMapping);
            _callUpdateDomainMapping = clientHelper.BuildApiCall <UpdateDomainMappingRequest, lro::Operation>(grpcClient.UpdateDomainMappingAsync, grpcClient.UpdateDomainMapping, effectiveSettings.UpdateDomainMappingSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callUpdateDomainMapping);
            Modify_UpdateDomainMappingApiCall(ref _callUpdateDomainMapping);
            _callDeleteDomainMapping = clientHelper.BuildApiCall <DeleteDomainMappingRequest, lro::Operation>(grpcClient.DeleteDomainMappingAsync, grpcClient.DeleteDomainMapping, effectiveSettings.DeleteDomainMappingSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callDeleteDomainMapping);
            Modify_DeleteDomainMappingApiCall(ref _callDeleteDomainMapping);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        public BasicLroClientImpl(BasicLro.BasicLroClient grpcClient, mel::ILogger logger)
        {
            var effectiveSettings = new BasicLroSettings();

            // TEST_START
            Method1OperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.Method1OperationsSettings, logger);
            // TEST_END
        }
        /// <summary>
        /// Constructs a client wrapper for the WorkflowsServiceV2Beta service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="WorkflowsServiceV2BetaSettings"/> used within this client.
        /// </param>
        public WorkflowsServiceV2BetaClientImpl(WorkflowsServiceV2Beta.WorkflowsServiceV2BetaClient grpcClient, WorkflowsServiceV2BetaSettings settings)
        {
            GrpcClient = grpcClient;
            WorkflowsServiceV2BetaSettings effectiveSettings = settings ?? WorkflowsServiceV2BetaSettings.GetDefault();
            gaxgrpc::ClientHelper          clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            RunPipelineOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.RunPipelineOperationsSettings);
            _callRunPipeline            = clientHelper.BuildApiCall <RunPipelineRequest, lro::Operation>(grpcClient.RunPipelineAsync, grpcClient.RunPipeline, effectiveSettings.RunPipelineSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callRunPipeline);
            Modify_RunPipelineApiCall(ref _callRunPipeline);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the RegionInstances service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="RegionInstancesSettings"/> used within this client.</param>
        public RegionInstancesClientImpl(RegionInstances.RegionInstancesClient grpcClient, RegionInstancesSettings settings)
        {
            GrpcClient = grpcClient;
            RegionInstancesSettings effectiveSettings = settings ?? RegionInstancesSettings.GetDefault();
            gaxgrpc::ClientHelper   clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            BulkInsertOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClientForRegionOperations(), effectiveSettings.BulkInsertOperationsSettings);
            _callBulkInsert            = clientHelper.BuildApiCall <BulkInsertRegionInstanceRequest, Operation>(grpcClient.BulkInsertAsync, grpcClient.BulkInsert, effectiveSettings.BulkInsertSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region);
            Modify_ApiCall(ref _callBulkInsert);
            Modify_BulkInsertApiCall(ref _callBulkInsert);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the VideoIntelligenceService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="VideoIntelligenceServiceSettings"/> used within this client.
        /// </param>
        public VideoIntelligenceServiceClientImpl(VideoIntelligenceService.VideoIntelligenceServiceClient grpcClient, VideoIntelligenceServiceSettings settings)
        {
            GrpcClient = grpcClient;
            VideoIntelligenceServiceSettings effectiveSettings = settings ?? VideoIntelligenceServiceSettings.GetDefault();
            gaxgrpc::ClientHelper            clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            AnnotateVideoOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.AnnotateVideoOperationsSettings);
            _callAnnotateVideo            = clientHelper.BuildApiCall <AnnotateVideoRequest, lro::Operation>(grpcClient.AnnotateVideoAsync, grpcClient.AnnotateVideo, effectiveSettings.AnnotateVideoSettings);
            Modify_ApiCall(ref _callAnnotateVideo);
            Modify_AnnotateVideoApiCall(ref _callAnnotateVideo);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Constructs a client wrapper for the UnitTests service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="UnitTestsSettings"/> used within this client.</param>
        public UnitTestsClientImpl(UnitTests.UnitTestsClient grpcClient, UnitTestsSettings settings)
        {
            GrpcClient = grpcClient;
            UnitTestsSettings     effectiveSettings = settings ?? UnitTestsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            MethodLroOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.MethodLroOperationsSettings);
            _callMethodValues         = clientHelper.BuildApiCall <ValuesRequest, Response>(grpcClient.MethodValuesAsync, grpcClient.MethodValues, effectiveSettings.MethodValuesSettings);
            Modify_ApiCall(ref _callMethodValues);
            Modify_MethodValuesApiCall(ref _callMethodValues);
            _callMethodLro = clientHelper.BuildApiCall <LroRequest, lro::Operation>(grpcClient.MethodLroAsync, grpcClient.MethodLro, effectiveSettings.MethodLroSettings);
            Modify_ApiCall(ref _callMethodLro);
            Modify_MethodLroApiCall(ref _callMethodLro);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the MigrationService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="MigrationServiceSettings"/> used within this client.</param>
        public MigrationServiceClientImpl(MigrationService.MigrationServiceClient grpcClient, MigrationServiceSettings settings)
        {
            GrpcClient = grpcClient;
            MigrationServiceSettings effectiveSettings = settings ?? MigrationServiceSettings.GetDefault();
            gaxgrpc::ClientHelper    clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            BatchMigrateResourcesOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.BatchMigrateResourcesOperationsSettings);
            _callSearchMigratableResources        = clientHelper.BuildApiCall <SearchMigratableResourcesRequest, SearchMigratableResourcesResponse>(grpcClient.SearchMigratableResourcesAsync, grpcClient.SearchMigratableResources, effectiveSettings.SearchMigratableResourcesSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callSearchMigratableResources);
            Modify_SearchMigratableResourcesApiCall(ref _callSearchMigratableResources);
            _callBatchMigrateResources = clientHelper.BuildApiCall <BatchMigrateResourcesRequest, lro::Operation>(grpcClient.BatchMigrateResourcesAsync, grpcClient.BatchMigrateResources, effectiveSettings.BatchMigrateResourcesSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callBatchMigrateResources);
            Modify_BatchMigrateResourcesApiCall(ref _callBatchMigrateResources);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Constructs a client wrapper for the PredictionService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="PredictionServiceSettings"/> used within this client.</param>
        public PredictionServiceClientImpl(PredictionService.PredictionServiceClient grpcClient, PredictionServiceSettings settings)
        {
            GrpcClient = grpcClient;
            PredictionServiceSettings effectiveSettings = settings ?? PredictionServiceSettings.GetDefault();
            gaxgrpc::ClientHelper     clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            BatchPredictOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.BatchPredictOperationsSettings);
            _callPredict = clientHelper.BuildApiCall <PredictRequest, PredictResponse>(grpcClient.PredictAsync, grpcClient.Predict, effectiveSettings.PredictSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callPredict);
            Modify_PredictApiCall(ref _callPredict);
            _callBatchPredict = clientHelper.BuildApiCall <BatchPredictRequest, lro::Operation>(grpcClient.BatchPredictAsync, grpcClient.BatchPredict, effectiveSettings.BatchPredictSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callBatchPredict);
            Modify_BatchPredictApiCall(ref _callBatchPredict);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the AssetService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="AssetServiceSettings"/> used within this client.</param>
        public AssetServiceClientImpl(AssetService.AssetServiceClient grpcClient, AssetServiceSettings settings)
        {
            GrpcClient = grpcClient;
            AssetServiceSettings  effectiveSettings = settings ?? AssetServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            ExportIamPolicyAnalysisOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.ExportIamPolicyAnalysisOperationsSettings);
            _callAnalyzeIamPolicy = clientHelper.BuildApiCall <AnalyzeIamPolicyRequest, AnalyzeIamPolicyResponse>(grpcClient.AnalyzeIamPolicyAsync, grpcClient.AnalyzeIamPolicy, effectiveSettings.AnalyzeIamPolicySettings).WithGoogleRequestParam("analysis_query.parent", request => request.AnalysisQuery?.Parent);
            Modify_ApiCall(ref _callAnalyzeIamPolicy);
            Modify_AnalyzeIamPolicyApiCall(ref _callAnalyzeIamPolicy);
            _callExportIamPolicyAnalysis = clientHelper.BuildApiCall <ExportIamPolicyAnalysisRequest, lro::Operation>(grpcClient.ExportIamPolicyAnalysisAsync, grpcClient.ExportIamPolicyAnalysis, effectiveSettings.ExportIamPolicyAnalysisSettings).WithGoogleRequestParam("analysis_query.parent", request => request.AnalysisQuery?.Parent);
            Modify_ApiCall(ref _callExportIamPolicyAnalysis);
            Modify_ExportIamPolicyAnalysisApiCall(ref _callExportIamPolicyAnalysis);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the CompletionService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="CompletionServiceSettings"/> used within this client.</param>
        public CompletionServiceClientImpl(CompletionService.CompletionServiceClient grpcClient, CompletionServiceSettings settings)
        {
            GrpcClient = grpcClient;
            CompletionServiceSettings effectiveSettings = settings ?? CompletionServiceSettings.GetDefault();
            gaxgrpc::ClientHelper     clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            ImportCompletionDataOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.ImportCompletionDataOperationsSettings);
            _callCompleteQuery = clientHelper.BuildApiCall <CompleteQueryRequest, CompleteQueryResponse>(grpcClient.CompleteQueryAsync, grpcClient.CompleteQuery, effectiveSettings.CompleteQuerySettings).WithGoogleRequestParam("catalog", request => request.Catalog);
            Modify_ApiCall(ref _callCompleteQuery);
            Modify_CompleteQueryApiCall(ref _callCompleteQuery);
            _callImportCompletionData = clientHelper.BuildApiCall <ImportCompletionDataRequest, lro::Operation>(grpcClient.ImportCompletionDataAsync, grpcClient.ImportCompletionData, effectiveSettings.ImportCompletionDataSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callImportCompletionData);
            Modify_ImportCompletionDataApiCall(ref _callImportCompletionData);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 13
0
        /// <summary>
        /// Constructs a client wrapper for the DocumentUnderstandingService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="DocumentUnderstandingServiceSettings"/> used within this client.
        /// </param>
        public DocumentUnderstandingServiceClientImpl(DocumentUnderstandingService.DocumentUnderstandingServiceClient grpcClient, DocumentUnderstandingServiceSettings settings)
        {
            GrpcClient = grpcClient;
            DocumentUnderstandingServiceSettings effectiveSettings = settings ?? DocumentUnderstandingServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            BatchProcessDocumentsOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.BatchProcessDocumentsOperationsSettings);
            _callBatchProcessDocuments            = clientHelper.BuildApiCall <BatchProcessDocumentsRequest, lro::Operation>(grpcClient.BatchProcessDocumentsAsync, grpcClient.BatchProcessDocuments, effectiveSettings.BatchProcessDocumentsSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callBatchProcessDocuments);
            Modify_BatchProcessDocumentsApiCall(ref _callBatchProcessDocuments);
            _callProcessDocument = clientHelper.BuildApiCall <ProcessDocumentRequest, Document>(grpcClient.ProcessDocumentAsync, grpcClient.ProcessDocument, effectiveSettings.ProcessDocumentSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callProcessDocument);
            Modify_ProcessDocumentApiCall(ref _callProcessDocument);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 14
0
        /// <summary>
        /// Constructs a client wrapper for the Speech service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="SpeechSettings"/> used within this client.</param>
        public SpeechClientImpl(Speech.SpeechClient grpcClient, SpeechSettings settings)
        {
            GrpcClient = grpcClient;
            SpeechSettings        effectiveSettings = settings ?? SpeechSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            LongRunningRecognizeOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.LongRunningRecognizeOperationsSettings);
            _callRecognize = clientHelper.BuildApiCall <RecognizeRequest, RecognizeResponse>(grpcClient.RecognizeAsync, grpcClient.Recognize, effectiveSettings.RecognizeSettings);
            Modify_ApiCall(ref _callRecognize);
            Modify_RecognizeApiCall(ref _callRecognize);
            _callLongRunningRecognize = clientHelper.BuildApiCall <LongRunningRecognizeRequest, lro::Operation>(grpcClient.LongRunningRecognizeAsync, grpcClient.LongRunningRecognize, effectiveSettings.LongRunningRecognizeSettings);
            Modify_ApiCall(ref _callLongRunningRecognize);
            Modify_LongRunningRecognizeApiCall(ref _callLongRunningRecognize);
            _callStreamingRecognize = clientHelper.BuildApiCall <StreamingRecognizeRequest, StreamingRecognizeResponse>(grpcClient.StreamingRecognize, effectiveSettings.StreamingRecognizeSettings, effectiveSettings.StreamingRecognizeStreamingSettings);
            Modify_ApiCall(ref _callStreamingRecognize);
            Modify_StreamingRecognizeApiCall(ref _callStreamingRecognize);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the AssetService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="AssetServiceSettings"/> used within this client </param>
        public AssetServiceClientImpl(AssetService.AssetServiceClient grpcClient, AssetServiceSettings settings)
        {
            GrpcClient = grpcClient;
            AssetServiceSettings  effectiveSettings = settings ?? AssetServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            ExportAssetsOperationsClient = new lro::OperationsClientImpl(
                grpcClient.CreateOperationsClient(), effectiveSettings.ExportAssetsOperationsSettings);
            _callExportAssets = clientHelper.BuildApiCall <ExportAssetsRequest, lro::Operation>(
                GrpcClient.ExportAssetsAsync, GrpcClient.ExportAssets, effectiveSettings.ExportAssetsSettings);
            _callBatchGetAssetsHistory = clientHelper.BuildApiCall <BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse>(
                GrpcClient.BatchGetAssetsHistoryAsync, GrpcClient.BatchGetAssetsHistory, effectiveSettings.BatchGetAssetsHistorySettings);
            Modify_ApiCall(ref _callExportAssets);
            Modify_ExportAssetsApiCall(ref _callExportAssets);
            Modify_ApiCall(ref _callBatchGetAssetsHistory);
            Modify_BatchGetAssetsHistoryApiCall(ref _callBatchGetAssetsHistory);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 16
0
        /// <summary>
        /// Constructs a client wrapper for the ImageAnnotator service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="ImageAnnotatorSettings"/> used within this client </param>
        public ImageAnnotatorClientImpl(ImageAnnotator.ImageAnnotatorClient grpcClient, ImageAnnotatorSettings settings)
        {
            GrpcClient = grpcClient;
            ImageAnnotatorSettings effectiveSettings = settings ?? ImageAnnotatorSettings.GetDefault();
            gaxgrpc::ClientHelper  clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            AsyncBatchAnnotateFilesOperationsClient = new lro::OperationsClientImpl(
                grpcClient.CreateOperationsClient(), effectiveSettings.AsyncBatchAnnotateFilesOperationsSettings);
            _callBatchAnnotateImages = clientHelper.BuildApiCall <BatchAnnotateImagesRequest, BatchAnnotateImagesResponse>(
                GrpcClient.BatchAnnotateImagesAsync, GrpcClient.BatchAnnotateImages, effectiveSettings.BatchAnnotateImagesSettings);
            _callAsyncBatchAnnotateFiles = clientHelper.BuildApiCall <AsyncBatchAnnotateFilesRequest, lro::Operation>(
                GrpcClient.AsyncBatchAnnotateFilesAsync, GrpcClient.AsyncBatchAnnotateFiles, effectiveSettings.AsyncBatchAnnotateFilesSettings);
            Modify_ApiCall(ref _callBatchAnnotateImages);
            Modify_BatchAnnotateImagesApiCall(ref _callBatchAnnotateImages);
            Modify_ApiCall(ref _callAsyncBatchAnnotateFiles);
            Modify_AsyncBatchAnnotateFilesApiCall(ref _callAsyncBatchAnnotateFiles);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the TagBindings service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="TagBindingsSettings"/> used within this client.</param>
        public TagBindingsClientImpl(TagBindings.TagBindingsClient grpcClient, TagBindingsSettings settings)
        {
            GrpcClient = grpcClient;
            TagBindingsSettings   effectiveSettings = settings ?? TagBindingsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            CreateTagBindingOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.CreateTagBindingOperationsSettings);
            DeleteTagBindingOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.DeleteTagBindingOperationsSettings);
            _callListTagBindings             = clientHelper.BuildApiCall <ListTagBindingsRequest, ListTagBindingsResponse>(grpcClient.ListTagBindingsAsync, grpcClient.ListTagBindings, effectiveSettings.ListTagBindingsSettings);
            Modify_ApiCall(ref _callListTagBindings);
            Modify_ListTagBindingsApiCall(ref _callListTagBindings);
            _callCreateTagBinding = clientHelper.BuildApiCall <CreateTagBindingRequest, lro::Operation>(grpcClient.CreateTagBindingAsync, grpcClient.CreateTagBinding, effectiveSettings.CreateTagBindingSettings);
            Modify_ApiCall(ref _callCreateTagBinding);
            Modify_CreateTagBindingApiCall(ref _callCreateTagBinding);
            _callDeleteTagBinding = clientHelper.BuildApiCall <DeleteTagBindingRequest, lro::Operation>(grpcClient.DeleteTagBindingAsync, grpcClient.DeleteTagBinding, effectiveSettings.DeleteTagBindingSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callDeleteTagBinding);
            Modify_DeleteTagBindingApiCall(ref _callDeleteTagBinding);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the RegionCommitments service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="RegionCommitmentsSettings"/> used within this client.</param>
        public RegionCommitmentsClientImpl(RegionCommitments.RegionCommitmentsClient grpcClient, RegionCommitmentsSettings settings)
        {
            GrpcClient = grpcClient;
            RegionCommitmentsSettings effectiveSettings = settings ?? RegionCommitmentsSettings.GetDefault();
            gaxgrpc::ClientHelper     clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            InsertOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClientForRegionOperations(), effectiveSettings.InsertOperationsSettings);
            _callAggregatedList    = clientHelper.BuildApiCall <AggregatedListRegionCommitmentsRequest, CommitmentAggregatedList>(grpcClient.AggregatedListAsync, grpcClient.AggregatedList, effectiveSettings.AggregatedListSettings).WithGoogleRequestParam("project", request => request.Project);
            Modify_ApiCall(ref _callAggregatedList);
            Modify_AggregatedListApiCall(ref _callAggregatedList);
            _callGet = clientHelper.BuildApiCall <GetRegionCommitmentRequest, Commitment>(grpcClient.GetAsync, grpcClient.Get, effectiveSettings.GetSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region).WithGoogleRequestParam("commitment", request => request.Commitment);
            Modify_ApiCall(ref _callGet);
            Modify_GetApiCall(ref _callGet);
            _callInsert = clientHelper.BuildApiCall <InsertRegionCommitmentRequest, Operation>(grpcClient.InsertAsync, grpcClient.Insert, effectiveSettings.InsertSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region);
            Modify_ApiCall(ref _callInsert);
            Modify_InsertApiCall(ref _callInsert);
            _callList = clientHelper.BuildApiCall <ListRegionCommitmentsRequest, CommitmentList>(grpcClient.ListAsync, grpcClient.List, effectiveSettings.ListSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("region", request => request.Region);
            Modify_ApiCall(ref _callList);
            Modify_ListApiCall(ref _callList);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 19
0
        /// <summary>
        /// Constructs a client wrapper for the Routes service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="RoutesSettings"/> used within this client.</param>
        public RoutesClientImpl(Routes.RoutesClient grpcClient, RoutesSettings settings)
        {
            GrpcClient = grpcClient;
            RoutesSettings        effectiveSettings = settings ?? RoutesSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            DeleteOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClientForGlobalOperations(), effectiveSettings.DeleteOperationsSettings);
            InsertOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClientForGlobalOperations(), effectiveSettings.InsertOperationsSettings);
            _callDelete            = clientHelper.BuildApiCall <DeleteRouteRequest, Operation>(grpcClient.DeleteAsync, grpcClient.Delete, effectiveSettings.DeleteSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("route", request => request.Route);
            Modify_ApiCall(ref _callDelete);
            Modify_DeleteApiCall(ref _callDelete);
            _callGet = clientHelper.BuildApiCall <GetRouteRequest, Route>(grpcClient.GetAsync, grpcClient.Get, effectiveSettings.GetSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("route", request => request.Route);
            Modify_ApiCall(ref _callGet);
            Modify_GetApiCall(ref _callGet);
            _callInsert = clientHelper.BuildApiCall <InsertRouteRequest, Operation>(grpcClient.InsertAsync, grpcClient.Insert, effectiveSettings.InsertSettings).WithGoogleRequestParam("project", request => request.Project);
            Modify_ApiCall(ref _callInsert);
            Modify_InsertApiCall(ref _callInsert);
            _callList = clientHelper.BuildApiCall <ListRoutesRequest, RouteList>(grpcClient.ListAsync, grpcClient.List, effectiveSettings.ListSettings).WithGoogleRequestParam("project", request => request.Project);
            Modify_ApiCall(ref _callList);
            Modify_ListApiCall(ref _callList);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 20
0
        /// <summary>
        /// Constructs a client wrapper for the Services service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="ServicesSettings"/> used within this client.</param>
        public ServicesClientImpl(Services.ServicesClient grpcClient, ServicesSettings settings)
        {
            GrpcClient = grpcClient;
            ServicesSettings      effectiveSettings = settings ?? ServicesSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            UpdateServiceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.UpdateServiceOperationsSettings);
            DeleteServiceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.DeleteServiceOperationsSettings);
            _callListServices             = clientHelper.BuildApiCall <ListServicesRequest, ListServicesResponse>(grpcClient.ListServicesAsync, grpcClient.ListServices, effectiveSettings.ListServicesSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callListServices);
            Modify_ListServicesApiCall(ref _callListServices);
            _callGetService = clientHelper.BuildApiCall <GetServiceRequest, Service>(grpcClient.GetServiceAsync, grpcClient.GetService, effectiveSettings.GetServiceSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetService);
            Modify_GetServiceApiCall(ref _callGetService);
            _callUpdateService = clientHelper.BuildApiCall <UpdateServiceRequest, lro::Operation>(grpcClient.UpdateServiceAsync, grpcClient.UpdateService, effectiveSettings.UpdateServiceSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callUpdateService);
            Modify_UpdateServiceApiCall(ref _callUpdateService);
            _callDeleteService = clientHelper.BuildApiCall <DeleteServiceRequest, lro::Operation>(grpcClient.DeleteServiceAsync, grpcClient.DeleteService, effectiveSettings.DeleteServiceSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callDeleteService);
            Modify_DeleteServiceApiCall(ref _callDeleteService);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the Applications service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="ApplicationsSettings"/> used within this client.</param>
        public ApplicationsClientImpl(Applications.ApplicationsClient grpcClient, ApplicationsSettings settings)
        {
            GrpcClient = grpcClient;
            ApplicationsSettings  effectiveSettings = settings ?? ApplicationsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            CreateApplicationOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.CreateApplicationOperationsSettings);
            UpdateApplicationOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.UpdateApplicationOperationsSettings);
            RepairApplicationOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.RepairApplicationOperationsSettings);
            _callGetApplication = clientHelper.BuildApiCall <GetApplicationRequest, Application>(grpcClient.GetApplicationAsync, grpcClient.GetApplication, effectiveSettings.GetApplicationSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetApplication);
            Modify_GetApplicationApiCall(ref _callGetApplication);
            _callCreateApplication = clientHelper.BuildApiCall <CreateApplicationRequest, lro::Operation>(grpcClient.CreateApplicationAsync, grpcClient.CreateApplication, effectiveSettings.CreateApplicationSettings);
            Modify_ApiCall(ref _callCreateApplication);
            Modify_CreateApplicationApiCall(ref _callCreateApplication);
            _callUpdateApplication = clientHelper.BuildApiCall <UpdateApplicationRequest, lro::Operation>(grpcClient.UpdateApplicationAsync, grpcClient.UpdateApplication, effectiveSettings.UpdateApplicationSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callUpdateApplication);
            Modify_UpdateApplicationApiCall(ref _callUpdateApplication);
            _callRepairApplication = clientHelper.BuildApiCall <RepairApplicationRequest, lro::Operation>(grpcClient.RepairApplicationAsync, grpcClient.RepairApplication, effectiveSettings.RepairApplicationSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callRepairApplication);
            Modify_RepairApplicationApiCall(ref _callRepairApplication);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }