Class: Imagekitio::Models::FileRenameParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/imagekitio/models/file_rename_params.rb

Overview

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(file_path: , new_file_name: , purge_cache: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Imagekitio::Models::FileRenameParams for more details.

Parameters:

  • file_path (String) (defaults to: )

    The full path of the file you want to rename.

  • new_file_name (String) (defaults to: )

    The new name of the file. A filename can contain:

  • purge_cache (Boolean) (defaults to: nil)

    Option to purge cache for the old file and its versions’ URLs.

  • request_options (Imagekitio::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/imagekitio/models/file_rename_params.rb', line 48

Instance Attribute Details

#file_pathString

The full path of the file you want to rename.

Returns:

  • (String)


14
# File 'lib/imagekitio/models/file_rename_params.rb', line 14

required :file_path, String, api_name: :filePath

#new_file_nameString

The new name of the file. A filename can contain:

Alphanumeric Characters: ‘a-z`, `A-Z`, `0-9` (including Unicode letters, marks, and numerals in other languages). Special Characters: `.`, `_`, and `-`.

Any other character, including space, will be replaced by ‘_`.

Returns:

  • (String)


25
# File 'lib/imagekitio/models/file_rename_params.rb', line 25

required :new_file_name, String, api_name: :newFileName

#purge_cacheBoolean?

Option to purge cache for the old file and its versions’ URLs.

When set to true, it will internally issue a purge cache request on CDN to remove cached content of old file and its versions. This purge request is counted against your monthly purge quota.

Note: If the old file were accessible at ‘`, a purge cache request would be issued against `*` (with a wildcard at the end). It will remove the file and its versions’ URLs and any transformations made using query parameters on this file or its versions. However, the cache for file transformations made using path parameters will persist. You can purge them using the purge API. For more details, refer to the purge API documentation.

Default value - ‘false`

Returns:

  • (Boolean, nil)


46
# File 'lib/imagekitio/models/file_rename_params.rb', line 46

optional :purge_cache, Imagekitio::Internal::Type::Boolean, api_name: :purgeCache