Class: Google::Apis::CesV1::Schema
- Inherits:
-
Object
- Object
- Google::Apis::CesV1::Schema
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb
Overview
Represents a select subset of an OpenAPI 3.0 schema object.
Instance Attribute Summary collapse
-
#additional_properties ⇒ Google::Apis::CesV1::Schema
Represents a select subset of an OpenAPI 3.0 schema object.
-
#any_of ⇒ Array<Google::Apis::CesV1::Schema>
Optional.
-
#default ⇒ Object
Optional.
-
#defs ⇒ Hash<String,Google::Apis::CesV1::Schema>
Optional.
-
#description ⇒ String
Optional.
-
#enum ⇒ Array<String>
Optional.
-
#items ⇒ Google::Apis::CesV1::Schema
Represents a select subset of an OpenAPI 3.0 schema object.
-
#max_items ⇒ Fixnum
Optional.
-
#maximum ⇒ Float
Optional.
-
#min_items ⇒ Fixnum
Optional.
-
#minimum ⇒ Float
Optional.
-
#nullable ⇒ Boolean
(also: #nullable?)
Optional.
-
#prefix_items ⇒ Array<Google::Apis::CesV1::Schema>
Optional.
-
#properties ⇒ Hash<String,Google::Apis::CesV1::Schema>
Optional.
-
#ref ⇒ String
Optional.
-
#required ⇒ Array<String>
Optional.
-
#title ⇒ String
Optional.
-
#type ⇒ String
Required.
-
#unique_items ⇒ Boolean
(also: #unique_items?)
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Schema
constructor
A new instance of Schema.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Schema
Returns a new instance of Schema.
7146 7147 7148 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7146 def initialize(**args) update!(**args) end |
Instance Attribute Details
#additional_properties ⇒ Google::Apis::CesV1::Schema
Represents a select subset of an OpenAPI 3.0 schema object.
Corresponds to the JSON property additionalProperties
7040 7041 7042 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7040 def additional_properties @additional_properties end |
#any_of ⇒ Array<Google::Apis::CesV1::Schema>
Optional. The value should be validated against any (one or more) of the
subschemas in the list.
Corresponds to the JSON property anyOf
7046 7047 7048 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7046 def any_of @any_of end |
#default ⇒ Object
Optional. Default value of the data.
Corresponds to the JSON property default
7051 7052 7053 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7051 def default @default end |
#defs ⇒ Hash<String,Google::Apis::CesV1::Schema>
Optional. A map of definitions for use by ref. Only allowed at the root of
the schema.
Corresponds to the JSON property defs
7057 7058 7059 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7057 def defs @defs end |
#description ⇒ String
Optional. The description of the data.
Corresponds to the JSON property description
7062 7063 7064 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7062 def description @description end |
#enum ⇒ Array<String>
Optional. Possible values of the element of primitive type with enum format.
Examples: 1. We can define direction as : type:STRING, format:enum, enum:["
EAST", NORTH", "SOUTH", "WEST"] 2. We can define apartment number as : type:
INTEGER, format:enum, enum:["101", "201", "301"]
Corresponds to the JSON property enum
7070 7071 7072 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7070 def enum @enum end |
#items ⇒ Google::Apis::CesV1::Schema
Represents a select subset of an OpenAPI 3.0 schema object.
Corresponds to the JSON property items
7075 7076 7077 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7075 def items @items end |
#max_items ⇒ Fixnum
Optional. Maximum number of the elements for Type.ARRAY.
Corresponds to the JSON property maxItems
7080 7081 7082 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7080 def max_items @max_items end |
#maximum ⇒ Float
Optional. Maximum value for Type.INTEGER and Type.NUMBER.
Corresponds to the JSON property maximum
7085 7086 7087 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7085 def maximum @maximum end |
#min_items ⇒ Fixnum
Optional. Minimum number of the elements for Type.ARRAY.
Corresponds to the JSON property minItems
7090 7091 7092 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7090 def min_items @min_items end |
#minimum ⇒ Float
Optional. Minimum value for Type.INTEGER and Type.NUMBER.
Corresponds to the JSON property minimum
7095 7096 7097 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7095 def minimum @minimum end |
#nullable ⇒ Boolean Also known as: nullable?
Optional. Indicates if the value may be null.
Corresponds to the JSON property nullable
7100 7101 7102 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7100 def nullable @nullable end |
#prefix_items ⇒ Array<Google::Apis::CesV1::Schema>
Optional. Schemas of initial elements of Type.ARRAY.
Corresponds to the JSON property prefixItems
7106 7107 7108 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7106 def prefix_items @prefix_items end |
#properties ⇒ Hash<String,Google::Apis::CesV1::Schema>
Optional. Properties of Type.OBJECT.
Corresponds to the JSON property properties
7111 7112 7113 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7111 def properties @properties end |
#ref ⇒ String
Optional. Allows indirect references between schema nodes. The value should be
a valid reference to a child of the root defs. For example, the following
schema defines a reference to a schema node named "Pet": type: object
properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name:
type: string The value of the "pet" property is a reference to the schema
node named "Pet". See details in https://json-schema.org/understanding-json-
schema/structuring.
Corresponds to the JSON property ref
7122 7123 7124 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7122 def ref @ref end |
#required ⇒ Array<String>
Optional. Required properties of Type.OBJECT.
Corresponds to the JSON property required
7127 7128 7129 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7127 def required @required end |
#title ⇒ String
Optional. The title of the schema.
Corresponds to the JSON property title
7132 7133 7134 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7132 def title @title end |
#type ⇒ String
Required. The type of the data.
Corresponds to the JSON property type
7137 7138 7139 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7137 def type @type end |
#unique_items ⇒ Boolean Also known as: unique_items?
Optional. Indicate the items in the array must be unique. Only applies to TYPE.
ARRAY.
Corresponds to the JSON property uniqueItems
7143 7144 7145 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7143 def unique_items @unique_items end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 |
# File 'lib/google/apis/ces_v1/classes.rb', line 7151 def update!(**args) @additional_properties = args[:additional_properties] if args.key?(:additional_properties) @any_of = args[:any_of] if args.key?(:any_of) @default = args[:default] if args.key?(:default) @defs = args[:defs] if args.key?(:defs) @description = args[:description] if args.key?(:description) @enum = args[:enum] if args.key?(:enum) @items = args[:items] if args.key?(:items) @max_items = args[:max_items] if args.key?(:max_items) @maximum = args[:maximum] if args.key?(:maximum) @min_items = args[:min_items] if args.key?(:min_items) @minimum = args[:minimum] if args.key?(:minimum) @nullable = args[:nullable] if args.key?(:nullable) @prefix_items = args[:prefix_items] if args.key?(:prefix_items) @properties = args[:properties] if args.key?(:properties) @ref = args[:ref] if args.key?(:ref) @required = args[:required] if args.key?(:required) @title = args[:title] if args.key?(:title) @type = args[:type] if args.key?(:type) @unique_items = args[:unique_items] if args.key?(:unique_items) end |