Class: Google::Apis::PagespeedonlineV5::LighthouseAuditResultV5

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

Overview

An audit's result object in a Lighthouse result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LighthouseAuditResultV5

Returns a new instance of LighthouseAuditResultV5.



399
400
401
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 399

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

Instance Attribute Details

#descriptionString

The description of the audit. Corresponds to the JSON property description

Returns:

  • (String)


334
335
336
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 334

def description
  @description
end

#detailsHash<String,Object>

Freeform details section of the audit. Corresponds to the JSON property details

Returns:

  • (Hash<String,Object>)


339
340
341
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 339

def details
  @details
end

#display_valueString

The value that should be displayed on the UI for this audit. Corresponds to the JSON property displayValue

Returns:

  • (String)


344
345
346
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 344

def display_value
  @display_value
end

#error_messageString

An error message from a thrown error inside the audit. Corresponds to the JSON property errorMessage

Returns:

  • (String)


349
350
351
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 349

def error_message
  @error_message
end

#explanationString

An explanation of the errors in the audit. Corresponds to the JSON property explanation

Returns:

  • (String)


354
355
356
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 354

def explanation
  @explanation
end

#idString

The audit's id. Corresponds to the JSON property id

Returns:

  • (String)


359
360
361
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 359

def id
  @id
end

#metric_savingsGoogle::Apis::PagespeedonlineV5::MetricSavings

The metric savings of the audit. Corresponds to the JSON property metricSavings



364
365
366
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 364

def metric_savings
  @metric_savings
end

#numeric_unitString

The unit of the numeric_value field. Used to format the numeric value for display. Corresponds to the JSON property numericUnit

Returns:

  • (String)


370
371
372
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 370

def numeric_unit
  @numeric_unit
end

#numeric_valueFloat

A numeric value that has a meaning specific to the audit, e.g. the number of nodes in the DOM or the timestamp of a specific load event. More information can be found in the audit details, if present. Corresponds to the JSON property numericValue

Returns:

  • (Float)


377
378
379
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 377

def numeric_value
  @numeric_value
end

#scoreObject

The score of the audit, can be null. Corresponds to the JSON property score

Returns:

  • (Object)


382
383
384
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 382

def score
  @score
end

#score_display_modeString

The enumerated score display mode. Corresponds to the JSON property scoreDisplayMode

Returns:

  • (String)


387
388
389
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 387

def score_display_mode
  @score_display_mode
end

#titleString

The human readable title. Corresponds to the JSON property title

Returns:

  • (String)


392
393
394
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 392

def title
  @title
end

#warningsObject

Possible warnings that occurred in the audit, can be null. Corresponds to the JSON property warnings

Returns:

  • (Object)


397
398
399
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 397

def warnings
  @warnings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 404

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @details = args[:details] if args.key?(:details)
  @display_value = args[:display_value] if args.key?(:display_value)
  @error_message = args[:error_message] if args.key?(:error_message)
  @explanation = args[:explanation] if args.key?(:explanation)
  @id = args[:id] if args.key?(:id)
  @metric_savings = args[:metric_savings] if args.key?(:metric_savings)
  @numeric_unit = args[:numeric_unit] if args.key?(:numeric_unit)
  @numeric_value = args[:numeric_value] if args.key?(:numeric_value)
  @score = args[:score] if args.key?(:score)
  @score_display_mode = args[:score_display_mode] if args.key?(:score_display_mode)
  @title = args[:title] if args.key?(:title)
  @warnings = args[:warnings] if args.key?(:warnings)
end