Class ImmutableGenerationRequest.Builder
java.lang.Object
io.github.ascopes.protobufmavenplugin.generation.ImmutableGenerationRequest.Builder
- Enclosing class:
ImmutableGenerationRequest
@Generated(from="GenerationRequest",
generator="Immutables")
public static final class ImmutableGenerationRequest.Builder
extends Object
Builds instances of type
ImmutableGenerationRequest.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllArguments(Iterable<@Nullable String> elements) Adds elements toargumentslist.addAllDependencyScopes(Iterable<@Nullable String> elements) Adds elements todependencyScopesset.addAllExcludes(Iterable<@Nullable String> elements) Adds elements toexcludeslist.addAllIncludes(Iterable<@Nullable String> elements) Adds elements toincludeslist.addArguments(@Nullable String element) Adds one element toargumentslist.addArguments(@Nullable String... elements) Adds elements toargumentslist.addDependencyScopes(@Nullable String element) Adds one element todependencyScopesset.addDependencyScopes(@Nullable String... elements) Adds elements todependencyScopesset.addExcludes(@Nullable String element) Adds one element toexcludeslist.addExcludes(@Nullable String... elements) Adds elements toexcludeslist.addIncludes(@Nullable String element) Adds one element toincludeslist.addIncludes(@Nullable String... elements) Adds elements toincludeslist.Sets or replaces all elements forargumentslist.binaryMavenPlugins(Collection<? extends MavenProtocPlugin> binaryMavenPlugins) Initializes the value for thebinaryMavenPluginsattribute.binaryPathPlugins(Collection<? extends PathProtocPlugin> binaryPathPlugins) Initializes the value for thebinaryPathPluginsattribute.binaryUrlPlugins(Collection<? extends UriProtocPlugin> binaryUrlPlugins) Initializes the value for thebinaryUrlPluginsattribute.build()Builds a newImmutableGenerationRequest.cleanOutputDirectories(boolean cleanOutputDirectories) Initializes the value for thecleanOutputDirectoriesattribute.dependencyResolutionDepth(DependencyResolutionDepth dependencyResolutionDepth) Initializes the value for thedependencyResolutionDepthattribute.dependencyScopes(Iterable<@Nullable String> elements) Sets or replaces all elements fordependencyScopesset.embedSourcesInClassOutputs(boolean embedSourcesInClassOutputs) Initializes the value for theembedSourcesInClassOutputsattribute.enabledLanguages(Collection<Language> enabledLanguages) Initializes the value for theenabledLanguagesattribute.environmentVariables(Map<@Nullable String, ? extends @Nullable String> entries) Sets or replaces all mappings from the specified map as entries for theenvironmentVariablesmap.Sets or replaces all elements forexcludeslist.failOnMissingSources(boolean failOnMissingSources) Initializes the value for thefailOnMissingSourcesattribute.failOnMissingTargets(boolean failOnMissingTargets) Initializes the value for thefailOnMissingTargetsattribute.fatalWarnings(boolean fatalWarnings) Initializes the value for thefatalWarningsattribute.from(GenerationRequest instance) Fill a builder with attribute values from the providedGenerationRequestinstance.ignoreProjectDependencies(boolean ignoreProjectDependencies) Initializes the value for theignoreProjectDependenciesattribute.importDependencies(Collection<? extends MavenArtifact> importDependencies) Initializes the value for theimportDependenciesattribute.importPaths(Collection<Path> importPaths) Initializes the value for theimportPathsattribute.Sets or replaces all elements forincludeslist.incrementalCompilationEnabled(boolean incrementalCompilationEnabled) Initializes the value for theincrementalCompilationEnabledattribute.jvmMavenPlugins(Collection<? extends MavenProtocPlugin> jvmMavenPlugins) Initializes the value for thejvmMavenPluginsattribute.liteEnabled(boolean liteEnabled) Initializes the value for theliteEnabledattribute.outputDescriptorAttached(boolean outputDescriptorAttached) Initializes the value for theoutputDescriptorAttachedattribute.outputDescriptorAttachmentClassifier(@Nullable String outputDescriptorAttachmentClassifier) Initializes the value for theoutputDescriptorAttachmentClassifierattribute.outputDescriptorAttachmentRegistrar(OutputDescriptorAttachmentRegistrar outputDescriptorAttachmentRegistrar) Initializes the value for theoutputDescriptorAttachmentRegistrarattribute.outputDescriptorAttachmentType(@Nullable String outputDescriptorAttachmentType) Initializes the value for theoutputDescriptorAttachmentTypeattribute.outputDescriptorFile(@Nullable Path outputDescriptorFile) Initializes the value for theoutputDescriptorFileattribute.outputDescriptorIncludeImports(boolean outputDescriptorIncludeImports) Initializes the value for theoutputDescriptorIncludeImportsattribute.outputDescriptorIncludeSourceInfo(boolean outputDescriptorIncludeSourceInfo) Initializes the value for theoutputDescriptorIncludeSourceInfoattribute.outputDescriptorRetainOptions(boolean outputDescriptorRetainOptions) Initializes the value for theoutputDescriptorRetainOptionsattribute.outputDirectory(Path outputDirectory) Initializes the value for theoutputDirectoryattribute.protocDigest(@Nullable Digest protocDigest) Initializes the value for theprotocDigestattribute.protocVersion(String protocVersion) Initializes the value for theprotocVersionattribute.putAllEnvironmentVariables(Map<@Nullable String, ? extends @Nullable String> entries) Put all mappings from the specified map as entries toenvironmentVariablesmap.putEnvironmentVariables(@Nullable String key, @Nullable String value) Put one entry to theenvironmentVariablesmap.putEnvironmentVariables(Map.Entry<@Nullable String, ? extends @Nullable String> entry) Put one entry to theenvironmentVariablesmap.registerAsCompilationRoot(boolean registerAsCompilationRoot) Initializes the value for theregisterAsCompilationRootattribute.sanctionedExecutablePath(@Nullable Path sanctionedExecutablePath) Initializes the value for thesanctionedExecutablePathattribute.sourceDependencies(Collection<? extends MavenArtifact> sourceDependencies) Initializes the value for thesourceDependenciesattribute.sourceDescriptorDependencies(Collection<? extends MavenArtifact> sourceDescriptorDependencies) Initializes the value for thesourceDescriptorDependenciesattribute.sourceDescriptorPaths(Collection<Path> sourceDescriptorPaths) Initializes the value for thesourceDescriptorPathsattribute.sourceDirectories(Collection<Path> sourceDirectories) Initializes the value for thesourceDirectoriesattribute.sourceRootRegistrar(SourceRootRegistrar sourceRootRegistrar) Initializes the value for thesourceRootRegistrarattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedGenerationRequestinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addArguments
Adds one element toargumentslist.- Parameters:
element- A arguments element- Returns:
thisbuilder for use in a chained invocation
-
addArguments
Adds elements toargumentslist.- Parameters:
elements- An array of arguments elements- Returns:
thisbuilder for use in a chained invocation
-
arguments
Sets or replaces all elements forargumentslist.- Parameters:
elements- An iterable of arguments elements- Returns:
thisbuilder for use in a chained invocation
-
addAllArguments
public final ImmutableGenerationRequest.Builder addAllArguments(Iterable<@Nullable String> elements) Adds elements toargumentslist.- Parameters:
elements- An iterable of arguments elements- Returns:
thisbuilder for use in a chained invocation
-
binaryMavenPlugins
public final ImmutableGenerationRequest.Builder binaryMavenPlugins(Collection<? extends MavenProtocPlugin> binaryMavenPlugins) Initializes the value for thebinaryMavenPluginsattribute.- Parameters:
binaryMavenPlugins- The value for binaryMavenPlugins (can benull)- Returns:
thisbuilder for use in a chained invocation
-
binaryPathPlugins
public final ImmutableGenerationRequest.Builder binaryPathPlugins(Collection<? extends PathProtocPlugin> binaryPathPlugins) Initializes the value for thebinaryPathPluginsattribute.- Parameters:
binaryPathPlugins- The value for binaryPathPlugins (can benull)- Returns:
thisbuilder for use in a chained invocation
-
binaryUrlPlugins
public final ImmutableGenerationRequest.Builder binaryUrlPlugins(Collection<? extends UriProtocPlugin> binaryUrlPlugins) Initializes the value for thebinaryUrlPluginsattribute.- Parameters:
binaryUrlPlugins- The value for binaryUrlPlugins (can benull)- Returns:
thisbuilder for use in a chained invocation
-
dependencyResolutionDepth
public final ImmutableGenerationRequest.Builder dependencyResolutionDepth(DependencyResolutionDepth dependencyResolutionDepth) Initializes the value for thedependencyResolutionDepthattribute.- Parameters:
dependencyResolutionDepth- The value for dependencyResolutionDepth (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addDependencyScopes
Adds one element todependencyScopesset.- Parameters:
element- A dependencyScopes element- Returns:
thisbuilder for use in a chained invocation
-
addDependencyScopes
Adds elements todependencyScopesset.- Parameters:
elements- An array of dependencyScopes elements- Returns:
thisbuilder for use in a chained invocation
-
dependencyScopes
public final ImmutableGenerationRequest.Builder dependencyScopes(Iterable<@Nullable String> elements) Sets or replaces all elements fordependencyScopesset.- Parameters:
elements- An iterable of dependencyScopes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDependencyScopes
public final ImmutableGenerationRequest.Builder addAllDependencyScopes(Iterable<@Nullable String> elements) Adds elements todependencyScopesset.- Parameters:
elements- An iterable of dependencyScopes elements- Returns:
thisbuilder for use in a chained invocation
-
enabledLanguages
public final ImmutableGenerationRequest.Builder enabledLanguages(Collection<Language> enabledLanguages) Initializes the value for theenabledLanguagesattribute.- Parameters:
enabledLanguages- The value for enabledLanguages (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addExcludes
Adds one element toexcludeslist.- Parameters:
element- A excludes element- Returns:
thisbuilder for use in a chained invocation
-
addExcludes
Adds elements toexcludeslist.- Parameters:
elements- An array of excludes elements- Returns:
thisbuilder for use in a chained invocation
-
excludes
Sets or replaces all elements forexcludeslist.- Parameters:
elements- An iterable of excludes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllExcludes
Adds elements toexcludeslist.- Parameters:
elements- An iterable of excludes elements- Returns:
thisbuilder for use in a chained invocation
-
putEnvironmentVariables
public final ImmutableGenerationRequest.Builder putEnvironmentVariables(@Nullable String key, @Nullable String value) Put one entry to theenvironmentVariablesmap.- Parameters:
key- The key in the environmentVariables mapvalue- The associated value in the environmentVariables map- Returns:
thisbuilder for use in a chained invocation
-
putEnvironmentVariables
public final ImmutableGenerationRequest.Builder putEnvironmentVariables(Map.Entry<@Nullable String, ? extends @Nullable String> entry) Put one entry to theenvironmentVariablesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
environmentVariables
public final ImmutableGenerationRequest.Builder environmentVariables(Map<@Nullable String, ? extends @Nullable String> entries) Sets or replaces all mappings from the specified map as entries for theenvironmentVariablesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the environmentVariables map- Returns:
thisbuilder for use in a chained invocation
-
putAllEnvironmentVariables
public final ImmutableGenerationRequest.Builder putAllEnvironmentVariables(Map<@Nullable String, ? extends @Nullable String> entries) Put all mappings from the specified map as entries toenvironmentVariablesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the environmentVariables map- Returns:
thisbuilder for use in a chained invocation
-
importDependencies
public final ImmutableGenerationRequest.Builder importDependencies(Collection<? extends MavenArtifact> importDependencies) Initializes the value for theimportDependenciesattribute.- Parameters:
importDependencies- The value for importDependencies (can benull)- Returns:
thisbuilder for use in a chained invocation
-
importPaths
Initializes the value for theimportPathsattribute.- Parameters:
importPaths- The value for importPaths (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addIncludes
Adds one element toincludeslist.- Parameters:
element- A includes element- Returns:
thisbuilder for use in a chained invocation
-
addIncludes
Adds elements toincludeslist.- Parameters:
elements- An array of includes elements- Returns:
thisbuilder for use in a chained invocation
-
includes
Sets or replaces all elements forincludeslist.- Parameters:
elements- An iterable of includes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllIncludes
Adds elements toincludeslist.- Parameters:
elements- An iterable of includes elements- Returns:
thisbuilder for use in a chained invocation
-
jvmMavenPlugins
public final ImmutableGenerationRequest.Builder jvmMavenPlugins(Collection<? extends MavenProtocPlugin> jvmMavenPlugins) Initializes the value for thejvmMavenPluginsattribute.- Parameters:
jvmMavenPlugins- The value for jvmMavenPlugins (can benull)- Returns:
thisbuilder for use in a chained invocation
-
outputDirectory
Initializes the value for theoutputDirectoryattribute.- Parameters:
outputDirectory- The value for outputDirectory (can benull)- Returns:
thisbuilder for use in a chained invocation
-
outputDescriptorFile
public final ImmutableGenerationRequest.Builder outputDescriptorFile(@Nullable Path outputDescriptorFile) Initializes the value for theoutputDescriptorFileattribute.- Parameters:
outputDescriptorFile- The value for outputDescriptorFile (can benull)- Returns:
thisbuilder for use in a chained invocation
-
outputDescriptorAttached
public final ImmutableGenerationRequest.Builder outputDescriptorAttached(boolean outputDescriptorAttached) Initializes the value for theoutputDescriptorAttachedattribute.- Parameters:
outputDescriptorAttached- The value for outputDescriptorAttached- Returns:
thisbuilder for use in a chained invocation
-
outputDescriptorAttachmentType
public final ImmutableGenerationRequest.Builder outputDescriptorAttachmentType(@Nullable String outputDescriptorAttachmentType) Initializes the value for theoutputDescriptorAttachmentTypeattribute.- Parameters:
outputDescriptorAttachmentType- The value for outputDescriptorAttachmentType (can benull)- Returns:
thisbuilder for use in a chained invocation
-
outputDescriptorAttachmentClassifier
public final ImmutableGenerationRequest.Builder outputDescriptorAttachmentClassifier(@Nullable String outputDescriptorAttachmentClassifier) Initializes the value for theoutputDescriptorAttachmentClassifierattribute.- Parameters:
outputDescriptorAttachmentClassifier- The value for outputDescriptorAttachmentClassifier (can benull)- Returns:
thisbuilder for use in a chained invocation
-
protocDigest
Initializes the value for theprotocDigestattribute.- Parameters:
protocDigest- The value for protocDigest (can benull)- Returns:
thisbuilder for use in a chained invocation
-
protocVersion
Initializes the value for theprotocVersionattribute.- Parameters:
protocVersion- The value for protocVersion (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sanctionedExecutablePath
public final ImmutableGenerationRequest.Builder sanctionedExecutablePath(@Nullable Path sanctionedExecutablePath) Initializes the value for thesanctionedExecutablePathattribute.- Parameters:
sanctionedExecutablePath- The value for sanctionedExecutablePath (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sourceDependencies
public final ImmutableGenerationRequest.Builder sourceDependencies(Collection<? extends MavenArtifact> sourceDependencies) Initializes the value for thesourceDependenciesattribute.- Parameters:
sourceDependencies- The value for sourceDependencies (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sourceDescriptorDependencies
public final ImmutableGenerationRequest.Builder sourceDescriptorDependencies(Collection<? extends MavenArtifact> sourceDescriptorDependencies) Initializes the value for thesourceDescriptorDependenciesattribute.- Parameters:
sourceDescriptorDependencies- The value for sourceDescriptorDependencies (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sourceDescriptorPaths
public final ImmutableGenerationRequest.Builder sourceDescriptorPaths(Collection<Path> sourceDescriptorPaths) Initializes the value for thesourceDescriptorPathsattribute.- Parameters:
sourceDescriptorPaths- The value for sourceDescriptorPaths (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sourceDirectories
public final ImmutableGenerationRequest.Builder sourceDirectories(Collection<Path> sourceDirectories) Initializes the value for thesourceDirectoriesattribute.- Parameters:
sourceDirectories- The value for sourceDirectories (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sourceRootRegistrar
public final ImmutableGenerationRequest.Builder sourceRootRegistrar(SourceRootRegistrar sourceRootRegistrar) Initializes the value for thesourceRootRegistrarattribute.- Parameters:
sourceRootRegistrar- The value for sourceRootRegistrar (can benull)- Returns:
thisbuilder for use in a chained invocation
-
outputDescriptorAttachmentRegistrar
public final ImmutableGenerationRequest.Builder outputDescriptorAttachmentRegistrar(OutputDescriptorAttachmentRegistrar outputDescriptorAttachmentRegistrar) Initializes the value for theoutputDescriptorAttachmentRegistrarattribute.- Parameters:
outputDescriptorAttachmentRegistrar- The value for outputDescriptorAttachmentRegistrar (can benull)- Returns:
thisbuilder for use in a chained invocation
-
cleanOutputDirectories
public final ImmutableGenerationRequest.Builder cleanOutputDirectories(boolean cleanOutputDirectories) Initializes the value for thecleanOutputDirectoriesattribute.- Parameters:
cleanOutputDirectories- The value for cleanOutputDirectories- Returns:
thisbuilder for use in a chained invocation
-
embedSourcesInClassOutputs
public final ImmutableGenerationRequest.Builder embedSourcesInClassOutputs(boolean embedSourcesInClassOutputs) Initializes the value for theembedSourcesInClassOutputsattribute.- Parameters:
embedSourcesInClassOutputs- The value for embedSourcesInClassOutputs- Returns:
thisbuilder for use in a chained invocation
-
failOnMissingSources
Initializes the value for thefailOnMissingSourcesattribute.- Parameters:
failOnMissingSources- The value for failOnMissingSources- Returns:
thisbuilder for use in a chained invocation
-
failOnMissingTargets
Initializes the value for thefailOnMissingTargetsattribute.- Parameters:
failOnMissingTargets- The value for failOnMissingTargets- Returns:
thisbuilder for use in a chained invocation
-
fatalWarnings
Initializes the value for thefatalWarningsattribute.- Parameters:
fatalWarnings- The value for fatalWarnings- Returns:
thisbuilder for use in a chained invocation
-
ignoreProjectDependencies
public final ImmutableGenerationRequest.Builder ignoreProjectDependencies(boolean ignoreProjectDependencies) Initializes the value for theignoreProjectDependenciesattribute.- Parameters:
ignoreProjectDependencies- The value for ignoreProjectDependencies- Returns:
thisbuilder for use in a chained invocation
-
incrementalCompilationEnabled
public final ImmutableGenerationRequest.Builder incrementalCompilationEnabled(boolean incrementalCompilationEnabled) Initializes the value for theincrementalCompilationEnabledattribute.- Parameters:
incrementalCompilationEnabled- The value for incrementalCompilationEnabled- Returns:
thisbuilder for use in a chained invocation
-
liteEnabled
Initializes the value for theliteEnabledattribute.- Parameters:
liteEnabled- The value for liteEnabled- Returns:
thisbuilder for use in a chained invocation
-
outputDescriptorIncludeImports
public final ImmutableGenerationRequest.Builder outputDescriptorIncludeImports(boolean outputDescriptorIncludeImports) Initializes the value for theoutputDescriptorIncludeImportsattribute.- Parameters:
outputDescriptorIncludeImports- The value for outputDescriptorIncludeImports- Returns:
thisbuilder for use in a chained invocation
-
outputDescriptorIncludeSourceInfo
public final ImmutableGenerationRequest.Builder outputDescriptorIncludeSourceInfo(boolean outputDescriptorIncludeSourceInfo) Initializes the value for theoutputDescriptorIncludeSourceInfoattribute.- Parameters:
outputDescriptorIncludeSourceInfo- The value for outputDescriptorIncludeSourceInfo- Returns:
thisbuilder for use in a chained invocation
-
outputDescriptorRetainOptions
public final ImmutableGenerationRequest.Builder outputDescriptorRetainOptions(boolean outputDescriptorRetainOptions) Initializes the value for theoutputDescriptorRetainOptionsattribute.- Parameters:
outputDescriptorRetainOptions- The value for outputDescriptorRetainOptions- Returns:
thisbuilder for use in a chained invocation
-
registerAsCompilationRoot
public final ImmutableGenerationRequest.Builder registerAsCompilationRoot(boolean registerAsCompilationRoot) Initializes the value for theregisterAsCompilationRootattribute.- Parameters:
registerAsCompilationRoot- The value for registerAsCompilationRoot- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableGenerationRequest.- Returns:
- An immutable instance of GenerationRequest
- Throws:
IllegalStateException- if any required attributes are missing
-