Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Schema

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1Schema

Returns a new instance of GoogleCloudAiplatformV1beta1Schema.



50346
50347
50348
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50346

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#additional_propertiesObject

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

Returns:

  • (Object)


50190
50191
50192
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50190

def additional_properties
  @additional_properties
end

#any_ofArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Schema>

Optional. The instance must be valid against any (one or more) of the subschemas listed in any_of. Corresponds to the JSON property anyOf



50196
50197
50198
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50196

def any_of
  @any_of
end

#defaultObject

Optional. Default value to use if the field is not specified. Corresponds to the JSON property default

Returns:

  • (Object)


50201
50202
50203
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50201

def default
  @default
end

#defsHash<String,Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Schema>

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



50207
50208
50209
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50207

def defs
  @defs
end

#descriptionString

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

Returns:

  • (String)


50215
50216
50217
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50215

def description
  @description
end

#enumArray<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

Returns:

  • (Array<String>)


50225
50226
50227
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50225

def enum
  @enum
end

#exampleObject

Optional. Example of an instance of this schema. Corresponds to the JSON property example

Returns:

  • (Object)


50230
50231
50232
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50230

def example
  @example
end

#formatString

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

Returns:

  • (String)


50238
50239
50240
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50238

def format
  @format
end

#itemsGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Schema

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



50244
50245
50246
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50244

def items
  @items
end

#max_itemsFixnum

Optional. If type is ARRAY, max_items specifies the maximum number of items in an array. Corresponds to the JSON property maxItems

Returns:

  • (Fixnum)


50250
50251
50252
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50250

def max_items
  @max_items
end

#max_lengthFixnum

Optional. If type is STRING, max_length specifies the maximum length of the string. Corresponds to the JSON property maxLength

Returns:

  • (Fixnum)


50256
50257
50258
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50256

def max_length
  @max_length
end

#max_propertiesFixnum

Optional. If type is OBJECT, max_properties specifies the maximum number of properties that can be provided. Corresponds to the JSON property maxProperties

Returns:

  • (Fixnum)


50262
50263
50264
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50262

def max_properties
  @max_properties
end

#maximumFloat

Optional. If type is INTEGER or NUMBER, maximum specifies the maximum allowed value. Corresponds to the JSON property maximum

Returns:

  • (Float)


50268
50269
50270
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50268

def maximum
  @maximum
end

#min_itemsFixnum

Optional. If type is ARRAY, min_items specifies the minimum number of items in an array. Corresponds to the JSON property minItems

Returns:

  • (Fixnum)


50274
50275
50276
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50274

def min_items
  @min_items
end

#min_lengthFixnum

Optional. If type is STRING, min_length specifies the minimum length of the string. Corresponds to the JSON property minLength

Returns:

  • (Fixnum)


50280
50281
50282
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50280

def min_length
  @min_length
end

#min_propertiesFixnum

Optional. If type is OBJECT, min_properties specifies the minimum number of properties that can be provided. Corresponds to the JSON property minProperties

Returns:

  • (Fixnum)


50286
50287
50288
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50286

def min_properties
  @min_properties
end

#minimumFloat

Optional. If type is INTEGER or NUMBER, minimum specifies the minimum allowed value. Corresponds to the JSON property minimum

Returns:

  • (Float)


50292
50293
50294
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50292

def minimum
  @minimum
end

#nullableBoolean Also known as: nullable?

Optional. Indicates if the value of this field can be null. Corresponds to the JSON property nullable

Returns:

  • (Boolean)


50297
50298
50299
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50297

def nullable
  @nullable
end

#patternString

Optional. If type is STRING, pattern specifies a regular expression that the string must match. Corresponds to the JSON property pattern

Returns:

  • (String)


50304
50305
50306
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50304

def pattern
  @pattern
end

#propertiesHash<String,Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Schema>

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



50310
50311
50312
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50310

def properties
  @properties
end

#property_orderingArray<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

Returns:

  • (Array<String>)


50317
50318
50319
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50317

def property_ordering
  @property_ordering
end

#refString

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

Returns:

  • (String)


50328
50329
50330
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50328

def ref
  @ref
end

#requiredArray<String>

Optional. If type is OBJECT, required lists the names of properties that must be present. Corresponds to the JSON property required

Returns:

  • (Array<String>)


50334
50335
50336
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50334

def required
  @required
end

#titleString

Optional. Title for the schema. Corresponds to the JSON property title

Returns:

  • (String)


50339
50340
50341
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50339

def title
  @title
end

#typeString

Optional. Data type of the schema field. Corresponds to the JSON property type

Returns:

  • (String)


50344
50345
50346
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50344

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50351

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