/// <summary> /// Constructs a client wrapper for the ErrorGroupService service, with the specified gRPC client and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="ErrorGroupServiceSettings"/> used within this client </param> public ErrorGroupServiceClientImpl(ErrorGroupService.ErrorGroupServiceClient grpcClient, ErrorGroupServiceSettings settings) { this.GrpcClient = grpcClient; ErrorGroupServiceSettings effectiveSettings = settings ?? ErrorGroupServiceSettings.GetDefault(); _clientHelper = new ClientHelper(effectiveSettings); _callGetGroup = _clientHelper.BuildApiCall <GetGroupRequest, ErrorGroup>( GrpcClient.GetGroupAsync, GrpcClient.GetGroup, effectiveSettings.GetGroupSettings); _callUpdateGroup = _clientHelper.BuildApiCall <UpdateGroupRequest, ErrorGroup>( GrpcClient.UpdateGroupAsync, GrpcClient.UpdateGroup, effectiveSettings.UpdateGroupSettings); }
/// <summary> /// Creates a <see cref="ErrorGroupServiceClient"/> which uses the specified channel for remote operations. /// </summary> /// <param name="channel">The <see cref="Channel"/> for remote operations. Must not be null.</param> /// <param name="settings">Optional <see cref="ErrorGroupServiceSettings"/>.</param> /// <returns>The created <see cref="ErrorGroupServiceClient"/>.</returns> public static ErrorGroupServiceClient Create(Channel channel, ErrorGroupServiceSettings settings = null) { GaxPreconditions.CheckNotNull(channel, nameof(channel)); ErrorGroupService.ErrorGroupServiceClient grpcClient = new ErrorGroupService.ErrorGroupServiceClient(channel); return(new ErrorGroupServiceClientImpl(grpcClient, settings)); }