ces

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package ces is an auto-generated package for the Gemini Enterprise for Customer Experience API.

NOTE: This package is in beta. It is not stable, and may be subject to changes.

General documentation

For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:

Example usage

To get started with this package, create a client.

// go get cloud.google.com/go/ces/apiv1beta@latest
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := ces.NewSessionClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client, mentioned above.

stream, err := c.BidiRunSession(ctx)
if err != nil {
	// TODO: Handle error.
}
go func() {
	reqs := []*cespb.BidiSessionClientMessage{
		// TODO: Create requests.
	}
	for _, req := range reqs {
		if err := stream.Send(req); err != nil {
			// TODO: Handle error.
		}
	}
	stream.CloseSend()
}()
for {
	resp, err := stream.Recv()
	if err == io.EOF {
		break
	}
	if err != nil {
		// TODO: handle error.
	}
	// TODO: Use resp.
	_ = resp
}

Use of Context

The ctx passed to NewSessionClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

Types

type AgentCallOptions

type AgentCallOptions struct {
	ListApps                 []gax.CallOption
	GetApp                   []gax.CallOption
	CreateApp                []gax.CallOption
	UpdateApp                []gax.CallOption
	DeleteApp                []gax.CallOption
	ExportApp                []gax.CallOption
	ImportApp                []gax.CallOption
	GetSecuritySettings      []gax.CallOption
	UpdateSecuritySettings   []gax.CallOption
	ListAgents               []gax.CallOption
	GetAgent                 []gax.CallOption
	CreateAgent              []gax.CallOption
	UpdateAgent              []gax.CallOption
	DeleteAgent              []gax.CallOption
	ListExamples             []gax.CallOption
	GetExample               []gax.CallOption
	CreateExample            []gax.CallOption
	UpdateExample            []gax.CallOption
	DeleteExample            []gax.CallOption
	ListTools                []gax.CallOption
	GetTool                  []gax.CallOption
	ListConversations        []gax.CallOption
	GetConversation          []gax.CallOption
	DeleteConversation       []gax.CallOption
	BatchDeleteConversations []gax.CallOption
	CreateTool               []gax.CallOption
	UpdateTool               []gax.CallOption
	DeleteTool               []gax.CallOption
	ListGuardrails           []gax.CallOption
	GetGuardrail             []gax.CallOption
	CreateGuardrail          []gax.CallOption
	UpdateGuardrail          []gax.CallOption
	DeleteGuardrail          []gax.CallOption
	ListDeployments          []gax.CallOption
	GetDeployment            []gax.CallOption
	CreateDeployment         []gax.CallOption
	UpdateDeployment         []gax.CallOption
	DeleteDeployment         []gax.CallOption
	ListToolsets             []gax.CallOption
	GetToolset               []gax.CallOption
	CreateToolset            []gax.CallOption
	UpdateToolset            []gax.CallOption
	DeleteToolset            []gax.CallOption
	ListAppVersions          []gax.CallOption
	GetAppVersion            []gax.CallOption
	CreateAppVersion         []gax.CallOption
	DeleteAppVersion         []gax.CallOption
	RestoreAppVersion        []gax.CallOption
	ListChangelogs           []gax.CallOption
	GetChangelog             []gax.CallOption
	GetLocation              []gax.CallOption
	ListLocations            []gax.CallOption
	CancelOperation          []gax.CallOption
	DeleteOperation          []gax.CallOption
	GetOperation             []gax.CallOption
	ListOperations           []gax.CallOption
}

AgentCallOptions contains the retry settings for each method of AgentClient.

type AgentClient

type AgentClient struct {

	// The call options for this service.
	CallOptions *AgentCallOptions

	// LROClient is used internally to handle long-running operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient
	// contains filtered or unexported fields
}

AgentClient is a client for interacting with Gemini Enterprise for Customer Experience API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The service that manages agent-related resources in Gemini Enterprise for Customer Engagement (CES).

func NewAgentClient

func NewAgentClient(ctx context.Context, opts ...option.ClientOption) (*AgentClient, error)

NewAgentClient creates a new agent service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

The service that manages agent-related resources in Gemini Enterprise for Customer Engagement (CES).

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewAgentRESTClient

func NewAgentRESTClient(ctx context.Context, opts ...option.ClientOption) (*AgentClient, error)

NewAgentRESTClient creates a new agent service rest client.

The service that manages agent-related resources in Gemini Enterprise for Customer Engagement (CES).

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*AgentClient) BatchDeleteConversations

BatchDeleteConversations batch deletes the specified conversations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.BatchDeleteConversationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#BatchDeleteConversationsRequest.
	}
	op, err := c.BatchDeleteConversations(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) BatchDeleteConversationsOperation

func (c *AgentClient) BatchDeleteConversationsOperation(name string) *BatchDeleteConversationsOperation

BatchDeleteConversationsOperation returns a new BatchDeleteConversationsOperation from a given name. The name must be that of a previously created BatchDeleteConversationsOperation, possibly from a different process.

func (*AgentClient) CancelOperation

func (c *AgentClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error

CancelOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) Close

func (c *AgentClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*AgentClient) Connection deprecated

func (c *AgentClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*AgentClient) CreateAgent

func (c *AgentClient) CreateAgent(ctx context.Context, req *cespb.CreateAgentRequest, opts ...gax.CallOption) (*cespb.Agent, error)

CreateAgent creates a new agent in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateAgentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateAgentRequest.
	}
	resp, err := c.CreateAgent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) CreateApp

CreateApp creates a new app in the given project and location.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateAppRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateAppRequest.
	}
	op, err := c.CreateApp(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) CreateAppOperation

func (c *AgentClient) CreateAppOperation(name string) *CreateAppOperation

CreateAppOperation returns a new CreateAppOperation from a given name. The name must be that of a previously created CreateAppOperation, possibly from a different process.

func (*AgentClient) CreateAppVersion

func (c *AgentClient) CreateAppVersion(ctx context.Context, req *cespb.CreateAppVersionRequest, opts ...gax.CallOption) (*cespb.AppVersion, error)

CreateAppVersion creates a new app version in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateAppVersionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateAppVersionRequest.
	}
	resp, err := c.CreateAppVersion(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) CreateDeployment

func (c *AgentClient) CreateDeployment(ctx context.Context, req *cespb.CreateDeploymentRequest, opts ...gax.CallOption) (*cespb.Deployment, error)

CreateDeployment creates a new deployment in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateDeploymentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateDeploymentRequest.
	}
	resp, err := c.CreateDeployment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) CreateExample

func (c *AgentClient) CreateExample(ctx context.Context, req *cespb.CreateExampleRequest, opts ...gax.CallOption) (*cespb.Example, error)

CreateExample creates a new example in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateExampleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateExampleRequest.
	}
	resp, err := c.CreateExample(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) CreateGuardrail

func (c *AgentClient) CreateGuardrail(ctx context.Context, req *cespb.CreateGuardrailRequest, opts ...gax.CallOption) (*cespb.Guardrail, error)

