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 Basic service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="BasicSettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public BasicClientImpl(Basic.BasicClient grpcClient, BasicSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            BasicSettings         effectiveSettings = settings ?? BasicSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            _callAMethod = clientHelper.BuildApiCall <Request, Response>("AMethod", grpcClient.AMethodAsync, grpcClient.AMethod, effectiveSettings.AMethodSettings);
            Modify_ApiCall(ref _callAMethod);
            Modify_AMethodApiCall(ref _callAMethod);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #3
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);
        }
Exemple #4
0
        /// <summary>
        /// Constructs a client wrapper for the Keywords service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="KeywordsSettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public KeywordsClientImpl(Keywords.KeywordsClient grpcClient, KeywordsSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            KeywordsSettings      effectiveSettings = settings ?? KeywordsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            _callMethod1 = clientHelper.BuildApiCall <Request, Response>("Method1", grpcClient.Method1Async, grpcClient.Method1, effectiveSettings.Method1Settings);
            Modify_ApiCall(ref _callMethod1);
            Modify_Method1ApiCall(ref _callMethod1);
            _callMethod2 = clientHelper.BuildApiCall <Resource, Response>("Method2", grpcClient.Method2Async, grpcClient.Method2, effectiveSettings.Method2Settings);
            Modify_ApiCall(ref _callMethod2);
            Modify_Method2ApiCall(ref _callMethod2);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #5
0
        /// <summary>
        /// Creates a <see cref="KeywordsClient"/> 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="KeywordsSettings"/>.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/>.</param>
        /// <returns>The created <see cref="KeywordsClient"/>.</returns>
        internal static KeywordsClient Create(grpccore::CallInvoker callInvoker, KeywordsSettings settings = null, mel::ILogger logger = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            Keywords.KeywordsClient grpcClient = new Keywords.KeywordsClient(callInvoker);
            return(new KeywordsClientImpl(grpcClient, settings, logger));
        }
Exemple #6
0
        // TEST_START
        /// <summary>
        /// Constructs a client wrapper for the MixinService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="MixinServiceSettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public MixinServiceClientImpl(MixinService.MixinServiceClient grpcClient, MixinServiceSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            MixinServiceSettings  effectiveSettings = settings ?? MixinServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            LocationsClient = new gcl::LocationsClientImpl(grpcClient.CreateLocationsClient(), effectiveSettings.LocationsSettings, logger);
            IAMPolicyClient = new gciv::IAMPolicyClientImpl(grpcClient.CreateIAMPolicyClient(), effectiveSettings.IAMPolicySettings, logger);
            _callMethod     = clientHelper.BuildApiCall <Request, Response>("Method", grpcClient.MethodAsync, grpcClient.Method, effectiveSettings.MethodSettings);
            Modify_ApiCall(ref _callMethod);
            Modify_MethodApiCall(ref _callMethod);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #7
