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.



627
628
629
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 627

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)


601
602
603
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 601

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)


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

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)


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

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)


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

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)


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

def tbt
  @tbt
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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