issue_models
Creates, updates, deletes, gets or lists an issue_models
resource.
Overview
Name | issue_models |
Type | Resource |
Id | google.contactcenterinsights.issue_models |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The resource name of the issue model. Format: projects/{project}/locations/{location}/issueModels/{issue_model} |
createTime | string (google-datetime) | Output only. The time at which this issue model was created. |
displayName | string | The representative name for the issue model. |
inputDataConfig | object | Configs for the input data that used to create the issue model. (id: GoogleCloudContactcenterinsightsV1IssueModelInputDataConfig) |
issueCount | string (int64) | Output only. Number of issues in this issue model. |
languageCode | string | Language of the model. |
modelType | string | Type of the model. |
state | string | Output only. State of the model. |
trainingStats | object | Output only. Immutable. The issue model's label statistics on its training data. (id: GoogleCloudContactcenterinsightsV1IssueModelLabelStats) |
updateTime | string (google-datetime) | Output only. The most recent time at which the issue model was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
issueModels | array | The issue models that match the request. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , issueModelsId | Gets an issue model. | |
list | select | projectsId , locationsId | Lists issue models. | |
create | insert | projectsId , locationsId | Creates an issue model. | |
patch | update | projectsId , locationsId , issueModelsId | updateMask | Updates an issue model. |
delete | delete | projectsId , locationsId , issueModelsId | Deletes an issue model. | |
deploy | exec | projectsId , locationsId , issueModelsId | Deploys an issue model. Returns an error if a model is already deployed. An issue model can only be used in analysis after it has been deployed. | |
undeploy | exec | projectsId , locationsId , issueModelsId | Undeploys an issue model. An issue model can not be used in analysis after it has been undeployed. | |
export | exec | projectsId , locationsId , issueModelsId | Exports an issue model to the provided destination. | |
import | exec | projectsId , locationsId | Imports an issue model from a Cloud Storage bucket. | |
calculate_issue_model_stats | exec | projectsId , locationsId , issueModelsId | Gets an issue model's statistics. |
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 |
---|---|---|
issueModelsId | string | |
locationsId | string | |
projectsId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets an issue model.
SELECT
name,
createTime,
displayName,
inputDataConfig,
issueCount,
languageCode,
modelType,
state,
trainingStats,
updateTime
FROM google.contactcenterinsights.issue_models
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND issueModelsId = '{{ issueModelsId }}' -- required;
Lists issue models.
SELECT
issueModels
FROM google.contactcenterinsights.issue_models
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required;
INSERT
examples
- create
- Manifest
Creates an issue model.
INSERT INTO google.contactcenterinsights.issue_models (
data__name,
data__displayName,
data__inputDataConfig,
data__modelType,
data__languageCode,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ inputDataConfig }}',
'{{ modelType }}',
'{{ languageCode }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: issue_models
props:
- name: projectsId
value: string
description: Required parameter for the issue_models resource.
- name: locationsId
value: string
description: Required parameter for the issue_models resource.
- name: name
value: string
description: >
Immutable. The resource name of the issue model. Format: projects/{project}/locations/{location}/issueModels/{issue_model}
- name: displayName
value: string
description: >
The representative name for the issue model.
- name: inputDataConfig
value: object
description: >
Configs for the input data that used to create the issue model.
- name: modelType
value: string
description: >
Type of the model.
valid_values: ['MODEL_TYPE_UNSPECIFIED', 'TYPE_V1', 'TYPE_V2']
- name: languageCode
value: string
description: >
Language of the model.
UPDATE
examples
- patch
Updates an issue model.
UPDATE google.contactcenterinsights.issue_models
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__inputDataConfig = '{{ inputDataConfig }}',
data__modelType = '{{ modelType }}',
data__languageCode = '{{ languageCode }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND issueModelsId = '{{ issueModelsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
displayName,
inputDataConfig,
issueCount,
languageCode,
modelType,
state,
trainingStats,
updateTime;
DELETE
examples
- delete
Deletes an issue model.
DELETE FROM google.contactcenterinsights.issue_models
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND issueModelsId = '{{ issueModelsId }}' --required;
Lifecycle Methods
- deploy
- undeploy
- export
- import
- calculate_issue_model_stats
Deploys an issue model. Returns an error if a model is already deployed. An issue model can only be used in analysis after it has been deployed.
EXEC google.contactcenterinsights.issue_models.deploy
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@issueModelsId='{{ issueModelsId }}' --required
@@json=
'{
"name": "{{ name }}"
}';
Undeploys an issue model. An issue model can not be used in analysis after it has been undeployed.
EXEC google.contactcenterinsights.issue_models.undeploy
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@issueModelsId='{{ issueModelsId }}' --required
@@json=
'{
"name": "{{ name }}"
}';
Exports an issue model to the provided destination.
EXEC google.contactcenterinsights.issue_models.export
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@issueModelsId='{{ issueModelsId }}' --required
@@json=
'{
"gcsDestination": "{{ gcsDestination }}",
"name": "{{ name }}"
}';
Imports an issue model from a Cloud Storage bucket.
EXEC google.contactcenterinsights.issue_models.import
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"gcsSource": "{{ gcsSource }}",
"parent": "{{ parent }}",
"createNewModel": {{ createNewModel }}
}';
Gets an issue model's statistics.
EXEC google.contactcenterinsights.issue_models.calculate_issue_model_stats
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@issueModelsId='{{ issueModelsId }}' --required;