Class: Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5::Metric

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

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



636
637
638
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 636

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

Instance Attribute Details

#categoryString

Corresponds to the JSON property category

Returns:

  • (String)


624
625
626
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 624

def category
  @category
end

#distributionsArray<Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5::Metric::Distribution>

Corresponds to the JSON property distributions



629
630
631
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 629

def distributions
  @distributions
end

#percentileFixnum

Corresponds to the JSON property percentile

Returns:

  • (Fixnum)


634
635
636
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 634

def percentile
  @percentile
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



641
642
643
644
645
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 641

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