mirror of
https://github.com/google/nomulus
synced 2026-01-10 16:00:52 +00:00
Replace nested @Multibindings interfaces with the new @Multibinds feature. See []
If the enclosing module can be abstract, pull @Multibinds methods up into it; otherwise, replace the @Multibindings interface with a @Module and include it into the enclosing module.
Tested:
TAP --sample for global presubmit queue
[]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125589112
This commit is contained in:
@@ -23,9 +23,9 @@ import com.google.api.services.bigquery.model.TableFieldSchema;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Multibindings;
|
||||
import dagger.Provides;
|
||||
import dagger.multibindings.ElementsIntoSet;
|
||||
import dagger.multibindings.Multibinds;
|
||||
|
||||
import google.registry.config.ConfigModule.Config;
|
||||
import google.registry.request.OAuthScopes;
|
||||
@@ -43,14 +43,11 @@ import java.util.Set;
|
||||
* @see google.registry.request.Modules.UseAppIdentityCredentialForGoogleApisModule
|
||||
*/
|
||||
@Module
|
||||
public final class BigqueryModule {
|
||||
public abstract class BigqueryModule {
|
||||
|
||||
@Multibindings
|
||||
interface BigQueryMultibindings {
|
||||
|
||||
/** Provides a map of BigQuery table names to field names. */
|
||||
Map<String, ImmutableList<TableFieldSchema>> bigquerySchemas();
|
||||
}
|
||||
/** Provides a map of BigQuery table names to field names. */
|
||||
@Multibinds
|
||||
abstract Map<String, ImmutableList<TableFieldSchema>> bigquerySchemas();
|
||||
|
||||
/** Provides OAuth2 scopes for the Bigquery service needed by Domain Registry. */
|
||||
@Provides
|
||||
@@ -70,4 +67,7 @@ public final class BigqueryModule {
|
||||
.setApplicationName(projectId)
|
||||
.build();
|
||||
}
|
||||
|
||||
// No subclasses.
|
||||
private BigqueryModule() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user