@NotThreadSafe public static final class PythonTestDescriptionArg.Builder extends Object
PythonTestDescriptionArg
.
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.
public final PythonTestDescriptionArg.Builder from(com.facebook.buck.features.python.PythonLibraryDescription.CoreArg instance)
com.facebook.buck.features.python.PythonLibraryDescription.CoreArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder from(HasVersionUniverse instance)
com.facebook.buck.versions.HasVersionUniverse
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder from(HasDeclaredDeps instance)
com.facebook.buck.core.description.arg.HasDeclaredDeps
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder from(HasTestTimeout instance)
com.facebook.buck.core.description.arg.HasTestTimeout
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder from(HasTests instance)
com.facebook.buck.core.description.arg.HasTests
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder from(PythonTestDescriptionArg instance)
PythonTestDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder from(com.facebook.buck.features.python.PythonTestDescription.AbstractPythonTestDescriptionArg instance)
AbstractPythonTestDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder from(HasTestRunner instance)
com.facebook.buck.core.test.rule.HasTestRunner
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder from(BuildRuleArg instance)
com.facebook.buck.core.description.arg.BuildRuleArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder from(HasContacts instance)
com.facebook.buck.core.description.arg.HasContacts
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder from(ConstructorArg instance)
com.facebook.buck.core.description.arg.ConstructorArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setMainModule(String mainModule)
mainModule
to mainModule.mainModule
- The value for mainModulethis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setMainModule(Optional<String> mainModule)
mainModule
to mainModule.mainModule
- The value for mainModulethis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setPlatform(String platform)
platform
to platform.platform
- The value for platformthis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setPlatform(Optional<String> platform)
platform
to platform.platform
- The value for platformthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setCxxPlatform(Flavor cxxPlatform)
cxxPlatform
to cxxPlatform.cxxPlatform
- The value for cxxPlatformthis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setCxxPlatform(Optional<? extends Flavor> cxxPlatform)
cxxPlatform
to cxxPlatform.cxxPlatform
- The value for cxxPlatformthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setExtension(String extension)
extension
to extension.extension
- The value for extensionthis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setExtension(Optional<String> extension)
extension
to extension.extension
- The value for extensionthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setPackageStyle(PythonBuckConfig.PackageStyle packageStyle)
packageStyle
to packageStyle.packageStyle
- The value for packageStylethis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setPackageStyle(Optional<? extends PythonBuckConfig.PackageStyle> packageStyle)
packageStyle
to packageStyle.packageStyle
- The value for packageStylethis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addPreloadDeps(BuildTarget element)
preloadDeps
set.element
- A preloadDeps elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addPreloadDeps(BuildTarget... elements)
preloadDeps
set.elements
- An array of preloadDeps elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setPreloadDeps(Iterable<? extends BuildTarget> elements)
preloadDeps
set.elements
- An iterable of preloadDeps elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllPreloadDeps(Iterable<? extends BuildTarget> elements)
preloadDeps
set.elements
- An iterable of preloadDeps elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addLinkerFlags(StringWithMacros element)
linkerFlags
list.element
- A linkerFlags elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addLinkerFlags(StringWithMacros... elements)
linkerFlags
list.elements
- An array of linkerFlags elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setLinkerFlags(Iterable<? extends StringWithMacros> elements)
linkerFlags
list.elements
- An iterable of linkerFlags elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllLinkerFlags(Iterable<? extends StringWithMacros> elements)
linkerFlags
list.elements
- An iterable of linkerFlags elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addNeededCoverage(NeededCoverageSpec element)
neededCoverage
list.element
- A neededCoverage elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addNeededCoverage(NeededCoverageSpec... elements)
neededCoverage
list.elements
- An array of neededCoverage elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setNeededCoverage(Iterable<? extends NeededCoverageSpec> elements)
neededCoverage
list.elements
- An iterable of neededCoverage elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllNeededCoverage(Iterable<? extends NeededCoverageSpec> elements)
neededCoverage
list.elements
- An iterable of neededCoverage elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addBuildArgs(StringWithMacros element)
buildArgs
list.element
- A buildArgs elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addBuildArgs(StringWithMacros... elements)
buildArgs
list.elements
- An array of buildArgs elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setBuildArgs(Iterable<? extends StringWithMacros> elements)
buildArgs
list.elements
- An iterable of buildArgs elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllBuildArgs(Iterable<? extends StringWithMacros> elements)
buildArgs
list.elements
- An iterable of buildArgs elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder putEnv(String key, StringWithMacros value)
env
map.key
- The key in the env mapvalue
- The associated value in the env mapthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder putEnv(Map.Entry<String,? extends StringWithMacros> entry)
env
map. Nulls are not permittedentry
- The key and value entrythis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setEnv(Map<String,? extends StringWithMacros> entries)
env
map. Nulls are not permittedentries
- The entries that will be added to the env mapthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder putAllEnv(Map<String,? extends StringWithMacros> entries)
env
map. Nulls are not permittedentries
- The entries that will be added to the env mapthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAdditionalCoverageTargets(BuildTarget element)
additionalCoverageTargets
set.element
- A additionalCoverageTargets elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAdditionalCoverageTargets(BuildTarget... elements)
additionalCoverageTargets
set.elements
- An array of additionalCoverageTargets elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setAdditionalCoverageTargets(Iterable<? extends BuildTarget> elements)
additionalCoverageTargets
set.elements
- An iterable of additionalCoverageTargets elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllAdditionalCoverageTargets(Iterable<? extends BuildTarget> elements)
additionalCoverageTargets
set.elements
- An iterable of additionalCoverageTargets elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setCompile(boolean compile)
compile
to compile.compile
- The value for compilethis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setCompile(Optional<Boolean> compile)
compile
to compile.compile
- The value for compilethis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addContacts(String element)
contacts
sortedSet.element
- A contacts elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addContacts(String... elements)
contacts
sortedSet.elements
- An array of contacts elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setContacts(Iterable<String> elements)
contacts
sortedSet.elements
- An iterable of contacts elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllContacts(Iterable<String> elements)
contacts
sortedSet.elements
- An iterable of contacts elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setRunner(BuildTarget runner)
runner
to runner.runner
- The value for runnerthis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setRunner(Optional<? extends BuildTarget> runner)
runner
to runner.runner
- The value for runnerthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setSpecs(TestRunnerSpec specs)
specs
to specs.specs
- The value for specsthis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setSpecs(Optional<? extends TestRunnerSpec> specs)
specs
to specs.specs
- The value for specsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setTestRuleTimeoutMs(long testRuleTimeoutMs)
testRuleTimeoutMs
to testRuleTimeoutMs.testRuleTimeoutMs
- The value for testRuleTimeoutMsthis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setTestRuleTimeoutMs(Optional<Long> testRuleTimeoutMs)
testRuleTimeoutMs
to testRuleTimeoutMs.testRuleTimeoutMs
- The value for testRuleTimeoutMsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setSrcs(SourceSortedSet srcs)
srcs
attribute.
If not set, this attribute will have a default value as returned by the initializer of srcs
.
srcs
- The value for srcsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setVersionedSrcs(VersionMatchedCollection<SourceSortedSet> versionedSrcs)
versionedSrcs
to versionedSrcs.versionedSrcs
- The value for versionedSrcsthis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setVersionedSrcs(Optional<? extends VersionMatchedCollection<SourceSortedSet>> versionedSrcs)
versionedSrcs
to versionedSrcs.versionedSrcs
- The value for versionedSrcsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setPlatformSrcs(PatternMatchedCollection<SourceSortedSet> platformSrcs)
platformSrcs
attribute.
If not set, this attribute will have a default value as returned by the initializer of platformSrcs
.
platformSrcs
- The value for platformSrcsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setResources(SourceSortedSet resources)
resources
attribute.
If not set, this attribute will have a default value as returned by the initializer of resources
.
resources
- The value for resourcesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setVersionedResources(VersionMatchedCollection<SourceSortedSet> versionedResources)
versionedResources
to versionedResources.versionedResources
- The value for versionedResourcesthis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setVersionedResources(Optional<? extends VersionMatchedCollection<SourceSortedSet>> versionedResources)
versionedResources
to versionedResources.versionedResources
- The value for versionedResourcesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setPlatformResources(PatternMatchedCollection<SourceSortedSet> platformResources)
platformResources
attribute.
If not set, this attribute will have a default value as returned by the initializer of platformResources
.
platformResources
- The value for platformResourcesthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setPlatformDeps(PatternMatchedCollection<com.google.common.collect.ImmutableSortedSet<BuildTarget>> platformDeps)
platformDeps
attribute.
If not set, this attribute will have a default value as returned by the initializer of platformDeps
.
platformDeps
- The value for platformDepsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setBaseModule(String baseModule)
baseModule
to baseModule.baseModule
- The value for baseModulethis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setBaseModule(Optional<String> baseModule)
baseModule
to baseModule.baseModule
- The value for baseModulethis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setZipSafe(boolean zipSafe)
zipSafe
to zipSafe.zipSafe
- The value for zipSafethis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setZipSafe(Optional<Boolean> zipSafe)
zipSafe
to zipSafe.zipSafe
- The value for zipSafethis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setExcludeDepsFromMergedLinking(boolean excludeDepsFromMergedLinking)
excludeDepsFromMergedLinking
attribute.
If not set, this attribute will have a default value as returned by the initializer of excludeDepsFromMergedLinking
.
excludeDepsFromMergedLinking
- The value for excludeDepsFromMergedLinkingthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addDeps(BuildTarget element)
deps
sortedSet.element
- A deps elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addDeps(BuildTarget... elements)
deps
sortedSet.elements
- An array of deps elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addTests(BuildTarget element)
tests
sortedSet.element
- A tests elementthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addTests(BuildTarget... elements)
tests
sortedSet.elements
- An array of tests elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder addAllTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic final PythonTestDescriptionArg.Builder setVersionUniverse(String versionUniverse)
versionUniverse
to versionUniverse.versionUniverse
- The value for versionUniversethis
builder for chained invocationpublic final PythonTestDescriptionArg.Builder setVersionUniverse(Optional<String> versionUniverse)
versionUniverse
to versionUniverse.versionUniverse
- The value for versionUniversethis
builder for use in a chained invocationpublic PythonTestDescriptionArg build()
PythonTestDescriptionArg
.IllegalStateException
- if any required attributes are missing