CreateGuardrail creates a new guardrail in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateGuardrailRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateGuardrailRequest.
	}
	resp, err := c.CreateGuardrail(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) CreateTool

func (c *AgentClient) CreateTool(ctx context.Context, req *cespb.CreateToolRequest, opts ...gax.CallOption) (*cespb.Tool, error)

CreateTool creates a new tool in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateToolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateToolRequest.
	}
	resp, err := c.CreateTool(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) CreateToolset

func (c *AgentClient) CreateToolset(ctx context.Context, req *cespb.CreateToolsetRequest, opts ...gax.CallOption) (*cespb.Toolset, error)

CreateToolset creates a new toolset in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateToolsetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateToolsetRequest.
	}
	resp, err := c.CreateToolset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) DeleteAgent

func (c *AgentClient) DeleteAgent(ctx context.Context, req *cespb.DeleteAgentRequest, opts ...gax.CallOption) error

DeleteAgent deletes the specified agent.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteAgentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteAgentRequest.
	}
	err = c.DeleteAgent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) DeleteApp

DeleteApp deletes the specified app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteAppRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteAppRequest.
	}
	op, err := c.DeleteApp(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) DeleteAppOperation

func (c *AgentClient) DeleteAppOperation(name string) *DeleteAppOperation

DeleteAppOperation returns a new DeleteAppOperation from a given name. The name must be that of a previously created DeleteAppOperation, possibly from a different process.

func (*AgentClient) DeleteAppVersion

func (c *AgentClient) DeleteAppVersion(ctx context.Context, req *cespb.DeleteAppVersionRequest, opts ...gax.CallOption) error

DeleteAppVersion deletes the specified app version.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteAppVersionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteAppVersionRequest.
	}
	err = c.DeleteAppVersion(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) DeleteConversation

func (c *AgentClient) DeleteConversation(ctx context.Context, req *cespb.DeleteConversationRequest, opts ...gax.CallOption) error

DeleteConversation deletes the specified conversation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteConversationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteConversationRequest.
	}
	err = c.DeleteConversation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) DeleteDeployment

func (c *AgentClient) DeleteDeployment(ctx context.Context, req *cespb.DeleteDeploymentRequest, opts ...gax.CallOption) error

DeleteDeployment deletes the specified deployment.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteDeploymentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteDeploymentRequest.
	}
	err = c.DeleteDeployment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) DeleteExample

func (c *AgentClient) DeleteExample(ctx context.Context, req *cespb.DeleteExampleRequest, opts ...gax.CallOption) error

DeleteExample deletes the specified example.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteExampleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteExampleRequest.
	}
	err = c.DeleteExample(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) DeleteGuardrail

func (c *AgentClient) DeleteGuardrail(ctx context.Context, req *cespb.DeleteGuardrailRequest, opts ...gax.CallOption) error

DeleteGuardrail deletes the specified guardrail.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteGuardrailRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteGuardrailRequest.
	}
	err = c.DeleteGuardrail(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) DeleteOperation

func (c *AgentClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error

DeleteOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) DeleteTool

func (c *AgentClient) DeleteTool(ctx context.Context, req *cespb.DeleteToolRequest, opts ...gax.CallOption) error

DeleteTool deletes the specified tool.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteToolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteToolRequest.
	}
	err = c.DeleteTool(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) DeleteToolset

func (c *AgentClient) DeleteToolset(ctx context.Context, req *cespb.DeleteToolsetRequest, opts ...gax.CallOption) error

DeleteToolset deletes the specified toolset.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteToolsetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteToolsetRequest.
	}
	err = c.DeleteToolset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*AgentClient) ExportApp

ExportApp exports the specified app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ExportAppRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ExportAppRequest.
	}
	op, err := c.ExportApp(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) ExportAppOperation

func (c *AgentClient) ExportAppOperation(name string) *ExportAppOperation

ExportAppOperation returns a new ExportAppOperation from a given name. The name must be that of a previously created ExportAppOperation, possibly from a different process.

func (*AgentClient) GetAgent

func (c *AgentClient) GetAgent(ctx context.Context, req *cespb.GetAgentRequest, opts ...gax.CallOption) (*cespb.Agent, error)

GetAgent gets details of the specified agent.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetAgentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetAgentRequest.
	}
	resp, err := c.GetAgent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetApp

func (c *AgentClient) GetApp(ctx context.Context, req *cespb.GetAppRequest, opts ...gax.CallOption) (*cespb.App, error)

GetApp gets details of the specified app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetAppRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetAppRequest.
	}
	resp, err := c.GetApp(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetAppVersion

func (c *AgentClient) GetAppVersion(ctx context.Context, req *cespb.GetAppVersionRequest, opts ...gax.CallOption) (*cespb.AppVersion, error)

GetAppVersion gets details of the specified app version.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetAppVersionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetAppVersionRequest.
	}
	resp, err := c.GetAppVersion(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetChangelog

func (c *AgentClient) GetChangelog(ctx context.Context, req *cespb.GetChangelogRequest, opts ...gax.CallOption) (*cespb.Changelog, error)

GetChangelog gets the specified changelog.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetChangelogRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetChangelogRequest.
	}
	resp, err := c.GetChangelog(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetConversation

func (c *AgentClient) GetConversation(ctx context.Context, req *cespb.GetConversationRequest, opts ...gax.CallOption) (*cespb.Conversation, error)

GetConversation gets details of the specified conversation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetConversationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetConversationRequest.
	}
	resp, err := c.GetConversation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetDeployment

func (c *AgentClient) GetDeployment(ctx context.Context, req *cespb.GetDeploymentRequest, opts ...gax.CallOption) (*cespb.Deployment, error)

GetDeployment gets details of the specified deployment.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetDeploymentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetDeploymentRequest.
	}
	resp, err := c.GetDeployment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetExample

func (c *AgentClient) GetExample(ctx context.Context, req *cespb.GetExampleRequest, opts ...gax.CallOption) (*cespb.Example, error)

GetExample gets details of the specified example.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetExampleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetExampleRequest.
	}
	resp, err := c.GetExample(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetGuardrail

func (c *AgentClient) GetGuardrail(ctx context.Context, req *cespb.GetGuardrailRequest, opts ...gax.CallOption) (*cespb.Guardrail, error)

GetGuardrail gets details of the specified guardrail.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetGuardrailRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetGuardrailRequest.
	}
	resp, err := c.GetGuardrail(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetLocation

GetLocation gets information about a location.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetSecuritySettings added in v0.3.0

func (c *AgentClient) GetSecuritySettings(ctx context.Context, req *cespb.GetSecuritySettingsRequest, opts ...gax.CallOption) (*cespb.SecuritySettings, error)

GetSecuritySettings retrieves the security settings for the project and location.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetSecuritySettingsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetSecuritySettingsRequest.
	}
	resp, err := c.GetSecuritySettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetTool

func (c *AgentClient) GetTool(ctx context.Context, req *cespb.GetToolRequest, opts ...gax.CallOption) (*cespb.Tool, error)

GetTool gets details of the specified tool.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetToolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetToolRequest.
	}
	resp, err := c.GetTool(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) GetToolset

