Class: Google::Apis::PagespeedonlineV5::ConfigSettings

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

Message containing the configuration settings for the Lighthouse run.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ConfigSettings

Returns a new instance of ConfigSettings.



200
201
202
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 200

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

Instance Attribute Details

#channelString

How Lighthouse was run, e.g. from the Chrome extension or from the npm module. Corresponds to the JSON property channel

Returns:

  • (String)


176
177
178
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 176

def channel
  @channel
end

#emulated_form_factorString

The form factor the emulation should use. This field is deprecated, form_factor should be used instead. Corresponds to the JSON property emulatedFormFactor

Returns:

  • (String)


182
183
184
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 182

def emulated_form_factor
  @emulated_form_factor
end

#form_factorString

How Lighthouse should interpret this run in regards to scoring performance metrics and skipping mobile-only tests in desktop. Corresponds to the JSON property formFactor

Returns:

  • (String)


188
189
190
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 188

def form_factor
  @form_factor
end

#localeString

The locale setting. Corresponds to the JSON property locale

Returns:

  • (String)


193
194
195
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 193

def locale
  @locale
end

#only_categoriesObject

List of categories of audits the run should conduct. Corresponds to the JSON property onlyCategories

Returns:

  • (Object)


198
199
200
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 198

def only_categories
  @only_categories
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



205
206
207
208
209
210
211
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 205

def update!(**args)
  @channel = args[:channel] if args.key?(:channel)
  @emulated_form_factor = args[:emulated_form_factor] if args.key?(:emulated_form_factor)
  @form_factor = args[:form_factor] if args.key?(:form_factor)
  @locale = args[:locale] if args.key?(:locale)
  @only_categories = args[:only_categories] if args.key?(:only_categories)
end