Class: Google::Apis::BigqueryV2::TableFieldSchema

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

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

Returns a new instance of TableFieldSchema.



2771
2772
2773
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2771

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

Instance Attribute Details

#descriptionString

[Optional] The field description. The maximum length is 16K characters. Corresponds to the JSON property description

Returns:

  • (String)


2743
2744
2745
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2743

def description
  @description
end

#fieldsArray<Google::Apis::BigqueryV2::TableFieldSchema>

[Optional] Describes the nested schema fields if the type property is set to RECORD. Corresponds to the JSON property fields



2749
2750
2751
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2749

def fields
  @fields
end

#modeString

[Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. Corresponds to the JSON property mode

Returns:

  • (String)


2755
2756
2757
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2755

def mode
  @mode
end

#nameString

[Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. Corresponds to the JSON property name

Returns:

  • (String)


2762
2763
2764
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2762

def name
  @name
end

#typeString

[Required] The field data type. Possible values include STRING, BYTES, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema). Corresponds to the JSON property type

Returns:

  • (String)


2769
2770
2771
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2769

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2776
2777
2778
2779
2780
2781
2782
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2776

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @fields = args[:fields] if args.key?(:fields)
  @mode = args[:mode] if args.key?(:mode)
  @name = args[:name] if args.key?(:name)
  @type = args[:type] if args.key?(:type)
end