Class: Google::Apis::SheetsV4::DataValidationRule

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

A data validation rule.

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

Returns a new instance of DataValidationRule



3577
3578
3579
# File 'generated/google/apis/sheets_v4/classes.rb', line 3577

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

Instance Attribute Details

#conditionGoogle::Apis::SheetsV4::BooleanCondition

A condition that can evaluate to true or false. BooleanConditions are used by conditional formatting, data validation, and the criteria in filters. Corresponds to the JSON property condition



3557
3558
3559
# File 'generated/google/apis/sheets_v4/classes.rb', line 3557

def condition
  @condition
end

#input_messageString

A message to show the user when adding data to the cell. Corresponds to the JSON property inputMessage

Returns:

  • (String)


3562
3563
3564
# File 'generated/google/apis/sheets_v4/classes.rb', line 3562

def input_message
  @input_message
end

#show_custom_uiBoolean Also known as: show_custom_ui?

True if the UI should be customized based on the kind of condition. If true, "List" conditions will show a dropdown. Corresponds to the JSON property showCustomUi

Returns:

  • (Boolean)


3568
3569
3570
# File 'generated/google/apis/sheets_v4/classes.rb', line 3568

def show_custom_ui
  @show_custom_ui
end

#strictBoolean Also known as: strict?

True if invalid data should be rejected. Corresponds to the JSON property strict

Returns:

  • (Boolean)


3574
3575
3576
# File 'generated/google/apis/sheets_v4/classes.rb', line 3574

def strict
  @strict
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3582
3583
3584
3585
3586
3587
# File 'generated/google/apis/sheets_v4/classes.rb', line 3582

def update!(**args)
  @condition = args[:condition] if args.key?(:condition)
  @input_message = args[:input_message] if args.key?(:input_message)
  @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui)
  @strict = args[:strict] if args.key?(:strict)
end