0
        public RoutingHeadersExplicitClientImpl(RoutingHeadersExplicit.RoutingHeadersExplicitClient grpcClient, RoutingHeadersExplicitSettings settings, mel::ILogger logger)
        {
            // TEST_START
            GrpcClient = grpcClient;
            RoutingHeadersExplicitSettings effectiveSettings = settings ?? RoutingHeadersExplicitSettings.GetDefault();
            gaxgrpc::ClientHelper          clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            _callNoRouting = clientHelper.BuildApiCall <SimpleRequest, Response>("NoRouting", grpcClient.NoRoutingAsync, grpcClient.NoRouting, effectiveSettings.NoRoutingSettings);
            Modify_ApiCall(ref _callNoRouting);
            Modify_NoRoutingApiCall(ref _callNoRouting);
            _callPlainNoTemplate = clientHelper.BuildApiCall <SimpleRequest, Response>("PlainNoTemplate", grpcClient.PlainNoTemplateAsync, grpcClient.PlainNoTemplate, effectiveSettings.PlainNoTemplateSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callPlainNoTemplate);
            Modify_PlainNoTemplateApiCall(ref _callPlainNoTemplate);
            _callPlainNoExtraction = clientHelper.BuildApiCall <SimpleRequest, Response>("PlainNoExtraction", grpcClient.PlainNoExtractionAsync, grpcClient.PlainNoExtraction, effectiveSettings.PlainNoExtractionSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callPlainNoExtraction);
            Modify_PlainNoExtractionApiCall(ref _callPlainNoExtraction);
            _callPlainFullField = clientHelper.BuildApiCall <SimpleRequest, Response>("PlainFullField", grpcClient.PlainFullFieldAsync, grpcClient.PlainFullField, effectiveSettings.PlainFullFieldSettings).WithExtractedGoogleRequestParam(new gaxgrpc::RoutingHeaderExtractor <SimpleRequest>().WithExtractedParameter("table_name", "^(projects/[^/]+/instances/[^/]+/tables/[^/]+)/?$", request => request.Name));
            Modify_ApiCall(ref _callPlainFullField);
            Modify_PlainFullFieldApiCall(ref _callPlainFullField);
            _callPlainExtract = clientHelper.BuildApiCall <SimpleRequest, Response>("PlainExtract", grpcClient.PlainExtractAsync, grpcClient.PlainExtract, effectiveSettings.PlainExtractSettings).WithExtractedGoogleRequestParam(new gaxgrpc::RoutingHeaderExtractor <SimpleRequest>().WithExtractedParameter("table_name", "^projects/[^/]+/instances/[^/]+/(tables/[^/]+)/?$", request => request.Name));
            Modify_ApiCall(ref _callPlainExtract);
            Modify_PlainExtractApiCall(ref _callPlainExtract);
            _callNested = clientHelper.BuildApiCall <NestedRequest, Response>("Nested", grpcClient.NestedAsync, grpcClient.Nested, effectiveSettings.NestedSettings).WithExtractedGoogleRequestParam(new gaxgrpc::RoutingHeaderExtractor <NestedRequest>().WithExtractedParameter("nest1.name", "^(.+)$", request => request.Nest1?.Name).WithExtractedParameter("nest1.nest2.name", "^(.+)$", request => request.Nest1?.Nest2?.Name));
            Modify_ApiCall(ref _callNested);
            Modify_NestedApiCall(ref _callNested);
            _callComplex = clientHelper.BuildApiCall <NestedRequest, Response>("Complex", grpcClient.ComplexAsync, grpcClient.Complex, effectiveSettings.ComplexSettings).WithExtractedGoogleRequestParam(new gaxgrpc::RoutingHeaderExtractor <NestedRequest>().WithExtractedParameter("table_location", "^projects/[^/]+/(instances/[^/]+)/tables/[^/]+/?$", request => request.TableName).WithExtractedParameter("table_location", "^(regions/[^/]+/zones/[^/]+)/tables/[^/]+/?$", request => request.TableName).WithExtractedParameter("routing_id", "^(projects/[^/]+)(?:/.*)?$", request => request.TableName).WithExtractedParameter("routing_id", "^(.+)$", request => request.AppProfileId).WithExtractedParameter("routing_id", "^profiles/([^/]+)/?$", request => request.AppProfileId));
            Modify_ApiCall(ref _callComplex);
            Modify_ComplexApiCall(ref _callComplex);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
            // TEST_END

            // for the easier reading, the above calls but indented
            _callPlainNoTemplate = clientHelper.BuildApiCall <SimpleRequest, Response>("PlainNoTemplate", grpcClient.PlainNoTemplateAsync, grpcClient.PlainNoTemplate, effectiveSettings.PlainNoTemplateSettings)
                                   .WithGoogleRequestParam("name", request => request.Name);

            _callPlainNoExtraction = clientHelper
                                     .BuildApiCall <SimpleRequest, Response>("PlainNoExtraction", grpcClient.PlainNoExtractionAsync, grpcClient.PlainNoExtraction, effectiveSettings.PlainNoExtractionSettings)
                                     .WithGoogleRequestParam("name", request => request.Name);

            _callPlainFullField = clientHelper
                                  .BuildApiCall <SimpleRequest, Response>("PlainFullField", grpcClient.PlainFullFieldAsync, grpcClient.PlainFullField, effectiveSettings.PlainFullFieldSettings)
                                  .WithExtractedGoogleRequestParam(new gaxgrpc::RoutingHeaderExtractor <SimpleRequest>()
                                                                   .WithExtractedParameter("table_name",
                                                                                           "^(projects/[^/]+/instances/[^/]+/tables/[^/]+)/?$", request => request.Name));

            _callPlainExtract = clientHelper
                                .BuildApiCall <SimpleRequest, Response>("", grpcClient.PlainExtractAsync, grpcClient.PlainExtract, effectiveSettings.PlainExtractSettings)
                                .WithExtractedGoogleRequestParam(new gaxgrpc::RoutingHeaderExtractor <SimpleRequest>()
                                                                 .WithExtractedParameter("table_name",
                                                                                         "^projects/[^/]+/instances/[^/]+/(tables/[^/]+)/?$", request => request.Name));

            _callNested = clientHelper
                          .BuildApiCall <NestedRequest, Response>("", grpcClient.NestedAsync, grpcClient.Nested, effectiveSettings.NestedSettings)
                          .WithExtractedGoogleRequestParam(new gaxgrpc::RoutingHeaderExtractor <NestedRequest>()
                                                           .WithExtractedParameter("nest1.name",
                                                                                   "^(.+)$", request => request.Nest1?.Name)
                                                           .WithExtractedParameter("nest1.nest2.name",
                                                                                   "^(.+)$", request => request.Nest1?.Nest2?.Name));

            _callComplex = clientHelper
                           .BuildApiCall <NestedRequest, Response>("", grpcClient.ComplexAsync, grpcClient.Complex, effectiveSettings.ComplexSettings)
                           .WithExtractedGoogleRequestParam(new gaxgrpc::RoutingHeaderExtractor <NestedRequest>()
                                                            .WithExtractedParameter("table_location",
                                                                                    "^projects/[^/]+/(instances/[^/]+)/tables/[^/]+/?$", request => request.TableName)
                                                            .WithExtractedParameter("table_location",
                                                                                    "^(regions/[^/]+/zones/[^/]+)/tables/[^/]+/?$", request => request.TableName)
                                                            .WithExtractedParameter("routing_id",
                                                                                    "^(projects/[^/]+)(?:/.*)?$", request => request.TableName)
                                                            .WithExtractedParameter("routing_id",
                                                                                    "^(.+)$", request => request.AppProfileId)
                                                            .WithExtractedParameter("routing_id",
                                                                                    "^profiles/([^/]+)/?$", request => request.AppProfileId));
        }
