Class: Google::Apis::PagespeedonlineV5::MetricSavings

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

The metric savings of the audit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MetricSavings

Returns a new instance of MetricSavings.



633
634
635
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 633

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

Instance Attribute Details

#clsFloat

Optional. Optional numeric value representing the audit's savings for the CLS metric. Corresponds to the JSON property CLS

Returns:

  • (Float)


607
608
609
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 607

def cls
  @cls
end

#fcpFloat

Optional. Optional numeric value representing the audit's savings for the FCP metric. Corresponds to the JSON property FCP

Returns:

  • (Float)


613
614
615
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 613

def fcp
  @fcp
end

#inpFloat

Optional. Optional numeric value representing the audit's savings for the INP metric. Corresponds to the JSON property INP

Returns:

  • (Float)


619
620
621
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 619

def inp
  @inp
end

#lcpFloat

Optional. Optional numeric value representing the audit's savings for the LCP metric. Corresponds to the JSON property LCP

Returns:

  • (Float)


625
626
627
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 625

def lcp
  @lcp
end

#tbtFloat

Optional. Optional numeric value representing the audit's savings for the TBT metric. Corresponds to the JSON property TBT

Returns:

  • (Float)


631
632
633
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 631

def tbt
  @tbt
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



638
639
640
641
642
643
644
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 638

def update!(**args)
  @cls = args[:cls] if args.key?(:cls)
  @fcp = args[:fcp] if args.key?(:fcp)
  @inp = args[:inp] if args.key?(:inp)
  @lcp = args[:lcp] if args.key?(:lcp)
  @tbt = args[:tbt] if args.key?(:tbt)
end