Class: Google::Apis::DataflowV1b3::MetricUpdate

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

Overview

Describes the state of a metric.

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

Returns a new instance of MetricUpdate.


1083
1084
1085
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1083

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

Instance Attribute Details

#cumulativeBoolean Also known as: cumulative?

True if this metric is reported as the total cumulative aggregate value accumulated since the worker started working on this WorkItem. By default this is false, indicating that this metric is reported as a delta that is not associated with any WorkItem. Corresponds to the JSON property cumulative

Returns:

  • (Boolean)

1039
1040
1041
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1039

def cumulative
  @cumulative
end

#internalObject

Worker-computed aggregate value for internal use by the Dataflow service. Corresponds to the JSON property internal

Returns:

  • (Object)

1075
1076
1077
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1075

def internal
  @internal
end

#kindString

Metric aggregation kind. The possible metric aggregation kinds are "Sum", "Max" , "Min", "Mean", "Set", "And", and "Or". The specified aggregation kind is case-insensitive. If omitted, this is not an aggregated value but instead a single metric sample value. Corresponds to the JSON property kind

Returns:

  • (String)

1031
1032
1033
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1031

def kind
  @kind
end

#mean_countObject

Worker-computed aggregate value for the "Mean" aggregation kind. This holds the count of the aggregated values and is used in combination with mean_sum above to obtain the actual mean aggregate value. The only possible value type is Long. Corresponds to the JSON property meanCount

Returns:

  • (Object)

1062
1063
1064
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1062

def mean_count
  @mean_count
end

#mean_sumObject

Worker-computed aggregate value for the "Mean" aggregation kind. This holds the sum of the aggregated values and is used in combination with mean_count below to obtain the actual mean aggregate value. The only possible value types are Long and Double. Corresponds to the JSON property meanSum

Returns:

  • (Object)

1054
1055
1056
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1054

def mean_sum
  @mean_sum
end

#nameGoogle::Apis::DataflowV1b3::MetricStructuredName

Identifies a metric, by describing the source which generated the metric. Corresponds to the JSON property name


1023
1024
1025
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1023

def name
  @name
end

#scalarObject

Worker-computed aggregate value for aggregation kinds "Sum", "Max", "Min", " And", and "Or". The possible value types are Long, Double, and Boolean. Corresponds to the JSON property scalar

Returns:

  • (Object)

1046
1047
1048
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1046

def scalar
  @scalar
end

#setObject

Worker-computed aggregate value for the "Set" aggregation kind. The only possible value type is a list of Values whose type can be Long, Double, or String, according to the metric's type. All Values in the list must be of the same type. Corresponds to the JSON property set

Returns:

  • (Object)

1070
1071
1072
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1070

def set
  @set
end

#update_timeString

Timestamp associated with the metric value. Optional when workers are reporting work progress; it will be filled in responses from the metrics API. Corresponds to the JSON property updateTime

Returns:

  • (String)

1081
1082
1083
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1081

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1088

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @kind = args[:kind] if args.key?(:kind)
  @cumulative = args[:cumulative] if args.key?(:cumulative)
  @scalar = args[:scalar] if args.key?(:scalar)
  @mean_sum = args[:mean_sum] if args.key?(:mean_sum)
  @mean_count = args[:mean_count] if args.key?(:mean_count)
  @set = args[:set] if args.key?(:set)
  @internal = args[:internal] if args.key?(:internal)
  @update_time = args[:update_time] if args.key?(:update_time)
end