# Google Certificate Authority Service V1 Client - Class AttributeTypeAndValue (2.4.0)

2.4.0 (latest) 2.3.0 2.2.2 2.1.1 2.0.3 1.7.3 1.5.0 1.4.2 1.3.1 1.2.2 1.1.0 1.0.3 Reference documentation and code samples for the Google Certificate Authority Service V1 Client class AttributeTypeAndValue.

[AttributeTypeAndValue](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.AttributeTypeAndValue)
specifies an attribute type and value. It can use either a OID or enum value
to specify the attribute type.

Generated from protobuf message `google.cloud.security.privateca.v1.AttributeTypeAndValue`

## Namespace

Google \\ Cloud \\ Security \\ PrivateCA \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `int` The attribute type of the attribute and value pair. |
| `↳ object_id` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.ObjectId` Object ID for an attribute type of an attribute and value pair. |
| `↳ value` | `string` The value for the attribute type. |

### getType

The attribute type of the attribute and value pair.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [AttributeType](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.AttributeType). |

### hasType

### setType

The attribute type of the attribute and value pair.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [AttributeType](https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.AttributeType). |

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

### getObjectId

Object ID for an attribute type of an attribute and value pair.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.ObjectId|null` |   |

### hasObjectId

### setObjectId

Object ID for an attribute type of an attribute and value pair.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-private-ca/latest/V1.ObjectId` |

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

### getValue

The value for the attribute type.

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

### setValue

The value for the attribute type.

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

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

### getAttributeType

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