/// <summary> /// Constructs a client wrapper for the AssetGroupService service, with the specified gRPC client and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="AssetGroupServiceSettings"/> used within this client.</param> public AssetGroupServiceClientImpl(AssetGroupService.AssetGroupServiceClient grpcClient, AssetGroupServiceSettings settings) { GrpcClient = grpcClient; AssetGroupServiceSettings effectiveSettings = settings ?? AssetGroupServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callMutateAssetGroups = clientHelper.BuildApiCall <MutateAssetGroupsRequest, MutateAssetGroupsResponse>(grpcClient.MutateAssetGroupsAsync, grpcClient.MutateAssetGroups, effectiveSettings.MutateAssetGroupsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId); Modify_ApiCall(ref _callMutateAssetGroups); Modify_MutateAssetGroupsApiCall(ref _callMutateAssetGroups); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
partial void OnCopy(AssetGroupServiceSettings existing);
private AssetGroupServiceSettings(AssetGroupServiceSettings existing) : base(existing) { gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); MutateAssetGroupsSettings = existing.MutateAssetGroupsSettings; OnCopy(existing); }
partial void OnConstruction(AssetGroupService.AssetGroupServiceClient grpcClient, AssetGroupServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
/// <summary> /// Creates a <see cref="AssetGroupServiceClient"/> 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="AssetGroupServiceSettings"/>.</param> /// <returns>The created <see cref="AssetGroupServiceClient"/>.</returns> internal static AssetGroupServiceClient Create(grpccore::CallInvoker callInvoker, AssetGroupServiceSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } AssetGroupService.AssetGroupServiceClient grpcClient = new AssetGroupService.AssetGroupServiceClient(callInvoker); return(new AssetGroupServiceClientImpl(grpcClient, settings)); }