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.



546
547
548
# File 'lib/google/apis/connectors_v2/classes.rb', line 546

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

Instance Attribute Details

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


495
496
497
# File 'lib/google/apis/connectors_v2/classes.rb', line 495

def additional_details
  @additional_details
end

#defaultObject

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

Returns:

  • (Object)


500
501
502
# File 'lib/google/apis/connectors_v2/classes.rb', line 500

def default
  @default
end

#descriptionString

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

Returns:

  • (String)


505
506
507
# File 'lib/google/apis/connectors_v2/classes.rb', line 505

def description
  @description
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>)


511
512
513
# File 'lib/google/apis/connectors_v2/classes.rb', line 511

def enum
  @enum
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)


517
518
519
# File 'lib/google/apis/connectors_v2/classes.rb', line 517

def format
  @format
end

#itemsGoogle::Apis::ConnectorsV2::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property items



522
523
524
# File 'lib/google/apis/connectors_v2/classes.rb', line 522

def items
  @items
end

#jdbc_typeString

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

Returns:

  • (String)


527
528
529
# File 'lib/google/apis/connectors_v2/classes.rb', line 527

def jdbc_type
  @jdbc_type
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:



534
535
536
# File 'lib/google/apis/connectors_v2/classes.rb', line 534

def properties
  @properties
end

#requiredArray<String>

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

Returns:

  • (Array<String>)


539
540
541
# File 'lib/google/apis/connectors_v2/classes.rb', line 539

def required
  @required
end

#typeArray<String>

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

Returns:

  • (Array<String>)


544
545
546
# File 'lib/google/apis/connectors_v2/classes.rb', line 544

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



551
552
553
554
555
556
557
558
559
560
561
562
# File 'lib/google/apis/connectors_v2/classes.rb', line 551

def update!(**args)
  @additional_details = args[:additional_details] if args.key?(:additional_details)
  @default = args[:default] if args.key?(:default)
  @description = args[:description] if args.key?(:description)
  @enum = args[:enum] if args.key?(:enum)
  @format = args[:format] if args.key?(:format)
  @items = args[:items] if args.key?(:items)
  @jdbc_type = args[:jdbc_type] if args.key?(:jdbc_type)
  @properties = args[:properties] if args.key?(:properties)
  @required = args[:required] if args.key?(:required)
  @type = args[:type] if args.key?(:type)
end