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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/pagespeedonline_v5/classes.rb,
generated/google/apis/pagespeedonline_v5/representations.rb,
generated/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.



305
306
307
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 305

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

Instance Attribute Details

#descriptionString

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

Returns:

  • (String)


251
252
253
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 251

def description
  @description
end

#detailsHash<String,Object>

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

Returns:

  • (Hash<String,Object>)


256
257
258
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 256

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)


261
262
263
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 261

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)


266
267
268
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 266

def error_message
  @error_message
end

#explanationString

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

Returns:

  • (String)


271
272
273
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 271

def explanation
  @explanation
end

#idString

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

Returns:

  • (String)


276
277
278
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 276

def id
  @id
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)


283
284
285
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 283

def numeric_value
  @numeric_value
end

#scoreObject

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

Returns:

  • (Object)


288
289
290
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 288

def score
  @score
end

#score_display_modeString

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

Returns:

  • (String)


293
294
295
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 293

def score_display_mode
  @score_display_mode
end

#titleString

The human readable title. Corresponds to the JSON property title

Returns:

  • (String)


298
299
300
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 298

def title
  @title
end

#warningsObject

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

Returns:

  • (Object)


303
304
305
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 303

def warnings
  @warnings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 310

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)
  @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