# Google Cloud Support V2beta Client - Class CreateCommentRequest (1.6.0)

1.6.0 (latest) 1.5.0 1.4.2 1.3.0 1.2.1 1.1.0 1.0.3 0.2.5 0.1.2

> [!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 Support V2beta Client class CreateCommentRequest.

The request message for the CreateComment endpoint.

Generated from protobuf message `google.cloud.support.v2beta.CreateCommentRequest`

## Namespace

Google \\ Cloud \\ Support \\ V2beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The name of the case to which the comment should be added. |
| `↳ comment` | `https://docs.cloud.google.com/php/docs/reference/cloud-support/latest/V2beta.Comment` Required. The comment to be added. |

### getParent

Required. The name of the case to which the comment should be added.

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

### setParent

Required. The name of the case to which the comment should be added.

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

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

### getComment

Required. The comment to be added.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-support/latest/V2beta.Comment|null` |   |

### hasComment

### clearComment

### setComment

Required. The comment to be added.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-support/latest/V2beta.Comment` |

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The name of the case to which the comment should be added. Please see CommentServiceClient::caseName() for help formatting this field. |
| `comment` | `https://docs.cloud.google.com/php/docs/reference/cloud-support/latest/V2beta.Comment` Required. The comment to be added. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-support/latest/V2beta.CreateCommentRequest` |   |