Class: Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience::Metric

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

Overview

The type of the metric.

Defined Under Namespace

Classes: Distribution

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

Returns a new instance of Metric



552
553
554
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 552

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

Instance Attribute Details

#categoryString

Corresponds to the JSON property category

Returns:

  • (String)


540
541
542
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 540

def category
  @category
end

#distributionsArray<Google::Apis::PagespeedonlineV4::PagespeedApiPagespeedResponseV4::LoadingExperience::Metric::Distribution>

Corresponds to the JSON property distributions



545
546
547
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 545

def distributions
  @distributions
end

#medianFixnum

Corresponds to the JSON property median

Returns:

  • (Fixnum)


550
551
552
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 550

def median
  @median
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



557
558
559
560
561
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 557

def update!(**args)
  @category = args[:category] if args.key?(:category)
  @distributions = args[:distributions] if args.key?(:distributions)
  @median = args[:median] if args.key?(:median)
end