@@ -22,15 +22,12 @@ import java.util.Optional
2222/* *
2323 * Creates a new named transformation and returns the created object.
2424 *
25- * Named transformations let you assign a short, reusable name to a complex transformation string,
26- * so it can be applied in image and video URLs as `tr:n-<name>` and later updated without changing
27- * any existing URLs.
28- *
29- * Learn more about
25+ * A named transformation is a short, reusable name for a transformation string. Use it in image and
26+ * video URLs as `tr:n-<name>`, and update the underlying transformation later without changing
27+ * existing URLs. Learn more about
3028 * [named transformations](https://imagekit.io/docs/transformations#named-transformations).
3129 *
32- * **Note:** You can create up to 250 named transformations per account. Once this limit is reached,
33- * the request fails with a `400` error.
30+ * You can create up to 250 named transformations per account.
3431 */
3532class NamedTransformationCreateParams
3633private constructor (
@@ -40,32 +37,28 @@ private constructor(
4037) : Params {
4138
4239 /* *
43- * Name of the named transformation. This is the alias used to refer to the transformation
44- * string in image and video URLs, for example `tr:n-<name>`. Can only contain alphanumeric
45- * characters or `_` (hyphens are not allowed), and must be unique for your account. Name
46- * matching is case-sensitive, so `Small_Thumbnail` and `small_thumbnail` are treated as
47- * different names.
40+ * Alias for the transformation string, used in URLs as `tr:n-<name>`. Must contain only
41+ * alphanumeric characters or `_` (no hyphens), and be unique for your account. Name matching is
42+ * case-sensitive.
4843 *
4944 * @throws ImageKitInvalidDataException if the JSON field has an unexpected type or is
5045 * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
5146 */
5247 fun name (): String = body.name()
5348
5449 /* *
55- * The transformation this name refers to, expressed as one or more comma-separated
56- * transformation parameters, for example `w-150,h-150,fo-center,cm-resize`. You do not need to
57- * prefix this with `tr:` — it is added automatically. If you do include it, it must appear in
58- * lowercase at the start of the string, or the request is rejected. Learn more about the
59- * [transformation syntax](https://imagekit.io/docs/transformations).
50+ * The transformation string this name refers to, for example `w-150,h-150,fo-center,cm-resize`.
51+ * The `tr:` prefix is optional — it's added automatically if missing, and validated if present.
52+ * Learn more about the [transformation syntax](https://imagekit.io/docs/transformations).
6053 *
6154 * @throws ImageKitInvalidDataException if the JSON field has an unexpected type or is
6255 * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
6356 */
6457 fun transformation (): String = body.transformation()
6558
6659 /* *
67- * Whether this named transformation is enabled. Set to `false` to temporarily disable it
68- * without deleting it — requests using a disabled named transformation fail at delivery time.
60+ * Whether the named transformation is enabled. Set to `false` to disable it without deleting
61+ * it; requests using a disabled named transformation fail at delivery time.
6962 *
7063 * @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
7164 * server responded with an unexpected value).
@@ -146,11 +139,9 @@ private constructor(
146139 fun body (body : Body ) = apply { this .body = body.toBuilder() }
147140
148141 /* *
149- * Name of the named transformation. This is the alias used to refer to the transformation
150- * string in image and video URLs, for example `tr:n-<name>`. Can only contain alphanumeric
151- * characters or `_` (hyphens are not allowed), and must be unique for your account. Name
152- * matching is case-sensitive, so `Small_Thumbnail` and `small_thumbnail` are treated as
153- * different names.
142+ * Alias for the transformation string, used in URLs as `tr:n-<name>`. Must contain only
143+ * alphanumeric characters or `_` (no hyphens), and be unique for your account. Name
144+ * matching is case-sensitive.
154145 */
155146 fun name (name : String ) = apply { body.name(name) }
156147
@@ -163,11 +154,10 @@ private constructor(
163154 fun name (name : JsonField <String >) = apply { body.name(name) }
164155
165156 /* *
166- * The transformation this name refers to, expressed as one or more comma-separated
167- * transformation parameters, for example `w-150,h-150,fo-center,cm-resize`. You do not need
168- * to prefix this with `tr:` — it is added automatically. If you do include it, it must
169- * appear in lowercase at the start of the string, or the request is rejected. Learn more
170- * about the [transformation syntax](https://imagekit.io/docs/transformations).
157+ * The transformation string this name refers to, for example
158+ * `w-150,h-150,fo-center,cm-resize`. The `tr:` prefix is optional — it's added
159+ * automatically if missing, and validated if present. Learn more about the
160+ * [transformation syntax](https://imagekit.io/docs/transformations).
171161 */
172162 fun transformation (transformation : String ) = apply { body.transformation(transformation) }
173163
@@ -183,9 +173,8 @@ private constructor(
183173 }
184174
185175 /* *
186- * Whether this named transformation is enabled. Set to `false` to temporarily disable it
187- * without deleting it — requests using a disabled named transformation fail at delivery
188- * time.
176+ * Whether the named transformation is enabled. Set to `false` to disable it without
177+ * deleting it; requests using a disabled named transformation fail at delivery time.
189178 */
190179 fun enabled (enabled : Boolean ) = apply { body.enabled(enabled) }
191180
@@ -360,33 +349,29 @@ private constructor(
360349 ) : this (name, transformation, enabled, mutableMapOf ())
361350
362351 /* *
363- * Name of the named transformation. This is the alias used to refer to the transformation
364- * string in image and video URLs, for example `tr:n-<name>`. Can only contain alphanumeric
365- * characters or `_` (hyphens are not allowed), and must be unique for your account. Name
366- * matching is case-sensitive, so `Small_Thumbnail` and `small_thumbnail` are treated as
367- * different names.
352+ * Alias for the transformation string, used in URLs as `tr:n-<name>`. Must contain only
353+ * alphanumeric characters or `_` (no hyphens), and be unique for your account. Name
354+ * matching is case-sensitive.
368355 *
369356 * @throws ImageKitInvalidDataException if the JSON field has an unexpected type or is
370357 * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
371358 */
372359 fun name (): String = name.getRequired(" name" )
373360
374361 /* *
375- * The transformation this name refers to, expressed as one or more comma-separated
376- * transformation parameters, for example `w-150,h-150,fo-center,cm-resize`. You do not need
377- * to prefix this with `tr:` — it is added automatically. If you do include it, it must
378- * appear in lowercase at the start of the string, or the request is rejected. Learn more
379- * about the [transformation syntax](https://imagekit.io/docs/transformations).
362+ * The transformation string this name refers to, for example
363+ * `w-150,h-150,fo-center,cm-resize`. The `tr:` prefix is optional — it's added
364+ * automatically if missing, and validated if present. Learn more about the
365+ * [transformation syntax](https://imagekit.io/docs/transformations).
380366 *
381367 * @throws ImageKitInvalidDataException if the JSON field has an unexpected type or is
382368 * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
383369 */
384370 fun transformation (): String = transformation.getRequired(" transformation" )
385371
386372 /* *
387- * Whether this named transformation is enabled. Set to `false` to temporarily disable it
388- * without deleting it — requests using a disabled named transformation fail at delivery
389- * time.
373+ * Whether the named transformation is enabled. Set to `false` to disable it without
374+ * deleting it; requests using a disabled named transformation fail at delivery time.
390375 *
391376 * @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if
392377 * the server responded with an unexpected value).
@@ -460,11 +445,9 @@ private constructor(
460445 }
461446
462447 /* *
463- * Name of the named transformation. This is the alias used to refer to the
464- * transformation string in image and video URLs, for example `tr:n-<name>`. Can only
465- * contain alphanumeric characters or `_` (hyphens are not allowed), and must be unique
466- * for your account. Name matching is case-sensitive, so `Small_Thumbnail` and
467- * `small_thumbnail` are treated as different names.
448+ * Alias for the transformation string, used in URLs as `tr:n-<name>`. Must contain only
449+ * alphanumeric characters or `_` (no hyphens), and be unique for your account. Name
450+ * matching is case-sensitive.
468451 */
469452 fun name (name : String ) = name(JsonField .of(name))
470453
@@ -478,11 +461,9 @@ private constructor(
478461 fun name (name : JsonField <String >) = apply { this .name = name }
479462
480463 /* *
481- * The transformation this name refers to, expressed as one or more comma-separated
482- * transformation parameters, for example `w-150,h-150,fo-center,cm-resize`. You do not
483- * need to prefix this with `tr:` — it is added automatically. If you do include it, it
484- * must appear in lowercase at the start of the string, or the request is rejected.
485- * Learn more about the
464+ * The transformation string this name refers to, for example
465+ * `w-150,h-150,fo-center,cm-resize`. The `tr:` prefix is optional — it's added
466+ * automatically if missing, and validated if present. Learn more about the
486467 * [transformation syntax](https://imagekit.io/docs/transformations).
487468 */
488469 fun transformation (transformation : String ) =
@@ -500,9 +481,8 @@ private constructor(
500481 }
501482
502483 /* *
503- * Whether this named transformation is enabled. Set to `false` to temporarily disable
504- * it without deleting it — requests using a disabled named transformation fail at
505- * delivery time.
484+ * Whether the named transformation is enabled. Set to `false` to disable it without
485+ * deleting it; requests using a disabled named transformation fail at delivery time.
506486 */
507487 fun enabled (enabled : Boolean ) = enabled(JsonField .of(enabled))
508488
0 commit comments