Class: Zilla::IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps
- Inherits:
-
Object
- Object
- Zilla::IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps
- Defined in:
- lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb
Overview
JSONSchemaProps is a JSON-Schema following Specification Draft 4 (json-schema.org/).
Instance Attribute Summary collapse
-
#_not ⇒ Object
Returns the value of attribute _not.
-
#additional_items ⇒ Object
JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value.
-
#additional_properties ⇒ Object
JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value.
-
#all_of ⇒ Object
Returns the value of attribute all_of.
-
#any_of ⇒ Object
Returns the value of attribute any_of.
-
#default ⇒ Object
JSON represents any valid JSON value.
-
#definitions ⇒ Object
Returns the value of attribute definitions.
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#description ⇒ Object
Returns the value of attribute description.
-
#enum ⇒ Object
Returns the value of attribute enum.
-
#example ⇒ Object
JSON represents any valid JSON value.
-
#exclusive_maximum ⇒ Object
Returns the value of attribute exclusive_maximum.
-
#exclusive_minimum ⇒ Object
Returns the value of attribute exclusive_minimum.
-
#external_docs ⇒ Object
Returns the value of attribute external_docs.
-
#format ⇒ Object
format is an OpenAPI v3 format string.
-
#id ⇒ Object
Returns the value of attribute id.
-
#items ⇒ Object
JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps.
-
#max_items ⇒ Object
Returns the value of attribute max_items.
-
#max_length ⇒ Object
Returns the value of attribute max_length.
-
#max_properties ⇒ Object
Returns the value of attribute max_properties.
-
#maximum ⇒ Object
Returns the value of attribute maximum.
-
#min_items ⇒ Object
Returns the value of attribute min_items.
-
#min_length ⇒ Object
Returns the value of attribute min_length.
-
#min_properties ⇒ Object
Returns the value of attribute min_properties.
-
#minimum ⇒ Object
Returns the value of attribute minimum.
-
#multiple_of ⇒ Object
Returns the value of attribute multiple_of.
-
#nullable ⇒ Object
Returns the value of attribute nullable.
-
#one_of ⇒ Object
Returns the value of attribute one_of.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#pattern_properties ⇒ Object
Returns the value of attribute pattern_properties.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#required ⇒ Object
Returns the value of attribute required.
-
#schema ⇒ Object
Returns the value of attribute schema.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unique_items ⇒ Object
Returns the value of attribute unique_items.
-
#x_kubernetes_embedded_resource ⇒ Object
x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta.
-
#x_kubernetes_int_or_string ⇒ Object
x-kubernetes-int-or-string specifies that this value is either an integer or a string.
-
#x_kubernetes_list_map_keys ⇒ Object
x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type ‘map` by specifying the keys used as the index of the map.
-
#x_kubernetes_list_type ⇒ Object
x-kubernetes-list-type annotates an array to further describe its topology.
-
#x_kubernetes_map_type ⇒ Object
x-kubernetes-map-type annotates an object to further describe its topology.
-
#x_kubernetes_preserve_unknown_fields ⇒ Object
x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema.
-
#x_kubernetes_validations ⇒ Object
x-kubernetes-validations describes a list of validation rules written in the CEL expression language.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps
Initializes the object
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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 173 def initialize(attributes = {}) unless attributes.is_a?(Hash) raise ArgumentError, 'The input argument (attributes) must be a hash in `Zilla::IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps` initialize method' end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) do |(k, v), h| unless self.class.attribute_map.key?(k.to_sym) raise ArgumentError, "`#{k}` is not a valid attribute in `Zilla::IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v end self.ref = attributes[:ref] if attributes.key?(:ref) self.schema = attributes[:schema] if attributes.key?(:schema) self.additional_items = attributes[:additional_items] if attributes.key?(:additional_items) self.additional_properties = attributes[:additional_properties] if attributes.key?(:additional_properties) if attributes.key?(:all_of) && (value = attributes[:all_of]).is_a?(Array) self.all_of = value end if attributes.key?(:any_of) && (value = attributes[:any_of]).is_a?(Array) self.any_of = value end self.default = attributes[:default] if attributes.key?(:default) if attributes.key?(:definitions) && (value = attributes[:definitions]).is_a?(Hash) self.definitions = value end if attributes.key?(:dependencies) && (value = attributes[:dependencies]).is_a?(Hash) self.dependencies = value end self.description = attributes[:description] if attributes.key?(:description) if attributes.key?(:enum) && (value = attributes[:enum]).is_a?(Array) self.enum = value end self.example = attributes[:example] if attributes.key?(:example) self.exclusive_maximum = attributes[:exclusive_maximum] if attributes.key?(:exclusive_maximum) self.exclusive_minimum = attributes[:exclusive_minimum] if attributes.key?(:exclusive_minimum) self.external_docs = attributes[:external_docs] if attributes.key?(:external_docs) self.format = attributes[:format] if attributes.key?(:format) self.id = attributes[:id] if attributes.key?(:id) self.items = attributes[:items] if attributes.key?(:items) self.max_items = attributes[:max_items] if attributes.key?(:max_items) self.max_length = attributes[:max_length] if attributes.key?(:max_length) self.max_properties = attributes[:max_properties] if attributes.key?(:max_properties) self.maximum = attributes[:maximum] if attributes.key?(:maximum) self.min_items = attributes[:min_items] if attributes.key?(:min_items) self.min_length = attributes[:min_length] if attributes.key?(:min_length) self.min_properties = attributes[:min_properties] if attributes.key?(:min_properties) self.minimum = attributes[:minimum] if attributes.key?(:minimum) self.multiple_of = attributes[:multiple_of] if attributes.key?(:multiple_of) self._not = attributes[:_not] if attributes.key?(:_not) self.nullable = attributes[:nullable] if attributes.key?(:nullable) if attributes.key?(:one_of) && (value = attributes[:one_of]).is_a?(Array) self.one_of = value end self.pattern = attributes[:pattern] if attributes.key?(:pattern) if attributes.key?(:pattern_properties) && (value = attributes[:pattern_properties]).is_a?(Hash) self.pattern_properties = value end if attributes.key?(:properties) && (value = attributes[:properties]).is_a?(Hash) self.properties = value end if attributes.key?(:required) && (value = attributes[:required]).is_a?(Array) self.required = value end self.title = attributes[:title] if attributes.key?(:title) self.type = attributes[:type] if attributes.key?(:type) self.unique_items = attributes[:unique_items] if attributes.key?(:unique_items) if attributes.key?(:x_kubernetes_embedded_resource) self. = attributes[:x_kubernetes_embedded_resource] end if attributes.key?(:x_kubernetes_int_or_string) self.x_kubernetes_int_or_string = attributes[:x_kubernetes_int_or_string] end if attributes.key?(:x_kubernetes_list_map_keys) && (value = attributes[:x_kubernetes_list_map_keys]).is_a?(Array) self.x_kubernetes_list_map_keys = value end self.x_kubernetes_list_type = attributes[:x_kubernetes_list_type] if attributes.key?(:x_kubernetes_list_type) self.x_kubernetes_map_type = attributes[:x_kubernetes_map_type] if attributes.key?(:x_kubernetes_map_type) if attributes.key?(:x_kubernetes_preserve_unknown_fields) self.x_kubernetes_preserve_unknown_fields = attributes[:x_kubernetes_preserve_unknown_fields] end return unless attributes.key?(:x_kubernetes_validations) return unless (value = attributes[:x_kubernetes_validations]).is_a?(Array) self.x_kubernetes_validations = value end |
Instance Attribute Details
#_not ⇒ Object
Returns the value of attribute _not.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def _not @_not end |
#additional_items ⇒ Object
JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.
23 24 25 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 23 def additional_items @additional_items end |
#additional_properties ⇒ Object
JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.
26 27 28 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 26 def additional_properties @additional_properties end |
#all_of ⇒ Object
Returns the value of attribute all_of.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def all_of @all_of end |
#any_of ⇒ Object
Returns the value of attribute any_of.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def any_of @any_of end |
#default ⇒ Object
JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, mapinterface{} and nil.
29 30 31 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 29 def default @default end |
#definitions ⇒ Object
Returns the value of attribute definitions.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def definitions @definitions end |
#dependencies ⇒ Object
Returns the value of attribute dependencies.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def dependencies @dependencies end |
#description ⇒ Object
Returns the value of attribute description.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def description @description end |
#enum ⇒ Object
Returns the value of attribute enum.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def enum @enum end |
#example ⇒ Object
JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, mapinterface{} and nil.
32 33 34 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 32 def example @example end |
#exclusive_maximum ⇒ Object
Returns the value of attribute exclusive_maximum.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def exclusive_maximum @exclusive_maximum end |
#exclusive_minimum ⇒ Object
Returns the value of attribute exclusive_minimum.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def exclusive_minimum @exclusive_minimum end |
#external_docs ⇒ Object
Returns the value of attribute external_docs.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def external_docs @external_docs end |
#format ⇒ Object
format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^8-?[0-9a-f]4-?[0-9a-f]4-?[0-9a-f]4-?[0-9a-f]12$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^8-?[0-9a-f]4-?33-?[0-9a-f]4-?[0-9a-f]12$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^8-?[0-9a-f]4-?43-?[89ab]3-?[0-9a-f]12$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^8-?[0-9a-f]4-?53-?[89ab]3-?[0-9a-f]12$ - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" - isbn10: an ISBN10 number string like "0321751043" - isbn13: an ISBN13 number string like "978-0321751041" - creditcard: a credit card number defined by the regex ^(?:412(?:[0-9]3)?|5[0-9]14|6(?:011|5[0-9])12|3[0-9]13|3(?:0|[68])[0-9]11|(?:2131|1800|35\d3)\d11)$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\d3[- ]?\d2[- ]?\d4$ - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]3|[0-9a-fA-F]6)$ - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" - byte: base64 encoded binary data - password: any kind of string - date: a date string like "2006-01-02" as defined by full-date in RFC3339 - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339.
35 36 37 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 35 def format @format end |
#id ⇒ Object
Returns the value of attribute id.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def id @id end |
#items ⇒ Object
JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.
38 39 40 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 38 def items @items end |
#max_items ⇒ Object
Returns the value of attribute max_items.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def max_items @max_items end |
#max_length ⇒ Object
Returns the value of attribute max_length.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def max_length @max_length end |
#max_properties ⇒ Object
Returns the value of attribute max_properties.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def max_properties @max_properties end |
#maximum ⇒ Object
Returns the value of attribute maximum.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def maximum @maximum end |
#min_items ⇒ Object
Returns the value of attribute min_items.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def min_items @min_items end |
#min_length ⇒ Object
Returns the value of attribute min_length.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def min_length @min_length end |
#min_properties ⇒ Object
Returns the value of attribute min_properties.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def min_properties @min_properties end |
#minimum ⇒ Object
Returns the value of attribute minimum.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def minimum @minimum end |
#multiple_of ⇒ Object
Returns the value of attribute multiple_of.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def multiple_of @multiple_of end |
#nullable ⇒ Object
Returns the value of attribute nullable.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def nullable @nullable end |
#one_of ⇒ Object
Returns the value of attribute one_of.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def one_of @one_of end |
#pattern ⇒ Object
Returns the value of attribute pattern.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def pattern @pattern end |
#pattern_properties ⇒ Object
Returns the value of attribute pattern_properties.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def pattern_properties @pattern_properties end |
#properties ⇒ Object
Returns the value of attribute properties.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def properties @properties end |
#ref ⇒ Object
Returns the value of attribute ref.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def ref @ref end |
#required ⇒ Object
Returns the value of attribute required.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def required @required end |
#schema ⇒ Object
Returns the value of attribute schema.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def schema @schema end |
#title ⇒ Object
Returns the value of attribute title.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def type @type end |
#unique_items ⇒ Object
Returns the value of attribute unique_items.
19 20 21 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 19 def unique_items @unique_items end |
#x_kubernetes_embedded_resource ⇒ Object
x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).
41 42 43 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 41 def @x_kubernetes_embedded_resource end |
#x_kubernetes_int_or_string ⇒ Object
x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns: 1) anyOf: - type: integer - type: string 2) allOf: - anyOf: - type: integer - type: string - … zero or more
44 45 46 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 44 def x_kubernetes_int_or_string @x_kubernetes_int_or_string end |
#x_kubernetes_list_map_keys ⇒ Object
x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type ‘map` by specifying the keys used as the index of the map. This tag MUST only be used on lists that have the "x-kubernetes-list-type" extension set to "map". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported). The properties specified must either be required or have a default value, to ensure those properties are present for all list items.
47 48 49 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 47 def x_kubernetes_list_map_keys @x_kubernetes_list_map_keys end |
#x_kubernetes_list_type ⇒ Object
x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values: 1) ‘atomic`: the list is treated as a single entity, like a scalar. Atomic lists will be entirely replaced when updated. This extension may be used on any type of list (struct, scalar, …). 2) `set`: Sets are lists that must not have multiple items with the same value. Each value must be a scalar, an object with x-kubernetes-map-type `atomic` or an array with x-kubernetes-list-type `atomic`. 3) `map`: These lists are like maps in that their elements have a non-index key used to identify them. Order is preserved upon merge. The map tag must only be used on a list with elements of type object. Defaults to atomic for arrays.
50 51 52 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 50 def x_kubernetes_list_type @x_kubernetes_list_type end |
#x_kubernetes_map_type ⇒ Object
x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values: 1) ‘granular`: These maps are actual maps (key-value pairs) and each fields are independent from each other (they can each be manipulated by separate actors). This is the default behaviour for all maps. 2) `atomic`: the list is treated as a single entity, like a scalar. Atomic maps will be entirely replaced when updated.
53 54 55 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 53 def x_kubernetes_map_type @x_kubernetes_map_type end |
#x_kubernetes_preserve_unknown_fields ⇒ Object
x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.
56 57 58 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 56 def x_kubernetes_preserve_unknown_fields @x_kubernetes_preserve_unknown_fields end |
#x_kubernetes_validations ⇒ Object
x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate ‘CustomResourceValidationExpressions` to be enabled.
59 60 61 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 59 def x_kubernetes_validations @x_kubernetes_validations end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
112 113 114 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 112 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 62 def self.attribute_map { ref: :$ref, schema: :$schema, additional_items: :additionalItems, additional_properties: :additionalProperties, all_of: :allOf, any_of: :anyOf, default: :default, definitions: :definitions, dependencies: :dependencies, description: :description, enum: :enum, example: :example, exclusive_maximum: :exclusiveMaximum, exclusive_minimum: :exclusiveMinimum, external_docs: :externalDocs, format: :format, id: :id, items: :items, max_items: :maxItems, max_length: :maxLength, max_properties: :maxProperties, maximum: :maximum, min_items: :minItems, min_length: :minLength, min_properties: :minProperties, minimum: :minimum, multiple_of: :multipleOf, _not: :not, nullable: :nullable, one_of: :oneOf, pattern: :pattern, pattern_properties: :patternProperties, properties: :properties, required: :required, title: :title, type: :type, unique_items: :uniqueItems, x_kubernetes_embedded_resource: :'x-kubernetes-embedded-resource', x_kubernetes_int_or_string: :'x-kubernetes-int-or-string', x_kubernetes_list_map_keys: :'x-kubernetes-list-map-keys', x_kubernetes_list_type: :'x-kubernetes-list-type', x_kubernetes_map_type: :'x-kubernetes-map-type', x_kubernetes_preserve_unknown_fields: :'x-kubernetes-preserve-unknown-fields', x_kubernetes_validations: :'x-kubernetes-validations' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
387 388 389 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 387 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
167 168 169 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 167 def self.openapi_nullable Set.new([]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 117 def self.openapi_types { ref: :String, schema: :String, additional_items: :Object, additional_properties: :Object, all_of: :'Array<IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps>', any_of: :'Array<IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps>', default: :Object, definitions: :'Hash<String, IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps>', dependencies: :'Hash<String, Object>', description: :String, enum: :'Array<Object>', example: :Object, exclusive_maximum: :Boolean, exclusive_minimum: :Boolean, external_docs: :IoK8sApiextensionsApiserverPkgApisApiextensionsV1ExternalDocumentation, format: :String, id: :String, items: :Object, max_items: :Integer, max_length: :Integer, max_properties: :Integer, maximum: :Float, min_items: :Integer, min_length: :Integer, min_properties: :Integer, minimum: :Float, multiple_of: :Float, _not: :IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps, nullable: :Boolean, one_of: :'Array<IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps>', pattern: :String, pattern_properties: :'Hash<String, IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps>', properties: :'Hash<String, IoK8sApiextensionsApiserverPkgApisApiextensionsV1JSONSchemaProps>', required: :'Array<String>', title: :String, type: :String, unique_items: :Boolean, x_kubernetes_embedded_resource: :Boolean, x_kubernetes_int_or_string: :Boolean, x_kubernetes_list_map_keys: :'Array<String>', x_kubernetes_list_type: :String, x_kubernetes_map_type: :String, x_kubernetes_preserve_unknown_fields: :Boolean, x_kubernetes_validations: :'Array<IoK8sApiextensionsApiserverPkgApisApiextensionsV1ValidationRule>' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 321 def ==(other) return true if equal?(other) self.class == other.class && ref == other.ref && schema == other.schema && additional_items == other.additional_items && additional_properties == other.additional_properties && all_of == other.all_of && any_of == other.any_of && default == other.default && definitions == other.definitions && dependencies == other.dependencies && description == other.description && enum == other.enum && example == other.example && exclusive_maximum == other.exclusive_maximum && exclusive_minimum == other.exclusive_minimum && external_docs == other.external_docs && format == other.format && id == other.id && items == other.items && max_items == other.max_items && max_length == other.max_length && max_properties == other.max_properties && maximum == other.maximum && min_items == other.min_items && min_length == other.min_length && min_properties == other.min_properties && minimum == other.minimum && multiple_of == other.multiple_of && _not == other._not && nullable == other.nullable && one_of == other.one_of && pattern == other.pattern && pattern_properties == other.pattern_properties && properties == other.properties && required == other.required && title == other.title && type == other.type && unique_items == other.unique_items && == other. && x_kubernetes_int_or_string == other.x_kubernetes_int_or_string && x_kubernetes_list_map_keys == other.x_kubernetes_list_map_keys && x_kubernetes_list_type == other.x_kubernetes_list_type && x_kubernetes_map_type == other.x_kubernetes_map_type && x_kubernetes_preserve_unknown_fields == other.x_kubernetes_preserve_unknown_fields && x_kubernetes_validations == other.x_kubernetes_validations end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 421 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Zilla.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 492 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 394 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) send("#{key}=", attributes[self.class.attribute_map[key]].map do |v| _deserialize(::Regexp.last_match(1), v) end) end elsif !attributes[self.class.attribute_map[key]].nil? send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(other) ⇒ Boolean
373 374 375 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 373 def eql?(other) self == other end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
379 380 381 382 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 379 def hash [ref, schema, additional_items, additional_properties, all_of, any_of, default, definitions, dependencies, description, enum, example, exclusive_maximum, exclusive_minimum, external_docs, format, id, items, max_items, max_length, max_properties, maximum, min_items, min_length, min_properties, minimum, multiple_of, _not, nullable, one_of, pattern, pattern_properties, properties, required, title, type, unique_items, , x_kubernetes_int_or_string, x_kubernetes_list_map_keys, x_kubernetes_list_type, x_kubernetes_map_type, x_kubernetes_preserve_unknown_fields, x_kubernetes_validations].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
309 310 311 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 309 def list_invalid_properties [] end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
468 469 470 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 468 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 474 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
462 463 464 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 462 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
315 316 317 |
# File 'lib/zilla/models/io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.rb', line 315 def valid? true end |