/// <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> /// Creates a <see cref="ComplianceClient"/> 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="ComplianceSettings"/>.</param> /// <param name="logger">Optional <see cref="mel::ILogger"/>.</param> /// <returns>The created <see cref="ComplianceClient"/>.</returns> internal static ComplianceClient Create(grpccore::CallInvoker callInvoker, ComplianceSettings 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); } Compliance.ComplianceClient grpcClient = new Compliance.ComplianceClient(callInvoker); return(new ComplianceClientImpl(grpcClient, settings, logger)); }
private ComplianceSettings(ComplianceSettings existing) : base(existing) { gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); RepeatDataBodySettings = existing.RepeatDataBodySettings; RepeatDataBodyInfoSettings = existing.RepeatDataBodyInfoSettings; RepeatDataQuerySettings = existing.RepeatDataQuerySettings; RepeatDataSimplePathSettings = existing.RepeatDataSimplePathSettings; RepeatDataPathResourceSettings = existing.RepeatDataPathResourceSettings; RepeatDataPathTrailingResourceSettings = existing.RepeatDataPathTrailingResourceSettings; RepeatDataBodyPutSettings = existing.RepeatDataBodyPutSettings; RepeatDataBodyPatchSettings = existing.RepeatDataBodyPatchSettings; OnCopy(existing); }
partial void OnConstruction(Compliance.ComplianceClient grpcClient, ComplianceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
partial void OnCopy(ComplianceSettings existing);