Class: Google::Apis::ConnectorsV2::JsonSchema

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/connectors_v2/classes.rb,
lib/google/apis/connectors_v2/representations.rb,
lib/google/apis/connectors_v2/representations.rb

Overview

JsonSchema representation of schema metadata

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ JsonSchema

Returns a new instance of JsonSchema.



1333
1334
1335
# File 'lib/google/apis/connectors_v2/classes.rb', line 1333

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

Instance Attribute Details

#_commentString

A comment on the schema. Corresponds to the JSON property $comment

Returns:

  • (String)


1082
1083
1084
# File 'lib/google/apis/connectors_v2/classes.rb', line 1082

def _comment
  @_comment
end

#_defsHash<String,Google::Apis::ConnectorsV2::JsonSchema>

Definitions for the schema. Corresponds to the JSON property $defs

Returns:



1087
1088
1089
# File 'lib/google/apis/connectors_v2/classes.rb', line 1087

def _defs
  @_defs
end

#_idString

The URI defining the core schema meta-schema. Corresponds to the JSON property $id

Returns:

  • (String)


1092
1093
1094
# File 'lib/google/apis/connectors_v2/classes.rb', line 1092

def _id
  @_id
end

#_refString

A reference to another schema. Corresponds to the JSON property $ref

Returns:

  • (String)


1097
1098
1099
# File 'lib/google/apis/connectors_v2/classes.rb', line 1097

def _ref
  @_ref
end

#_schemaString

The URI defining the schema. Corresponds to the JSON property $schema

Returns:

  • (String)


1102
1103
1104
# File 'lib/google/apis/connectors_v2/classes.rb', line 1102

def _schema
  @_schema
end

#additional_detailsHash<String,Object>

Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema Corresponds to the JSON property additionalDetails

Returns:

  • (Hash<String,Object>)


1108
1109
1110
# File 'lib/google/apis/connectors_v2/classes.rb', line 1108

def additional_details
  @additional_details
end

#additional_itemsGoogle::Apis::ConnectorsV2::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property additionalItems



1113
1114
1115
# File 'lib/google/apis/connectors_v2/classes.rb', line 1113

def additional_items
  @additional_items
end

#additional_propertiesGoogle::Apis::ConnectorsV2::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property additionalProperties



1118
1119
1120
# File 'lib/google/apis/connectors_v2/classes.rb', line 1118

def additional_properties
  @additional_properties
end

#all_ofArray<Google::Apis::ConnectorsV2::JsonSchema>

Schema that must be valid against all of the sub-schemas. Corresponds to the JSON property allOf



1123
1124
1125
# File 'lib/google/apis/connectors_v2/classes.rb', line 1123

def all_of
  @all_of
end

#any_ofArray<Google::Apis::ConnectorsV2::JsonSchema>

Schema that must be valid against at least one of the sub-schemas. Corresponds to the JSON property anyOf



1128
1129
1130
# File 'lib/google/apis/connectors_v2/classes.rb', line 1128

def any_of
  @any_of
end

#constObject

Const value that the data must match. Corresponds to the JSON property const

Returns:

  • (Object)


1133
1134
1135
# File 'lib/google/apis/connectors_v2/classes.rb', line 1133

def const
  @const
end

#containsGoogle::Apis::ConnectorsV2::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property contains



1138
1139
1140
# File 'lib/google/apis/connectors_v2/classes.rb', line 1138

def contains
  @contains
end

#content_encodingString

Encoding of the content. Corresponds to the JSON property contentEncoding

Returns:

  • (String)


1143
1144
1145
# File 'lib/google/apis/connectors_v2/classes.rb', line 1143

def content_encoding
  @content_encoding
end

#content_media_typeString

Media type of the content. Corresponds to the JSON property contentMediaType

Returns:

  • (String)


1148
1149
1150
# File 'lib/google/apis/connectors_v2/classes.rb', line 1148

def content_media_type
  @content_media_type
end

#defaultObject

