@@ -87,9 +87,8 @@ class FileUploadParams < Imagekit::Internal::Type::BaseModel
8787 # Array of extensions to be applied to the asset. Each extension can be configured
8888 # with specific parameters based on the extension type.
8989 #
90- # @return [Array<Imagekit::Models::Beta::V2::FileUploadParams::Extension::RemoveBg, Imagekit::Models::Beta::V2::FileUploadParams::Extension::AIAutoDescription, Imagekit::Models::Beta::V2::FileUploadParams::Extension::AutoTaggingExtension>, nil]
91- optional :extensions ,
92- -> { Imagekit ::Internal ::Type ::ArrayOf [ union : Imagekit ::Beta ::V2 ::FileUploadParams ::Extension ] }
90+ # @return [Array<Imagekit::Models::ExtensionItem::RemoveBg, Imagekit::Models::ExtensionItem::AIAutoDescription, Imagekit::Models::ExtensionItem::AutoTaggingExtension>, nil]
91+ optional :extensions , -> { Imagekit ::Internal ::Type ::ArrayOf [ union : Imagekit ::ExtensionItem ] }
9392
9493 # @!attribute folder
9594 # The folder path in which the image has to be uploaded. If the folder(s) didn't
@@ -225,7 +224,7 @@ class FileUploadParams < Imagekit::Internal::Type::BaseModel
225224 #
226225 # @param description [String] Optional text to describe the contents of the file.
227226 #
228- # @param extensions [Array<Imagekit::Models::Beta::V2::FileUploadParams::Extension:: RemoveBg, Imagekit::Models::Beta::V2::FileUploadParams::Extension:: AIAutoDescription, Imagekit::Models::Beta::V2::FileUploadParams::Extension ::AutoTaggingExtension>] Array of extensions to be applied to the asset. Each extension can be configured
227+ # @param extensions [Array<Imagekit::Models::ExtensionItem:: RemoveBg, Imagekit::Models::ExtensionItem:: AIAutoDescription, Imagekit::Models::ExtensionItem ::AutoTaggingExtension>] Array of extensions to be applied to the asset. Each extension can be configured
229228 #
230229 # @param folder [String] The folder path in which the image has to be uploaded. If the folder(s) didn't e
231230 #
@@ -253,135 +252,6 @@ class FileUploadParams < Imagekit::Internal::Type::BaseModel
253252 #
254253 # @param request_options [Imagekit::RequestOptions, Hash{Symbol=>Object}]
255254
256- module Extension
257- extend Imagekit ::Internal ::Type ::Union
258-
259- discriminator :name
260-
261- variant :"remove-bg" , -> { Imagekit ::Beta ::V2 ::FileUploadParams ::Extension ::RemoveBg }
262-
263- variant :"ai-auto-description" , -> { Imagekit ::Beta ::V2 ::FileUploadParams ::Extension ::AIAutoDescription }
264-
265- variant -> { Imagekit ::Beta ::V2 ::FileUploadParams ::Extension ::AutoTaggingExtension }
266-
267- class RemoveBg < Imagekit ::Internal ::Type ::BaseModel
268- # @!attribute name
269- # Specifies the background removal extension.
270- #
271- # @return [Symbol, :"remove-bg"]
272- required :name , const : :"remove-bg"
273-
274- # @!attribute options
275- #
276- # @return [Imagekit::Models::Beta::V2::FileUploadParams::Extension::RemoveBg::Options, nil]
277- optional :options , -> { Imagekit ::Beta ::V2 ::FileUploadParams ::Extension ::RemoveBg ::Options }
278-
279- # @!method initialize(options: nil, name: :"remove-bg")
280- # @param options [Imagekit::Models::Beta::V2::FileUploadParams::Extension::RemoveBg::Options]
281- #
282- # @param name [Symbol, :"remove-bg"] Specifies the background removal extension.
283-
284- # @see Imagekit::Models::Beta::V2::FileUploadParams::Extension::RemoveBg#options
285- class Options < Imagekit ::Internal ::Type ::BaseModel
286- # @!attribute add_shadow
287- # Whether to add an artificial shadow to the result. Default is false. Note:
288- # Adding shadows is currently only supported for car photos.
289- #
290- # @return [Boolean, nil]
291- optional :add_shadow , Imagekit ::Internal ::Type ::Boolean
292-
293- # @!attribute bg_color
294- # Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or
295- # color name (e.g., "green"). If this parameter is set, `bg_image_url` must be
296- # empty.
297- #
298- # @return [String, nil]
299- optional :bg_color , String
300-
301- # @!attribute bg_image_url
302- # Sets a background image from a URL. If this parameter is set, `bg_color` must be
303- # empty.
304- #
305- # @return [String, nil]
306- optional :bg_image_url , String
307-
308- # @!attribute semitransparency
309- # Allows semi-transparent regions in the result. Default is true. Note:
310- # Semitransparency is currently only supported for car windows.
311- #
312- # @return [Boolean, nil]
313- optional :semitransparency , Imagekit ::Internal ::Type ::Boolean
314-
315- # @!method initialize(add_shadow: nil, bg_color: nil, bg_image_url: nil, semitransparency: nil)
316- # Some parameter documentations has been truncated, see
317- # {Imagekit::Models::Beta::V2::FileUploadParams::Extension::RemoveBg::Options} for
318- # more details.
319- #
320- # @param add_shadow [Boolean] Whether to add an artificial shadow to the result. Default is false. Note: Addin
321- #
322- # @param bg_color [String] Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or col
323- #
324- # @param bg_image_url [String] Sets a background image from a URL. If this parameter is set, `bg_color` must be
325- #
326- # @param semitransparency [Boolean] Allows semi-transparent regions in the result. Default is true. Note: Semitransp
327- end
328- end
329-
330- class AutoTaggingExtension < Imagekit ::Internal ::Type ::BaseModel
331- # @!attribute max_tags
332- # Maximum number of tags to attach to the asset.
333- #
334- # @return [Integer]
335- required :max_tags , Integer , api_name : :maxTags
336-
337- # @!attribute min_confidence
338- # Minimum confidence level for tags to be considered valid.
339- #
340- # @return [Integer]
341- required :min_confidence , Integer , api_name : :minConfidence
342-
343- # @!attribute name
344- # Specifies the auto-tagging extension used.
345- #
346- # @return [Symbol, Imagekit::Models::Beta::V2::FileUploadParams::Extension::AutoTaggingExtension::Name]
347- required :name , enum : -> { Imagekit ::Beta ::V2 ::FileUploadParams ::Extension ::AutoTaggingExtension ::Name }
348-
349- # @!method initialize(max_tags:, min_confidence:, name:)
350- # @param max_tags [Integer] Maximum number of tags to attach to the asset.
351- #
352- # @param min_confidence [Integer] Minimum confidence level for tags to be considered valid.
353- #
354- # @param name [Symbol, Imagekit::Models::Beta::V2::FileUploadParams::Extension::AutoTaggingExtension::Name] Specifies the auto-tagging extension used.
355-
356- # Specifies the auto-tagging extension used.
357- #
358- # @see Imagekit::Models::Beta::V2::FileUploadParams::Extension::AutoTaggingExtension#name
359- module Name
360- extend Imagekit ::Internal ::Type ::Enum
361-
362- GOOGLE_AUTO_TAGGING = :"google-auto-tagging"
363- AWS_AUTO_TAGGING = :"aws-auto-tagging"
364-
365- # @!method self.values
366- # @return [Array<Symbol>]
367- end
368- end
369-
370- class AIAutoDescription < Imagekit ::Internal ::Type ::BaseModel
371- # @!attribute name
372- # Specifies the auto description extension.
373- #
374- # @return [Symbol, :"ai-auto-description"]
375- required :name , const : :"ai-auto-description"
376-
377- # @!method initialize(name: :"ai-auto-description")
378- # @param name [Symbol, :"ai-auto-description"] Specifies the auto description extension.
379- end
380-
381- # @!method self.variants
382- # @return [Array(Imagekit::Models::Beta::V2::FileUploadParams::Extension::RemoveBg, Imagekit::Models::Beta::V2::FileUploadParams::Extension::AIAutoDescription, Imagekit::Models::Beta::V2::FileUploadParams::Extension::AutoTaggingExtension)]
383- end
384-
385255 module ResponseField
386256 extend Imagekit ::Internal ::Type ::Enum
387257
0 commit comments