private MigrationServiceSettings(MigrationServiceSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     SearchMigratableResourcesSettings       = existing.SearchMigratableResourcesSettings;
     BatchMigrateResourcesSettings           = existing.BatchMigrateResourcesSettings;
     BatchMigrateResourcesOperationsSettings = existing.BatchMigrateResourcesOperationsSettings.Clone();
     OnCopy(existing);
 }
        /// <summary>
        /// Constructs a client wrapper for the MigrationService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="MigrationServiceSettings"/> used within this client.</param>
        public MigrationServiceClientImpl(MigrationService.MigrationServiceClient grpcClient, MigrationServiceSettings settings)
        {
            GrpcClient = grpcClient;
            MigrationServiceSettings effectiveSettings = settings ?? MigrationServiceSettings.GetDefault();
            gaxgrpc::ClientHelper    clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            BatchMigrateResourcesOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.BatchMigrateResourcesOperationsSettings);
            _callSearchMigratableResources        = clientHelper.BuildApiCall <SearchMigratableResourcesRequest, SearchMigratableResourcesResponse>(grpcClient.SearchMigratableResourcesAsync, grpcClient.SearchMigratableResources, effectiveSettings.SearchMigratableResourcesSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callSearchMigratableResources);
            Modify_SearchMigratableResourcesApiCall(ref _callSearchMigratableResources);
            _callBatchMigrateResources = clientHelper.BuildApiCall <BatchMigrateResourcesRequest, lro::Operation>(grpcClient.BatchMigrateResourcesAsync, grpcClient.BatchMigrateResources, effectiveSettings.BatchMigrateResourcesSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callBatchMigrateResources);
            Modify_BatchMigrateResourcesApiCall(ref _callBatchMigrateResources);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
 partial void OnConstruction(MigrationService.MigrationServiceClient grpcClient, MigrationServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
 partial void OnCopy(MigrationServiceSettings existing);
        /// <summary>
        /// Creates a <see cref="MigrationServiceClient"/> 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="MigrationServiceSettings"/>.</param>
        /// <returns>The created <see cref="MigrationServiceClient"/>.</returns>
        internal static MigrationServiceClient Create(grpccore::CallInvoker callInvoker, MigrationServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            MigrationService.MigrationServiceClient grpcClient = new MigrationService.MigrationServiceClient(callInvoker);
            return(new MigrationServiceClientImpl(grpcClient, settings));
        }