Method: Wavefront::Validators#wf_savedsearch_entity?

Defined in:
lib/wavefront-sdk/validators.rb

#wf_savedsearch_entity?(id) ⇒ Boolean

Ensure the given argument is a valid saved search entity type.

Parameters:

Returns:

  • (Boolean)

    true if valid

Raises:

  • Wavefront::Exceptions::InvalidSavedSearchEntity if not valid



377
378
379
380
381
382
383
# File 'lib/wavefront-sdk/validators.rb', line 377

def wf_savedsearch_entity?(id)
  return true if %w[DASHBOARD ALERT MAINTENANCE_WINDOW
                    NOTIFICANT EVENT SOURCE EXTERNAL_LINK AGENT
                    CLOUD_INTEGRATION].include?(id)

  raise Wavefront::Exception::InvalidSavedSearchEntity, id
end