Skip to content

samples: migrate code from googleapis/java-contact-center-insights #7411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 107 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
8543291
feat: initial client generation
Neenu1995 Jun 8, 2021
cb3cab5
build(deps-dev): bump junit from 4.13 to 4.13.1 in /samples/snippets …
dependabot[bot] Jun 9, 2021
d453757
test(deps): update dependency com.google.truth:truth to v1.1.3 (#16)
renovate-bot Jun 10, 2021
3730b54
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Jun 10, 2021
5240188
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Jun 10, 2021
9cd6ea1
test(deps): update dependency junit:junit to v4.13.2 (#11)
renovate-bot Jun 11, 2021
79e08ff
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Jul 28, 2021
53aa5ab
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Aug 19, 2021
e18cddc
samples: create conversation (#80)
TrucHLe Sep 16, 2021
298c986
samples: create converation with TTL (#81)
TrucHLe Sep 17, 2021
f9360fe
samples: create analysis (#89)
TrucHLe Sep 17, 2021
2ea3ddf
samples: get operation (#83)
TrucHLe Sep 17, 2021
6a4e8be
samples: create topic model (#84)
TrucHLe Sep 17, 2021
a5ecd99
samples: enable pubsub notifications (#87)
TrucHLe Sep 17, 2021
f7bf8eb
samples: set project-level TTL (#86)
TrucHLe Sep 20, 2021
17cf4f4
samples: create custom highlights (#82)
TrucHLe Sep 20, 2021
dd55ae3
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Sep 20, 2021
c678821
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Oct 1, 2021
04cf64a
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Oct 5, 2021
7594da3
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Oct 6, 2021
e8a99c5
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Oct 6, 2021
73e315b
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Oct 20, 2021
23af50d
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Oct 21, 2021
7959f89
samples: export data to BigQuery (#90)
TrucHLe Oct 25, 2021
5ad7982
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Oct 25, 2021
f3f60ca
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Nov 17, 2021
3273552
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Dec 3, 2021
ee30603
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Dec 5, 2021
25c4898
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Dec 7, 2021
601add7
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Dec 7, 2021
3932782
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jan 7, 2022
592337f
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jan 18, 2022
2707324
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Jan 18, 2022
00bd6e7
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jan 19, 2022
66469a0
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Jan 19, 2022
93e1a14
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Feb 2, 2022
5ae3125
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Feb 2, 2022
44a99be
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Feb 3, 2022
351d2b3
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Feb 15, 2022
0642c27
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Mar 1, 2022
30c700a
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Mar 1, 2022
b34d9a1
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Mar 8, 2022
ddbdcc4
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Mar 8, 2022
6832bda
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Mar 11, 2022
75b8679
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Mar 22, 2022
e33f3bc
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Mar 22, 2022
3fe30a5
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Mar 25, 2022
9825d26
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Mar 25, 2022
4d7f523
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Mar 25, 2022
a141afc
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Mar 29, 2022
d65951a
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Mar 29, 2022
770577a
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Apr 1, 2022
00902e2
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Apr 1, 2022
292f649
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Apr 1, 2022
b465165
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Apr 4, 2022
2d83015
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Apr 11, 2022
470e360
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Apr 13, 2022
11c3c87
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Apr 15, 2022
a52063e
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Apr 18, 2022
9516294
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Apr 18, 2022
ca16f65
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Apr 19, 2022
3a1e8d8
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Apr 21, 2022
ad44134
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot May 12, 2022
fe30bbc
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot May 12, 2022
683b639
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot May 17, 2022
aa7b621
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot May 19, 2022
dd7e13f
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot May 19, 2022
4f6bb31
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot May 25, 2022
d7e585e
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot May 25, 2022
bc1b1f4
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot May 26, 2022
b359903
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jun 6, 2022
1db295d
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Jun 6, 2022
69575a3
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.11…
renovate-bot Jun 13, 2022
52f1d60
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jun 13, 2022
c482141
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Jun 13, 2022
5210fd7
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Jun 15, 2022
ff72009
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jun 21, 2022
92897bf
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jun 22, 2022
e4eb9e1
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jun 23, 2022
17688e3
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jun 24, 2022
a2a97c2
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jul 1, 2022
0c7ae21
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Jul 1, 2022
2502fec
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jul 25, 2022
eafee3b
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Jul 29, 2022
380302b
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Aug 2, 2022
5f34712
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Aug 2, 2022
f815531
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Aug 4, 2022
747eb52
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Aug 4, 2022
f76f42c
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Aug 5, 2022
9067eb1
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Aug 6, 2022
c5a3033
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Aug 18, 2022
081160b
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Aug 18, 2022
24d501a
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Aug 24, 2022
7fc36ce
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Aug 24, 2022
74e40f6
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Aug 29, 2022
e85e864
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Sep 10, 2022
c749ac4
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Sep 13, 2022
0981c0f
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Sep 20, 2022
b11c5de
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Sep 20, 2022
0342a01
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Sep 20, 2022
05893f4
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Sep 22, 2022
c148777
chore(deps): update dependency com.google.cloud:google-cloud-contact-…
renovate-bot Oct 6, 2022
5939cd5
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Oct 6, 2022
66eac43
deps: update dependency com.google.cloud:google-cloud-pubsub to v1.12…
renovate-bot Oct 6, 2022
3dc713d
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
renovate-bot Oct 10, 2022
4d369bc
Merge remote-tracking branch 'migration/main' into java-contact-cente…
Shabirmean Nov 11, 2022
4380336
chore: post migration updates - groupId, artifact url, repo references
Shabirmean Nov 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions contact-center-insights/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.contactcenterinsights</groupId>
<artifactId>contact-center-insights-snippets</artifactId>
<packaging>jar</packaging>
<name>Google CCAI Insights Snippets</name>
<url>https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/contact-center-insights</url>

<!--
The parent pom defines common style checks and testing strategies for our samples.
Removing or replacing it should not affect the execution of the samples in anyway.
-->
<parent>
<groupId>com.google.cloud.samples</groupId>
<artifactId>shared-configuration</artifactId>
<version>1.2.0</version>
</parent>

<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<!-- TODO: switch to libraries-bom after this artifact is included -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-contact-center-insights</artifactId>
<version>2.3.9</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>1.1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>2.17.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>1.120.20</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright 2021 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.contactcenterinsights;

// [START contactcenterinsights_create_analysis]

import com.google.cloud.contactcenterinsights.v1.Analysis;
import com.google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient;
import java.io.IOException;

public class CreateAnalysis {

public static void main(String[] args) throws Exception, IOException {
// TODO(developer): Replace this variable before running the sample.
String conversationName =
"projects/my_project_id/locations/us-central1/conversations/my_conversation_id";

createAnalysis(conversationName);
}

public static Analysis createAnalysis(String conversationName) throws Exception, IOException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the "close" method on the client to safely clean up any remaining background resources.
try (ContactCenterInsightsClient client = ContactCenterInsightsClient.create()) {
// Construct an analysis.
Analysis analysis = Analysis.newBuilder().build();

// Call the Insights client to create an analysis.
Analysis response = client.createAnalysisAsync(conversationName, analysis).get();
System.out.printf("Created %s%n", response.getName());
return response;
}
}
}

// [END contactcenterinsights_create_analysis]
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* Copyright 2021 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.contactcenterinsights;

// [START contactcenterinsights_create_conversation]

import com.google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient;
import com.google.cloud.contactcenterinsights.v1.Conversation;
import com.google.cloud.contactcenterinsights.v1.ConversationDataSource;
import com.google.cloud.contactcenterinsights.v1.CreateConversationRequest;
import com.google.cloud.contactcenterinsights.v1.GcsSource;
import com.google.cloud.contactcenterinsights.v1.LocationName;
import java.io.IOException;

public class CreateConversation {

public static void main(String[] args) throws IOException {
// TODO(developer): Replace these variables before running the sample.
String projectId = "my_project_id";
String transcriptUri = "gs://cloud-samples-data/ccai/chat_sample.json";
String audioUri = "gs://cloud-samples-data/ccai/voice_6912.txt";

createConversation(projectId, transcriptUri, audioUri);
}

public static Conversation createConversation(
String projectId, String transcriptUri, String audioUri) throws IOException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the "close" method on the client to safely clean up any remaining background resources.
try (ContactCenterInsightsClient client = ContactCenterInsightsClient.create()) {
// Construct a parent resource.
LocationName parent = LocationName.of(projectId, "us-central1");

// Construct a conversation.
Conversation conversation =
Conversation.newBuilder()
.setDataSource(
ConversationDataSource.newBuilder()
.setGcsSource(
GcsSource.newBuilder()
.setTranscriptUri(transcriptUri)
.setAudioUri(audioUri)
.build())
.build())
.setMedium(Conversation.Medium.CHAT)
.build();

// Construct a request.
CreateConversationRequest request =
CreateConversationRequest.newBuilder()
.setParent(parent.toString())
.setConversation(conversation)
.build();

// Call the Insights client to create a conversation.
Conversation response = client.createConversation(request);
System.out.printf("Created %s%n", response.getName());
return response;
}
}
}

// [END contactcenterinsights_create_conversation]
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Copyright 2021 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.contactcenterinsights;

// [START contactcenterinsights_create_conversation_with_ttl]

import com.google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient;
import com.google.cloud.contactcenterinsights.v1.Conversation;
import com.google.cloud.contactcenterinsights.v1.ConversationDataSource;
import com.google.cloud.contactcenterinsights.v1.CreateConversationRequest;
import com.google.cloud.contactcenterinsights.v1.GcsSource;
import com.google.cloud.contactcenterinsights.v1.LocationName;
import com.google.protobuf.Duration;
import java.io.IOException;

public class CreateConversationWithTtl {

public static void main(String[] args) throws IOException {
// TODO(developer): Replace these variables before running the sample.
String projectId = "my_project_id";
String transcriptUri = "gs://cloud-samples-data/ccai/chat_sample.json";
String audioUri = "gs://cloud-samples-data/ccai/voice_6912.txt";

createConversationWithTtl(projectId, transcriptUri, audioUri);
}

public static Conversation createConversationWithTtl(
String projectId, String transcriptUri, String audioUri) throws IOException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the "close" method on the client to safely clean up any remaining background resources.
try (ContactCenterInsightsClient client = ContactCenterInsightsClient.create()) {
// Construct a parent resource.
LocationName parent = LocationName.of(projectId, "us-central1");

// Construct a conversation.
Conversation conversation =
Conversation.newBuilder()
.setDataSource(
ConversationDataSource.newBuilder()
.setGcsSource(
GcsSource.newBuilder()
.setTranscriptUri(transcriptUri)
.setAudioUri(audioUri)
.build())
.build())
.setMedium(Conversation.Medium.CHAT)
.setTtl(Duration.newBuilder().setSeconds(86400).build())
.build();

// Construct a request.
CreateConversationRequest request =
CreateConversationRequest.newBuilder()
.setParent(parent.toString())
.setConversation(conversation)
.build();

// Call the Insights client to create a conversation.
Conversation response = client.createConversation(request);
System.out.printf("Created %s%n", response.getName());
return response;
}
}
}

// [END contactcenterinsights_create_conversation_with_ttl]
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright 2021 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.contactcenterinsights;

// [START contactcenterinsights_create_issue_model]

import com.google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient;
import com.google.cloud.contactcenterinsights.v1.IssueModel;
import com.google.cloud.contactcenterinsights.v1.LocationName;
import java.io.IOException;

public class CreateIssueModel {

public static void main(String[] args) throws Exception, IOException {
// TODO(developer): Replace this variable before running the sample.
String projectId = "my_project_id";

createIssueModel(projectId);
}

public static IssueModel createIssueModel(String projectId) throws Exception, IOException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the "close" method on the client to safely clean up any remaining background resources.
try (ContactCenterInsightsClient client = ContactCenterInsightsClient.create()) {
// Construct a parent resource.
LocationName parent = LocationName.of(projectId, "us-central1");

// Construct an issue model.
IssueModel issueModel =
IssueModel.newBuilder()
.setDisplayName("my-model")
.setInputDataConfig(
IssueModel.InputDataConfig.newBuilder().setFilter("medium=\"CHAT\"").build())
.build();

// Call the Insights client to create an issue model.
IssueModel response = client.createIssueModelAsync(parent, issueModel).get();
System.out.printf("Created %s%n", response.getName());
return response;
}
}
}

// [END contactcenterinsights_create_issue_model]
Loading