func (c *AgentClient) GetToolset(ctx context.Context, req *cespb.GetToolsetRequest, opts ...gax.CallOption) (*cespb.Toolset, error)

GetToolset gets details of the specified toolset.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetToolsetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetToolsetRequest.
	}
	resp, err := c.GetToolset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) ImportApp

ImportApp imports the specified app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ImportAppRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ImportAppRequest.
	}
	op, err := c.ImportApp(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) ImportAppOperation

func (c *AgentClient) ImportAppOperation(name string) *ImportAppOperation

ImportAppOperation returns a new ImportAppOperation from a given name. The name must be that of a previously created ImportAppOperation, possibly from a different process.

func (*AgentClient) ListAgents

func (c *AgentClient) ListAgents(ctx context.Context, req *cespb.ListAgentsRequest, opts ...gax.CallOption) *AgentIterator

ListAgents lists agents in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListAgentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListAgentsRequest.
	}
	it := c.ListAgents(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListAgentsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListAgentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListAgentsRequest.
	}
	for resp, err := range c.ListAgents(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListAppVersions

func (c *AgentClient) ListAppVersions(ctx context.Context, req *cespb.ListAppVersionsRequest, opts ...gax.CallOption) *AppVersionIterator

ListAppVersions lists all app versions in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListAppVersionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListAppVersionsRequest.
	}
	it := c.ListAppVersions(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListAppVersionsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListAppVersionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListAppVersionsRequest.
	}
	for resp, err := range c.ListAppVersions(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListApps

func (c *AgentClient) ListApps(ctx context.Context, req *cespb.ListAppsRequest, opts ...gax.CallOption) *AppIterator

ListApps lists apps in the given project and location.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListAppsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListAppsRequest.
	}
	it := c.ListApps(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListAppsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListAppsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListAppsRequest.
	}
	for resp, err := range c.ListApps(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListChangelogs

func (c *AgentClient) ListChangelogs(ctx context.Context, req *cespb.ListChangelogsRequest, opts ...gax.CallOption) *ChangelogIterator

ListChangelogs lists the changelogs of the specified app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListChangelogsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListChangelogsRequest.
	}
	it := c.ListChangelogs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListChangelogsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListChangelogsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListChangelogsRequest.
	}
	for resp, err := range c.ListChangelogs(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListConversations

func (c *AgentClient) ListConversations(ctx context.Context, req *cespb.ListConversationsRequest, opts ...gax.CallOption) *ConversationIterator

ListConversations lists conversations in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListConversationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListConversationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListConversationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListConversationsRequest.
	}
	for resp, err := range c.ListConversations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListDeployments

func (c *AgentClient) ListDeployments(ctx context.Context, req *cespb.ListDeploymentsRequest, opts ...gax.CallOption) *DeploymentIterator

ListDeployments lists deployments in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListDeploymentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListDeploymentsRequest.
	}
	it := c.ListDeployments(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListDeploymentsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListDeploymentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListDeploymentsRequest.
	}
	for resp, err := range c.ListDeployments(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListExamples

func (c *AgentClient) ListExamples(ctx context.Context, req *cespb.ListExamplesRequest, opts ...gax.CallOption) *ExampleIterator

ListExamples lists examples in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListExamplesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListExamplesRequest.
	}
	it := c.ListExamples(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListExamplesResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListExamplesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListExamplesRequest.
	}
	for resp, err := range c.ListExamples(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListGuardrails

func (c *AgentClient) ListGuardrails(ctx context.Context, req *cespb.ListGuardrailsRequest, opts ...gax.CallOption) *GuardrailIterator

ListGuardrails lists guardrails in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListGuardrailsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListGuardrailsRequest.
	}
	it := c.ListGuardrails(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListGuardrailsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListGuardrailsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListGuardrailsRequest.
	}
	for resp, err := range c.ListGuardrails(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListLocations

ListLocations lists information about the supported locations for this service. This method can be called in two ways:

List all public locations: Use the path GET /v1/locations.

List project-visible locations: Use the path
GET /v1/projects/{project_id}/locations. This may include public
locations as well as private or other locations specifically visible
to the project.
Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*locationpb.ListLocationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	for resp, err := range c.ListLocations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*longrunningpb.ListOperationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	for resp, err := range c.ListOperations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListTools

func (c *AgentClient) ListTools(ctx context.Context, req *cespb.ListToolsRequest, opts ...gax.CallOption) *ToolIterator

ListTools lists tools in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListToolsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListToolsRequest.
	}
	it := c.ListTools(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListToolsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListToolsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListToolsRequest.
	}
	for resp, err := range c.ListTools(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) ListToolsets

func (c *AgentClient) ListToolsets(ctx context.Context, req *cespb.ListToolsetsRequest, opts ...gax.CallOption) *ToolsetIterator

ListToolsets lists toolsets in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListToolsetsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListToolsetsRequest.
	}
	it := c.ListToolsets(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListToolsetsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListToolsetsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListToolsetsRequest.
	}
	for resp, err := range c.ListToolsets(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AgentClient) RestoreAppVersion

RestoreAppVersion restores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.RestoreAppVersionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#RestoreAppVersionRequest.
	}
	op, err := c.RestoreAppVersion(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) RestoreAppVersionOperation

func (c *AgentClient) RestoreAppVersionOperation(name string) *RestoreAppVersionOperation

RestoreAppVersionOperation returns a new RestoreAppVersionOperation from a given name. The name must be that of a previously created RestoreAppVersionOperation, possibly from a different process.

func (*AgentClient) UpdateAgent

func (c *AgentClient) UpdateAgent(ctx context.Context, req *cespb.UpdateAgentRequest, opts ...gax.CallOption) (*cespb.Agent, error)

UpdateAgent updates the specified agent.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateAgentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateAgentRequest.
	}
	resp, err := c.UpdateAgent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) UpdateApp

func (c *AgentClient) UpdateApp(ctx context.Context, req *cespb.UpdateAppRequest, opts ...gax.CallOption) (*cespb.App, error)

UpdateApp updates the specified app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateAppRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateAppRequest.
	}
	resp, err := c.UpdateApp(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) UpdateDeployment

func (c *AgentClient) UpdateDeployment(ctx context.Context, req *cespb.UpdateDeploymentRequest, opts ...gax.CallOption) (*cespb.Deployment, error)

UpdateDeployment updates the specified deployment.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateDeploymentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateDeploymentRequest.
	}
	resp, err := c.UpdateDeployment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) UpdateExample

func (c *AgentClient) UpdateExample(ctx context.Context, req *cespb.UpdateExampleRequest, opts ...gax.CallOption) (*cespb.Example, error)

UpdateExample updates the specified example.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateExampleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateExampleRequest.
	}
	resp, err := c.UpdateExample(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) UpdateGuardrail

func (c *AgentClient) UpdateGuardrail(ctx context.Context, req *cespb.UpdateGuardrailRequest, opts ...gax.CallOption) (*cespb.Guardrail, error)

UpdateGuardrail updates the specified guardrail.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateGuardrailRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateGuardrailRequest.
	}
	resp, err := c.UpdateGuardrail(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) UpdateSecuritySettings added in v0.3.0

