Class: Imagekitio::Models::CustomMetadataField::Schema
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Imagekitio::Models::CustomMetadataField::Schema
- Defined in:
- lib/imagekitio/models/custom_metadata_field.rb,
sig/imagekitio/models/custom_metadata_field.rbs
Overview
Defined Under Namespace
Modules: DefaultValue, MaxValue, MinValue, SelectOption, Type
Instance Attribute Summary collapse
-
#default_value ⇒ String, ...
The default value for this custom metadata field.
-
#is_value_required ⇒ Boolean?
Specifies if the this custom metadata field is required or not.
-
#max_length ⇒ Float?
Maximum length of string.
-
#max_value ⇒ String, ...
Maximum value of the field.
-
#min_length ⇒ Float?
Minimum length of string.
-
#min_value ⇒ String, ...
Minimum value of the field.
-
#select_options ⇒ Array<String, Float, Boolean>?
An array of allowed values when field type is
SingleSelectorMultiSelect. -
#type ⇒ Symbol, Imagekitio::Models::CustomMetadataField::Schema::Type
Type of the custom metadata field.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, default_value: nil, is_value_required: nil, max_length: nil, max_value: nil, min_length: nil, min_value: nil, select_options: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Schema for more details.
- #to_hash ⇒ {
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(type:, default_value: nil, is_value_required: nil, max_length: nil, max_value: nil, min_length: nil, min_value: nil, select_options: nil) ⇒ Object
Some parameter documentations has been truncated, see Imagekitio::Models::CustomMetadataField::Schema for more details.
An object that describes the rules for the custom metadata field value.
|
|
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 127
|
Instance Attribute Details
#default_value ⇒ String, ...
The default value for this custom metadata field. Data type of default value depends on the field type.
71 72 73 |
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 71 optional :default_value, union: -> { Imagekitio::CustomMetadataField::Schema::DefaultValue }, api_name: :defaultValue |
#is_value_required ⇒ Boolean?
Specifies if the this custom metadata field is required or not.
79 |
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 79 optional :is_value_required, Imagekitio::Internal::Type::Boolean, api_name: :isValueRequired |
#max_length ⇒ Float?
Maximum length of string. Only set if type is set to Text or Textarea.
85 |
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 85 optional :max_length, Float, api_name: :maxLength |
#max_value ⇒ String, ...
Maximum value of the field. Only set if field type is Date or Number. For
Date type field, the value will be in ISO8601 string format. For Number type
field, it will be a numeric value.
93 94 95 96 97 |
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 93 optional :max_value, union: -> { Imagekitio::CustomMetadataField::Schema::MaxValue }, api_name: :maxValue |
#min_length ⇒ Float?
Minimum length of string. Only set if type is set to Text or Textarea.
103 |
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 103 optional :min_length, Float, api_name: :minLength |
#min_value ⇒ String, ...
Minimum value of the field. Only set if field type is Date or Number. For
Date type field, the value will be in ISO8601 string format. For Number type
field, it will be a numeric value.
111 112 113 114 115 |
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 111 optional :min_value, union: -> { Imagekitio::CustomMetadataField::Schema::MinValue }, api_name: :minValue |
#select_options ⇒ Array<String, Float, Boolean>?
An array of allowed values when field type is SingleSelect or MultiSelect.
121 122 123 124 125 |
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 121 optional :select_options, -> { Imagekitio::Internal::Type::ArrayOf[union: Imagekitio::CustomMetadataField::Schema::SelectOption] }, api_name: :selectOptions |
#type ⇒ Symbol, Imagekitio::Models::CustomMetadataField::Schema::Type
Type of the custom metadata field.
64 |
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 64 required :type, enum: -> { Imagekitio::CustomMetadataField::Schema::Type } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 163
|
.variants ⇒ Array(String, Float)
|
|
# File 'lib/imagekitio/models/custom_metadata_field.rb', line 218
|
Instance Method Details
#to_hash ⇒ {
103 |
# File 'sig/imagekitio/models/custom_metadata_field.rbs', line 103
def to_hash: -> {
|