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