Skip to content

Commit e71dfe1

Browse files
refactor: AITags to singular AITag schema with array items pattern
1 parent dc76ed5 commit e71dfe1

6 files changed

Lines changed: 51 additions & 94 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 47
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-7c4c23556be689ded6bcafd05e1645b82239521c9c841c0f7e76336e2eefcffa.yml
3-
openapi_spec_hash: eca5b039a0066c6536296248c3a80854
4-
config_hash: f914ebc9670f6e7c7751660caa4e5556
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-70c42eda2bee929830b2537f758400a58dded1f1ef5686a286e2469c35a041a0.yml
3+
openapi_spec_hash: cdaeed824e91657b45092765cf55eb42
4+
config_hash: e3c2679d25f6235381dfb11962fbf3d9

image-kit-java-core/src/main/kotlin/com/imagekit/api/models/beta/v2/files/FileUploadResponse.kt

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ private constructor(
133133
)
134134

135135
/**
136-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be null. These
137-
* tags can be added using the `google-auto-tagging` or `aws-auto-tagging` extensions.
136+
* An array of tags assigned to the uploaded file by auto tagging.
138137
*
139138
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
140139
* server responded with an unexpected value).
@@ -636,10 +635,7 @@ private constructor(
636635
additionalProperties = fileUploadResponse.additionalProperties.toMutableMap()
637636
}
638637

639-
/**
640-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be null.
641-
* These tags can be added using the `google-auto-tagging` or `aws-auto-tagging` extensions.
642-
*/
638+
/** An array of tags assigned to the uploaded file by auto tagging. */
643639
fun aiTags(aiTags: List<AiTag>?) = aiTags(JsonField.ofNullable(aiTags))
644640

