blob: 30e7fab8816c2c989de60edc3feb842ab5bd2f65 [file] [log] [blame]
// Copyright 2022 Google LLC
//
// 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
//
// https://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.
// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package contactcenterinsights_test
import (
"context"
contactcenterinsights "cloud.google.com/go/contactcenterinsights/apiv1"
"google.golang.org/api/iterator"
contactcenterinsightspb "google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1"
longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)
func ExampleNewClient() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func ExampleClient_CreateConversation() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.CreateConversationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#CreateConversationRequest.
}
resp, err := c.CreateConversation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_UpdateConversation() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.UpdateConversationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#UpdateConversationRequest.
}
resp, err := c.UpdateConversation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_GetConversation() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.GetConversationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#GetConversationRequest.
}
resp, err := c.GetConversation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ListConversations() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.ListConversationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#ListConversationsRequest.
}
it := c.ListConversations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func ExampleClient_DeleteConversation() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.DeleteConversationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#DeleteConversationRequest.
}
err = c.DeleteConversation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func ExampleClient_CreateAnalysis() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.CreateAnalysisRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#CreateAnalysisRequest.
}
op, err := c.CreateAnalysis(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_GetAnalysis() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.GetAnalysisRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#GetAnalysisRequest.
}
resp, err := c.GetAnalysis(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ListAnalyses() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.ListAnalysesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#ListAnalysesRequest.
}
it := c.ListAnalyses(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func ExampleClient_DeleteAnalysis() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.DeleteAnalysisRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#DeleteAnalysisRequest.
}
err = c.DeleteAnalysis(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func ExampleClient_ExportInsightsData() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.ExportInsightsDataRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#ExportInsightsDataRequest.
}
op, err := c.ExportInsightsData(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_CreateIssueModel() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.CreateIssueModelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#CreateIssueModelRequest.
}
op, err := c.CreateIssueModel(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_UpdateIssueModel() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.UpdateIssueModelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#UpdateIssueModelRequest.
}
resp, err := c.UpdateIssueModel(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_GetIssueModel() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.GetIssueModelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#GetIssueModelRequest.
}
resp, err := c.GetIssueModel(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ListIssueModels() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.ListIssueModelsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#ListIssueModelsRequest.
}
resp, err := c.ListIssueModels(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_DeleteIssueModel() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.DeleteIssueModelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#DeleteIssueModelRequest.
}
op, err := c.DeleteIssueModel(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func ExampleClient_DeployIssueModel() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.DeployIssueModelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#DeployIssueModelRequest.
}
op, err := c.DeployIssueModel(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_UndeployIssueModel() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.UndeployIssueModelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#UndeployIssueModelRequest.
}
op, err := c.UndeployIssueModel(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_GetIssue() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.GetIssueRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#GetIssueRequest.
}
resp, err := c.GetIssue(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ListIssues() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.ListIssuesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#ListIssuesRequest.
}
resp, err := c.ListIssues(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_UpdateIssue() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.UpdateIssueRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#UpdateIssueRequest.
}
resp, err := c.UpdateIssue(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_CalculateIssueModelStats() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.CalculateIssueModelStatsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#CalculateIssueModelStatsRequest.
}
resp, err := c.CalculateIssueModelStats(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_CreatePhraseMatcher() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.CreatePhraseMatcherRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#CreatePhraseMatcherRequest.
}
resp, err := c.CreatePhraseMatcher(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_GetPhraseMatcher() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.GetPhraseMatcherRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#GetPhraseMatcherRequest.
}
resp, err := c.GetPhraseMatcher(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ListPhraseMatchers() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.ListPhraseMatchersRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#ListPhraseMatchersRequest.
}
it := c.ListPhraseMatchers(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func ExampleClient_DeletePhraseMatcher() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.DeletePhraseMatcherRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#DeletePhraseMatcherRequest.
}
err = c.DeletePhraseMatcher(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func ExampleClient_UpdatePhraseMatcher() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.UpdatePhraseMatcherRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#UpdatePhraseMatcherRequest.
}
resp, err := c.UpdatePhraseMatcher(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_CalculateStats() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.CalculateStatsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#CalculateStatsRequest.
}
resp, err := c.CalculateStats(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_GetSettings() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.GetSettingsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#GetSettingsRequest.
}
resp, err := c.GetSettings(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_UpdateSettings() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.UpdateSettingsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#UpdateSettingsRequest.
}
resp, err := c.UpdateSettings(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_CreateView() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.CreateViewRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#CreateViewRequest.
}
resp, err := c.CreateView(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_GetView() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.GetViewRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#GetViewRequest.
}
resp, err := c.GetView(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ListViews() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.ListViewsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#ListViewsRequest.
}
it := c.ListViews(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func ExampleClient_UpdateView() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.UpdateViewRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#UpdateViewRequest.
}
resp, err := c.UpdateView(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_DeleteView() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &contactcenterinsightspb.DeleteViewRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#DeleteViewRequest.
}
err = c.DeleteView(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func ExampleClient_CancelOperation() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func ExampleClient_GetOperation() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func ExampleClient_ListOperations() {
ctx := context.Background()
c, err := contactcenterinsights.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}