func (c *AgentClient) UpdateSecuritySettings(ctx context.Context, req *cespb.UpdateSecuritySettingsRequest, opts ...gax.CallOption) (*cespb.SecuritySettings, error)

UpdateSecuritySettings updates the security settings for the project and location.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateSecuritySettingsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateSecuritySettingsRequest.
	}
	resp, err := c.UpdateSecuritySettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) UpdateTool

func (c *AgentClient) UpdateTool(ctx context.Context, req *cespb.UpdateToolRequest, opts ...gax.CallOption) (*cespb.Tool, error)

UpdateTool updates the specified tool.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateToolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateToolRequest.
	}
	resp, err := c.UpdateTool(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AgentClient) UpdateToolset

func (c *AgentClient) UpdateToolset(ctx context.Context, req *cespb.UpdateToolsetRequest, opts ...gax.CallOption) (*cespb.Toolset, error)

UpdateToolset updates the specified toolset.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewAgentClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateToolsetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateToolsetRequest.
	}
	resp, err := c.UpdateToolset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type AgentIterator

type AgentIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.Agent, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AgentIterator manages a stream of *cespb.Agent.

func (*AgentIterator) All

func (it *AgentIterator) All() iter.Seq2[*cespb.Agent, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*AgentIterator) Next

func (it *AgentIterator) Next() (*cespb.Agent, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AgentIterator) PageInfo

func (it *AgentIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type AppIterator

type AppIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.App, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AppIterator manages a stream of *cespb.App.

func (*AppIterator) All

func (it *AppIterator) All() iter.Seq2[*cespb.App, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*AppIterator) Next

func (it *AppIterator) Next() (*cespb.App, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AppIterator) PageInfo

func (it *AppIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type AppVersionIterator

type AppVersionIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.AppVersion, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AppVersionIterator manages a stream of *cespb.AppVersion.

func (*AppVersionIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*AppVersionIterator) Next

func (it *AppVersionIterator) Next() (*cespb.AppVersion, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AppVersionIterator) PageInfo

func (it *AppVersionIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type BatchDeleteConversationsOperation

type BatchDeleteConversationsOperation struct {
	// contains filtered or unexported fields
}

BatchDeleteConversationsOperation manages a long-running operation from BatchDeleteConversations.

func (*BatchDeleteConversationsOperation) Done

Done reports whether the long-running operation has completed.

func (*BatchDeleteConversationsOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*BatchDeleteConversationsOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*BatchDeleteConversationsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*BatchDeleteConversationsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type ChangelogIterator

type ChangelogIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.Changelog, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ChangelogIterator manages a stream of *cespb.Changelog.

func (*ChangelogIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ChangelogIterator) Next

func (it *ChangelogIterator) Next() (*cespb.Changelog, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ChangelogIterator) PageInfo

func (it *ChangelogIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type ConversationIterator

type ConversationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.Conversation, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ConversationIterator manages a stream of *cespb.Conversation.

func (*ConversationIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ConversationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ConversationIterator) PageInfo

func (it *ConversationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type CreateAppOperation

type CreateAppOperation struct {
	// contains filtered or unexported fields
}

CreateAppOperation manages a long-running operation from CreateApp.

func (*CreateAppOperation) Done

func (op *CreateAppOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateAppOperation) Metadata

func (op *CreateAppOperation) Metadata() (*cespb.OperationMetadata, error)

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*CreateAppOperation) Name

func (op *CreateAppOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateAppOperation) Poll

func (op *CreateAppOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*cespb.App, error)

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateAppOperation) Wait

func (op *CreateAppOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*cespb.App, error)

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type DeleteAppOperation

type DeleteAppOperation struct {
	// contains filtered or unexported fields
}

DeleteAppOperation manages a long-running operation from DeleteApp.

func (*DeleteAppOperation) Done

func (op *DeleteAppOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteAppOperation) Metadata

func (op *DeleteAppOperation) Metadata() (*cespb.OperationMetadata, error)

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteAppOperation) Name

func (op *DeleteAppOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteAppOperation) Poll

func (op *DeleteAppOperation) Poll(ctx context.Context, opts ...gax.CallOption) error

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteAppOperation) Wait

func (op *DeleteAppOperation) Wait(ctx context.Context, opts ...gax.CallOption) error

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type DeleteEvaluationRunOperation

type DeleteEvaluationRunOperation struct {
	// contains filtered or unexported fields
}

DeleteEvaluationRunOperation manages a long-running operation from DeleteEvaluationRun.

func (*DeleteEvaluationRunOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteEvaluationRunOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteEvaluationRunOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteEvaluationRunOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteEvaluationRunOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type DeploymentIterator

type DeploymentIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.Deployment, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DeploymentIterator manages a stream of *cespb.Deployment.

func (*DeploymentIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*DeploymentIterator) Next

func (it *DeploymentIterator) Next() (*cespb.Deployment, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*DeploymentIterator) PageInfo

func (it *DeploymentIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type EvaluationCallOptions

type EvaluationCallOptions struct {
	RunEvaluation                []gax.CallOption
	UploadEvaluationAudio        []gax.CallOption
	CreateEvaluation             []gax.CallOption
	GenerateEvaluation           []gax.CallOption
	ImportEvaluations            []gax.CallOption
	CreateEvaluationDataset      []gax.CallOption
	UpdateEvaluation             []gax.CallOption
	UpdateEvaluationDataset      []gax.CallOption
	DeleteEvaluation             []gax.CallOption
	DeleteEvaluationResult       []gax.CallOption
	DeleteEvaluationDataset      []gax.CallOption
	DeleteEvaluationRun          []gax.CallOption
	GetEvaluation                []gax.CallOption
	GetEvaluationResult          []gax.CallOption
	GetEvaluationDataset         []gax.CallOption
	GetEvaluationRun             []gax.CallOption
	ListEvaluations              []gax.CallOption
	ListEvaluationResults        []gax.CallOption
	ListEvaluationDatasets       []gax.CallOption
	ListEvaluationRuns           []gax.CallOption
	ListEvaluationExpectations   []gax.CallOption
	GetEvaluationExpectation     []gax.CallOption
	CreateEvaluationExpectation  []gax.CallOption
	UpdateEvaluationExpectation  []gax.CallOption
	DeleteEvaluationExpectation  []gax.CallOption
	CreateScheduledEvaluationRun []gax.CallOption
	GetScheduledEvaluationRun    []gax.CallOption
	ListScheduledEvaluationRuns  []gax.CallOption
	UpdateScheduledEvaluationRun []gax.CallOption
	DeleteScheduledEvaluationRun []gax.CallOption
	TestPersonaVoice             []gax.CallOption
	GetLocation                  []gax.CallOption
	ListLocations                []gax.CallOption
	CancelOperation              []gax.CallOption
	DeleteOperation              []gax.CallOption
	GetOperation                 []gax.CallOption
	ListOperations               []gax.CallOption
}

EvaluationCallOptions contains the retry settings for each method of EvaluationClient.

type EvaluationClient

type EvaluationClient struct {

	// The call options for this service.
	CallOptions *EvaluationCallOptions

	// LROClient is used internally to handle long-running operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient
	// contains filtered or unexported fields
}

EvaluationClient is a client for interacting with Gemini Enterprise for Customer Experience API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

EvaluationService exposes methods to perform evaluation for the CES app.

func NewEvaluationClient

func NewEvaluationClient(ctx context.Context, opts ...option.ClientOption) (*EvaluationClient, error)

NewEvaluationClient creates a new evaluation service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

EvaluationService exposes methods to perform evaluation for the CES app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewEvaluationRESTClient

func NewEvaluationRESTClient(ctx context.Context, opts ...option.ClientOption) (*EvaluationClient, error)

NewEvaluationRESTClient creates a new evaluation service rest client.

EvaluationService exposes methods to perform evaluation for the CES app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*EvaluationClient) CancelOperation

CancelOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*EvaluationClient) Close

func (c *EvaluationClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*EvaluationClient) Connection deprecated

func (c *EvaluationClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*EvaluationClient) CreateEvaluation

func (c *EvaluationClient) CreateEvaluation(ctx context.Context, req *cespb.CreateEvaluationRequest, opts ...gax.CallOption) (*cespb.Evaluation, error)

CreateEvaluation creates an evaluation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateEvaluationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateEvaluationRequest.
	}
	resp, err := c.CreateEvaluation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) CreateEvaluationDataset

