Class: Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema
- Defined in:
- lib/imagekitio/models/custom_metadata_field_update_params.rb
Defined Under Namespace
Modules: DefaultValue, MaxValue, MinValue, SelectOption
Instance Attribute Summary collapse
-
#default_value ⇒ String, ...
The default value for this custom metadata field.
-
#is_value_required ⇒ Boolean?
Sets this custom metadata field as required.
-
#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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(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.
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(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::CustomMetadataFieldUpdateParams::Schema for more details.
An object that describes the rules for the custom metadata key. This parameter is required if ‘label` is not provided. Note: `type` cannot be updated and will be ignored if sent with the `schema`. The schema will be validated as per the existing `type`.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/imagekitio/models/custom_metadata_field_update_params.rb', line 38 class Schema < Imagekitio::Internal::Type::BaseModel # @!attribute default_value # The default value for this custom metadata field. This property is only required # if `isValueRequired` property is set to `true`. The value should match the # `type` of custom metadata field. # # @return [String, Float, Boolean, Array<String, Float, Boolean>, nil] optional :default_value, union: -> { Imagekitio::CustomMetadataFieldUpdateParams::Schema::DefaultValue }, api_name: :defaultValue # @!attribute is_value_required # Sets this custom metadata field as required. Setting custom metadata fields on # an asset will throw error if the value for all required fields are not present # in upload or update asset API request body. # # @return [Boolean, nil] optional :is_value_required, Imagekitio::Internal::Type::Boolean, api_name: :isValueRequired # @!attribute max_length # Maximum length of string. Only set this property if `type` is set to `Text` or # `Textarea`. # # @return [Float, nil] optional :max_length, Float, api_name: :maxLength # @!attribute max_value # Maximum value of the field. Only set this property if field type is `Date` or # `Number`. For `Date` type field, set the minimum date in ISO8601 string format. # For `Number` type field, set the minimum numeric value. # # @return [String, Float, nil] optional :max_value, union: -> { Imagekitio::CustomMetadataFieldUpdateParams::Schema::MaxValue }, api_name: :maxValue # @!attribute min_length # Minimum length of string. Only set this property if `type` is set to `Text` or # `Textarea`. # # @return [Float, nil] optional :min_length, Float, api_name: :minLength # @!attribute min_value # Minimum value of the field. Only set this property if field type is `Date` or # `Number`. For `Date` type field, set the minimum date in ISO8601 string format. # For `Number` type field, set the minimum numeric value. # # @return [String, Float, nil] optional :min_value, union: -> { Imagekitio::CustomMetadataFieldUpdateParams::Schema::MinValue }, api_name: :minValue # @!attribute select_options # An array of allowed values. This property is only required if `type` property is # set to `SingleSelect` or `MultiSelect`. # # @return [Array<String, Float, Boolean>, nil] optional :select_options, -> { Imagekitio::Internal::Type::ArrayOf[union: Imagekitio::CustomMetadataFieldUpdateParams::Schema::SelectOption] }, api_name: :selectOptions # @!method initialize(default_value: nil, is_value_required: nil, max_length: nil, max_value: nil, min_length: nil, min_value: nil, select_options: nil) # Some parameter documentations has been truncated, see # {Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema} for more details. # # An object that describes the rules for the custom metadata key. This parameter # is required if `label` is not provided. Note: `type` cannot be updated and will # be ignored if sent with the `schema`. The schema will be validated as per the # existing `type`. # # @param default_value [String, Float, Boolean, Array<String, Float, Boolean>] The default value for this custom metadata field. This property is only required # # @param is_value_required [Boolean] Sets this custom metadata field as required. Setting custom metadata fields on a # # @param max_length [Float] Maximum length of string. Only set this property if `type` is set to `Text` or ` # # @param max_value [String, Float] Maximum value of the field. Only set this property if field type is `Date` or `N # # @param min_length [Float] Minimum length of string. Only set this property if `type` is set to `Text` or ` # # @param min_value [String, Float] Minimum value of the field. Only set this property if field type is `Date` or `N # # @param select_options [Array<String, Float, Boolean>] An array of allowed values. This property is only required if `type` property is # The default value for this custom metadata field. This property is only required # if `isValueRequired` property is set to `true`. The value should match the # `type` of custom metadata field. # # @see Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema#default_value module DefaultValue extend Imagekitio::Internal::Type::Union variant String variant Float variant Imagekitio::Internal::Type::Boolean # Default value should be of type array when custom metadata field type is set to `MultiSelect`. variant -> { Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema::DefaultValue::MixedArray } module Mixed extend Imagekitio::Internal::Type::Union variant String variant Float variant Imagekitio::Internal::Type::Boolean # @!method self.variants # @return [Array(String, Float, Boolean)] end # @!method self.variants # @return [Array(String, Float, Boolean, Array<String, Float, Boolean>)] # @type [Imagekitio::Internal::Type::Converter] MixedArray = Imagekitio::Internal::Type::ArrayOf[union: -> { Imagekitio::CustomMetadataFieldUpdateParams::Schema::DefaultValue::Mixed }] end # Maximum value of the field. Only set this property if field type is `Date` or # `Number`. For `Date` type field, set the minimum date in ISO8601 string format. # For `Number` type field, set the minimum numeric value. # # @see Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema#max_value module MaxValue extend Imagekitio::Internal::Type::Union variant String variant Float # @!method self.variants # @return [Array(String, Float)] end # Minimum value of the field. Only set this property if field type is `Date` or # `Number`. For `Date` type field, set the minimum date in ISO8601 string format. # For `Number` type field, set the minimum numeric value. # # @see Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema#min_value module MinValue extend Imagekitio::Internal::Type::Union variant String variant Float # @!method self.variants # @return [Array(String, Float)] end module SelectOption extend Imagekitio::Internal::Type::Union variant String variant Float variant Imagekitio::Internal::Type::Boolean # @!method self.variants # @return [Array(String, Float, Boolean)] end end |
Instance Attribute Details
#default_value ⇒ String, ...
The default value for this custom metadata field. This property is only required if ‘isValueRequired` property is set to `true`. The value should match the `type` of custom metadata field.
45 46 47 |
# File 'lib/imagekitio/models/custom_metadata_field_update_params.rb', line 45 optional :default_value, union: -> { Imagekitio::CustomMetadataFieldUpdateParams::Schema::DefaultValue }, api_name: :defaultValue |
#is_value_required ⇒ Boolean?
Sets this custom metadata field as required. Setting custom metadata fields on an asset will throw error if the value for all required fields are not present in upload or update asset API request body.
55 |
# File 'lib/imagekitio/models/custom_metadata_field_update_params.rb', line 55 optional :is_value_required, Imagekitio::Internal::Type::Boolean, api_name: :isValueRequired |
#max_length ⇒ Float?
Maximum length of string. Only set this property if ‘type` is set to `Text` or `Textarea`.
62 |
# File 'lib/imagekitio/models/custom_metadata_field_update_params.rb', line 62 optional :max_length, Float, api_name: :maxLength |
#max_value ⇒ String, ...
Maximum value of the field. Only set this property if field type is ‘Date` or `Number`. For `Date` type field, set the minimum date in ISO8601 string format. For `Number` type field, set the minimum numeric value.
70 71 72 |
# File 'lib/imagekitio/models/custom_metadata_field_update_params.rb', line 70 optional :max_value, union: -> { Imagekitio::CustomMetadataFieldUpdateParams::Schema::MaxValue }, api_name: :maxValue |
#min_length ⇒ Float?
Minimum length of string. Only set this property if ‘type` is set to `Text` or `Textarea`.
79 |
# File 'lib/imagekitio/models/custom_metadata_field_update_params.rb', line 79 optional :min_length, Float, api_name: :minLength |
#min_value ⇒ String, ...
Minimum value of the field. Only set this property if field type is ‘Date` or `Number`. For `Date` type field, set the minimum date in ISO8601 string format. For `Number` type field, set the minimum numeric value.
87 88 89 |
# File 'lib/imagekitio/models/custom_metadata_field_update_params.rb', line 87 optional :min_value, union: -> { Imagekitio::CustomMetadataFieldUpdateParams::Schema::MinValue }, api_name: :minValue |
#select_options ⇒ Array<String, Float, Boolean>?
An array of allowed values. This property is only required if ‘type` property is set to `SingleSelect` or `MultiSelect`.
96 97 98 99 100 |
# File 'lib/imagekitio/models/custom_metadata_field_update_params.rb', line 96 optional :select_options, -> { Imagekitio::Internal::Type::ArrayOf[union: Imagekitio::CustomMetadataFieldUpdateParams::Schema::SelectOption] }, api_name: :selectOptions |
Class Method Details
.variants ⇒ Array(String, Float)
|
|
# File 'lib/imagekitio/models/custom_metadata_field_update_params.rb', line 177
|