Class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest

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

Overview

Updates a conditional format rule at the given index, or moves a conditional format rule to another index.

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

Returns a new instance of UpdateConditionalFormatRuleRequest.



246
247
248
# File 'generated/google/apis/sheets_v4/classes.rb', line 246

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

Instance Attribute Details

#indexFixnum

The zero-based index of the rule that should be replaced or moved. Corresponds to the JSON property index

Returns:

  • (Fixnum)


239
240
241
# File 'generated/google/apis/sheets_v4/classes.rb', line 239

def index
  @index
end

#new_indexFixnum

The zero-based new index the rule should end up at. Corresponds to the JSON property newIndex

Returns:

  • (Fixnum)


244
245
246
# File 'generated/google/apis/sheets_v4/classes.rb', line 244

def new_index
  @new_index
end

#ruleGoogle::Apis::SheetsV4::ConditionalFormatRule

A rule describing a conditional format. Corresponds to the JSON property rule



234
235
236
# File 'generated/google/apis/sheets_v4/classes.rb', line 234

def rule
  @rule
end

#sheet_idFixnum

The sheet of the rule to move. Required if new_index is set, unused otherwise. Corresponds to the JSON property sheetId

Returns:

  • (Fixnum)


229
230
231
# File 'generated/google/apis/sheets_v4/classes.rb', line 229

def sheet_id
  @sheet_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



251
252
253
254
255
256
# File 'generated/google/apis/sheets_v4/classes.rb', line 251

def update!(**args)
  @sheet_id = args[:sheet_id] if args.key?(:sheet_id)
  @rule = args[:rule] if args.key?(:rule)
  @index = args[:index] if args.key?(:index)
  @new_index = args[:new_index] if args.key?(:new_index)
end