Class CustomMetadataField
-
- All Implemented Interfaces:
public final class CustomMetadataFieldObject containing details of a custom metadata field.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCustomMetadataField.BuilderA builder for CustomMetadataField.
public final classCustomMetadataField.SchemaAn object that describes the rules for the custom metadata field value.
-
Method Summary
Modifier and Type Method Description final Stringid()Unique identifier for the custom metadata field. final Stringlabel()Human readable name of the custom metadata field. final Stringname()API name of the custom metadata field. final CustomMetadataField.Schemaschema()An object that describes the rules for the custom metadata field value. final Optional<String>description()Optional description of the custom metadata field. final Optional<Boolean>reserved()Present and set to truewhen the field is reserved, i.e.final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_label()Returns the raw JSON value of label. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<CustomMetadataField.Schema>_schema()Returns the raw JSON value of schema. final JsonField<String>_description()Returns the raw JSON value of description. final JsonField<Boolean>_reserved()Returns the raw JSON value of reserved. final Map<String, JsonValue>_additionalProperties()final CustomMetadataField.BuildertoBuilder()final CustomMetadataFieldvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static CustomMetadataField.Builderbuilder()Returns a mutable builder for constructing an instance of CustomMetadataField. -
-
Method Detail
-
label
final String label()
Human readable name of the custom metadata field. This name is displayed as form field label to the users while setting field value on the asset in the media library UI.
-
name
final String name()
API name of the custom metadata field. This becomes the key while setting
customMetadata(key-value object) for an asset using upload or update API.
-
schema
final CustomMetadataField.Schema schema()
An object that describes the rules for the custom metadata field value.
-
description
final Optional<String> description()
Optional description of the custom metadata field. Only present when a description has been set. Shown as a hint to the users while setting the field's value on an asset in the media library UI.
-
reserved
final Optional<Boolean> reserved()
Present and set to
truewhen the field is reserved, i.e. created and managed by ImageKit rather than by you. Omitted for regular fields.Currently the only reserved field is
_internal_original_created_datetime(label "Original creation date", typeDate). ImageKit creates it when you enable the original creation date setting under the Custom Metadata tab of the media library settings in the dashboard. Use it to preserve the original creation date of assets migrated from another system: set its value through thecustomMetadataobject in the upload or update file details API, then sort withASC_ORIGINAL_CREATION_DATEorDESC_ORIGINAL_CREATION_DATEin the list and search assets API, or filter with"customMetadata._internal_original_created_datetime"insearchQuery.Reserved fields cannot be deleted, and their name cannot be reused when creating a new field.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_label
final JsonField<String> _label()
Returns the raw JSON value of label.
Unlike label, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_schema
final JsonField<CustomMetadataField.Schema> _schema()
Returns the raw JSON value of schema.
Unlike schema, this method doesn't throw if the JSON field has an unexpected type.
-
_description
final JsonField<String> _description()
Returns the raw JSON value of description.
Unlike description, this method doesn't throw if the JSON field has an unexpected type.
-
_reserved
final JsonField<Boolean> _reserved()
Returns the raw JSON value of reserved.
Unlike reserved, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final CustomMetadataField.Builder toBuilder()
-
validate
final CustomMetadataField validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static CustomMetadataField.Builder builder()
Returns a mutable builder for constructing an instance of CustomMetadataField.
The following fields are required:
.id() .label() .name() .schema()
-
-
-
-