The default value of the field or object described by this schema. Corresponds to the JSON property default

Returns:

  • (Object)


1153
1154
1155
# File 'lib/google/apis/connectors_v2/classes.rb', line 1153

def default
  @default
end

#definitionsHash<String,Google::Apis::ConnectorsV2::JsonSchema>

Definitions for the schema. Corresponds to the JSON property definitions

Returns:



1158
1159
1160
# File 'lib/google/apis/connectors_v2/classes.rb', line 1158

def definitions
  @definitions
end

#dependenciesHash<String,Object>

Dependencies for the schema. Corresponds to the JSON property dependencies

Returns:

  • (Hash<String,Object>)


1163
1164
1165
# File 'lib/google/apis/connectors_v2/classes.rb', line 1163

def dependencies
  @dependencies
end

#descriptionString

A description of this schema. Corresponds to the JSON property description

Returns:

  • (String)


1168
1169
1170
# File 'lib/google/apis/connectors_v2/classes.rb', line 1168

def description
  @description
end

#elseGoogle::Apis::ConnectorsV2::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property else



1173
1174
1175
# File 'lib/google/apis/connectors_v2/classes.rb', line 1173

def else
  @else
end

#enumArray<Object>

Possible values for an enumeration. This works in conjunction with type to represent types with a fixed set of legal values Corresponds to the JSON property enum

Returns:

  • (Array<Object>)


1179
1180
1181
# File 'lib/google/apis/connectors_v2/classes.rb', line 1179

def enum
  @enum
end

#examplesArray<Object>

Examples of the value. Corresponds to the JSON property examples

Returns:

  • (Array<Object>)


1184
1185
1186
# File 'lib/google/apis/connectors_v2/classes.rb', line 1184

def examples
  @examples
end

#exclusive_maximumObject

Whether the maximum number value is exclusive. Corresponds to the JSON property exclusiveMaximum

Returns:

  • (Object)


1189
1190
1191
# File 'lib/google/apis/connectors_v2/classes.rb', line 1189

def exclusive_maximum
  @exclusive_maximum
end

#exclusive_minimumObject

Whether the minimum number value is exclusive. Corresponds to the JSON property exclusiveMinimum

Returns:

  • (Object)


1194
1195
1196
# File 'lib/google/apis/connectors_v2/classes.rb', line 1194

def exclusive_minimum
  @exclusive_minimum
end

#formatString

Format of the value as per https://json-schema.org/understanding-json-schema/ reference/string.html#format Corresponds to the JSON property format

Returns:

  • (String)


1200
1201
1202
# File 'lib/google/apis/connectors_v2/classes.rb', line 1200

def format
  @format
end

#ifGoogle::Apis::ConnectorsV2::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property if



1205
1206
1207
# File 'lib/google/apis/connectors_v2/classes.rb', line 1205

def if
  @if
end

#itemsGoogle::Apis::ConnectorsV2::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property items



1210
1211
1212
# File 'lib/google/apis/connectors_v2/classes.rb', line 1210

def items
  @items
end

#jdbc_typeString

JDBC datatype of the field. Corresponds to the JSON property jdbcType

Returns:

  • (String)


1215
1216
1217
# File 'lib/google/apis/connectors_v2/classes.rb', line 1215

def jdbc_type
  @jdbc_type
end

#max_itemsFixnum

Maximum number of items in the array field. Corresponds to the JSON property maxItems

Returns:

  • (Fixnum)


1220
1221
1222
# File 'lib/google/apis/connectors_v2/classes.rb', line 1220

def max_items
  @max_items
end

#max_lengthFixnum

Maximum length of the string field. Corresponds to the JSON property maxLength

Returns:

  • (Fixnum)


1225
1226
1227
# File 'lib/google/apis/connectors_v2/classes.rb', line 1225

def max_length
  @max_length
end

#max_propertiesFixnum

Maximum number of properties. Corresponds to the JSON property maxProperties

Returns:

  • (Fixnum)