645641
/** Alias for calling [Builder.aiTags] with `aiTags.orElse(null)`. */
@@ -1168,6 +1164,10 @@ private constructor(
11681164
(if (videoCodec.asKnown().isPresent) 1 else 0) +
11691165
(if (width.asKnown().isPresent) 1 else 0)
11701166

1167+
/**
1168+
* AI-generated tag associated with an image. These tags can be added using the
1169+
* `google-auto-tagging` or `aws-auto-tagging` extensions.
1170+
*/
11711171
class AiTag
11721172
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
11731173
private constructor(
@@ -1388,12 +1388,7 @@ private constructor(
13881388
"AiTag{confidence=$confidence, name=$name, source=$source, additionalProperties=$additionalProperties}"
13891389
}
13901390

1391-
/**
1392-
* A key-value data associated with the asset. Use `responseField` in API request to get
1393-
* `customMetadata` in the upload API response. Before setting any custom metadata on an asset,
1394-
* you have to create the field using custom metadata fields API. Send `customMetadata` in
1395-
* `responseFields` in API request to get the value of this field.
1396-
*/
1391+
/** A key-value data associated with the asset. */
13971392
class CustomMetadata
13981393
@JsonCreator
13991394
private constructor(
@@ -1495,8 +1490,7 @@ private constructor(
14951490

14961491
/**
14971492
* Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp
1498-
* data. Send `embeddedMetadata` in `responseFields` in API request to get embeddedMetadata in
1499-
* the upload API response.
1493+
* data.
15001494
*/
15011495
class EmbeddedMetadata
15021496
@JsonCreator

image-kit-java-core/src/main/kotlin/com/imagekit/api/models/files/File.kt

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ private constructor(
142142
)
143143

144144
/**
145-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be null. These
146-
* tags can be added using the `google-auto-tagging` or `aws-auto-tagging` extensions.
145+
* Array of AI-generated tags associated with the image. If no AITags are set, it will be null.
147146
*
148147
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
149148
* server responded with an unexpected value).
@@ -183,10 +182,7 @@ private constructor(
183182
fun customCoordinates(): Optional<String> = customCoordinates.getOptional("customCoordinates")
184183

185184
/**
186-
* A key-value data associated with the asset. Use `responseField` in API request to get
187-
* `customMetadata` in the upload API response. Before setting any custom metadata on an asset,
188-
* you have to create the field using custom metadata fields API. Send `customMetadata` in
189-
* `responseFields` in API request to get the value of this field.
185+
* An object with custom metadata for the file.
190186
*
191187
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
192188
* server responded with an unexpected value).
@@ -212,8 +208,7 @@ private constructor(
212208

213209
/**
214210
* Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp
215-
* data. Send `embeddedMetadata` in `responseFields` in API request to get embeddedMetadata in
216-
* the upload API response.
211+
* data.
217212
*
218213
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
219214
* server responded with an unexpected value).
@@ -360,7 +355,7 @@ private constructor(
360355
fun url(): Optional<String> = url.getOptional("url")
361356

362357
/**
363-
* An object containing the file or file version's `id` (versionId) and `name`.
358+
* An object with details of the file version.
364359
*
365360
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
366361
* server responded with an unexpected value).
@@ -685,8 +680,8 @@ private constructor(
685680
}
686681

687682
/**
688-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be null.
689-
* These tags can be added using the `google-auto-tagging` or `aws-auto-tagging` extensions.
683+
* Array of AI-generated tags associated with the image. If no AITags are set, it will be
684+
* null.
690685
*/
691686
fun aiTags(aiTags: List<AiTag>?) = aiTags(JsonField.ofNullable(aiTags))
692687

@@ -770,12 +765,7 @@ private constructor(
770765
this.customCoordinates = customCoordinates
771766
}
772767

773-
/**
774-
* A key-value data associated with the asset. Use `responseField` in API request to get
775-
* `customMetadata` in the upload API response. Before setting any custom metadata on an
776-
* asset, you have to create the field using custom metadata fields API. Send
777-
* `customMetadata` in `responseFields` in API request to get the value of this field.
778-
*/
768+
/** An object with custom metadata for the file. */
779769
fun customMetadata(customMetadata: CustomMetadata) =
780770
customMetadata(JsonField.of(customMetadata))
781771

@@ -818,8 +808,7 @@ private constructor(
818808

819809
/**
820810
* Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp
821-
* data. Send `embeddedMetadata` in `responseFields` in API request to get embeddedMetadata
822-
* in the upload API response.
811+
* data.
823812
*/
824813
fun embeddedMetadata(embeddedMetadata: EmbeddedMetadata) =
825814
embeddedMetadata(JsonField.of(embeddedMetadata))
@@ -1055,7 +1044,7 @@ private constructor(
10551044
*/
10561045
fun url(url: JsonField<String>) = apply { this.url = url }
10571046

1058-
/** An object containing the file or file version's `id` (versionId) and `name`. */
1047+
/** An object with details of the file version. */
10591048
fun versionInfo(versionInfo: VersionInfo) = versionInfo(JsonField.of(versionInfo))
10601049

10611050
/**
@@ -1232,6 +1221,10 @@ private constructor(
12321221
(if (videoCodec.asKnown().isPresent) 1 else 0) +
12331222
(if (width.asKnown().isPresent) 1 else 0)
12341223

1224+
/**
1225+
* AI-generated tag associated with an image. These tags can be added using the
1226+
* `google-auto-tagging` or `aws-auto-tagging` extensions.
1227+
*/
12351228
class AiTag
12361229
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
12371230
private constructor(
@@ -1452,12 +1445,7 @@ private constructor(
14521445
"AiTag{confidence=$confidence, name=$name, source=$source, additionalProperties=$additionalProperties}"
14531446
}
14541447

1455-
/**
1456-
* A key-value data associated with the asset. Use `responseField` in API request to get
1457-
* `customMetadata` in the upload API response. Before setting any custom metadata on an asset,
1458-
* you have to create the field using custom metadata fields API. Send `customMetadata` in
1459-
* `responseFields` in API request to get the value of this field.
1460-
*/
1448+
/** A key-value data associated with the asset. */
14611449
class CustomMetadata
14621450
@JsonCreator
14631451
private constructor(
@@ -1559,8 +1547,7 @@ private constructor(
15591547

15601548
/**
15611549
* Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp
1562-
* data. Send `embeddedMetadata` in `responseFields` in API request to get embeddedMetadata in
1563-
* the upload API response.
1550+
* data.
15641551
*/
15651552
class EmbeddedMetadata
15661553
@JsonCreator

image-kit-java-core/src/main/kotlin/com/imagekit/api/models/files/FileUpdateResponse.kt

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ private constructor(
181181
.build()
182182

183183
/**
184-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be null. These
185-
* tags can be added using the `google-auto-tagging` or `aws-auto-tagging` extensions.
184+
* Array of AI-generated tags associated with the image. If no AITags are set, it will be null.
186185
*
187186
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
188187
* server responded with an unexpected value).
@@ -222,10 +221,7 @@ private constructor(
222221
fun customCoordinates(): Optional<String> = customCoordinates.getOptional("customCoordinates")
223222

224223
/**
225-
* A key-value data associated with the asset. Use `responseField` in API request to get
226-
* `customMetadata` in the upload API response. Before setting any custom metadata on an asset,
227-
* you have to create the field using custom metadata fields API. Send `customMetadata` in
228-
* `responseFields` in API request to get the value of this field.
224+
* An object with custom metadata for the file.
229225
*
230226
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
231227
* server responded with an unexpected value).
@@ -252,8 +248,7 @@ private constructor(
252248

253249
/**
254250
* Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp
255-
* data. Send `embeddedMetadata` in `responseFields` in API request to get embeddedMetadata in
256-
* the upload API response.
251+
* data.
257252
*
258253
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
259254
* server responded with an unexpected value).
@@ -400,7 +395,7 @@ private constructor(
400395
fun url(): Optional<String> = url.getOptional("url")
401396

402397
/**
403-
* An object containing the file or file version's `id` (versionId) and `name`.
398+
* An object with details of the file version.
404399
*
405400
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
406401
* server responded with an unexpected value).
@@ -743,8 +738,8 @@ private constructor(
743738
}
744739

745740
/**
746-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be null.
747-
* These tags can be added using the `google-auto-tagging` or `aws-auto-tagging` extensions.
741+
* Array of AI-generated tags associated with the image. If no AITags are set, it will be
742+
* null.
748743
*/
749744
fun aiTags(aiTags: List<File.AiTag>?) = aiTags(JsonField.ofNullable(aiTags))
750745

@@ -828,12 +823,7 @@ private constructor(
828823
this.customCoordinates = customCoordinates
829824
}
830825

831-
/**
832-
* A key-value data associated with the asset. Use `responseField` in API request to get
833-
* `customMetadata` in the upload API response. Before setting any custom metadata on an
834-
* asset, you have to create the field using custom metadata fields API. Send
835-
* `customMetadata` in `responseFields` in API request to get the value of this field.
836-
*/
826+
/** An object with custom metadata for the file. */
837827
fun customMetadata(customMetadata: File.CustomMetadata) =
838828
customMetadata(JsonField.of(customMetadata))
839829

@@ -876,8 +866,7 @@ private constructor(
876866

877867
/**
878868
* Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp
879-
* data. Send `embeddedMetadata` in `responseFields` in API request to get embeddedMetadata
880-
* in the upload API response.
869+
* data.
881870
*/
882871
fun embeddedMetadata(embeddedMetadata: File.EmbeddedMetadata) =
883872
embeddedMetadata(JsonField.of(embeddedMetadata))
@@ -1114,7 +1103,7 @@ private constructor(
11141103
*/
11151104
fun url(url: JsonField<String>) = apply { this.url = url }
11161105

1117-
/** An object containing the file or file version's `id` (versionId) and `name`. */
1106+
/** An object with details of the file version. */
11181107
fun versionInfo(versionInfo: File.VersionInfo) = versionInfo(JsonField.of(versionInfo))
11191108

11201109
/**

image-kit-java-core/src/main/kotlin/com/imagekit/api/models/files/FileUploadResponse.kt

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ private constructor(
132132
)
133133

134134
/**
135-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be null. These
136-
* tags can be added using the `google-auto-tagging` or `aws-auto-tagging` extensions.
135+
* An array of tags assigned to the uploaded file by auto tagging.
137136
*
138137
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if the
139138
* server responded with an unexpected value).
@@ -635,10 +634,7 @@ private constructor(
635634
additionalProperties = fileUploadResponse.additionalProperties.toMutableMap()
636635
}
637636

638-
/**
639-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be null.
640-
* These tags can be added using the `google-auto-tagging` or `aws-auto-tagging` extensions.
641-
*/
637+
/** An array of tags assigned to the uploaded file by auto tagging. */
642638
fun aiTags(aiTags: List<AiTag>?) = aiTags(JsonField.ofNullable(aiTags))
643639

644640
/** Alias for calling [Builder.aiTags] with `aiTags.orElse(null)`. */
@@ -1167,6 +1163,10 @@ private constructor(
11671163
(if (videoCodec.asKnown().isPresent) 1 else 0) +
11681164
(if (width.asKnown().isPresent) 1 else 0)
11691165

1166+
/**
1167+
* AI-generated tag associated with an image. These tags can be added using the
1168+
* `google-auto-tagging` or `aws-auto-tagging` extensions.
1169+
*/
11701170
class AiTag
11711171
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
11721172
private constructor(
@@ -1387,12 +1387,7 @@ private constructor(
13871387
"AiTag{confidence=$confidence, name=$name, source=$source, additionalProperties=$additionalProperties}"
13881388
}
13891389

1390-
/**
1391-
* A key-value data associated with the asset. Use `responseField` in API request to get
1392-
* `customMetadata` in the upload API response. Before setting any custom metadata on an asset,
1393-
* you have to create the field using custom metadata fields API. Send `customMetadata` in
1394-
* `responseFields` in API request to get the value of this field.
1395-
*/
1390+
/** A key-value data associated with the asset. */
13961391
class CustomMetadata
13971392
@JsonCreator
13981393
private constructor(
@@ -1494,8 +1489,7 @@ private constructor(
14941489

14951490
/**
14961491
* Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp
1497-
* data. Send `embeddedMetadata` in `responseFields` in API request to get embeddedMetadata in
1498-
* the upload API response.
1492+
* data.
14991493
*/
15001494
class EmbeddedMetadata
15011495
@JsonCreator

image-kit-java-core/src/main/kotlin/com/imagekit/api/models/webhooks/UploadPreTransformSuccessEvent.kt

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,7 @@ private constructor(
435435
)
436436

437437
/**
438-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be null.
439-
* These tags can be added using the `google-auto-tagging` or `aws-auto-tagging` extensions.
438+
* An array of tags assigned to the uploaded file by auto tagging.
440439
*
441440
* @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if
442441
* the server responded with an unexpected value).
@@ -952,11 +951,7 @@ private constructor(
952951
additionalProperties = data.additionalProperties.toMutableMap()
953952
}
954953

955-
/**
956-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be null.
957-
* These tags can be added using the `google-auto-tagging` or `aws-auto-tagging`
958-
* extensions.
959-
*/
954+
/** An array of tags assigned to the uploaded file by auto tagging. */
960955
fun aiTags(aiTags: List<AiTag>?) = aiTags(JsonField.ofNullable(aiTags))
961956

962957
/** Alias for calling [Builder.aiTags] with `aiTags.orElse(null)`. */
@@ -1505,6 +1500,10 @@ private constructor(
15051500
(if (videoCodec.asKnown().isPresent) 1 else 0) +
15061501
(if (width.asKnown().isPresent) 1 else 0)
15071502

1503+
/**
1504+
* AI-generated tag associated with an image. These tags can be added using the
1505+
* `google-auto-tagging` or `aws-auto-tagging` extensions.
1506+
*/
15081507
class AiTag
15091508
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
15101509
private constructor(
@@ -1732,12 +1731,7 @@ private constructor(
17321731
"AiTag{confidence=$confidence, name=$name, source=$source, additionalProperties=$additionalProperties}"
17331732
}
17341733

1735-
/**
1736-
* A key-value data associated with the asset. Use `responseField` in API request to get
1737-
* `customMetadata` in the upload API response. Before setting any custom metadata on an
1738-
* asset, you have to create the field using custom metadata fields API. Send
1739-
* `customMetadata` in `responseFields` in API request to get the value of this field.
1740-
*/
1734+
/** A key-value data associated with the asset. */
17411735
class CustomMetadata
17421736
@JsonCreator
17431737
private constructor(
@@ -1842,8 +1836,7 @@ private constructor(
18421836

18431837
/**
18441838
* Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp
1845-
* data. Send `embeddedMetadata` in `responseFields` in API request to get embeddedMetadata
1846-
* in the upload API response.
1839+
* data.
18471840
*/
18481841
class EmbeddedMetadata
18491842
@JsonCreator

0 commit comments

Comments
 (0)