#pragma warning restore CS0612

        /// <summary>
        /// Constructs a client wrapper for the Deprecated service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="DeprecatedSettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public DeprecatedClientImpl(Deprecated.DeprecatedClient grpcClient, DeprecatedSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            DeprecatedSettings    effectiveSettings = settings ?? DeprecatedSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            _callDeprecatedFieldMethod = clientHelper.BuildApiCall <DeprecatedFieldRequest, Response>("DeprecatedFieldMethod", grpcClient.DeprecatedFieldMethodAsync, grpcClient.DeprecatedFieldMethod, effectiveSettings.DeprecatedFieldMethodSettings);
            Modify_ApiCall(ref _callDeprecatedFieldMethod);
            Modify_DeprecatedFieldMethodApiCall(ref _callDeprecatedFieldMethod);
#pragma warning disable CS0612
            _callDeprecatedMessageMethod = clientHelper.BuildApiCall <DeprecatedMessageRequest, Response>("DeprecatedMessageMethod", grpcClient.DeprecatedMessageMethodAsync, grpcClient.DeprecatedMessageMethod, effectiveSettings.DeprecatedMessageMethodSettings);
#pragma warning restore CS0612
            Modify_ApiCall(ref _callDeprecatedMessageMethod);
            Modify_DeprecatedMessageMethodApiCall(ref _callDeprecatedMessageMethod);
#pragma warning disable CS0612
            _callDeprecatedMethod = clientHelper.BuildApiCall <Request, Response>("DeprecatedMethod", grpcClient.DeprecatedMethodAsync, grpcClient.DeprecatedMethod, effectiveSettings.DeprecatedMethodSettings);
#pragma warning restore CS0612
            Modify_ApiCall(ref _callDeprecatedMethod);
            Modify_DeprecatedMethodApiCall(ref _callDeprecatedMethod);
