Class: Google::Apis::ConnectorsV1::JsonSchema

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



2980
2981
2982
# File 'lib/google/apis/connectors_v1/classes.rb', line 2980

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

Instance Attribute Details

#defaultObject

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

Returns:

  • (Object)


2934
2935
2936
# File 'lib/google/apis/connectors_v1/classes.rb', line 2934

def default
  @default
end

#descriptionString

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

Returns:

  • (String)


2939
2940
2941
# File 'lib/google/apis/connectors_v1/classes.rb', line 2939

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


2945
2946
2947
# File 'lib/google/apis/connectors_v1/classes.rb', line 2945

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)


2951
2952
2953
# File 'lib/google/apis/connectors_v1/classes.rb', line 2951

def format
  @format
end

#itemsGoogle::Apis::ConnectorsV1::JsonSchema

JsonSchema representation of schema metadata Corresponds to the JSON property items



2956
2957
2958
# File 'lib/google/apis/connectors_v1/classes.rb', line 2956

def items
  @items
end

#jdbc_typeString

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

Returns:

  • (String)


2961
2962
2963
# File 'lib/google/apis/connectors_v1/classes.rb', line 2961

def jdbc_type
  @jdbc_type
end

#propertiesHash<String,Google::Apis::ConnectorsV1::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:



2968
2969
2970
# File 'lib/google/apis/connectors_v1/classes.rb', line 2968

def properties
  @properties
end

#requiredArray<String>

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

Returns:

  • (Array<String>)


2973
2974
2975
# File 'lib/google/apis/connectors_v1/classes.rb', line 2973

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


2978
2979
2980
# File 'lib/google/apis/connectors_v1/classes.rb', line 2978

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
# File 'lib/google/apis/connectors_v1/classes.rb', line 2985

def update!(**args)
  @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