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 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 final ImmutableDownloadConfig.Builder userAgent(String userAgent)
userAgent attribute.
If not set, this attribute will have a default value as returned by the initializer of userAgent.
userAgent - The value for userAgentthis builder for use in a chained invocation@Deprecated public final ImmutableDownloadConfig.Builder authorization(String authorization)
authorization to authorization.authorization - The value for authorizationthis builder for chained invocation@Deprecated public 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 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 ImmutableDownloadConfig build()
ImmutableDownloadConfig.IllegalStateException - if any required attributes are missingCopyright © 2023. All rights reserved.