- [Resource: AutoLabelingRule](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules.md.txt#AutoLabelingRule)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules.md.txt#AutoLabelingRule.SCHEMA_REPRESENTATION)
- [LabelKeyType](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules.md.txt#LabelKeyType)
- [LabelingCondition](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules.md.txt#LabelingCondition)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules.md.txt#LabelingCondition.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules.md.txt#METHODS_SUMMARY)

## Resource: AutoLabelingRule

Rule for auto-labeling conversations.

| JSON representation |
|---|
| ``` { "name": string, "active": boolean, "displayName": string, "description": string, "labelKeyType": enum (`LabelKeyType`), "labelKey": string, "conditions": [ { object (`LabelingCondition`) } ], "createTime": string, "updateTime": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The resource name of the auto-labeling rule. Format: projects/{project}/locations/{location}/autoLabelingRules/{autoLabelingRule} |
| `active` | `boolean` Whether the rule is active. |
| `displayName` | `string` The user-provided display name of the rule. |
| `description` | `string` The description of the rule. |
| `labelKeyType` | ``enum (`LabelKeyType`)`` The type of the label key. |
| `labelKey` | `string` The label key. This is also the {autoLabelingRule} in the resource name. Only settable if labelKeyType is LABEL_KEY_TYPE_CUSTOM. |
| `conditions[]` | ``object (`LabelingCondition`)`` Conditions to apply for auto-labeling the labelKey. Representing sequential block of if .. else if .. else statements. The value of the first matching condition will be used. |
| `createTime` | ``string (`Timestamp` format)`` Output only. The time at which this rule was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`Timestamp` format)`` Output only. The most recent time at which the rule was updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

## LabelKeyType

The type of the label key.

| Enums ||
|---|---|
| `LABEL_KEY_TYPE_UNSPECIFIED` | Unspecified label key type. |
| `LABEL_KEY_TYPE_CUSTOM` | The label key is custom defined by the user. |

## LabelingCondition

Condition for auto-labeling conversations.

| JSON representation |
|---|
| ``` { "condition": string, "value": string } ``` |

| Fields ||
|---|---|
| `condition` | `string` A optional CEL expression to be evaluated as a boolean value. Once evaluated as true, then we will proceed with the value evaluation. An empty condition will be auto evaluated as true. |
| `value` | `string` CEL expression to be evaluated as the value. |

| ## Methods ||
|---|---|
| ### `create` | Creates an auto labeling rule. |
| ### `delete` | Deletes an auto labeling rule. |
| ### `get` | Gets an auto labeling rule. |
| ### `list` | Lists auto labeling rules. |
| ### `patch` | Updates an auto labeling rule. |
| ### `test` | Tests auto labeling rules against a conversation. |