Class: Google::Apis::SheetsV4::DataSource

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

Overview

Information about an external data source in the spreadsheet.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DataSource

Returns a new instance of DataSource.



4003
4004
4005
# File 'lib/google/apis/sheets_v4/classes.rb', line 4003

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

Instance Attribute Details

#calculated_columnsArray<Google::Apis::SheetsV4::DataSourceColumn>

All calculated columns in the data source. Corresponds to the JSON property calculatedColumns



3981
3982
3983
# File 'lib/google/apis/sheets_v4/classes.rb', line 3981

def calculated_columns
  @calculated_columns
end

#data_source_idString

The spreadsheet-scoped unique ID that identifies the data source. Example: 1080547365. Corresponds to the JSON property dataSourceId

Returns:

  • (String)


3987
3988
3989
# File 'lib/google/apis/sheets_v4/classes.rb', line 3987

def data_source_id
  @data_source_id
end

#sheet_idFixnum

The ID of the Sheet connected with the data source. The field cannot be changed once set. When creating a data source, an associated DATA_SOURCE sheet is also created, if the field is not specified, the ID of the created sheet will be randomly generated. Corresponds to the JSON property sheetId

Returns:

  • (Fixnum)


3995
3996
3997
# File 'lib/google/apis/sheets_v4/classes.rb', line 3995

def sheet_id
  @sheet_id
end

#specGoogle::Apis::SheetsV4::DataSourceSpec

This specifies the details of the data source. For example, for BigQuery, this specifies information about the BigQuery source. Corresponds to the JSON property spec



4001
4002
4003
# File 'lib/google/apis/sheets_v4/classes.rb', line 4001

def spec
  @spec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4008
4009
4010
4011
4012
4013
# File 'lib/google/apis/sheets_v4/classes.rb', line 4008

def update!(**args)
  @calculated_columns = args[:calculated_columns] if args.key?(:calculated_columns)
  @data_source_id = args[:data_source_id] if args.key?(:data_source_id)
  @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
  @spec = args[:spec] if args.key?(:spec)
end