Class: Google::Apis::SheetsV4::DuplicateSheetRequest

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

Duplicates the contents of a sheet.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DuplicateSheetRequest

Returns a new instance of DuplicateSheetRequest.



5140
5141
5142
# File 'lib/google/apis/sheets_v4/classes.rb', line 5140

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

Instance Attribute Details

#insert_sheet_indexFixnum

The zero-based index where the new sheet should be inserted. The index of all sheets after this are incremented. Corresponds to the JSON property insertSheetIndex

Returns:

  • (Fixnum)


5119
5120
5121
# File 'lib/google/apis/sheets_v4/classes.rb', line 5119

def insert_sheet_index
  @insert_sheet_index
end

#new_sheet_idFixnum

If set, the ID of the new sheet. If not set, an ID is chosen. If set, the ID must not conflict with any existing sheet ID. If set, it must be non-negative. Corresponds to the JSON property newSheetId

Returns:

  • (Fixnum)


5125
5126
5127
# File 'lib/google/apis/sheets_v4/classes.rb', line 5125

def new_sheet_id
  @new_sheet_id
end

#new_sheet_nameString

The name of the new sheet. If empty, a new name is chosen for you. Corresponds to the JSON property newSheetName

Returns:

  • (String)


5130
5131
5132
# File 'lib/google/apis/sheets_v4/classes.rb', line 5130

def new_sheet_name
  @new_sheet_name
end

#source_sheet_idFixnum

The sheet to duplicate. If the source sheet is of DATA_SOURCE type, its backing DataSource is also duplicated and associated with the new copy of the sheet. No data execution is triggered, the grid data of this sheet is also copied over but only available after the batch request completes. Corresponds to the JSON property sourceSheetId

Returns:

  • (Fixnum)


5138
5139
5140
# File 'lib/google/apis/sheets_v4/classes.rb', line 5138

def source_sheet_id
  @source_sheet_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5145
5146
5147
5148
5149
5150
# File 'lib/google/apis/sheets_v4/classes.rb', line 5145

def update!(**args)
  @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index)
  @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id)
  @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name)
  @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id)
end