/// <summary> /// Constructs a client wrapper for the ImageFamilyViews service, with the specified gRPC client and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="ImageFamilyViewsSettings"/> used within this client.</param> public ImageFamilyViewsClientImpl(ImageFamilyViews.ImageFamilyViewsClient grpcClient, ImageFamilyViewsSettings settings) { GrpcClient = grpcClient; ImageFamilyViewsSettings effectiveSettings = settings ?? ImageFamilyViewsSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callGet = clientHelper.BuildApiCall <GetImageFamilyViewRequest, ImageFamilyView>(grpcClient.GetAsync, grpcClient.Get, effectiveSettings.GetSettings).WithGoogleRequestParam("project", request => request.Project).WithGoogleRequestParam("zone", request => request.Zone).WithGoogleRequestParam("family", request => request.Family); Modify_ApiCall(ref _callGet); Modify_GetApiCall(ref _callGet); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
partial void OnCopy(ImageFamilyViewsSettings existing);
private ImageFamilyViewsSettings(ImageFamilyViewsSettings existing) : base(existing) { gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); GetSettings = existing.GetSettings; OnCopy(existing); }
partial void OnConstruction(ImageFamilyViews.ImageFamilyViewsClient grpcClient, ImageFamilyViewsSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
/// <summary> /// Creates a <see cref="ImageFamilyViewsClient"/> 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="ImageFamilyViewsSettings"/>.</param> /// <returns>The created <see cref="ImageFamilyViewsClient"/>.</returns> internal static ImageFamilyViewsClient Create(grpccore::CallInvoker callInvoker, ImageFamilyViewsSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } ImageFamilyViews.ImageFamilyViewsClient grpcClient = new ImageFamilyViews.ImageFamilyViewsClient(callInvoker); return(new ImageFamilyViewsClientImpl(grpcClient, settings)); }