# Stackdriver Trace V2 Client - Class AttributeValue (2.0.0)

2.0.0 (latest) 2.0.0-RC1 1.9.5 1.8.10 1.7.0 1.6.5 1.5.3 1.4.11 Reference documentation and code samples for the Stackdriver Trace V2 Client class AttributeValue.

The allowed types for `[VALUE]` in a `[KEY]:[VALUE]` attribute.

Generated from protobuf message `google.devtools.cloudtrace.v2.AttributeValue`

## Namespace

Google \\ Cloud \\ Trace \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ string_value` | `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.TruncatableString` A string up to 256 bytes long. |
| `↳ int_value` | `int|string` A 64-bit signed integer. |
| `↳ bool_value` | `bool` A Boolean value represented by `true` or `false`. |

### getStringValue

A string up to 256 bytes long.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.TruncatableString|null` |   |

### hasStringValue

### setStringValue

A string up to 256 bytes long.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.TruncatableString` |

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

### getIntValue

A 64-bit signed integer.

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

### hasIntValue

### setIntValue

A 64-bit signed integer.

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

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

### getBoolValue

A Boolean value represented by `true` or `false`.

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

### hasBoolValue

### setBoolValue

A Boolean value represented by `true` or `false`.

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

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

### getValue

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