Class: Google::Apis::BigqueryV2::StandardSqlDataType

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/bigquery_v2/classes.rb,
generated/google/apis/bigquery_v2/representations.rb,
generated/google/apis/bigquery_v2/representations.rb

Overview

The type of a variable, e.g., a function argument. Examples: INT64: type_kind= "INT64" ARRAY: type_kind="ARRAY", array_element_type="STRING" STRUCT>: type_kind="STRUCT", struct_type=fields=[ name="x", type=type_kind="STRING" , `name="y", type=`type_kind="ARRAY", array_element_type="DATE" ]``

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ StandardSqlDataType

Returns a new instance of StandardSqlDataType.


5489
5490
5491
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5489

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

Instance Attribute Details

#array_element_typeGoogle::Apis::BigqueryV2::StandardSqlDataType

The type of a variable, e.g., a function argument. Examples: INT64: type_kind= "INT64" ARRAY: type_kind="ARRAY", array_element_type="STRING" STRUCT>: type_kind="STRUCT", struct_type=fields=[ name="x", type=type_kind="STRING" , `name="y", type=`type_kind="ARRAY", array_element_type="DATE" ]` Corresponds to the JSON propertyarrayElementType`


5476
5477
5478
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5476

def array_element_type
  @array_element_type
end

#struct_typeGoogle::Apis::BigqueryV2::StandardSqlStructType

The fields of this struct, in order, if type_kind = "STRUCT". Corresponds to the JSON property structType


5481
5482
5483
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5481

def struct_type
  @struct_type
end

#type_kindString

Required. The top level type of this field. Can be any standard SQL data type ( e.g., "INT64", "DATE", "ARRAY"). Corresponds to the JSON property typeKind

Returns:

  • (String)

5487
5488
5489
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5487

def type_kind
  @type_kind
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


5494
5495
5496
5497
5498
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5494

def update!(**args)
  @array_element_type = args[:array_element_type] if args.key?(:array_element_type)
  @struct_type = args[:struct_type] if args.key?(:struct_type)
  @type_kind = args[:type_kind] if args.key?(:type_kind)
end