@@ -15,6 +15,7 @@ import io.imagekit.errors.ImageKitInvalidDataException
1515import java.time.OffsetDateTime
1616import java.util.Collections
1717import java.util.Objects
18+ import java.util.Optional
1819import kotlin.jvm.optionals.getOrNull
1920
2021/* *
@@ -288,13 +289,19 @@ private constructor(
288289 @JsonCreator(mode = JsonCreator .Mode .DISABLED )
289290 private constructor (
290291 private val folderId: JsonField <String >,
292+ private val folderPath: JsonField <String >,
291293 private val additionalProperties: MutableMap <String , JsonValue >,
292294 ) {
293295
294296 @JsonCreator
295297 private constructor (
296- @JsonProperty(" folderId" ) @ExcludeMissing folderId: JsonField <String > = JsonMissing .of()
297- ) : this (folderId, mutableMapOf ())
298+ @JsonProperty(" folderId" )
299+ @ExcludeMissing
300+ folderId: JsonField <String > = JsonMissing .of(),
301+ @JsonProperty(" folderPath" )
302+ @ExcludeMissing
303+ folderPath: JsonField <String > = JsonMissing .of(),
304+ ) : this (folderId, folderPath, mutableMapOf ())
298305
299306 /* *
300307 * The unique `folderId` of the deleted folder.
@@ -304,13 +311,30 @@ private constructor(
304311 */
305312 fun folderId (): String = folderId.getRequired(" folderId" )
306313
314+ /* *
315+ * Path of the deleted folder. For a moved folder, this is its path before the move.
316+ *
317+ * @throws ImageKitInvalidDataException if the JSON field has an unexpected type (e.g. if
318+ * the server responded with an unexpected value).
319+ */
320+ fun folderPath (): Optional <String > = folderPath.getOptional(" folderPath" )
321+
307322 /* *
308323 * Returns the raw JSON value of [folderId].
309324 *
310325 * Unlike [folderId], this method doesn't throw if the JSON field has an unexpected type.
311326 */
312327 @JsonProperty(" folderId" ) @ExcludeMissing fun _folderId (): JsonField <String > = folderId
313328
329+ /* *
330+ * Returns the raw JSON value of [folderPath].
331+ *
332+ * Unlike [folderPath], this method doesn't throw if the JSON field has an unexpected type.
333+ */
334+ @JsonProperty(" folderPath" )
335+ @ExcludeMissing
336+ fun _folderPath (): JsonField <String > = folderPath
337+
314338 @JsonAnySetter
315339 private fun putAdditionalProperty (key : String , value : JsonValue ) {
316340 additionalProperties.put(key, value)
@@ -340,11 +364,13 @@ private constructor(
340364 class Builder internal constructor() {
341365
342366 private var folderId: JsonField <String >? = null
367+ private var folderPath: JsonField <String > = JsonMissing .of()
343368 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
344369
345370 @JvmSynthetic
346371 internal fun from (data : Data ) = apply {
347372 folderId = data.folderId
373+ folderPath = data.folderPath
348374 additionalProperties = data.additionalProperties.toMutableMap()
349375 }
350376
@@ -360,6 +386,18 @@ private constructor(
360386 */
361387 fun folderId (folderId : JsonField <String >) = apply { this .folderId = folderId }
362388
389+ /* * Path of the deleted folder. For a moved folder, this is its path before the move. */
390+ fun folderPath (folderPath : String ) = folderPath(JsonField .of(folderPath))
391+
392+ /* *
393+ * Sets [Builder.folderPath] to an arbitrary JSON value.
394+ *
395+ * You should usually call [Builder.folderPath] with a well-typed [String] value
396+ * instead. This method is primarily for setting the field to an undocumented or not yet
397+ * supported value.
398+ */
399+ fun folderPath (folderPath : JsonField <String >) = apply { this .folderPath = folderPath }
400+
363401 fun additionalProperties (additionalProperties : Map <String , JsonValue >) = apply {
364402 this .additionalProperties.clear()
365403 putAllAdditionalProperties(additionalProperties)
@@ -392,7 +430,11 @@ private constructor(
392430 * @throws IllegalStateException if any required field is unset.
393431 */
394432 fun build (): Data =
395- Data (checkRequired(" folderId" , folderId), additionalProperties.toMutableMap())
433+ Data (
434+ checkRequired(" folderId" , folderId),
435+ folderPath,
436+ additionalProperties.toMutableMap(),
437+ )
396438 }
397439
398440 private var validated: Boolean = false
@@ -412,6 +454,7 @@ private constructor(
412454 }
413455
414456 folderId()
457+ folderPath()
415458 validated = true
416459 }
417460
@@ -429,7 +472,10 @@ private constructor(
429472 *
430473 * Used for best match union deserialization.
431474 */
432- @JvmSynthetic internal fun validity (): Int = (if (folderId.asKnown().isPresent) 1 else 0 )
475+ @JvmSynthetic
476+ internal fun validity (): Int =
477+ (if (folderId.asKnown().isPresent) 1 else 0 ) +
478+ (if (folderPath.asKnown().isPresent) 1 else 0 )
433479
434480 override fun equals (other : Any? ): Boolean {
435481 if (this == = other) {
@@ -438,15 +484,18 @@ private constructor(
438484
439485 return other is Data &&
440486 folderId == other.folderId &&
487+ folderPath == other.folderPath &&
441488 additionalProperties == other.additionalProperties
442489 }
443490
444- private val hashCode: Int by lazy { Objects .hash(folderId, additionalProperties) }
491+ private val hashCode: Int by lazy {
492+ Objects .hash(folderId, folderPath, additionalProperties)
493+ }
445494
446495 override fun hashCode (): Int = hashCode
447496
448497 override fun toString () =
449- " Data{folderId=$folderId , additionalProperties=$additionalProperties }"
498+ " Data{folderId=$folderId , folderPath= $folderPath , additionalProperties=$additionalProperties }"
450499 }
451500
452501 override fun equals (other : Any? ): Boolean {
0 commit comments