Class: Google::Apis::DatastreamV1::SpannerColumn
- Inherits:
-
Object
- Object
- Google::Apis::DatastreamV1::SpannerColumn
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/datastream_v1/classes.rb,
lib/google/apis/datastream_v1/representations.rb,
lib/google/apis/datastream_v1/representations.rb
Overview
Spanner column.
Instance Attribute Summary collapse
-
#column ⇒ String
Required.
-
#data_type ⇒ String
Optional.
-
#is_primary_key ⇒ Boolean
(also: #is_primary_key?)
Optional.
-
#ordinal_position ⇒ Fixnum
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SpannerColumn
constructor
A new instance of SpannerColumn.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SpannerColumn
Returns a new instance of SpannerColumn.
4722 4723 4724 |
# File 'lib/google/apis/datastream_v1/classes.rb', line 4722 def initialize(**args) update!(**args) end |
Instance Attribute Details
#column ⇒ String
Required. The column name.
Corresponds to the JSON property column
4704 4705 4706 |
# File 'lib/google/apis/datastream_v1/classes.rb', line 4704 def column @column end |
#data_type ⇒ String
Optional. Spanner data type.
Corresponds to the JSON property dataType
4709 4710 4711 |
# File 'lib/google/apis/datastream_v1/classes.rb', line 4709 def data_type @data_type end |
#is_primary_key ⇒ Boolean Also known as: is_primary_key?
Optional. Whether or not the column is a primary key.
Corresponds to the JSON property isPrimaryKey
4714 4715 4716 |
# File 'lib/google/apis/datastream_v1/classes.rb', line 4714 def is_primary_key @is_primary_key end |
#ordinal_position ⇒ Fixnum
Optional. The ordinal position of the column in the table.
Corresponds to the JSON property ordinalPosition
4720 4721 4722 |
# File 'lib/google/apis/datastream_v1/classes.rb', line 4720 def ordinal_position @ordinal_position end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4727 4728 4729 4730 4731 4732 |
# File 'lib/google/apis/datastream_v1/classes.rb', line 4727 def update!(**args) @column = args[:column] if args.key?(:column) @data_type = args[:data_type] if args.key?(:data_type) @is_primary_key = args[:is_primary_key] if args.key?(:is_primary_key) @ordinal_position = args[:ordinal_position] if args.key?(:ordinal_position) end |