auto_labeling_rules
Creates, updates, deletes, gets or lists an auto_labeling_rules resource.
Overview
| Name | auto_labeling_rules |
| Type | Resource |
| Id | google.contactcenterinsights.auto_labeling_rules |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the auto-labeling rule. Format: projects/{project}/locations/{location}/autoLabelingRules/{auto_labeling_rule} |
active | boolean | Whether the rule is active. |
conditions | array | Conditions to apply for auto-labeling the label_key. Representing sequential block of if .. else if .. else statements. The value of the first matching condition will be used. |
createTime | string (google-datetime) | Output only. The time at which this rule was created. |
description | string | The description of the rule. |
displayName | string | The user-provided display name of the rule. |
labelKey | string | The label key. This is also the {auto_labeling_rule} in the resource name. Only settable if label_key_type is LABEL_KEY_TYPE_CUSTOM. |
labelKeyType | string | The type of the label key. (LABEL_KEY_TYPE_UNSPECIFIED, LABEL_KEY_TYPE_CUSTOM) |
updateTime | string (google-datetime) | Output only. The most recent time at which the rule was updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the auto-labeling rule. Format: projects/{project}/locations/{location}/autoLabelingRules/{auto_labeling_rule} |
active | boolean | Whether the rule is active. |
conditions | array | Conditions to apply for auto-labeling the label_key. Representing sequential block of if .. else if .. else statements. The value of the first matching condition will be used. |
createTime | string (google-datetime) | Output only. The time at which this rule was created. |
description | string | The description of the rule. |
displayName | string | The user-provided display name of the rule. |
labelKey | string | The label key. This is also the {auto_labeling_rule} in the resource name. Only settable if label_key_type is LABEL_KEY_TYPE_CUSTOM. |
labelKeyType | string | The type of the label key. (LABEL_KEY_TYPE_UNSPECIFIED, LABEL_KEY_TYPE_CUSTOM) |
updateTime | string (google-datetime) | Output only. The most recent time at which the rule was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, autoLabelingRulesId | Gets an auto labeling rule. | |
list | select | projectsId, locationsId | pageSize, pageToken | Lists auto labeling rules. |
create | insert | projectsId, locationsId | autoLabelingRuleId | Creates an auto labeling rule. |
patch | update | projectsId, locationsId, autoLabelingRulesId | updateMask | Updates an auto labeling rule. |
delete | delete | projectsId, locationsId, autoLabelingRulesId | Deletes an auto labeling rule. | |
test | exec | projectsId, locationsId | Tests auto labeling rules against a conversation. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
autoLabelingRulesId | string | |
locationsId | string | |
projectsId | string | |
autoLabelingRuleId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets an auto labeling rule.
SELECT
name,
active,
conditions,
createTime,
description,
displayName,
labelKey,
labelKeyType,
updateTime
FROM google.contactcenterinsights.auto_labeling_rules
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND autoLabelingRulesId = '{{ autoLabelingRulesId }}' -- required
;
Lists auto labeling rules.
SELECT
name,
active,
conditions,
createTime,
description,
displayName,
labelKey,
labelKeyType,
updateTime
FROM google.contactcenterinsights.auto_labeling_rules
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates an auto labeling rule.
INSERT INTO google.contactcenterinsights.auto_labeling_rules (
data__description,
data__active,
data__labelKeyType,
data__labelKey,
data__name,
data__conditions,
data__displayName,
projectsId,
locationsId,
autoLabelingRuleId
)
SELECT
'{{ description }}',
{{ active }},
'{{ labelKeyType }}',
'{{ labelKey }}',
'{{ name }}',
'{{ conditions }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ autoLabelingRuleId }}'
RETURNING
name,
active,
conditions,
createTime,
description,
displayName,
labelKey,
labelKeyType,
updateTime
;
# Description fields are for documentation purposes
- name: auto_labeling_rules
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the auto_labeling_rules resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the auto_labeling_rules resource.
- name: description
value: "{{ description }}"
description: |
The description of the rule.
- name: active
value: {{ active }}
description: |
Whether the rule is active.
- name: labelKeyType
value: "{{ labelKeyType }}"
description: |
The type of the label key.
valid_values: ['LABEL_KEY_TYPE_UNSPECIFIED', 'LABEL_KEY_TYPE_CUSTOM']
- name: labelKey
value: "{{ labelKey }}"
description: |
The label key. This is also the {auto_labeling_rule} in the resource name. Only settable if label_key_type is LABEL_KEY_TYPE_CUSTOM.
- name: name
value: "{{ name }}"
description: |
Identifier. The resource name of the auto-labeling rule. Format: projects/{project}/locations/{location}/autoLabelingRules/{auto_labeling_rule}
- name: conditions
description: |
Conditions to apply for auto-labeling the label_key. Representing sequential block of if .. else if .. else statements. The value of the first matching condition will be used.
value:
- condition: "{{ condition }}"
value: "{{ value }}"
- name: displayName
value: "{{ displayName }}"
description: |
The user-provided display name of the rule.
- name: autoLabelingRuleId
value: "{{ autoLabelingRuleId }}"
UPDATE examples
- patch
Updates an auto labeling rule.
UPDATE google.contactcenterinsights.auto_labeling_rules
SET
data__description = '{{ description }}',
data__active = {{ active }},
data__labelKeyType = '{{ labelKeyType }}',
data__labelKey = '{{ labelKey }}',
data__name = '{{ name }}',
data__conditions = '{{ conditions }}',
data__displayName = '{{ displayName }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND autoLabelingRulesId = '{{ autoLabelingRulesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
active,
conditions,
createTime,
description,
displayName,
labelKey,
labelKeyType,
updateTime;
DELETE examples
- delete
Deletes an auto labeling rule.
DELETE FROM google.contactcenterinsights.auto_labeling_rules
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND autoLabelingRulesId = '{{ autoLabelingRulesId }}' --required
;
Lifecycle Methods
- test
Tests auto labeling rules against a conversation.
EXEC google.contactcenterinsights.auto_labeling_rules.test
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"conversation": "{{ conversation }}",
"autoLabelingRule": "{{ autoLabelingRule }}"
}'
;