CreateEvaluationDataset creates an evaluation dataset.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateEvaluationDatasetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateEvaluationDatasetRequest.
	}
	resp, err := c.CreateEvaluationDataset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) CreateEvaluationExpectation

CreateEvaluationExpectation creates an evaluation expectation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateEvaluationExpectationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateEvaluationExpectationRequest.
	}
	resp, err := c.CreateEvaluationExpectation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) CreateScheduledEvaluationRun

CreateScheduledEvaluationRun creates a scheduled evaluation run.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.CreateScheduledEvaluationRunRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#CreateScheduledEvaluationRunRequest.
	}
	resp, err := c.CreateScheduledEvaluationRun(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) DeleteEvaluation

func (c *EvaluationClient) DeleteEvaluation(ctx context.Context, req *cespb.DeleteEvaluationRequest, opts ...gax.CallOption) error

DeleteEvaluation deletes an evaluation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteEvaluationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteEvaluationRequest.
	}
	err = c.DeleteEvaluation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*EvaluationClient) DeleteEvaluationDataset

func (c *EvaluationClient) DeleteEvaluationDataset(ctx context.Context, req *cespb.DeleteEvaluationDatasetRequest, opts ...gax.CallOption) error

DeleteEvaluationDataset deletes an evaluation dataset.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteEvaluationDatasetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteEvaluationDatasetRequest.
	}
	err = c.DeleteEvaluationDataset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*EvaluationClient) DeleteEvaluationExpectation

func (c *EvaluationClient) DeleteEvaluationExpectation(ctx context.Context, req *cespb.DeleteEvaluationExpectationRequest, opts ...gax.CallOption) error

DeleteEvaluationExpectation deletes an evaluation expectation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteEvaluationExpectationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteEvaluationExpectationRequest.
	}
	err = c.DeleteEvaluationExpectation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*EvaluationClient) DeleteEvaluationResult

func (c *EvaluationClient) DeleteEvaluationResult(ctx context.Context, req *cespb.DeleteEvaluationResultRequest, opts ...gax.CallOption) error

DeleteEvaluationResult deletes an evaluation result.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteEvaluationResultRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteEvaluationResultRequest.
	}
	err = c.DeleteEvaluationResult(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*EvaluationClient) DeleteEvaluationRun

DeleteEvaluationRun deletes an evaluation run.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteEvaluationRunRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteEvaluationRunRequest.
	}
	op, err := c.DeleteEvaluationRun(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*EvaluationClient) DeleteEvaluationRunOperation

func (c *EvaluationClient) DeleteEvaluationRunOperation(name string) *DeleteEvaluationRunOperation

DeleteEvaluationRunOperation returns a new DeleteEvaluationRunOperation from a given name. The name must be that of a previously created DeleteEvaluationRunOperation, possibly from a different process.

func (*EvaluationClient) DeleteOperation

DeleteOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*EvaluationClient) DeleteScheduledEvaluationRun

func (c *EvaluationClient) DeleteScheduledEvaluationRun(ctx context.Context, req *cespb.DeleteScheduledEvaluationRunRequest, opts ...gax.CallOption) error

DeleteScheduledEvaluationRun deletes a scheduled evaluation run.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.DeleteScheduledEvaluationRunRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#DeleteScheduledEvaluationRunRequest.
	}
	err = c.DeleteScheduledEvaluationRun(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*EvaluationClient) GenerateEvaluation

GenerateEvaluation creates a golden evaluation from a conversation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GenerateEvaluationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GenerateEvaluationRequest.
	}
	op, err := c.GenerateEvaluation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) GenerateEvaluationOperation

func (c *EvaluationClient) GenerateEvaluationOperation(name string) *GenerateEvaluationOperation

GenerateEvaluationOperation returns a new GenerateEvaluationOperation from a given name. The name must be that of a previously created GenerateEvaluationOperation, possibly from a different process.

func (*EvaluationClient) GetEvaluation

func (c *EvaluationClient) GetEvaluation(ctx context.Context, req *cespb.GetEvaluationRequest, opts ...gax.CallOption) (*cespb.Evaluation, error)

GetEvaluation gets details of the specified evaluation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetEvaluationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetEvaluationRequest.
	}
	resp, err := c.GetEvaluation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) GetEvaluationDataset

GetEvaluationDataset gets details of the specified evaluation dataset.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetEvaluationDatasetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetEvaluationDatasetRequest.
	}
	resp, err := c.GetEvaluationDataset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) GetEvaluationExpectation

GetEvaluationExpectation gets details of the specified evaluation expectation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetEvaluationExpectationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetEvaluationExpectationRequest.
	}
	resp, err := c.GetEvaluationExpectation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) GetEvaluationResult

GetEvaluationResult gets details of the specified evaluation result.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetEvaluationResultRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetEvaluationResultRequest.
	}
	resp, err := c.GetEvaluationResult(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) GetEvaluationRun

GetEvaluationRun gets details of the specified evaluation run.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetEvaluationRunRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetEvaluationRunRequest.
	}
	resp, err := c.GetEvaluationRun(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) GetLocation

GetLocation gets information about a location.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) GetScheduledEvaluationRun

GetScheduledEvaluationRun gets details of the specified scheduled evaluation run.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GetScheduledEvaluationRunRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GetScheduledEvaluationRunRequest.
	}
	resp, err := c.GetScheduledEvaluationRun(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) ImportEvaluations

ImportEvaluations imports evaluations into the app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ImportEvaluationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ImportEvaluationsRequest.
	}
	op, err := c.ImportEvaluations(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) ImportEvaluationsOperation

func (c *EvaluationClient) ImportEvaluationsOperation(name string) *ImportEvaluationsOperation

