0.11.3 (latest) 0.10.0 0.9.3 0.8.2 0.7.1 0.6.6 0.5.1 0.4.1 0.3.10

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Dataflow V1beta3 Client class MetricUpdate.

Describes the state of a metric.

Generated from protobuf message `google.dataflow.v1beta3.MetricUpdate`

## Namespace

Google \\ Cloud \\ Dataflow \\ V1beta3

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataflow/latest/V1beta3.MetricStructuredName` Name of the metric. |
| `↳ kind` | `string` Metric aggregation kind. The possible metric aggregation kinds are "Sum", "Max", "Min", "Mean", "Set", "And", "Or", and "Distribution". The specified aggregation kind is case-insensitive. If omitted, this is not an aggregated value but instead a single metric sample value. |
| `↳ cumulative` | `bool` 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. |
| `↳ scalar` | `Google\Protobuf\Value` Worker-computed aggregate value for aggregation kinds "Sum", "Max", "Min", "And", and "Or". The possible value types are Long, Double, and Boolean. |
| `↳ mean_sum` | `Google\Protobuf\Value` 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. |
| `↳ mean_count` | `Google\Protobuf\Value` 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. |
| `↳ set` | `Google\Protobuf\Value` 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, String, or BoundedTrie according to the metric's type. All Values in the list must be of the same type. |
| `↳ trie` | `Google\Protobuf\Value` Worker-computed aggregate value for the "Trie" aggregation kind. The only possible value type is a BoundedTrieNode. |
| `↳ bounded_trie` | `Google\Protobuf\Value` Worker-computed aggregate value for the "Trie" aggregation kind. The only possible value type is a BoundedTrieNode. Introduced this field to avoid breaking older SDKs when Dataflow service starts to populate the `bounded_trie` field. |
| `↳ distribution` | `Google\Protobuf\Value` A struct value describing properties of a distribution of numeric values. |
| `↳ gauge` | `Google\Protobuf\Value` A struct value describing properties of a Gauge. Metrics of gauge type show the value of a metric across time, and is aggregated based on the newest value. |
| `↳ internal` | `Google\Protobuf\Value` Worker-computed aggregate value for internal use by the Dataflow service. |
| `↳ update_time` | `Google\Protobuf\Timestamp` Timestamp associated with the metric value. Optional when workers are reporting work progress; it will be filled in responses from the metrics API. |

### getName

Name of the metric.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataflow/latest/V1beta3.MetricStructuredName|null` |   |

### hasName

### clearName

### setName

Name of the metric.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataflow/latest/V1beta3.MetricStructuredName` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKind

Metric aggregation kind. The possible metric aggregation kinds are
"Sum", "Max", "Min", "Mean", "Set", "And", "Or", and "Distribution".

The specified aggregation kind is case-insensitive.
If omitted, this is not an aggregated value but instead
a single metric sample value.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setKind

Metric aggregation kind. The possible metric aggregation kinds are
"Sum", "Max", "Min", "Mean", "Set", "And", "Or", and "Distribution".

The specified aggregation kind is case-insensitive.
If omitted, this is not an aggregated value but instead
a single metric sample value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCumulative

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setCumulative

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getScalar

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Value|null` |   |

### hasScalar

### clearScalar

### setScalar

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMeanSum

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Value|null` |   |

### hasMeanSum

### clearMeanSum

### setMeanSum

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMeanCount

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Value|null` |   |

### hasMeanCount

### clearMeanCount

### setMeanCount

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSet

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,
String, or BoundedTrie according to the metric's type. All Values in the
list must be of the same type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Value|null` |   |

### hasSet

### clearSet

### setSet

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,
String, or BoundedTrie according to the metric's type. All Values in the
list must be of the same type.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTrie

Worker-computed aggregate value for the "Trie" aggregation kind. The only
possible value type is a BoundedTrieNode.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Value|null` |   |

### hasTrie

### clearTrie

### setTrie

Worker-computed aggregate value for the "Trie" aggregation kind. The only
possible value type is a BoundedTrieNode.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBoundedTrie

Worker-computed aggregate value for the "Trie" aggregation kind. The only
possible value type is a BoundedTrieNode.

Introduced this field to avoid breaking older SDKs when Dataflow service
starts to populate the `bounded_trie` field.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Value|null` |   |

### hasBoundedTrie

### clearBoundedTrie

### setBoundedTrie

Worker-computed aggregate value for the "Trie" aggregation kind. The only
possible value type is a BoundedTrieNode.

Introduced this field to avoid breaking older SDKs when Dataflow service
starts to populate the `bounded_trie` field.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDistribution

A struct value describing properties of a distribution of numeric values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Value|null` |   |

### hasDistribution

### clearDistribution

### setDistribution

A struct value describing properties of a distribution of numeric values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getGauge

A struct value describing properties of a Gauge.

Metrics of gauge type show the value of a metric across time, and is
aggregated based on the newest value.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Value|null` |   |

### hasGauge

### clearGauge

### setGauge

A struct value describing properties of a Gauge.

Metrics of gauge type show the value of a metric across time, and is
aggregated based on the newest value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getInternal

Worker-computed aggregate value for internal use by the Dataflow
service.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Value|null` |   |

### hasInternal

### clearInternal

### setInternal

Worker-computed aggregate value for internal use by the Dataflow
service.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateTime

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |