Class SrcOptions.Builder
-
- All Implemented Interfaces:
public final class SrcOptions.BuilderA builder for SrcOptions.
-
-
Method Summary
Modifier and Type Method Description final SrcOptions.Buildersrc(String src)Accepts a relative or absolute path of the resource. final SrcOptions.Buildersrc(JsonField<String> src)Sets Builder.src to an arbitrary JSON value. final SrcOptions.BuilderurlEndpoint(String urlEndpoint)Get your urlEndpoint from the ImageKit dashboard. final SrcOptions.BuilderurlEndpoint(JsonField<String> urlEndpoint)Sets Builder.urlEndpoint to an arbitrary JSON value. final SrcOptions.BuilderexpiresIn(Double expiresIn)When you want the signed URL to expire, specified in seconds. final SrcOptions.BuilderexpiresIn(JsonField<Double> expiresIn)Sets Builder.expiresIn to an arbitrary JSON value. final SrcOptions.BuilderqueryParameters(SrcOptions.QueryParameters queryParameters)These are additional query parameters that you want to add to the final URL. final SrcOptions.BuilderqueryParameters(JsonField<SrcOptions.QueryParameters> queryParameters)Sets Builder.queryParameters to an arbitrary JSON value. final SrcOptions.Buildersigned(Boolean signed)Whether to sign the URL or not. final SrcOptions.Buildersigned(JsonField<Boolean> signed)Sets Builder.signed to an arbitrary JSON value. final SrcOptions.Buildertransformation(List<Transformation> transformation)An array of objects specifying the transformations to be applied in the URL. final SrcOptions.Buildertransformation(JsonField<List<Transformation>> transformation)Sets Builder.transformation to an arbitrary JSON value. final SrcOptions.BuilderaddTransformation(Transformation transformation)Adds a single Transformation to Builder.transformation. final SrcOptions.BuildertransformationPosition(TransformationPosition transformationPosition)By default, the transformation string is added as a query parameter in the URL, e.g. final SrcOptions.BuildertransformationPosition(JsonField<TransformationPosition> transformationPosition)Sets Builder.transformationPosition to an arbitrary JSON value. final SrcOptions.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final SrcOptions.BuilderputAdditionalProperty(String key, JsonValue value)final SrcOptions.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final SrcOptions.BuilderremoveAdditionalProperty(String key)final SrcOptions.BuilderremoveAllAdditionalProperties(Set<String> keys)final SrcOptionsbuild()Returns an immutable instance of SrcOptions. -
-
Method Detail
-
src
final SrcOptions.Builder src(String src)
Accepts a relative or absolute path of the resource. If a relative path is provided, it is appended to the
urlEndpoint. If an absolute path is provided,urlEndpointis ignored.
-
src
final SrcOptions.Builder src(JsonField<String> src)
Sets Builder.src to an arbitrary JSON value.
You should usually call Builder.src with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
urlEndpoint
final SrcOptions.Builder urlEndpoint(String urlEndpoint)
Get your urlEndpoint from the ImageKit dashboard.
-
urlEndpoint
final SrcOptions.Builder urlEndpoint(JsonField<String> urlEndpoint)
Sets Builder.urlEndpoint to an arbitrary JSON value.
You should usually call Builder.urlEndpoint with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
expiresIn
final SrcOptions.Builder expiresIn(Double expiresIn)
When you want the signed URL to expire, specified in seconds. If
expiresInis anything above 0, the URL will always be signed even ifsignedis set to false. If not specified andsignedistrue, the signed URL will not expire (valid indefinitely).Example: Setting
expiresIn: 3600will make the URL expire 1 hour from generation time. After the expiry time, the signed URL will no longer be valid and ImageKit will return a 401 Unauthorized status code.
-
expiresIn
final SrcOptions.Builder expiresIn(JsonField<Double> expiresIn)
Sets Builder.expiresIn to an arbitrary JSON value.
You should usually call Builder.expiresIn with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
queryParameters
final SrcOptions.Builder queryParameters(SrcOptions.QueryParameters queryParameters)
These are additional query parameters that you want to add to the final URL. They can be any query parameters and not necessarily related to ImageKit. This is especially useful if you want to add a versioning parameter to your URLs.
-
queryParameters
final SrcOptions.Builder queryParameters(JsonField<SrcOptions.QueryParameters> queryParameters)
Sets Builder.queryParameters to an arbitrary JSON value.
You should usually call Builder.queryParameters with a well-typed QueryParameters value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
signed
final SrcOptions.Builder signed(Boolean signed)
Whether to sign the URL or not. Set this to
trueif you want to generate a signed URL. IfsignedistrueandexpiresInis not specified, the signed URL will not expire (valid indefinitely). Note: IfexpiresInis set to any value above 0, the URL will always be signed regardless of this setting. Learn more.
-
signed
final SrcOptions.Builder signed(JsonField<Boolean> signed)
Sets Builder.signed to an arbitrary JSON value.
You should usually call Builder.signed with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
transformation
final SrcOptions.Builder transformation(List<Transformation> transformation)
An array of objects specifying the transformations to be applied in the URL. If more than one transformation is specified, they are applied in the order they are specified as chained transformations. See Chained transformations.
-
transformation
final SrcOptions.Builder transformation(JsonField<List<Transformation>> transformation)
Sets Builder.transformation to an arbitrary JSON value.
You should usually call Builder.transformation with a well-typed
List<Transformation>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTransformation
final SrcOptions.Builder addTransformation(Transformation transformation)
Adds a single Transformation to Builder.transformation.
-
transformationPosition
final SrcOptions.Builder transformationPosition(TransformationPosition transformationPosition)
By default, the transformation string is added as a query parameter in the URL, e.g.,
?tr=w-100,h-100. If you want to add the transformation string in the path of the URL, set this topath. Learn more in the Transformations guide.
-
transformationPosition
final SrcOptions.Builder transformationPosition(JsonField<TransformationPosition> transformationPosition)
Sets Builder.transformationPosition to an arbitrary JSON value.
You should usually call Builder.transformationPosition with a well-typed TransformationPosition value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final SrcOptions.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final SrcOptions.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final SrcOptions.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final SrcOptions.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final SrcOptions.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final SrcOptions build()
Returns an immutable instance of SrcOptions.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.src() .urlEndpoint()
-
-
-
-