#pragma warning disable CS0612
            _callDeprecatedResponseMethod = clientHelper.BuildApiCall <Request, DeprecatedMessageResponse>("DeprecatedResponseMethod", grpcClient.DeprecatedResponseMethodAsync, grpcClient.DeprecatedResponseMethod, effectiveSettings.DeprecatedResponseMethodSettings);
#pragma warning restore CS0612
            Modify_ApiCall(ref _callDeprecatedResponseMethod);
            Modify_DeprecatedResponseMethodApiCall(ref _callDeprecatedResponseMethod);
            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
        }
        /// <summary>
        /// Constructs a client wrapper for the Identity service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="IdentitySettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public IdentityClientImpl(Identity.IdentityClient grpcClient, IdentitySettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            IdentitySettings      effectiveSettings = settings ?? IdentitySettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            _callCreateUser = clientHelper.BuildApiCall <CreateUserRequest, User>("CreateUser", grpcClient.CreateUserAsync, grpcClient.CreateUser, effectiveSettings.CreateUserSettings);
            Modify_ApiCall(ref _callCreateUser);
            Modify_CreateUserApiCall(ref _callCreateUser);
            _callGetUser = clientHelper.BuildApiCall <GetUserRequest, User>("GetUser", grpcClient.GetUserAsync, grpcClient.GetUser, effectiveSettings.GetUserSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetUser);
            Modify_GetUserApiCall(ref _callGetUser);
            _callUpdateUser = clientHelper.BuildApiCall <UpdateUserRequest, User>("UpdateUser", grpcClient.UpdateUserAsync, grpcClient.UpdateUser, effectiveSettings.UpdateUserSettings).WithGoogleRequestParam("user.name", request => request.User?.Name);
            Modify_ApiCall(ref _callUpdateUser);
            Modify_UpdateUserApiCall(ref _callUpdateUser);
            _callDeleteUser = clientHelper.BuildApiCall <DeleteUserRequest, wkt::Empty>("DeleteUser", grpcClient.DeleteUserAsync, grpcClient.DeleteUser, effectiveSettings.DeleteUserSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callDeleteUser);
            Modify_DeleteUserApiCall(ref _callDeleteUser);
            _callListUsers = clientHelper.BuildApiCall <ListUsersRequest, ListUsersResponse>("ListUsers", grpcClient.ListUsersAsync, grpcClient.ListUsers, effectiveSettings.ListUsersSettings);
            Modify_ApiCall(ref _callListUsers);
            Modify_ListUsersApiCall(ref _callListUsers);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #11
