Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb
Overview
Defines the schema of input and output data. This is a subset of the OpenAPI 3.0 Schema Object.
Instance Attribute Summary collapse
-
#additional_properties ⇒ Object
Optional.
-
#any_of ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema>
Optional.
-
#default ⇒ Object
Optional.
-
#defs ⇒ Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema>
Optional.
-
#description ⇒ String
Optional.
-
#enum ⇒ Array<String>
Optional.
-
#example ⇒ Object
Optional.
-
#format ⇒ String
Optional.
-
#items ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema
Defines the schema of input and output data.
-
#max_items ⇒ Fixnum
Optional.
-
#max_length ⇒ Fixnum
Optional.
-
#max_properties ⇒ Fixnum
Optional.
-
#maximum ⇒ Float
Optional.
-
#min_items ⇒ Fixnum
Optional.
-
#min_length ⇒ Fixnum
Optional.
-
#min_properties ⇒ Fixnum
Optional.
-
#minimum ⇒ Float
Optional.
-
#nullable ⇒ Boolean
(also: #nullable?)
Optional.
-
#pattern ⇒ String
Optional.
-
#properties ⇒ Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema>
Optional.
-
#property_ordering ⇒ Array<String>
Optional.
-
#ref ⇒ String
Optional.
-
#required ⇒ Array<String>
Optional.
-
#title ⇒ String
Optional.
-
#type ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1Schema
constructor
A new instance of GoogleCloudAiplatformV1Schema.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1Schema
Returns a new instance of GoogleCloudAiplatformV1Schema.
37838 37839 37840 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37838 def initialize(**args) update!(**args) end |
Instance Attribute Details
#additional_properties ⇒ Object
Optional. If type is OBJECT, specifies how to handle properties not
defined in properties. If it is a boolean false, no additional properties
are allowed. If it is a schema, additional properties are allowed if they
conform to the schema.
Corresponds to the JSON property additionalProperties
37682 37683 37684 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37682 def additional_properties @additional_properties end |
#any_of ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema>
Optional. The instance must be valid against any (one or more) of the
subschemas listed in any_of.
Corresponds to the JSON property anyOf
37688 37689 37690 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37688 def any_of @any_of end |
#default ⇒ Object
Optional. Default value to use if the field is not specified.
Corresponds to the JSON property default
37693 37694 37695 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37693 def default @default end |
#defs ⇒ Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema>
Optional. defs provides a map of schema definitions that can be reused by
ref elsewhere in the schema. Only allowed at root level of the schema.
Corresponds to the JSON property defs
37699 37700 37701 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37699 def defs @defs end |
#description ⇒ String
Optional. Describes the data. The model uses this field to understand the
purpose of the schema and how to use it. It is a best practice to provide a
clear and descriptive explanation for the schema and its properties here,
rather than in the prompt.
Corresponds to the JSON property description
37707 37708 37709 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37707 def description @description end |
#enum ⇒ Array<String>
Optional. Possible values of the field. This field can be used to restrict a
value to a fixed set of values. To mark a field as an enum, set format to
enum and provide the list of possible values in enum. For example: 1. To
define directions: type:STRING, format:enum, enum:["EAST", "NORTH", "SOUTH",
"WEST"] 2. To define apartment numbers: type:INTEGER, format:enum, enum:["
101", "201", "301"]
Corresponds to the JSON property enum
37717 37718 37719 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37717 def enum @enum end |
#example ⇒ Object
Optional. Example of an instance of this schema.
Corresponds to the JSON property example
37722 37723 37724 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37722 def example @example end |
#format ⇒ String
Optional. The format of the data. For NUMBER type, format can be float or
double. For INTEGER type, format can be int32 or int64. For STRING
type, format can be email, byte, date, date-time, password, and
other formats to further refine the data type.
Corresponds to the JSON property format
37730 37731 37732 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37730 def format @format end |
#items ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema
Defines the schema of input and output data. This is a subset of the OpenAPI
3.0 Schema Object.
Corresponds to the JSON property items
37736 37737 37738 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37736 def items @items end |
#max_items ⇒ Fixnum
Optional. If type is ARRAY, max_items specifies the maximum number of
items in an array.
Corresponds to the JSON property maxItems
37742 37743 37744 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37742 def max_items @max_items end |
#max_length ⇒ Fixnum
Optional. If type is STRING, max_length specifies the maximum length of
the string.
Corresponds to the JSON property maxLength
37748 37749 37750 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37748 def max_length @max_length end |
#max_properties ⇒ Fixnum
Optional. If type is OBJECT, max_properties specifies the maximum number
of properties that can be provided.
Corresponds to the JSON property maxProperties
37754 37755 37756 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37754 def max_properties @max_properties end |
#maximum ⇒ Float
Optional. If type is INTEGER or NUMBER, maximum specifies the maximum
allowed value.
Corresponds to the JSON property maximum
37760 37761 37762 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37760 def maximum @maximum end |
#min_items ⇒ Fixnum
Optional. If type is ARRAY, min_items specifies the minimum number of
items in an array.
Corresponds to the JSON property minItems
37766 37767 37768 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37766 def min_items @min_items end |
#min_length ⇒ Fixnum
Optional. If type is STRING, min_length specifies the minimum length of
the string.
Corresponds to the JSON property minLength
37772 37773 37774 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37772 def min_length @min_length end |
#min_properties ⇒ Fixnum
Optional. If type is OBJECT, min_properties specifies the minimum number
of properties that can be provided.
Corresponds to the JSON property minProperties
37778 37779 37780 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37778 def min_properties @min_properties end |
#minimum ⇒ Float
Optional. If type is INTEGER or NUMBER, minimum specifies the minimum
allowed value.
Corresponds to the JSON property minimum
37784 37785 37786 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37784 def minimum @minimum end |
#nullable ⇒ Boolean Also known as: nullable?
Optional. Indicates if the value of this field can be null.
Corresponds to the JSON property nullable
37789 37790 37791 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37789 def nullable @nullable end |
#pattern ⇒ String
Optional. If type is STRING, pattern specifies a regular expression that
the string must match.
Corresponds to the JSON property pattern
37796 37797 37798 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37796 def pattern @pattern end |
#properties ⇒ Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema>
Optional. If type is OBJECT, properties is a map of property names to
schema definitions for each property of the object.
Corresponds to the JSON property properties
37802 37803 37804 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37802 def properties @properties end |
#property_ordering ⇒ Array<String>
Optional. Order of properties displayed or used where order matters. This is
not a standard field in OpenAPI specification, but can be used to control the
order of properties.
Corresponds to the JSON property propertyOrdering
37809 37810 37811 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37809 def property_ordering @property_ordering end |
#ref ⇒ String
Optional. Allows referencing another schema definition to use in place of this
schema. The value must be a valid reference to a schema in 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
37820 37821 37822 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37820 def ref @ref end |
#required ⇒ Array<String>
Optional. If type is OBJECT, required lists the names of properties that
must be present.
Corresponds to the JSON property required
37826 37827 37828 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37826 def required @required end |
#title ⇒ String
Optional. Title for the schema.
Corresponds to the JSON property title
37831 37832 37833 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37831 def title @title end |
#type ⇒ String
Optional. Data type of the schema field.
Corresponds to the JSON property type
37836 37837 37838 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37836 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
37843 37844 37845 37846 37847 37848 37849 37850 37851 37852 37853 37854 37855 37856 37857 37858 37859 37860 37861 37862 37863 37864 37865 37866 37867 37868 37869 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37843 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) @example = args[:example] if args.key?(:example) @format = args[:format] if args.key?(:format) @items = args[:items] if args.key?(:items) @max_items = args[:max_items] if args.key?(:max_items) @max_length = args[:max_length] if args.key?(:max_length) @max_properties = args[:max_properties] if args.key?(:max_properties) @maximum = args[:maximum] if args.key?(:maximum) @min_items = args[:min_items] if args.key?(:min_items) @min_length = args[:min_length] if args.key?(:min_length) @min_properties = args[:min_properties] if args.key?(:min_properties) @minimum = args[:minimum] if args.key?(:minimum) @nullable = args[:nullable] if args.key?(:nullable) @pattern = args[:pattern] if args.key?(:pattern) @properties = args[:properties] if args.key?(:properties) @property_ordering = args[:property_ordering] if args.key?(:property_ordering) @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) end |