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

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

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

Constructor Details

#initialize(**args) ⇒ UpdateConditionalFormatRuleRequest

Returns a new instance of UpdateConditionalFormatRuleRequest.



11003
11004
11005
# File 'lib/google/apis/sheets_v4/classes.rb', line 11003

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)


10986
10987
10988
# File 'lib/google/apis/sheets_v4/classes.rb', line 10986

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)


10991
10992
10993
# File 'lib/google/apis/sheets_v4/classes.rb', line 10991

def new_index
  @new_index
end

#ruleGoogle::Apis::SheetsV4::ConditionalFormatRule

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



10996
10997
10998
# File 'lib/google/apis/sheets_v4/classes.rb', line 10996

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)


11001
11002
11003
# File 'lib/google/apis/sheets_v4/classes.rb', line 11001

def sheet_id
  @sheet_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11008
11009
11010
11011
11012
11013
# File 'lib/google/apis/sheets_v4/classes.rb', line 11008

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