ImportEvaluationsOperation returns a new ImportEvaluationsOperation from a given name. The name must be that of a previously created ImportEvaluationsOperation, possibly from a different process.

func (*EvaluationClient) ListEvaluationDatasets

ListEvaluationDatasets lists all evaluation datasets in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListEvaluationDatasetsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListEvaluationDatasetsRequest.
	}
	it := c.ListEvaluationDatasets(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListEvaluationDatasetsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListEvaluationDatasetsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListEvaluationDatasetsRequest.
	}
	for resp, err := range c.ListEvaluationDatasets(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*EvaluationClient) ListEvaluationExpectations

ListEvaluationExpectations lists all evaluation expectations in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListEvaluationExpectationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListEvaluationExpectationsRequest.
	}
	it := c.ListEvaluationExpectations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListEvaluationExpectationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListEvaluationExpectationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListEvaluationExpectationsRequest.
	}
	for resp, err := range c.ListEvaluationExpectations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*EvaluationClient) ListEvaluationResults

ListEvaluationResults lists all evaluation results for a given evaluation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListEvaluationResultsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListEvaluationResultsRequest.
	}
	it := c.ListEvaluationResults(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListEvaluationResultsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListEvaluationResultsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListEvaluationResultsRequest.
	}
	for resp, err := range c.ListEvaluationResults(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*EvaluationClient) ListEvaluationRuns

ListEvaluationRuns lists all evaluation runs in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListEvaluationRunsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListEvaluationRunsRequest.
	}
	it := c.ListEvaluationRuns(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListEvaluationRunsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListEvaluationRunsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListEvaluationRunsRequest.
	}
	for resp, err := range c.ListEvaluationRuns(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*EvaluationClient) ListEvaluations

ListEvaluations lists all evaluations in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListEvaluationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListEvaluationsRequest.
	}
	it := c.ListEvaluations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListEvaluationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListEvaluationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListEvaluationsRequest.
	}
	for resp, err := range c.ListEvaluations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*EvaluationClient) ListLocations

ListLocations lists information about the supported locations for this service. This method can be called in two ways:

List all public locations: Use the path GET /v1/locations.

List project-visible locations: Use the path
GET /v1/projects/{project_id}/locations. This may include public
locations as well as private or other locations specifically visible
to the project.
Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*locationpb.ListLocationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	for resp, err := range c.ListLocations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*EvaluationClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*longrunningpb.ListOperationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	for resp, err := range c.ListOperations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*EvaluationClient) ListScheduledEvaluationRuns

ListScheduledEvaluationRuns lists all scheduled evaluation runs in the given app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListScheduledEvaluationRunsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListScheduledEvaluationRunsRequest.
	}
	it := c.ListScheduledEvaluationRuns(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*cespb.ListScheduledEvaluationRunsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ListScheduledEvaluationRunsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ListScheduledEvaluationRunsRequest.
	}
	for resp, err := range c.ListScheduledEvaluationRuns(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*EvaluationClient) RunEvaluation

RunEvaluation runs an evaluation of the app.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.RunEvaluationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#RunEvaluationRequest.
	}
	op, err := c.RunEvaluation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) RunEvaluationOperation

func (c *EvaluationClient) RunEvaluationOperation(name string) *RunEvaluationOperation

RunEvaluationOperation returns a new RunEvaluationOperation from a given name. The name must be that of a previously created RunEvaluationOperation, possibly from a different process.

func (*EvaluationClient) TestPersonaVoice

TestPersonaVoice tests the voice of a persona. Also accepts a default persona.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.TestPersonaVoiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#TestPersonaVoiceRequest.
	}
	resp, err := c.TestPersonaVoice(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) UpdateEvaluation

func (c *EvaluationClient) UpdateEvaluation(ctx context.Context, req *cespb.UpdateEvaluationRequest, opts ...gax.CallOption) (*cespb.Evaluation, error)

UpdateEvaluation updates an evaluation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateEvaluationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateEvaluationRequest.
	}
	resp, err := c.UpdateEvaluation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) UpdateEvaluationDataset

UpdateEvaluationDataset updates an evaluation dataset.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateEvaluationDatasetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateEvaluationDatasetRequest.
	}
	resp, err := c.UpdateEvaluationDataset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) UpdateEvaluationExpectation

UpdateEvaluationExpectation updates an evaluation expectation.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateEvaluationExpectationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateEvaluationExpectationRequest.
	}
	resp, err := c.UpdateEvaluationExpectation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) UpdateScheduledEvaluationRun

UpdateScheduledEvaluationRun updates a scheduled evaluation run.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UpdateScheduledEvaluationRunRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UpdateScheduledEvaluationRunRequest.
	}
	resp, err := c.UpdateScheduledEvaluationRun(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EvaluationClient) UploadEvaluationAudio

UploadEvaluationAudio uploads audio for use in Golden Evaluations. Stores the audio in the Cloud Storage bucket defined in ‘App.logging_settings.evaluation_audio_recording_config.gcs_bucket’ and returns a transcript.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewEvaluationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.UploadEvaluationAudioRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#UploadEvaluationAudioRequest.
	}
	resp, err := c.UploadEvaluationAudio(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type EvaluationDatasetIterator

type EvaluationDatasetIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.EvaluationDataset, nextPageToken string, err error)
	// contains filtered or unexported fields
}

EvaluationDatasetIterator manages a stream of *cespb.EvaluationDataset.

func (*EvaluationDatasetIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*EvaluationDatasetIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*EvaluationDatasetIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type EvaluationExpectationIterator

type EvaluationExpectationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.EvaluationExpectation, nextPageToken string, err error)
	// contains filtered or unexported fields
}

EvaluationExpectationIterator manages a stream of *cespb.EvaluationExpectation.

func (*EvaluationExpectationIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*EvaluationExpectationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*EvaluationExpectationIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type EvaluationIterator

type EvaluationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.Evaluation, nextPageToken string, err error)
	// contains filtered or unexported fields
}

EvaluationIterator manages a stream of *cespb.Evaluation.

func (*EvaluationIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*EvaluationIterator) Next

func (it *EvaluationIterator) Next() (*cespb.Evaluation, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*EvaluationIterator) PageInfo

func (it *EvaluationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type EvaluationResultIterator

type EvaluationResultIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.EvaluationResult, nextPageToken string, err error)
	// contains filtered or unexported fields
}

EvaluationResultIterator manages a stream of *cespb.EvaluationResult.

func (*EvaluationResultIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*EvaluationResultIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*EvaluationResultIterator) PageInfo

func (it *EvaluationResultIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type EvaluationRunIterator

type EvaluationRunIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.EvaluationRun, nextPageToken string, err error)
	// contains filtered or unexported fields
}

EvaluationRunIterator manages a stream of *cespb.EvaluationRun.

func (*EvaluationRunIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*EvaluationRunIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*EvaluationRunIterator) PageInfo

