Class: Google::Apis::PagespeedonlineV5::LighthouseResultV5::Environment

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

Environment settings that were used when making this LHR.

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

Returns a new instance of Environment



394
395
396
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 394

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

Instance Attribute Details

#benchmark_indexFloat

The benchmark index number that indicates rough device class. Corresponds to the JSON property benchmarkIndex

Returns:

  • (Float)


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

def benchmark_index
  @benchmark_index
end

#host_user_agentString

The user agent string of the version of Chrome used. Corresponds to the JSON property hostUserAgent

Returns:

  • (String)


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

def host_user_agent
  @host_user_agent
end

#network_user_agentString

The user agent string that was sent over the network. Corresponds to the JSON property networkUserAgent

Returns:

  • (String)


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

def network_user_agent
  @network_user_agent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



399
400
401
402
403
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 399

def update!(**args)
  @benchmark_index = args[:benchmark_index] if args.key?(:benchmark_index)
  @host_user_agent = args[:host_user_agent] if args.key?(:host_user_agent)
  @network_user_agent = args[:network_user_agent] if args.key?(:network_user_agent)
end