Class: Google::Apis::BusinessprofileperformanceV1::DatedValue

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

Overview

Represents a single datapoint in the timeseries, where each datapoint is a date-value pair.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DatedValue

Returns a new instance of DatedValue.



148
149
150
# File 'lib/google/apis/businessprofileperformance_v1/classes.rb', line 148

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

Instance Attribute Details

#dateGoogle::Apis::BusinessprofileperformanceV1::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property date



141
142
143
# File 'lib/google/apis/businessprofileperformance_v1/classes.rb', line 141

def date
  @date
end

#valueFixnum

The value of the datapoint. This will not be present when the value is zero. Corresponds to the JSON property value

Returns:

  • (Fixnum)


146
147
148
# File 'lib/google/apis/businessprofileperformance_v1/classes.rb', line 146

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



153
154
155
156
# File 'lib/google/apis/businessprofileperformance_v1/classes.rb', line 153

def update!(**args)
  @date = args[:date] if args.key?(:date)
  @value = args[:value] if args.key?(:value)
end