0
        /// <summary>
        /// Constructs a client wrapper for the Compliance service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="ComplianceSettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public ComplianceClientImpl(Compliance.ComplianceClient grpcClient, ComplianceSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            ComplianceSettings    effectiveSettings = settings ?? ComplianceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            _callRepeatDataBody = clientHelper.BuildApiCall <RepeatRequest, RepeatResponse>("RepeatDataBody", grpcClient.RepeatDataBodyAsync, grpcClient.RepeatDataBody, effectiveSettings.RepeatDataBodySettings);
            Modify_ApiCall(ref _callRepeatDataBody);
            Modify_RepeatDataBodyApiCall(ref _callRepeatDataBody);
            _callRepeatDataBodyInfo = clientHelper.BuildApiCall <RepeatRequest, RepeatResponse>("RepeatDataBodyInfo", grpcClient.RepeatDataBodyInfoAsync, grpcClient.RepeatDataBodyInfo, effectiveSettings.RepeatDataBodyInfoSettings);
            Modify_ApiCall(ref _callRepeatDataBodyInfo);
            Modify_RepeatDataBodyInfoApiCall(ref _callRepeatDataBodyInfo);
            _callRepeatDataQuery = clientHelper.BuildApiCall <RepeatRequest, RepeatResponse>("RepeatDataQuery", grpcClient.RepeatDataQueryAsync, grpcClient.RepeatDataQuery, effectiveSettings.RepeatDataQuerySettings);
            Modify_ApiCall(ref _callRepeatDataQuery);
            Modify_RepeatDataQueryApiCall(ref _callRepeatDataQuery);
            _callRepeatDataSimplePath = clientHelper.BuildApiCall <RepeatRequest, RepeatResponse>("RepeatDataSimplePath", grpcClient.RepeatDataSimplePathAsync, grpcClient.RepeatDataSimplePath, effectiveSettings.RepeatDataSimplePathSettings).WithGoogleRequestParam("info.f_string", request => request.Info?.FString);
            Modify_ApiCall(ref _callRepeatDataSimplePath);
            Modify_RepeatDataSimplePathApiCall(ref _callRepeatDataSimplePath);
            _callRepeatDataPathResource = clientHelper.BuildApiCall <RepeatRequest, RepeatResponse>("RepeatDataPathResource", grpcClient.RepeatDataPathResourceAsync, grpcClient.RepeatDataPathResource, effectiveSettings.RepeatDataPathResourceSettings).WithGoogleRequestParam("info.f_string", request => request.Info?.FString).WithGoogleRequestParam("info.f_child.f_string", request => request.Info?.FChild?.FString);
            Modify_ApiCall(ref _callRepeatDataPathResource);
            Modify_RepeatDataPathResourceApiCall(ref _callRepeatDataPathResource);
            _callRepeatDataPathTrailingResource = clientHelper.BuildApiCall <RepeatRequest, RepeatResponse>("RepeatDataPathTrailingResource", grpcClient.RepeatDataPathTrailingResourceAsync, grpcClient.RepeatDataPathTrailingResource, effectiveSettings.RepeatDataPathTrailingResourceSettings).WithGoogleRequestParam("info.f_string", request => request.Info?.FString).WithGoogleRequestParam("info.f_child.f_string", request => request.Info?.FChild?.FString);
            Modify_ApiCall(ref _callRepeatDataPathTrailingResource);
            Modify_RepeatDataPathTrailingResourceApiCall(ref _callRepeatDataPathTrailingResource);
            _callRepeatDataBodyPut = clientHelper.BuildApiCall <RepeatRequest, RepeatResponse>("RepeatDataBodyPut", grpcClient.RepeatDataBodyPutAsync, grpcClient.RepeatDataBodyPut, effectiveSettings.RepeatDataBodyPutSettings);
            Modify_ApiCall(ref _callRepeatDataBodyPut);
            Modify_RepeatDataBodyPutApiCall(ref _callRepeatDataBodyPut);
            _callRepeatDataBodyPatch = clientHelper.BuildApiCall <RepeatRequest, RepeatResponse>("RepeatDataBodyPatch", grpcClient.RepeatDataBodyPatchAsync, grpcClient.RepeatDataBodyPatch, effectiveSettings.RepeatDataBodyPatchSettings);
            Modify_ApiCall(ref _callRepeatDataBodyPatch);
            Modify_RepeatDataBodyPatchApiCall(ref _callRepeatDataBodyPatch);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the Testing service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="TestingSettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public TestingClientImpl(Testing.TestingClient grpcClient, TestingSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            TestingSettings       effectiveSettings = settings ?? TestingSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            _callCreateSession = clientHelper.BuildApiCall <CreateSessionRequest, Session>("CreateSession", grpcClient.CreateSessionAsync, grpcClient.CreateSession, effectiveSettings.CreateSessionSettings);
            Modify_ApiCall(ref _callCreateSession);
            Modify_CreateSessionApiCall(ref _callCreateSession);
            _callGetSession = clientHelper.BuildApiCall <GetSessionRequest, Session>("GetSession", grpcClient.GetSessionAsync, grpcClient.GetSession, effectiveSettings.GetSessionSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetSession);
            Modify_GetSessionApiCall(ref _callGetSession);
            _callListSessions = clientHelper.BuildApiCall <ListSessionsRequest, ListSessionsResponse>("ListSessions", grpcClient.ListSessionsAsync, grpcClient.ListSessions, effectiveSettings.ListSessionsSettings);
            Modify_ApiCall(ref _callListSessions);
            Modify_ListSessionsApiCall(ref _callListSessions);
            _callDeleteSession = clientHelper.BuildApiCall <DeleteSessionRequest, wkt::Empty>("DeleteSession", grpcClient.DeleteSessionAsync, grpcClient.DeleteSession, effectiveSettings.DeleteSessionSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callDeleteSession);
            Modify_DeleteSessionApiCall(ref _callDeleteSession);
            _callReportSession = clientHelper.BuildApiCall <ReportSessionRequest, ReportSessionResponse>("ReportSession", grpcClient.ReportSessionAsync, grpcClient.ReportSession, effectiveSettings.ReportSessionSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callReportSession);
            Modify_ReportSessionApiCall(ref _callReportSession);
            _callListTests = clientHelper.BuildApiCall <ListTestsRequest, ListTestsResponse>("ListTests", grpcClient.ListTestsAsync, grpcClient.ListTests, effectiveSettings.ListTestsSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callListTests);
            Modify_ListTestsApiCall(ref _callListTests);
            _callDeleteTest = clientHelper.BuildApiCall <DeleteTestRequest, wkt::Empty>("DeleteTest", grpcClient.DeleteTestAsync, grpcClient.DeleteTest, effectiveSettings.DeleteTestSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callDeleteTest);
            Modify_DeleteTestApiCall(ref _callDeleteTest);
            _callVerifyTest = clientHelper.BuildApiCall <VerifyTestRequest, VerifyTestResponse>("VerifyTest", grpcClient.VerifyTestAsync, grpcClient.VerifyTest, effectiveSettings.VerifyTestSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callVerifyTest);
            Modify_VerifyTestApiCall(ref _callVerifyTest);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <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>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public UnitTestsClientImpl(UnitTests.UnitTestsClient grpcClient, UnitTestsSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            UnitTestsSettings     effectiveSettings = settings ?? UnitTestsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            MethodLroOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.MethodLroOperationsSettings, logger);
            _callMethodValues         = clientHelper.BuildApiCall <ValuesRequest, Response>("MethodValues", grpcClient.MethodValuesAsync, grpcClient.MethodValues, effectiveSettings.MethodValuesSettings);
            Modify_ApiCall(ref _callMethodValues);
            Modify_MethodValuesApiCall(ref _callMethodValues);
            _callMethodLro = clientHelper.BuildApiCall <LroRequest, lro::Operation>("MethodLro", grpcClient.MethodLroAsync, grpcClient.MethodLro, effectiveSettings.MethodLroSettings);
            Modify_ApiCall(ref _callMethodLro);
            Modify_MethodLroApiCall(ref _callMethodLro);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #14