func (it *EvaluationRunIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type ExampleIterator

type ExampleIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.Example, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ExampleIterator manages a stream of *cespb.Example.

func (*ExampleIterator) All

func (it *ExampleIterator) All() iter.Seq2[*cespb.Example, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ExampleIterator) Next

func (it *ExampleIterator) Next() (*cespb.Example, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ExampleIterator) PageInfo

func (it *ExampleIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type ExportAppOperation

type ExportAppOperation struct {
	// contains filtered or unexported fields
}

ExportAppOperation manages a long-running operation from ExportApp.

func (*ExportAppOperation) Done

func (op *ExportAppOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ExportAppOperation) Metadata

func (op *ExportAppOperation) Metadata() (*cespb.OperationMetadata, error)

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ExportAppOperation) Name

func (op *ExportAppOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ExportAppOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ExportAppOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type GenerateEvaluationOperation

type GenerateEvaluationOperation struct {
	// contains filtered or unexported fields
}

GenerateEvaluationOperation manages a long-running operation from GenerateEvaluation.

func (*GenerateEvaluationOperation) Done

func (op *GenerateEvaluationOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*GenerateEvaluationOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*GenerateEvaluationOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*GenerateEvaluationOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*GenerateEvaluationOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type GuardrailIterator

type GuardrailIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.Guardrail, nextPageToken string, err error)
	// contains filtered or unexported fields
}

GuardrailIterator manages a stream of *cespb.Guardrail.

func (*GuardrailIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*GuardrailIterator) Next

func (it *GuardrailIterator) Next() (*cespb.Guardrail, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*GuardrailIterator) PageInfo

func (it *GuardrailIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type ImportAppOperation

type ImportAppOperation struct {
	// contains filtered or unexported fields
}

ImportAppOperation manages a long-running operation from ImportApp.

func (*ImportAppOperation) Done

func (op *ImportAppOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ImportAppOperation) Metadata

func (op *ImportAppOperation) Metadata() (*cespb.OperationMetadata, error)

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ImportAppOperation) Name

func (op *ImportAppOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ImportAppOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ImportAppOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type ImportEvaluationsOperation

type ImportEvaluationsOperation struct {
	// contains filtered or unexported fields
}

ImportEvaluationsOperation manages a long-running operation from ImportEvaluations.

func (*ImportEvaluationsOperation) Done

func (op *ImportEvaluationsOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ImportEvaluationsOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ImportEvaluationsOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ImportEvaluationsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ImportEvaluationsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type LocationIterator

type LocationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)
	// contains filtered or unexported fields
}

LocationIterator manages a stream of *locationpb.Location.

func (*LocationIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*LocationIterator) Next

func (it *LocationIterator) Next() (*locationpb.Location, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*LocationIterator) PageInfo

func (it *LocationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type OperationIterator

type OperationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
	// contains filtered or unexported fields
}

OperationIterator manages a stream of *longrunningpb.Operation.

func (*OperationIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*OperationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*OperationIterator) PageInfo

func (it *OperationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type RestoreAppVersionOperation

type RestoreAppVersionOperation struct {
	// contains filtered or unexported fields
}

RestoreAppVersionOperation manages a long-running operation from RestoreAppVersion.

func (*RestoreAppVersionOperation) Done

func (op *RestoreAppVersionOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*RestoreAppVersionOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*RestoreAppVersionOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*RestoreAppVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*RestoreAppVersionOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type RunEvaluationOperation

type RunEvaluationOperation struct {
	// contains filtered or unexported fields
}

RunEvaluationOperation manages a long-running operation from RunEvaluation.

func (*RunEvaluationOperation) Done

func (op *RunEvaluationOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*RunEvaluationOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*RunEvaluationOperation) Name

func (op *RunEvaluationOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*RunEvaluationOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*RunEvaluationOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type ScheduledEvaluationRunIterator

type ScheduledEvaluationRunIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.ScheduledEvaluationRun, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ScheduledEvaluationRunIterator manages a stream of *cespb.ScheduledEvaluationRun.

func (*ScheduledEvaluationRunIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ScheduledEvaluationRunIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ScheduledEvaluationRunIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type SessionCallOptions

type SessionCallOptions struct {
	RunSession      []gax.CallOption
	BidiRunSession  []gax.CallOption
	GetLocation     []gax.CallOption
	ListLocations   []gax.CallOption
	CancelOperation []gax.CallOption
	DeleteOperation []gax.CallOption
	GetOperation    []gax.CallOption
	ListOperations  []gax.CallOption
}

SessionCallOptions contains the retry settings for each method of SessionClient.

type SessionClient

type SessionClient struct {

	// The call options for this service.
	CallOptions *SessionCallOptions
	// contains filtered or unexported fields
}

SessionClient is a client for interacting with Gemini Enterprise for Customer Experience API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Session service provides APIs for interacting with CES agents.

func NewSessionClient

func NewSessionClient(ctx context.Context, opts ...option.ClientOption) (*SessionClient, error)

NewSessionClient creates a new session service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Session service provides APIs for interacting with CES agents.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewSessionRESTClient

func NewSessionRESTClient(ctx context.Context, opts ...option.ClientOption) (*SessionClient, error)

NewSessionRESTClient creates a new session service rest client.

Session service provides APIs for interacting with CES agents.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*SessionClient) BidiRunSession

BidiRunSession establishes a bidirectional streaming connection with the CES agent. The agent processes continuous multimodal inputs (e.g., text, audio) and generates real-time multimodal output streams.

— Client Request Stream — The client streams requests in the following order:

Initialization: The first message must contain SessionConfig. For audio sessions, this should also include InputAudioConfig and OutputAudioConfig to define audio processing and synthesis parameters.

Interaction: Subsequent messages stream SessionInput containing real-time user input data.

Termination: The client should half-close the stream when there is no more user input. It should also half-close upon receiving EndSession or GoAway from the agent.

— Server Response Stream — For each interaction turn, the agent streams messages in the following sequence:

Speech Recognition (First N messages): Contains RecognitionResult representing the concatenated user speech segments captured so far. This is only populated for audio sessions.

Response (Next M messages): Contains SessionOutput delivering the agent’s response in various modalities (e.g., text, audio).

Turn Completion (Final message of the turn): Contains SessionOutput with turn_completed set to true. This signals the end of the current turn and includes DiagnosticInfo with execution details.

— Audio Best Practices —

Streaming: Stream [audio data][google.cloud.ces.v1beta.SessionInput.audio (at http://google.cloud.ces.v1beta.SessionInput.audio)] CONTINUOUSLY, even during silence. Recommended chunk size: 40-120ms (balances latency vs. efficiency).

Playback & Interruption: Play [audio responses][google.cloud.ces.v1beta.SessionOutput.audio (at http://google.cloud.ces.v1beta.SessionOutput.audio)] upon receipt. Stop playback immediately if an InterruptionSignal is received (e.g., user barge-in or new agent response).

This method is not supported for the REST transport.

Example
package main

import (
	"context"
	"io"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()
	stream, err := c.BidiRunSession(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	go func() {
		reqs := []*cespb.BidiSessionClientMessage{
			// TODO: Create requests.
		}
		for _, req := range reqs {
			if err := stream.Send(req); err != nil {
				// TODO: Handle error.
			}
		}
		stream.CloseSend()
	}()
	for {
		resp, err := stream.Recv()
		if err == io.EOF {
			break
		}
		if err != nil {
			// TODO: handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SessionClient) CancelOperation

func (c *SessionClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error

CancelOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*SessionClient) Close

func (c *SessionClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*SessionClient) Connection deprecated

func (c *SessionClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*SessionClient) DeleteOperation

func (c *SessionClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error

DeleteOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*SessionClient) GetLocation

GetLocation gets information about a location.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SessionClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SessionClient) ListLocations

ListLocations lists information about the supported locations for this service. This method can be called in two ways:

List all public locations: Use the path GET /v1/locations.

List project-visible locations: Use the path
GET /v1/projects/{project_id}/locations. This may include public
locations as well as private or other locations specifically visible
to the project.
Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*locationpb.ListLocationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	for resp, err := range c.ListLocations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SessionClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*longrunningpb.ListOperationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	for resp, err := range c.ListOperations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SessionClient) RunSession

RunSession initiates a single turn interaction with the CES agent within a session.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewSessionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.RunSessionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#RunSessionRequest.
	}
	resp, err := c.RunSession(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type ToolCallOptions

type ToolCallOptions struct {
	ExecuteTool        []gax.CallOption
	RetrieveToolSchema []gax.CallOption
	RetrieveTools      []gax.CallOption
	GetLocation        []gax.CallOption
	ListLocations      []gax.CallOption
	CancelOperation    []gax.CallOption
	DeleteOperation    []gax.CallOption
	GetOperation       []gax.CallOption
	ListOperations     []gax.CallOption
}

ToolCallOptions contains the retry settings for each method of ToolClient.

type ToolClient

type ToolClient struct {

	// The call options for this service.
	CallOptions *ToolCallOptions
	// contains filtered or unexported fields
}

ToolClient is a client for interacting with Gemini Enterprise for Customer Experience API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Tool service provides APIs for interacting with CES tools.

func NewToolClient

func NewToolClient(ctx context.Context, opts ...option.ClientOption) (*ToolClient, error)

NewToolClient creates a new tool service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Tool service provides APIs for interacting with CES tools.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewToolRESTClient

func NewToolRESTClient(ctx context.Context, opts ...option.ClientOption) (*ToolClient, error)

NewToolRESTClient creates a new tool service rest client.

Tool service provides APIs for interacting with CES tools.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ToolClient) CancelOperation

func (c *ToolClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error

CancelOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*ToolClient) Close

func (c *ToolClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ToolClient) Connection deprecated

func (c *ToolClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*ToolClient) DeleteOperation

func (c *ToolClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error

DeleteOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*ToolClient) ExecuteTool

ExecuteTool executes the given tool with the given arguments.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.ExecuteToolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#ExecuteToolRequest.
	}
	resp, err := c.ExecuteTool(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ToolClient) GetLocation

GetLocation gets information about a location.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ToolClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ToolClient) ListLocations

ListLocations lists information about the supported locations for this service. This method can be called in two ways:

List all public locations: Use the path GET /v1/locations.

List project-visible locations: Use the path
GET /v1/projects/{project_id}/locations. This may include public
locations as well as private or other locations specifically visible
to the project.
Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*locationpb.ListLocationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	for resp, err := range c.ListLocations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ToolClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*longrunningpb.ListOperationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	for resp, err := range c.ListOperations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ToolClient) RetrieveToolSchema

RetrieveToolSchema retrieve the schema of the given tool. The schema is computed on the fly for the given instance of the tool.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.RetrieveToolSchemaRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#RetrieveToolSchemaRequest.
	}
	resp, err := c.RetrieveToolSchema(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ToolClient) RetrieveTools

RetrieveTools retrieve the list of tools included in the specified toolset.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewToolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.RetrieveToolsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#RetrieveToolsRequest.
	}
	resp, err := c.RetrieveTools(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type ToolIterator

type ToolIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.Tool, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ToolIterator manages a stream of *cespb.Tool.

func (*ToolIterator) All

func (it *ToolIterator) All() iter.Seq2[*cespb.Tool, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ToolIterator) Next

func (it *ToolIterator) Next() (*cespb.Tool, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ToolIterator) PageInfo

func (it *ToolIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type ToolsetIterator

type ToolsetIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*cespb.Toolset, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ToolsetIterator manages a stream of *cespb.Toolset.

func (*ToolsetIterator) All

func (it *ToolsetIterator) All() iter.Seq2[*cespb.Toolset, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ToolsetIterator) Next

func (it *ToolsetIterator) Next() (*cespb.Toolset, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ToolsetIterator) PageInfo

func (it *ToolsetIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type WidgetCallOptions

type WidgetCallOptions struct {
	GenerateChatToken []gax.CallOption
	GetLocation       []gax.CallOption
	ListLocations     []gax.CallOption
	CancelOperation   []gax.CallOption
	DeleteOperation   []gax.CallOption
	GetOperation      []gax.CallOption
	ListOperations    []gax.CallOption
}

WidgetCallOptions contains the retry settings for each method of WidgetClient.

type WidgetClient

type WidgetClient struct {

	// The call options for this service.
	CallOptions *WidgetCallOptions
	// contains filtered or unexported fields
}

WidgetClient is a client for interacting with Gemini Enterprise for Customer Experience API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Provides APIs for widgets to interact with CES APIs.

func NewWidgetClient

func NewWidgetClient(ctx context.Context, opts ...option.ClientOption) (*WidgetClient, error)

NewWidgetClient creates a new widget service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Provides APIs for widgets to interact with CES APIs.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewWidgetRESTClient

func NewWidgetRESTClient(ctx context.Context, opts ...option.ClientOption) (*WidgetClient, error)

NewWidgetRESTClient creates a new widget service rest client.

Provides APIs for widgets to interact with CES APIs.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*WidgetClient) CancelOperation

func (c *WidgetClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error

CancelOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*WidgetClient) Close

func (c *WidgetClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*WidgetClient) Connection deprecated

func (c *WidgetClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*WidgetClient) DeleteOperation

func (c *WidgetClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error

DeleteOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*WidgetClient) GenerateChatToken

GenerateChatToken generates a session scoped token for chat widget to authenticate with Session APIs.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	cespb "cloud.google.com/go/ces/apiv1beta/cespb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &cespb.GenerateChatTokenRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/ces/apiv1beta/cespb#GenerateChatTokenRequest.
	}
	resp, err := c.GenerateChatToken(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*WidgetClient) GetLocation

GetLocation gets information about a location.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*WidgetClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*WidgetClient) ListLocations

ListLocations lists information about the supported locations for this service. This method can be called in two ways:

List all public locations: Use the path GET /v1/locations.

List project-visible locations: Use the path
GET /v1/projects/{project_id}/locations. This may include public
locations as well as private or other locations specifically visible
to the project.
Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*locationpb.ListLocationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	for resp, err := range c.ListLocations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*WidgetClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*longrunningpb.ListOperationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	ces "cloud.google.com/go/ces/apiv1beta"
	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := ces.NewWidgetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	for resp, err := range c.ListOperations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL