# Google Cloud Document Ai V1 Client - Class Style (2.7.0)

2.7.0 (latest) 2.6.1 2.5.1 2.4.1 2.3.0 2.2.2 2.1.3 2.0.0 1.14.0 1.13.1 1.12.2 1.9.0 1.8.2 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.2 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Style.

Annotation for common text style attributes. This adheres to CSS
conventions as much as possible.

Generated from protobuf message `google.cloud.documentai.v1.Document.Style`

## Namespace

Google \\ Cloud \\ DocumentAI \\ V1 \\ Document

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ text_anchor` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.TextAnchor` Text anchor indexing into the [Document.text](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document#_Google_Cloud_DocumentAI_V1_Document__getText__). |
| `↳ color` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Color.html` Text color. |
| `↳ background_color` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Color.html` Text background color. |
| `↳ font_weight` | `string` [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`. |
| `↳ text_style` | `string` [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`. |
| `↳ text_decoration` | `string` [Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard. |
| `↳ font_size` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Style.FontSize` Font size. |
| `↳ font_family` | `string` Font family such as `Arial`, `Times New Roman`. <https://www.w3schools.com/cssref/pr_font_font-family.asp> |

### getTextAnchor

Text anchor indexing into the
[Document.text](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document#_Google_Cloud_DocumentAI_V1_Document__getText__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.TextAnchor|null` |   |

### hasTextAnchor

### clearTextAnchor

### setTextAnchor

Text anchor indexing into the
[Document.text](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document#_Google_Cloud_DocumentAI_V1_Document__getText__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.TextAnchor` |

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

### getColor

Text color.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Color.html|null` |   |

### hasColor

### clearColor

### setColor

Text color.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Color.html` |

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

### getBackgroundColor

Text background color.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Color.html|null` |   |

### hasBackgroundColor

### clearBackgroundColor

### setBackgroundColor

Text background color.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Color.html` |

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

### getFontWeight

[Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).

Possible values are `normal`, `bold`, `bolder`, and `lighter`.

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

### setFontWeight

[Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).

Possible values are `normal`, `bold`, `bolder`, and `lighter`.

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

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

### getTextStyle

[Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).

Possible values are `normal`, `italic`, and `oblique`.

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

### setTextStyle

[Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).

Possible values are `normal`, `italic`, and `oblique`.

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

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

### getTextDecoration

[Text
decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).

Follows CSS standard.


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

### setTextDecoration

[Text
decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).

Follows CSS standard.


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

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

### getFontSize

Font size.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Style.FontSize|null` |   |

### hasFontSize

### clearFontSize

### setFontSize

Font size.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Style.FontSize` |

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

### getFontFamily

Font family such as `Arial`, `Times New Roman`.

<https://www.w3schools.com/cssref/pr_font_font-family.asp>

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

### setFontFamily

Font family such as `Arial`, `Times New Roman`.

<https://www.w3schools.com/cssref/pr_font_font-family.asp>

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

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