Skip to main content

issue_models

Creates, updates, deletes, gets or lists an issue_models resource.

Overview

Nameissue_models
TypeResource
Idgoogle.contactcenterinsights.issue_models

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringImmutable. The resource name of the issue model. Format: projects/{project}/locations/{location}/issueModels/{issue_model}
createTimestring (google-datetime)Output only. The time at which this issue model was created.
displayNamestringThe representative name for the issue model.
inputDataConfigobjectConfigs for the input data that used to create the issue model. (id: GoogleCloudContactcenterinsightsV1IssueModelInputDataConfig)
issueCountstring (int64)Output only. Number of issues in this issue model.
languageCodestringLanguage of the model.
modelTypestringType of the model.
statestringOutput only. State of the model.
trainingStatsobjectOutput only. Immutable. The issue model's label statistics on its training data. (id: GoogleCloudContactcenterinsightsV1IssueModelLabelStats)
updateTimestring (google-datetime)Output only. The most recent time at which the issue model was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, issueModelsIdGets an issue model.
listselectprojectsId, locationsIdLists issue models.
createinsertprojectsId, locationsIdCreates an issue model.
patchupdateprojectsId, locationsId, issueModelsIdupdateMaskUpdates an issue model.
deletedeleteprojectsId, locationsId, issueModelsIdDeletes an issue model.
deployexecprojectsId, locationsId, issueModelsIdDeploys 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.
undeployexecprojectsId, locationsId, issueModelsIdUndeploys an issue model. An issue model can not be used in analysis after it has been undeployed.
exportexecprojectsId, locationsId, issueModelsIdExports an issue model to the provided destination.
importexecprojectsId, locationsIdImports an issue model from a Cloud Storage bucket.
calculate_issue_model_statsexecprojectsId, locationsId, issueModelsIdGets 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.

NameDatatypeDescription
issueModelsIdstring
locationsIdstring
projectsIdstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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

Deletes an issue model.

DELETE FROM google.contactcenterinsights.issue_models
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND issueModelsId = '{{ issueModelsId }}' --required;

Lifecycle Methods

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 }}"
}';