public static final class ImmutableDownloadConfig.Builder extends Object
ImmutableDownloadConfig.
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 ImmutableDownloadConfig.Builder from(DownloadConfig instance)
DownloadConfig instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableDownloadConfig.Builder downloadPath(DistributionDownloadPath downloadPath)
downloadPath attribute.downloadPath - The value for downloadPaththis builder for use in a chained invocationpublic final ImmutableDownloadConfig.Builder progressListener(ProgressListener progressListener)
progressListener attribute.progressListener - The value for progressListenerthis builder for use in a chained invocationpublic final ImmutableDownloadConfig.Builder artifactStorePath(Directory artifactStorePath)
artifactStorePath attribute.artifactStorePath - The value for artifactStorePaththis builder for use in a chained invocationpublic final ImmutableDownloadConfig.Builder fileNaming(TempNaming fileNaming)
fileNaming attribute.fileNaming - The value for fileNamingthis builder for use in a chained invocationpublic final ImmutableDownloadConfig.Builder downloadPrefix(String downloadPrefix)
downloadPrefix attribute.downloadPrefix - The value for downloadPrefixthis builder for use in a chained invocationpublic final ImmutableDownloadConfig.Builder userAgent(String userAgent)
userAgent attribute.userAgent - The value for userAgentthis builder for use in a chained invocationpublic final ImmutableDownloadConfig.Builder authorization(String authorization)
authorization to authorization.authorization - The value for authorizationthis builder for chained invocationpublic final ImmutableDownloadConfig.Builder authorization(Optional<String> authorization)
authorization to authorization.authorization - The value for authorizationthis builder for use in a chained invocationpublic final ImmutableDownloadConfig.Builder packageResolver(PackageResolver packageResolver)
packageResolver attribute.packageResolver - The value for packageResolverthis builder for use in a chained invocationpublic final ImmutableDownloadConfig.Builder timeoutConfig(TimeoutConfig timeoutConfig)
timeoutConfig attribute.
If not set, this attribute will have a default value as returned by the initializer of timeoutConfig.
timeoutConfig - The value for timeoutConfigthis builder for use in a chained invocationpublic final ImmutableDownloadConfig.Builder proxyFactory(ProxyFactory proxyFactory)
proxyFactory to proxyFactory.proxyFactory - The value for proxyFactorythis builder for chained invocationpublic final ImmutableDownloadConfig.Builder proxyFactory(Optional<? extends ProxyFactory> proxyFactory)
proxyFactory to proxyFactory.proxyFactory - The value for proxyFactorythis builder for use in a chained invocationpublic ImmutableDownloadConfig build()
ImmutableDownloadConfig.IllegalStateException - if any required attributes are missingCopyright © 2022. All rights reserved.