0
        /// <summary>
        /// Constructs a client wrapper for the SequenceService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="SequenceServiceSettings"/> used within this client.</param>
        /// <param name="logger">Optional <see cref="mel::ILogger"/> to use within this client.</param>
        public SequenceServiceClientImpl(SequenceService.SequenceServiceClient grpcClient, SequenceServiceSettings settings, mel::ILogger logger)
        {
            GrpcClient = grpcClient;
            SequenceServiceSettings effectiveSettings = settings ?? SequenceServiceSettings.GetDefault();
            gaxgrpc::ClientHelper   clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings, logger);

            _callCreateSequence = clientHelper.BuildApiCall <CreateSequenceRequest, Sequence>("CreateSequence", grpcClient.CreateSequenceAsync, grpcClient.CreateSequence, effectiveSettings.CreateSequenceSettings);
            Modify_ApiCall(ref _callCreateSequence);
            Modify_CreateSequenceApiCall(ref _callCreateSequence);
            _callGetSequenceReport = clientHelper.BuildApiCall <GetSequenceReportRequest, SequenceReport>("GetSequenceReport", grpcClient.GetSequenceReportAsync, grpcClient.GetSequenceReport, effectiveSettings.GetSequenceReportSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetSequenceReport);
            Modify_GetSequenceReportApiCall(ref _callGetSequenceReport);
            _callAttemptSequence = clientHelper.BuildApiCall <AttemptSequenceRequest, wkt::Empty>("AttemptSequence", grpcClient.AttemptSequenceAsync, grpcClient.AttemptSequence, effectiveSettings.AttemptSequenceSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callAttemptSequence);
            Modify_AttemptSequenceApiCall(ref _callAttemptSequence);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }