@@ -7,172 +7,142 @@ class FileUpdateParams < Imagekit::Internal::Type::BaseModel
77 extend Imagekit ::Internal ::Type ::RequestParameters ::Converter
88 include Imagekit ::Internal ::Type ::RequestParameters
99
10- # @!attribute update
10+ # @!attribute custom_coordinates
11+ # Define an important area in the image in the format `x,y,width,height` e.g.
12+ # `10,10,100,100`. Send `null` to unset this value.
1113 #
12- # @return [Imagekit::Models::FileUpdateParams::Update::UpdateFileDetails, Imagekit::Models::FileUpdateParams::Update::ChangePublicationStatus , nil]
13- optional :update , union : -> { Imagekit :: FileUpdateParams :: Update }
14+ # @return [String , nil]
15+ optional :custom_coordinates , String , api_name : :customCoordinates , nil? : true
1416
15- # @!method initialize(update: nil, request_options: {})
16- # @param update [Imagekit::Models::FileUpdateParams::Update::UpdateFileDetails, Imagekit::Models::FileUpdateParams::Update::ChangePublicationStatus]
17+ # @!attribute custom_metadata
18+ # A key-value data to be associated with the asset. To unset a key, send `null`
19+ # value for that key. Before setting any custom metadata on an asset you have to
20+ # create the field using custom metadata fields API.
21+ #
22+ # @return [Hash{Symbol=>Object}, nil]
23+ optional :custom_metadata ,
24+ Imagekit ::Internal ::Type ::HashOf [ Imagekit ::Internal ::Type ::Unknown ] ,
25+ api_name : :customMetadata
26+
27+ # @!attribute description
28+ # Optional text to describe the contents of the file.
29+ #
30+ # @return [String, nil]
31+ optional :description , String
32+
33+ # @!attribute extensions
34+ # Array of extensions to be applied to the asset. Each extension can be configured
35+ # with specific parameters based on the extension type.
36+ #
37+ # @return [Array<Imagekit::Models::ExtensionItem::RemoveBg, Imagekit::Models::ExtensionItem::AIAutoDescription, Imagekit::Models::ExtensionItem::AutoTaggingExtension>, nil]
38+ optional :extensions , -> { Imagekit ::Internal ::Type ::ArrayOf [ union : Imagekit ::ExtensionItem ] }
39+
40+ # @!attribute remove_ai_tags
41+ # An array of AITags associated with the file that you want to remove, e.g.
42+ # `["car", "vehicle", "motorsports"]`.
43+ #
44+ # If you want to remove all AITags associated with the file, send a string -
45+ # "all".
46+ #
47+ # Note: The remove operation for `AITags` executes before any of the `extensions`
48+ # are processed.
49+ #
50+ # @return [Array<String>, Symbol, :all, nil]
51+ optional :remove_ai_tags ,
52+ union : -> {
53+ Imagekit ::FileUpdateParams ::RemoveAITags
54+ } ,
55+ api_name : :removeAITags
56+
57+ # @!attribute tags
58+ # An array of tags associated with the file, such as `["tag1", "tag2"]`. Send
59+ # `null` to unset all tags associated with the file.
60+ #
61+ # @return [Array<String>, nil]
62+ optional :tags , Imagekit ::Internal ::Type ::ArrayOf [ String ] , nil? : true
63+
64+ # @!attribute webhook_url
65+ # The final status of extensions after they have completed execution will be
66+ # delivered to this endpoint as a POST request.
67+ # [Learn more](/docs/api-reference/digital-asset-management-dam/managing-assets/update-file-details#webhook-payload-structure)
68+ # about the webhook payload structure.
69+ #
70+ # @return [String, nil]
71+ optional :webhook_url , String , api_name : :webhookUrl
72+
73+ # @!attribute publish
74+ # Configure the publication status of a file and its versions.
75+ #
76+ # @return [Imagekit::Models::FileUpdateParams::Publish, nil]
77+ optional :publish , -> { Imagekit ::FileUpdateParams ::Publish }
78+
79+ # @!method initialize(custom_coordinates: nil, custom_metadata: nil, description: nil, extensions: nil, remove_ai_tags: nil, tags: nil, webhook_url: nil, publish: nil, request_options: {})
80+ # Some parameter documentations has been truncated, see
81+ # {Imagekit::Models::FileUpdateParams} for more details.
82+ #
83+ # @param custom_coordinates [String, nil] Define an important area in the image in the format `x,y,width,height` e.g. `10,
84+ #
85+ # @param custom_metadata [Hash{Symbol=>Object}] A key-value data to be associated with the asset. To unset a key, send `null` va
86+ #
87+ # @param description [String] Optional text to describe the contents of the file.
88+ #
89+ # @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
90+ #
91+ # @param remove_ai_tags [Array<String>, Symbol, :all] An array of AITags associated with the file that you want to remove, e.g. `["car
92+ #
93+ # @param tags [Array<String>, nil] An array of tags associated with the file, such as `["tag1", "tag2"]`. Send `nul
94+ #
95+ # @param webhook_url [String] The final status of extensions after they have completed execution will be deliv
96+ #
97+ # @param publish [Imagekit::Models::FileUpdateParams::Publish] Configure the publication status of a file and its versions.
98+ #
1799 # @param request_options [Imagekit::RequestOptions, Hash{Symbol=>Object}]
18100
19- module Update
101+ # An array of AITags associated with the file that you want to remove, e.g.
102+ # `["car", "vehicle", "motorsports"]`.
103+ #
104+ # If you want to remove all AITags associated with the file, send a string -
105+ # "all".
106+ #
107+ # Note: The remove operation for `AITags` executes before any of the `extensions`
108+ # are processed.
109+ module RemoveAITags
20110 extend Imagekit ::Internal ::Type ::Union
21111
22- variant -> { Imagekit ::FileUpdateParams ::Update ::UpdateFileDetails }
23-
24- variant -> { Imagekit ::FileUpdateParams ::Update ::ChangePublicationStatus }
25-
26- class UpdateFileDetails < Imagekit ::Internal ::Type ::BaseModel
27- # @!attribute custom_coordinates
28- # Define an important area in the image in the format `x,y,width,height` e.g.
29- # `10,10,100,100`. Send `null` to unset this value.
30- #
31- # @return [String, nil]
32- optional :custom_coordinates , String , api_name : :customCoordinates , nil? : true
33-
34- # @!attribute custom_metadata
35- # A key-value data to be associated with the asset. To unset a key, send `null`
36- # value for that key. Before setting any custom metadata on an asset you have to
37- # create the field using custom metadata fields API.
38- #
39- # @return [Hash{Symbol=>Object}, nil]
40- optional :custom_metadata ,
41- Imagekit ::Internal ::Type ::HashOf [ Imagekit ::Internal ::Type ::Unknown ] ,
42- api_name : :customMetadata
43-
44- # @!attribute description
45- # Optional text to describe the contents of the file.
46- #
47- # @return [String, nil]
48- optional :description , String
49-
50- # @!attribute extensions
51- # Array of extensions to be applied to the asset. Each extension can be configured
52- # with specific parameters based on the extension type.
53- #
54- # @return [Array<Imagekit::Models::ExtensionItem::RemoveBg, Imagekit::Models::ExtensionItem::AIAutoDescription, Imagekit::Models::ExtensionItem::AutoTaggingExtension>, nil]
55- optional :extensions , -> { Imagekit ::Internal ::Type ::ArrayOf [ union : Imagekit ::ExtensionItem ] }
56-
57- # @!attribute remove_ai_tags
58- # An array of AITags associated with the file that you want to remove, e.g.
59- # `["car", "vehicle", "motorsports"]`.
60- #
61- # If you want to remove all AITags associated with the file, send a string -
62- # "all".
63- #
64- # Note: The remove operation for `AITags` executes before any of the `extensions`
65- # are processed.
66- #
67- # @return [Array<String>, Symbol, :all, nil]
68- optional :remove_ai_tags ,
69- union : -> { Imagekit ::FileUpdateParams ::Update ::UpdateFileDetails ::RemoveAITags } ,
70- api_name : :removeAITags
71-
72- # @!attribute tags
73- # An array of tags associated with the file, such as `["tag1", "tag2"]`. Send
74- # `null` to unset all tags associated with the file.
75- #
76- # @return [Array<String>, nil]
77- optional :tags , Imagekit ::Internal ::Type ::ArrayOf [ String ] , nil? : true
78-
79- # @!attribute webhook_url
80- # The final status of extensions after they have completed execution will be
81- # delivered to this endpoint as a POST request.
82- # [Learn more](/docs/api-reference/digital-asset-management-dam/managing-assets/update-file-details#webhook-payload-structure)
83- # about the webhook payload structure.
84- #
85- # @return [String, nil]
86- optional :webhook_url , String , api_name : :webhookUrl
87-
88- # @!method initialize(custom_coordinates: nil, custom_metadata: nil, description: nil, extensions: nil, remove_ai_tags: nil, tags: nil, webhook_url: nil)
89- # Some parameter documentations has been truncated, see
90- # {Imagekit::Models::FileUpdateParams::Update::UpdateFileDetails} for more
91- # details.
92- #
93- # @param custom_coordinates [String, nil] Define an important area in the image in the format `x,y,width,height` e.g. `10,
94- #
95- # @param custom_metadata [Hash{Symbol=>Object}] A key-value data to be associated with the asset. To unset a key, send `null` va
96- #
97- # @param description [String] Optional text to describe the contents of the file.
98- #
99- # @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
100- #
101- # @param remove_ai_tags [Array<String>, Symbol, :all] An array of AITags associated with the file that you want to remove, e.g. `["car
102- #
103- # @param tags [Array<String>, nil] An array of tags associated with the file, such as `["tag1", "tag2"]`. Send `nul
104- #
105- # @param webhook_url [String] The final status of extensions after they have completed execution will be deliv
106-
107- # An array of AITags associated with the file that you want to remove, e.g.
108- # `["car", "vehicle", "motorsports"]`.
109- #
110- # If you want to remove all AITags associated with the file, send a string -
111- # "all".
112- #
113- # Note: The remove operation for `AITags` executes before any of the `extensions`
114- # are processed.
115- #
116- # @see Imagekit::Models::FileUpdateParams::Update::UpdateFileDetails#remove_ai_tags
117- module RemoveAITags
118- extend Imagekit ::Internal ::Type ::Union
119-
120- variant -> { Imagekit ::Models ::FileUpdateParams ::Update ::UpdateFileDetails ::RemoveAITags ::StringArray }
121-
122- variant const : :all
123-
124- # @!method self.variants
125- # @return [Array(Array<String>, Symbol, :all)]
126-
127- # @type [Imagekit::Internal::Type::Converter]
128- StringArray = Imagekit ::Internal ::Type ::ArrayOf [ String ]
129- end
130- end
131-
132- class ChangePublicationStatus < Imagekit ::Internal ::Type ::BaseModel
133- # @!attribute publish
134- # Configure the publication status of a file and its versions.
135- #
136- # @return [Imagekit::Models::FileUpdateParams::Update::ChangePublicationStatus::Publish, nil]
137- optional :publish , -> { Imagekit ::FileUpdateParams ::Update ::ChangePublicationStatus ::Publish }
138-
139- # @!method initialize(publish: nil)
140- # Some parameter documentations has been truncated, see
141- # {Imagekit::Models::FileUpdateParams::Update::ChangePublicationStatus} for more
142- # details.
143- #
144- # @param publish [Imagekit::Models::FileUpdateParams::Update::ChangePublicationStatus::Publish] Configure the publication status of a file and its versions.
145-
146- # @see Imagekit::Models::FileUpdateParams::Update::ChangePublicationStatus#publish
147- class Publish < Imagekit ::Internal ::Type ::BaseModel
148- # @!attribute is_published
149- # Set to `true` to publish the file. Set to `false` to unpublish the file.
150- #
151- # @return [Boolean]
152- required :is_published , Imagekit ::Internal ::Type ::Boolean , api_name : :isPublished
153-
154- # @!attribute include_file_versions
155- # Set to `true` to publish/unpublish all versions of the file. Set to `false` to
156- # publish/unpublish only the current version of the file.
157- #
158- # @return [Boolean, nil]
159- optional :include_file_versions , Imagekit ::Internal ::Type ::Boolean , api_name : :includeFileVersions
160-
161- # @!method initialize(is_published:, include_file_versions: nil)
162- # Some parameter documentations has been truncated, see
163- # {Imagekit::Models::FileUpdateParams::Update::ChangePublicationStatus::Publish}
164- # for more details.
165- #
166- # Configure the publication status of a file and its versions.
167- #
168- # @param is_published [Boolean] Set to `true` to publish the file. Set to `false` to unpublish the file.
169- #
170- # @param include_file_versions [Boolean] Set to `true` to publish/unpublish all versions of the file. Set to `false` to p
171- end
172- end
112+ variant -> { Imagekit ::Models ::FileUpdateParams ::RemoveAITags ::StringArray }
113+
114+ variant const : :all
173115
174116 # @!method self.variants
175- # @return [Array(Imagekit::Models::FileUpdateParams::Update::UpdateFileDetails, Imagekit::Models::FileUpdateParams::Update::ChangePublicationStatus)]
117+ # @return [Array(Array<String>, Symbol, :all)]
118+
119+ # @type [Imagekit::Internal::Type::Converter]
120+ StringArray = Imagekit ::Internal ::Type ::ArrayOf [ String ]
121+ end
122+
123+ class Publish < Imagekit ::Internal ::Type ::BaseModel
124+ # @!attribute is_published
125+ # Set to `true` to publish the file. Set to `false` to unpublish the file.
126+ #
127+ # @return [Boolean]
128+ required :is_published , Imagekit ::Internal ::Type ::Boolean , api_name : :isPublished
129+
130+ # @!attribute include_file_versions
131+ # Set to `true` to publish/unpublish all versions of the file. Set to `false` to
132+ # publish/unpublish only the current version of the file.
133+ #
134+ # @return [Boolean, nil]
135+ optional :include_file_versions , Imagekit ::Internal ::Type ::Boolean , api_name : :includeFileVersions
136+
137+ # @!method initialize(is_published:, include_file_versions: nil)
138+ # Some parameter documentations has been truncated, see
139+ # {Imagekit::Models::FileUpdateParams::Publish} for more details.
140+ #
141+ # Configure the publication status of a file and its versions.
142+ #
143+ # @param is_published [Boolean] Set to `true` to publish the file. Set to `false` to unpublish the file.
144+ #
145+ # @param include_file_versions [Boolean] Set to `true` to publish/unpublish all versions of the file. Set to `false` to p
176146 end
177147 end
178148 end
0 commit comments