1230
1231
1232
# File 'lib/google/apis/connectors_v2/classes.rb', line 1230

def max_properties
  @max_properties
end

#maximumObject

Maximum value of the number field. Corresponds to the JSON property maximum

Returns:

  • (Object)


1235
1236
1237
# File 'lib/google/apis/connectors_v2/classes.rb', line 1235

def maximum
  @maximum
end

#min_itemsFixnum

Minimum number of items in the array field. Corresponds to the JSON property minItems

Returns:

  • (Fixnum)


1240
1241
1242
# File 'lib/google/apis/connectors_v2/classes.rb', line 1240

def min_items
  @min_items
end

#min_lengthFixnum

Minimum length of the string field. Corresponds to the JSON property minLength

Returns:

  • (Fixnum)


1245
1246
1247
# File 'lib/google/apis/connectors_v2/classes.rb', line 1245

def min_length
  @min_length
end

#min_propertiesFixnum

Minimum number of properties. Corresponds to the JSON property minProperties

Returns:

  • (Fixnum)


1250
1251
1252
# File 'lib/google/apis/connectors_v2/classes.rb', line 1250

def min_properties
  @min_properties
end

#minimumObject

Minimum value of the number field. Corresponds to the JSON property minimum

Returns:

  • (Object)


1255
1256
1257
# File 'lib/google/apis/connectors_v2/classes.rb', line 1255

def minimum
  @minimum
end

#multiple_ofFloat

Number must be a multiple of this value. Corresponds to the JSON property multipleOf

Returns:

  • (Float)


1260
1261
1262
# File 'lib/google/apis/connectors_v2/classes.rb', line 1260

def multiple_of
  @multiple_of
end

#notGoogle::Apis::ConnectorsV2::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property not



1265
1266
1267
# File 'lib/google/apis/connectors_v2/classes.rb', line 1265

def not
  @not
end

#one_ofArray<Google::Apis::ConnectorsV2::JsonSchema>

Schema that must be valid against at least one of the sub-schemas. Corresponds to the JSON property oneOf



1270
1271
1272
# File 'lib/google/apis/connectors_v2/classes.rb', line 1270

def one_of
  @one_of
end

#patternString

Regex pattern of the string field. This is a string value that describes the regular expression that the string value should match. Corresponds to the JSON property pattern

Returns:

  • (String)


1276
1277
1278
# File 'lib/google/apis/connectors_v2/classes.rb', line 1276

def pattern
  @pattern
end

#pattern_propertiesHash<String,Google::Apis::ConnectorsV2::JsonSchema>

Pattern properties for the schema. Corresponds to the JSON property patternProperties

Returns:



1281
1282
1283
# File 'lib/google/apis/connectors_v2/classes.rb', line 1281

def pattern_properties
  @pattern_properties
end

#propertiesHash<String,Google::Apis::ConnectorsV2::JsonSchema>

The child schemas, applicable only if this is of type object. The key is the name of the property and the value is the json schema that describes that property Corresponds to the JSON property properties

Returns:



1288
1289
1290
# File 'lib/google/apis/connectors_v2/classes.rb', line 1288

def properties
  @properties
end

#property_namesGoogle::Apis::ConnectorsV2::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property propertyNames



1293
1294
1295
# File 'lib/google/apis/connectors_v2/classes.rb', line 1293

def property_names
  @property_names
end

#read_onlyBoolean Also known as: read_only?

Whether the value is read-only. Corresponds to the JSON property readOnly

Returns:

  • (Boolean)


1298
1299
1300
# File 'lib/google/apis/connectors_v2/classes.rb', line 1298

def read_only
  @read_only
end

#requiredArray<String>

Whether this property is required. Corresponds to the JSON property required

Returns:

  • (Array<String>)


1304
1305
1306
# File 'lib/google/apis/connectors_v2/classes.rb', line 1304

def required
  @required
end

#then_propGoogle::Apis::ConnectorsV2::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property then



