/// <summary> /// Constructs a client wrapper for the ManagedPlacementViewService service, with the specified gRPC client and /// settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings"> /// The base <see cref="ManagedPlacementViewServiceSettings"/> used within this client. /// </param> public ManagedPlacementViewServiceClientImpl(ManagedPlacementViewService.ManagedPlacementViewServiceClient grpcClient, ManagedPlacementViewServiceSettings settings) { GrpcClient = grpcClient; ManagedPlacementViewServiceSettings effectiveSettings = settings ?? ManagedPlacementViewServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callGetManagedPlacementView = clientHelper.BuildApiCall <GetManagedPlacementViewRequest, gagvr::ManagedPlacementView>(grpcClient.GetManagedPlacementViewAsync, grpcClient.GetManagedPlacementView, effectiveSettings.GetManagedPlacementViewSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName); Modify_ApiCall(ref _callGetManagedPlacementView); Modify_GetManagedPlacementViewApiCall(ref _callGetManagedPlacementView); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
/// <summary> /// Constructs a client wrapper for the ManagedPlacementViewService service, with the specified gRPC client and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="ManagedPlacementViewServiceSettings"/> used within this client </param> public ManagedPlacementViewServiceClientImpl(ManagedPlacementViewService.ManagedPlacementViewServiceClient grpcClient, ManagedPlacementViewServiceSettings settings) { GrpcClient = grpcClient; ManagedPlacementViewServiceSettings effectiveSettings = settings ?? ManagedPlacementViewServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callGetManagedPlacementView = clientHelper.BuildApiCall <GetManagedPlacementViewRequest, gagvr::ManagedPlacementView>( GrpcClient.GetManagedPlacementViewAsync, GrpcClient.GetManagedPlacementView, effectiveSettings.GetManagedPlacementViewSettings) .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"resource_name={request.ResourceName}")); Modify_ApiCall(ref _callGetManagedPlacementView); Modify_GetManagedPlacementViewApiCall(ref _callGetManagedPlacementView); OnConstruction(grpcClient, effectiveSettings, clientHelper); }