1309
1310
1311
# File 'lib/google/apis/connectors_v2/classes.rb', line 1309

def then_prop
  @then_prop
end

#titleString

A title of the schema. Corresponds to the JSON property title

Returns:

  • (String)


1314
1315
1316
# File 'lib/google/apis/connectors_v2/classes.rb', line 1314

def title
  @title
end

#typeArray<String>

JSON Schema Validation: A Vocabulary for Structural Validation of JSON Corresponds to the JSON property type

Returns:

  • (Array<String>)


1319
1320
1321
# File 'lib/google/apis/connectors_v2/classes.rb', line 1319

def type
  @type
end

#unique_itemsBoolean Also known as: unique_items?

Whether the items in the array field are unique. Corresponds to the JSON property uniqueItems

Returns:

  • (Boolean)


1324
1325
1326
# File 'lib/google/apis/connectors_v2/classes.rb', line 1324

def unique_items
  @unique_items
end

#write_onlyBoolean Also known as: write_only?

Whether the value is write-only. Corresponds to the JSON property writeOnly

Returns:

  • (Boolean)


1330
1331
1332
# File 'lib/google/apis/connectors_v2/classes.rb', line 1330

def write_only
  @write_only
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
# File 'lib/google/apis/connectors_v2/classes.rb', line 1338

def update!(**args)
  @_comment = args[:_comment] if args.key?(:_comment)
  @_defs = args[:_defs] if args.key?(:_defs)
  @_id = args[:_id] if args.key?(:_id)
  @_ref = args[:_ref] if args.key?(:_ref)
  @_schema = args[:_schema] if args.key?(:_schema)
  @additional_details = args[:additional_details] if args.key?(:additional_details)
  @additional_items = args[:additional_items] if args.key?(:additional_items)
  @additional_properties = args[:additional_properties] if args.key?(:additional_properties)
  @all_of = args[:all_of] if args.key?(:all_of)
  @any_of = args[:any_of] if args.key?(:any_of)
  @const = args[:const] if args.key?(:const)
  @contains = args[:contains] if args.key?(:contains)
  @content_encoding = args[:content_encoding] if args.key?(:content_encoding)
  @content_media_type = args[:content_media_type] if args.key?(:content_media_type)
  @default = args[:default] if args.key?(:default)
  @definitions = args[:definitions] if args.key?(:definitions)
  @dependencies = args[:dependencies] if args.key?(:dependencies)
  @description = args[:description] if args.key?(:description)
  @else = args[:else] if args.key?(:else)
  @enum = args[:enum] if args.key?(:enum)
  @examples = args[:examples] if args.key?(:examples)
  @exclusive_maximum = args[:exclusive_maximum] if args.key?(:exclusive_maximum)
  @exclusive_minimum = args[:exclusive_minimum] if args.key?(:exclusive_minimum)
  @format = args[:format] if args.key?(:format)
  @if = args[:if] if args.key?(:if)
  @items = args[:items] if args.key?(:items)
  @jdbc_type = args[:jdbc_type] if args.key?(:jdbc_type)
  @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)
  @multiple_of = args[:multiple_of] if args.key?(:multiple_of)
  @not = args[:not] if args.key?(:not)
  @one_of = args[:one_of] if args.key?(:one_of)
  @pattern = args[:pattern] if args.key?(:pattern)
  @pattern_properties = args[:pattern_properties] if args.key?(:pattern_properties)
  @properties = args[:properties] if args.key?(:properties)
  @property_names = args[:property_names] if args.key?(:property_names)
  @read_only = args[:read_only] if args.key?(:read_only)
  @required = args[:required] if args.key?(:required)
  @then_prop = args[:then_prop] if args.key?(:then_prop)
  @title = args[:title] if args.key?(:title)
  @type = args[:type] if args.key?(:type)
  @unique_items = args[:unique_items] if args.key?(:unique_items)
  @write_only = args[:write_only] if args.key?(:write_only)
end