1.89.1 (latest) 1.89.0 1.88.0 1.87.0 1.86.0 1.85.0 1.84.0 1.83.0 1.82.0 1.81.0 1.80.0 1.79.0 1.78.0 1.77.0 1.76.0 1.75.0 1.74.0 1.73.0 1.72.0 1.71.0 1.70.0 1.69.1 1.68.2 1.67.0 1.66.0 1.65.0 1.64.1 1.63.0 1.62.0 1.61.0 1.60.0 1.59.0 1.58.1 1.57.1 1.56.0 1.55.0 1.54.3 1.53.0 1.52.0 1.51.0 1.50.0 1.49.0 1.48.2 1.47.0 1.46.0 1.45.0 1.44.3 1.42.0 1.41.0 1.40.1 1.39.0 1.38.0 1.37.0 1.36.0 1.35.0 1.34.0 1.33.0 1.32.1 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.23.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.0 1.16.1 1.15.0 1.14.0 1.13.0 1.12.1 1.11.0 1.10.0 1.9.0 1.8.1 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

> [!NOTE]
> **Note:** To get more information about this package, such as access to older versions, view [this package on pkg.go.dev](https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1).

<br />

Package dialogflow is an auto-generated package for the
Dialogflow API.

Builds conversational interfaces (for example, chatbots, and voice-powered
apps and devices).

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

<br />

## 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:

- [Authentication and Authorization](https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization)
- [Timeouts and Cancellation](https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation)
- [Testing against Client Libraries](https://pkg.go.dev/cloud.google.com/go#hdr-Testing)
- [Debugging Client Libraries](https://pkg.go.dev/cloud.google.com/go#hdr-Debugging)
- [Inspecting errors](https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors)

## Example usage

To get started with this package, create a client.

```go
// go get cloud.google.com/go/dialogflow/apiv2beta1@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 := dialogflow.NewAgentsClient(ctx)
if err != nil {
    // TODO: Handle error.
}
defer c.Close()
```

<br />

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.

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

<br />

## Use of Context

The ctx passed to NewAgentsClient 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.

## Functions

### func DefaultAuthScopes

    func DefaultAuthScopes() []https://pkg.go.dev/builtin#string

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

## 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Agent, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

AgentIterator manages a stream of \*dialogflowpb.Agent.

### func (\*AgentIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentIterator) All() iter.Seq2[*dialogflowpb.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 *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Agent, https://pkg.go.dev/builtin#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 *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentIterator) PageInfo() *iterator.PageInfo

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

## AgentsCallOptions

    type AgentsCallOptions struct {
    	GetAgent            []gax.CallOption
    	SetAgent            []gax.CallOption
    	DeleteAgent         []gax.CallOption
    	SearchAgents        []gax.CallOption
    	TrainAgent          []gax.CallOption
    	ExportAgent         []gax.CallOption
    	ImportAgent         []gax.CallOption
    	RestoreAgent        []gax.CallOption
    	GetValidationResult []gax.CallOption
    	GetLocation         []gax.CallOption
    	ListLocations       []gax.CallOption
    	CancelOperation     []gax.CallOption
    	GetOperation        []gax.CallOption
    	ListOperations      []gax.CallOption
    }

AgentsCallOptions contains the retry settings for each method of AgentsClient.

## AgentsClient

    type AgentsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsCallOptions

    	// 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
    }

AgentsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing Agents.

### func NewAgentsClient

    func NewAgentsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient, https://pkg.go.dev/builtin#error)

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

Service for managing Agents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewAgentsRESTClient

    func NewAgentsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient, https://pkg.go.dev/builtin#error)

NewAgentsRESTClient creates a new agents rest client.

Service for managing Agents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient_NewAgentsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*AgentsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*AgentsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*AgentsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) 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 (\*AgentsClient) DeleteAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) DeleteAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteAgent deletes the specified agent.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*AgentsClient) ExportAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) ExportAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ExportAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ExportAgentOperation, https://pkg.go.dev/builtin#error)

ExportAgent exports the specified agent to a ZIP file.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response:
    ExportAgentResponse

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ExportAgentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ExportAgentRequest.
    	}
    	op, err := c.ExportAgent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*AgentsClient) ExportAgentOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) ExportAgentOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ExportAgentOperation

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

### func (\*AgentsClient) GetAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) GetAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Agent, https://pkg.go.dev/builtin#error)

GetAgent retrieves the specified agent.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*AgentsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAgentsClient(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 (\*AgentsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*AgentsClient) GetValidationResult

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) GetValidationResult(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetValidationResultRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ValidationResult, https://pkg.go.dev/builtin#error)

GetValidationResult gets agent validation result. Agent validation is performed during
training time and is updated automatically when training is completed.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetValidationResultRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetValidationResultRequest.
    	}
    	resp, err := c.GetValidationResult(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*AgentsClient) ImportAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) ImportAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ImportAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportAgentOperation, https://pkg.go.dev/builtin#error)

ImportAgent imports the specified agent from a ZIP file.

Uploads new intents and entity types without deleting the existing ones.
Intents and entity types with the same name are replaced with the new
versions from
ImportAgentRequest.
After the import, the imported draft agent will be trained automatically
(unless disabled in agent settings). However, once the import is done,
training may not be completed yet. Please call
TrainAgent and wait
for the operation it returns in order to train explicitly.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response: An Empty
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

The operation only tracks when importing is complete, not when it is done
training.

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ImportAgentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ImportAgentRequest.
    	}
    	op, err := c.ImportAgent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*AgentsClient) ImportAgentOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) ImportAgentOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportAgentOperation

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

### func (\*AgentsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewAgentsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAgentsClient(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 (\*AgentsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*AgentsClient) RestoreAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) RestoreAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_RestoreAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_RestoreAgentOperation, https://pkg.go.dev/builtin#error)

RestoreAgent restores the specified agent from a ZIP file.

Replaces the current agent version with a new one. All the intents and
entity types in the older version are deleted. After the restore, the
restored draft agent will be trained automatically (unless disabled in
agent settings). However, once the restore is done, training may not be
completed yet. Please call
TrainAgent and wait
for the operation it returns in order to train explicitly.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response: An Empty
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

The operation only tracks when restoring is complete, not when it is done
training.

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.RestoreAgentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#RestoreAgentRequest.
    	}
    	op, err := c.RestoreAgent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*AgentsClient) RestoreAgentOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) RestoreAgentOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_RestoreAgentOperation

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

### func (\*AgentsClient) SearchAgents

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) SearchAgents(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SearchAgentsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentIterator

SearchAgents returns the list of agents.
Since there is at most one conversational agent per project, this method is
useful primarily for listing all agents across projects the caller has
access to. One can achieve that with a wildcard project collection id "-".
Refer to List
Sub-Collections (at <https://cloud.google.com/apis/design/design_patterns#list_sub-collections>).

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.SearchAgentsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#SearchAgentsRequest.
    	}
    	it := c.SearchAgents(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.(*dialogflowpb.SearchAgentsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*AgentsClient) SetAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) SetAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SetAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Agent, https://pkg.go.dev/builtin#error)

SetAgent creates/updates the specified agent.

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.SetAgentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#SetAgentRequest.
    	}
    	resp, err := c.SetAgent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*AgentsClient) TrainAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) TrainAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_TrainAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_TrainAgentOperation, https://pkg.go.dev/builtin#error)

TrainAgent trains the specified agent.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response: An Empty
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.TrainAgentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#TrainAgentRequest.
    	}
    	op, err := c.TrainAgent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*AgentsClient) TrainAgentOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AgentsClient) TrainAgentOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_TrainAgentOperation

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

## AnswerRecordIterator

    type AnswerRecordIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.AnswerRecord, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

AnswerRecordIterator manages a stream of \*dialogflowpb.AnswerRecord.

### func (\*AnswerRecordIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordIterator) All() iter.Seq2[*dialogflowpb.AnswerRecord, error]

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

### func (\*AnswerRecordIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_AnswerRecord, https://pkg.go.dev/builtin#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 (\*AnswerRecordIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordIterator) PageInfo() *iterator.PageInfo

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

## AnswerRecordsCallOptions

    type AnswerRecordsCallOptions struct {
    	GetAnswerRecord    []gax.CallOption
    	ListAnswerRecords  []gax.CallOption
    	UpdateAnswerRecord []gax.CallOption
    	GetLocation        []gax.CallOption
    	ListLocations      []gax.CallOption
    	CancelOperation    []gax.CallOption
    	GetOperation       []gax.CallOption
    	ListOperations     []gax.CallOption
    }

AnswerRecordsCallOptions contains the retry settings for each method of AnswerRecordsClient.

## AnswerRecordsClient

    type AnswerRecordsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsCallOptions
    	// contains filtered or unexported fields
    }

AnswerRecordsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing
AnswerRecords.

### func NewAnswerRecordsClient

    func NewAnswerRecordsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient, https://pkg.go.dev/builtin#error)

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

Service for managing
AnswerRecords.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewAnswerRecordsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewAnswerRecordsRESTClient

    func NewAnswerRecordsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient, https://pkg.go.dev/builtin#error)

NewAnswerRecordsRESTClient creates a new answer records rest client.

Service for managing
AnswerRecords.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient_NewAnswerRecordsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*AnswerRecordsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAnswerRecordsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*AnswerRecordsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*AnswerRecordsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient) 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 (\*AnswerRecordsClient) GetAnswerRecord
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient) GetAnswerRecord(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetAnswerRecordRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_AnswerRecord, https://pkg.go.dev/builtin#error)

GetAnswerRecord deprecated.
Retrieves a specific answer record.

Deprecated: GetAnswerRecord may be removed in a future version.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAnswerRecordsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetAnswerRecordRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetAnswerRecordRequest.
    	}
    	resp, err := c.GetAnswerRecord(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*AnswerRecordsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAnswerRecordsClient(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 (\*AnswerRecordsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAnswerRecordsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*AnswerRecordsClient) ListAnswerRecords

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient) ListAnswerRecords(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListAnswerRecordsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordIterator

ListAnswerRecords returns the list of all answer records in the specified project in reverse
chronological order.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewAnswerRecordsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListAnswerRecordsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListAnswerRecordsRequest.
    	}
    	it := c.ListAnswerRecords(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.(*dialogflowpb.ListAnswerRecordsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAnswerRecordsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*AnswerRecordsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewAnswerRecordsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAnswerRecordsClient(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 (\*AnswerRecordsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAnswerRecordsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewAnswerRecordsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*AnswerRecordsClient) UpdateAnswerRecord

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_AnswerRecordsClient) UpdateAnswerRecord(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateAnswerRecordRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_AnswerRecord, https://pkg.go.dev/builtin#error)

UpdateAnswerRecord updates the specified answer record.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewAnswerRecordsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateAnswerRecordRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateAnswerRecordRequest.
    	}
    	resp, err := c.UpdateAnswerRecord(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## BatchCreateEntitiesOperation

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

BatchCreateEntitiesOperation manages a long-running operation from BatchCreateEntities.

### func (\*BatchCreateEntitiesOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchCreateEntitiesOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*BatchCreateEntitiesOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchCreateEntitiesOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*BatchCreateEntitiesOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchCreateEntitiesOperation) Name() https://pkg.go.dev/builtin#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 (\*BatchCreateEntitiesOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchCreateEntitiesOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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 (\*BatchCreateEntitiesOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchCreateEntitiesOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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.

## BatchDeleteEntitiesOperation

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

BatchDeleteEntitiesOperation manages a long-running operation from BatchDeleteEntities.

### func (\*BatchDeleteEntitiesOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntitiesOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*BatchDeleteEntitiesOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntitiesOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*BatchDeleteEntitiesOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntitiesOperation) Name() https://pkg.go.dev/builtin#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 (\*BatchDeleteEntitiesOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntitiesOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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 (\*BatchDeleteEntitiesOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntitiesOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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.

## BatchDeleteEntityTypesOperation

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

BatchDeleteEntityTypesOperation manages a long-running operation from BatchDeleteEntityTypes.

### func (\*BatchDeleteEntityTypesOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntityTypesOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*BatchDeleteEntityTypesOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntityTypesOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*BatchDeleteEntityTypesOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntityTypesOperation) Name() https://pkg.go.dev/builtin#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 (\*BatchDeleteEntityTypesOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntityTypesOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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 (\*BatchDeleteEntityTypesOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntityTypesOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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.

## BatchDeleteIntentsOperation

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

BatchDeleteIntentsOperation manages a long-running operation from BatchDeleteIntents.

### func (\*BatchDeleteIntentsOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchDeleteIntentsOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*BatchDeleteIntentsOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchDeleteIntentsOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*BatchDeleteIntentsOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchDeleteIntentsOperation) Name() https://pkg.go.dev/builtin#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 (\*BatchDeleteIntentsOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchDeleteIntentsOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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 (\*BatchDeleteIntentsOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchDeleteIntentsOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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.

## BatchUpdateEntitiesOperation

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

BatchUpdateEntitiesOperation manages a long-running operation from BatchUpdateEntities.

### func (\*BatchUpdateEntitiesOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntitiesOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*BatchUpdateEntitiesOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntitiesOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*BatchUpdateEntitiesOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntitiesOperation) Name() https://pkg.go.dev/builtin#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 (\*BatchUpdateEntitiesOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntitiesOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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 (\*BatchUpdateEntitiesOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntitiesOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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.

## BatchUpdateEntityTypesOperation

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

BatchUpdateEntityTypesOperation manages a long-running operation from BatchUpdateEntityTypes.

### func (\*BatchUpdateEntityTypesOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntityTypesOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*BatchUpdateEntityTypesOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntityTypesOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*BatchUpdateEntityTypesOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntityTypesOperation) Name() https://pkg.go.dev/builtin#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 (\*BatchUpdateEntityTypesOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntityTypesOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchUpdateEntityTypesResponse, https://pkg.go.dev/builtin#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 (\*BatchUpdateEntityTypesOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntityTypesOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchUpdateEntityTypesResponse, https://pkg.go.dev/builtin#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.

## BatchUpdateIntentsOperation

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

BatchUpdateIntentsOperation manages a long-running operation from BatchUpdateIntents.

### func (\*BatchUpdateIntentsOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchUpdateIntentsOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*BatchUpdateIntentsOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchUpdateIntentsOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*BatchUpdateIntentsOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchUpdateIntentsOperation) Name() https://pkg.go.dev/builtin#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 (\*BatchUpdateIntentsOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchUpdateIntentsOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchUpdateIntentsResponse, https://pkg.go.dev/builtin#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 (\*BatchUpdateIntentsOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchUpdateIntentsOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchUpdateIntentsResponse, https://pkg.go.dev/builtin#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.

## ClearSuggestionFeatureConfigOperation

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

ClearSuggestionFeatureConfigOperation manages a long-running operation from ClearSuggestionFeatureConfig.

### func (\*ClearSuggestionFeatureConfigOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient_ClearSuggestionFeatureConfigOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*ClearSuggestionFeatureConfigOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient_ClearSuggestionFeatureConfigOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ClearSuggestionFeatureConfigOperationMetadata, https://pkg.go.dev/builtin#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 (\*ClearSuggestionFeatureConfigOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient_ClearSuggestionFeatureConfigOperation) Name() https://pkg.go.dev/builtin#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 (\*ClearSuggestionFeatureConfigOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient_ClearSuggestionFeatureConfigOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ConversationProfile, https://pkg.go.dev/builtin#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 (\*ClearSuggestionFeatureConfigOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient_ClearSuggestionFeatureConfigOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ConversationProfile, https://pkg.go.dev/builtin#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.

## CompanionAgentIterator

    type CompanionAgentIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.CompanionAgent, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

CompanionAgentIterator manages a stream of \*dialogflowpb.CompanionAgent.

### func (\*CompanionAgentIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentIterator) All() iter.Seq2[*dialogflowpb.CompanionAgent, error]

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

### func (\*CompanionAgentIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CompanionAgent, https://pkg.go.dev/builtin#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 (\*CompanionAgentIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentIterator) PageInfo() *iterator.PageInfo

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

## CompanionAgentsCallOptions

    type CompanionAgentsCallOptions struct {
    	CreateCompanionAgent []gax.CallOption
    	GetCompanionAgent    []gax.CallOption
    	UpdateCompanionAgent []gax.CallOption
    	DeleteCompanionAgent []gax.CallOption
    	ListCompanionAgents  []gax.CallOption
    	GetLocation          []gax.CallOption
    	ListLocations        []gax.CallOption
    	CancelOperation      []gax.CallOption
    	GetOperation         []gax.CallOption
    	ListOperations       []gax.CallOption
    }

CompanionAgentsCallOptions contains the retry settings for each method of CompanionAgentsClient.

## CompanionAgentsClient

    type CompanionAgentsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsCallOptions
    	// contains filtered or unexported fields
    }

CompanionAgentsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing companion agents.

### func NewCompanionAgentsClient

    func NewCompanionAgentsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient, https://pkg.go.dev/builtin#error)

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

Service for managing companion agents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewCompanionAgentsRESTClient

    func NewCompanionAgentsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient, https://pkg.go.dev/builtin#error)

NewCompanionAgentsRESTClient creates a new companion agents rest client.

Service for managing companion agents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient_NewCompanionAgentsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*CompanionAgentsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*CompanionAgentsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*CompanionAgentsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) 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 (\*CompanionAgentsClient) CreateCompanionAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) CreateCompanionAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateCompanionAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CompanionAgent, https://pkg.go.dev/builtin#error)

CreateCompanionAgent creates a companion agent.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateCompanionAgentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateCompanionAgentRequest.
    	}
    	resp, err := c.CreateCompanionAgent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*CompanionAgentsClient) DeleteCompanionAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) DeleteCompanionAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteCompanionAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteCompanionAgent deletes a companion agent.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteCompanionAgentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteCompanionAgentRequest.
    	}
    	err = c.DeleteCompanionAgent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*CompanionAgentsClient) GetCompanionAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) GetCompanionAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetCompanionAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CompanionAgent, https://pkg.go.dev/builtin#error)

GetCompanionAgent gets a companion agent.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetCompanionAgentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetCompanionAgentRequest.
    	}
    	resp, err := c.GetCompanionAgent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*CompanionAgentsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewCompanionAgentsClient(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 (\*CompanionAgentsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*CompanionAgentsClient) ListCompanionAgents

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) ListCompanionAgents(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListCompanionAgentsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentIterator

ListCompanionAgents lists companion agents.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListCompanionAgentsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListCompanionAgentsRequest.
    	}
    	it := c.ListCompanionAgents(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.(*dialogflowpb.ListCompanionAgentsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*CompanionAgentsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewCompanionAgentsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewCompanionAgentsClient(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 (\*CompanionAgentsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*CompanionAgentsClient) UpdateCompanionAgent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_CompanionAgentsClient) UpdateCompanionAgent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateCompanionAgentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CompanionAgent, https://pkg.go.dev/builtin#error)

UpdateCompanionAgent updates a companion agent.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewCompanionAgentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateCompanionAgentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateCompanionAgentRequest.
    	}
    	resp, err := c.UpdateCompanionAgent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## ContextIterator

    type ContextIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Context, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

ContextIterator manages a stream of \*dialogflowpb.Context.

### func (\*ContextIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextIterator) All() iter.Seq2[*dialogflowpb.Context, error]

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

### func (\*ContextIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Context, https://pkg.go.dev/builtin#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 (\*ContextIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextIterator) PageInfo() *iterator.PageInfo

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

## ContextsCallOptions

    type ContextsCallOptions struct {
    	ListContexts      []gax.CallOption
    	GetContext        []gax.CallOption
    	CreateContext     []gax.CallOption
    	UpdateContext     []gax.CallOption
    	DeleteContext     []gax.CallOption
    	DeleteAllContexts []gax.CallOption
    	GetLocation       []gax.CallOption
    	ListLocations     []gax.CallOption
    	CancelOperation   []gax.CallOption
    	GetOperation      []gax.CallOption
    	ListOperations    []gax.CallOption
    }

ContextsCallOptions contains the retry settings for each method of ContextsClient.

## ContextsClient

    type ContextsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsCallOptions
    	// contains filtered or unexported fields
    }

ContextsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing Contexts.

### func NewContextsClient

    func NewContextsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient, https://pkg.go.dev/builtin#error)

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

Service for managing Contexts.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewContextsRESTClient

    func NewContextsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient, https://pkg.go.dev/builtin#error)

NewContextsRESTClient creates a new contexts rest client.

Service for managing Contexts.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient_NewContextsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*ContextsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ContextsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*ContextsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) 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 (\*ContextsClient) CreateContext

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) CreateContext(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateContextRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Context, https://pkg.go.dev/builtin#error)

CreateContext creates a context.

If the specified context already exists, overrides the context.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateContextRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateContextRequest.
    	}
    	resp, err := c.CreateContext(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ContextsClient) DeleteAllContexts

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) DeleteAllContexts(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteAllContextsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteAllContexts deletes all active contexts in the specified session.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteAllContextsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteAllContextsRequest.
    	}
    	err = c.DeleteAllContexts(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*ContextsClient) DeleteContext

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) DeleteContext(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteContextRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteContext deletes the specified context.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteContextRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteContextRequest.
    	}
    	err = c.DeleteContext(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*ContextsClient) GetContext

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) GetContext(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetContextRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Context, https://pkg.go.dev/builtin#error)

GetContext retrieves the specified context.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetContextRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetContextRequest.
    	}
    	resp, err := c.GetContext(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ContextsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewContextsClient(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 (\*ContextsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ContextsClient) ListContexts

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) ListContexts(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListContextsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextIterator

ListContexts returns the list of all contexts in the specified session.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListContextsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListContextsRequest.
    	}
    	it := c.ListContexts(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.(*dialogflowpb.ListContextsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ContextsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewContextsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewContextsClient(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 (\*ContextsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*ContextsClient) UpdateContext

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ContextsClient) UpdateContext(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateContextRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Context, https://pkg.go.dev/builtin#error)

UpdateContext updates the specified context.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewContextsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateContextRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateContextRequest.
    	}
    	resp, err := c.UpdateContext(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Conversation, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

ConversationIterator manages a stream of \*dialogflowpb.Conversation.

### func (\*ConversationIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationIterator) All() iter.Seq2[*dialogflowpb.Conversation, error]

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

### func (\*ConversationIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Conversation, https://pkg.go.dev/builtin#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 (\*ConversationIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationIterator) PageInfo() *iterator.PageInfo

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

## ConversationProfileIterator

    type ConversationProfileIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.ConversationProfile, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

ConversationProfileIterator manages a stream of \*dialogflowpb.ConversationProfile.

### func (\*ConversationProfileIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfileIterator) All() iter.Seq2[*dialogflowpb.ConversationProfile, error]

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

### func (\*ConversationProfileIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfileIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ConversationProfile, https://pkg.go.dev/builtin#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 (\*ConversationProfileIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfileIterator) PageInfo() *iterator.PageInfo

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

## ConversationProfilesCallOptions

    type ConversationProfilesCallOptions struct {
    	ListConversationProfiles     []gax.CallOption
    	GetConversationProfile       []gax.CallOption
    	CreateConversationProfile    []gax.CallOption
    	UpdateConversationProfile    []gax.CallOption
    	DeleteConversationProfile    []gax.CallOption
    	SetSuggestionFeatureConfig   []gax.CallOption
    	ClearSuggestionFeatureConfig []gax.CallOption
    	GetLocation                  []gax.CallOption
    	ListLocations                []gax.CallOption
    	CancelOperation              []gax.CallOption
    	GetOperation                 []gax.CallOption
    	ListOperations               []gax.CallOption
    }

ConversationProfilesCallOptions contains the retry settings for each method of ConversationProfilesClient.

## ConversationProfilesClient

    type ConversationProfilesClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesCallOptions

    	// 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
    }

ConversationProfilesClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing
ConversationProfiles.

### func NewConversationProfilesClient

    func NewConversationProfilesClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient, https://pkg.go.dev/builtin#error)

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

Service for managing
ConversationProfiles.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewConversationProfilesRESTClient

    func NewConversationProfilesRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient, https://pkg.go.dev/builtin#error)

NewConversationProfilesRESTClient creates a new conversation profiles rest client.

Service for managing
ConversationProfiles.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient_NewConversationProfilesRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*ConversationProfilesClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ConversationProfilesClient) ClearSuggestionFeatureConfig

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) ClearSuggestionFeatureConfig(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ClearSuggestionFeatureConfigRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient_ClearSuggestionFeatureConfigOperation, https://pkg.go.dev/builtin#error)

ClearSuggestionFeatureConfig clears a suggestion feature from a conversation profile for the given
participant role.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata:
    ClearSuggestionFeatureConfigOperationMetadata

    response:
    ConversationProfile

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ClearSuggestionFeatureConfigRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ClearSuggestionFeatureConfigRequest.
    	}
    	op, err := c.ClearSuggestionFeatureConfig(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*ConversationProfilesClient) ClearSuggestionFeatureConfigOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) ClearSuggestionFeatureConfigOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient_ClearSuggestionFeatureConfigOperation

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

### func (\*ConversationProfilesClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*ConversationProfilesClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) 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 (\*ConversationProfilesClient) CreateConversationProfile

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) CreateConversationProfile(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateConversationProfileRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ConversationProfile, https://pkg.go.dev/builtin#error)

CreateConversationProfile creates a conversation profile in the specified project.

ConversationProfile.CreateTime and ConversationProfile.UpdateTime
aren't populated in the response. You can retrieve them via
GetConversationProfile
API.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateConversationProfileRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateConversationProfileRequest.
    	}
    	resp, err := c.CreateConversationProfile(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ConversationProfilesClient) DeleteConversationProfile

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) DeleteConversationProfile(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteConversationProfileRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteConversationProfile deletes the specified conversation profile.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteConversationProfileRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteConversationProfileRequest.
    	}
    	err = c.DeleteConversationProfile(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*ConversationProfilesClient) GetConversationProfile

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) GetConversationProfile(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetConversationProfileRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ConversationProfile, https://pkg.go.dev/builtin#error)

GetConversationProfile retrieves the specified conversation profile.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetConversationProfileRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetConversationProfileRequest.
    	}
    	resp, err := c.GetConversationProfile(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ConversationProfilesClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationProfilesClient(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 (\*ConversationProfilesClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ConversationProfilesClient) ListConversationProfiles

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) ListConversationProfiles(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListConversationProfilesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfileIterator

ListConversationProfiles returns the list of all conversation profiles in the specified project.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListConversationProfilesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListConversationProfilesRequest.
    	}
    	it := c.ListConversationProfiles(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.(*dialogflowpb.ListConversationProfilesResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ConversationProfilesClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewConversationProfilesClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationProfilesClient(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 (\*ConversationProfilesClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*ConversationProfilesClient) SetSuggestionFeatureConfig

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) SetSuggestionFeatureConfig(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SetSuggestionFeatureConfigRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SetSuggestionFeatureConfigOperation, https://pkg.go.dev/builtin#error)

SetSuggestionFeatureConfig adds or updates a suggestion feature in a conversation profile.
If the conversation profile contains the type of suggestion feature for
the participant role, it will update it. Otherwise it will insert the
suggestion feature.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata:
    SetSuggestionFeatureConfigOperationMetadata

    response:
    ConversationProfile

If a long running operation to add or update suggestion feature
config for the same conversation profile, participant role and suggestion
feature type exists, please cancel the existing long running operation
before sending such request, otherwise the request will be rejected.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.SetSuggestionFeatureConfigRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#SetSuggestionFeatureConfigRequest.
    	}
    	op, err := c.SetSuggestionFeatureConfig(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*ConversationProfilesClient) SetSuggestionFeatureConfigOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) SetSuggestionFeatureConfigOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SetSuggestionFeatureConfigOperation

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

### func (\*ConversationProfilesClient) UpdateConversationProfile

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationProfilesClient) UpdateConversationProfile(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateConversationProfileRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ConversationProfile, https://pkg.go.dev/builtin#error)

UpdateConversationProfile updates the specified conversation profile.

ConversationProfile.CreateTime and ConversationProfile.UpdateTime
aren't populated in the response. You can retrieve them via
GetConversationProfile
API.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationProfilesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateConversationProfileRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateConversationProfileRequest.
    	}
    	resp, err := c.UpdateConversationProfile(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## ConversationsCallOptions

    type ConversationsCallOptions struct {
    	CreateConversation          []gax.CallOption
    	ListConversations           []gax.CallOption
    	GetConversation             []gax.CallOption
    	CompleteConversation        []gax.CallOption
    	IngestContextReferences     []gax.CallOption
    	BatchCreateMessages         []gax.CallOption
    	ListMessages                []gax.CallOption
    	SuggestConversationSummary  []gax.CallOption
    	GenerateStatelessSummary    []gax.CallOption
    	GenerateStatelessSuggestion []gax.CallOption
    	SearchKnowledge             []gax.CallOption
    	GenerateSuggestions         []gax.CallOption
    	GetLocation                 []gax.CallOption
    	ListLocations               []gax.CallOption
    	CancelOperation             []gax.CallOption
    	GetOperation                []gax.CallOption
    	ListOperations              []gax.CallOption
    }

ConversationsCallOptions contains the retry settings for each method of ConversationsClient.

## ConversationsClient

    type ConversationsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsCallOptions
    	// contains filtered or unexported fields
    }

ConversationsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing
Conversations.

### func NewConversationsClient

    func NewConversationsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient, https://pkg.go.dev/builtin#error)

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

Service for managing
Conversations.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewConversationsRESTClient

    func NewConversationsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient, https://pkg.go.dev/builtin#error)

NewConversationsRESTClient creates a new conversations rest client.

Service for managing
Conversations.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient_NewConversationsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*ConversationsClient) BatchCreateMessages

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) BatchCreateMessages(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchCreateMessagesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchCreateMessagesResponse, https://pkg.go.dev/builtin#error)

BatchCreateMessages batch ingests messages to conversation. Customers can use this RPC to
ingest historical messages to conversation.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.BatchCreateMessagesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#BatchCreateMessagesRequest.
    	}
    	resp, err := c.BatchCreateMessages(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ConversationsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ConversationsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*ConversationsClient) CompleteConversation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) CompleteConversation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CompleteConversationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Conversation, https://pkg.go.dev/builtin#error)

CompleteConversation completes the specified conversation. Finished conversations are purged
from the database after 30 days.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CompleteConversationRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CompleteConversationRequest.
    	}
    	resp, err := c.CompleteConversation(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ConversationsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) 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 (\*ConversationsClient) CreateConversation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) CreateConversation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateConversationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Conversation, https://pkg.go.dev/builtin#error)

CreateConversation creates a new conversation. Conversations are auto-completed after 24
hours.

Conversation Lifecycle:
There are two stages during a conversation: Automated Agent Stage and
Assist Stage.

For Automated Agent Stage, there will be a dialogflow agent responding to
user queries.

For Assist Stage, there's no dialogflow agent responding to user queries.
But we will provide suggestions which are generated from conversation.

If
Conversation.conversation_profile
is configured for a dialogflow agent, conversation will start from
Automated Agent Stage, otherwise, it will start from Assist Stage. And
during Automated Agent Stage, once an
Intent with
Intent.live_agent_handoff
is triggered, conversation will transfer to Assist Stage.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateConversationRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateConversationRequest.
    	}
    	resp, err := c.CreateConversation(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ConversationsClient) GenerateStatelessSuggestion

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) GenerateStatelessSuggestion(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GenerateStatelessSuggestionRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GenerateStatelessSuggestionResponse, https://pkg.go.dev/builtin#error)

GenerateStatelessSuggestion generates and returns a suggestion for a conversation that does not have a
resource created for it.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GenerateStatelessSuggestionRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GenerateStatelessSuggestionRequest.
    	}
    	resp, err := c.GenerateStatelessSuggestion(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ConversationsClient) GenerateStatelessSummary

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) GenerateStatelessSummary(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GenerateStatelessSummaryRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GenerateStatelessSummaryResponse, https://pkg.go.dev/builtin#error)

GenerateStatelessSummary generates and returns a summary for a conversation that does not have a
resource created for it.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GenerateStatelessSummaryRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GenerateStatelessSummaryRequest.
    	}
    	resp, err := c.GenerateStatelessSummary(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ConversationsClient) GenerateSuggestions

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) GenerateSuggestions(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GenerateSuggestionsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GenerateSuggestionsResponse, https://pkg.go.dev/builtin#error)

GenerateSuggestions generates all the suggestions using generators configured in the
conversation profile. A generator is used only if its trigger event is
matched.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GenerateSuggestionsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GenerateSuggestionsRequest.
    	}
    	resp, err := c.GenerateSuggestions(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ConversationsClient) GetConversation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) GetConversation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetConversationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Conversation, https://pkg.go.dev/builtin#error)

GetConversation retrieves the specific conversation.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ConversationsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationsClient(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 (\*ConversationsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ConversationsClient) IngestContextReferences

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) IngestContextReferences(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_IngestContextReferencesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_IngestContextReferencesResponse, https://pkg.go.dev/builtin#error)

IngestContextReferences data ingestion API.
Ingests context references for an existing conversation.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.IngestContextReferencesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#IngestContextReferencesRequest.
    	}
    	resp, err := c.IngestContextReferences(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ConversationsClient) ListConversations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) ListConversations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListConversationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationIterator

ListConversations returns the list of all conversations in the specified project.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListConversationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#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.(*dialogflowpb.ListConversationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListConversationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#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 (\*ConversationsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewConversationsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationsClient(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 (\*ConversationsClient) ListMessages

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) ListMessages(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListMessagesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_MessageIterator

ListMessages lists messages that belong to a given conversation.
messages are ordered by create_time in descending order. To fetch
updates without duplication, send request with filter
create_time_epoch_microseconds \> \[first item's create_time of previous request\] and empty page_token.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListMessagesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListMessagesRequest.
    	}
    	it := c.ListMessages(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.(*dialogflowpb.ListMessagesResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ConversationsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*ConversationsClient) SearchKnowledge

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) SearchKnowledge(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SearchKnowledgeRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SearchKnowledgeResponse, https://pkg.go.dev/builtin#error)

SearchKnowledge get answers for the given query based on knowledge documents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.SearchKnowledgeRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#SearchKnowledgeRequest.
    	}
    	resp, err := c.SearchKnowledge(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ConversationsClient) SuggestConversationSummary

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ConversationsClient) SuggestConversationSummary(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SuggestConversationSummaryRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SuggestConversationSummaryResponse, https://pkg.go.dev/builtin#error)

SuggestConversationSummary suggest summary for a conversation based on specific historical messages.
The range of the messages to be used for summary can be specified in the
request.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewConversationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.SuggestConversationSummaryRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#SuggestConversationSummaryRequest.
    	}
    	resp, err := c.SuggestConversationSummary(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## CreateDocumentOperation

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

CreateDocumentOperation manages a long-running operation from CreateDocument.

### func (\*CreateDocumentOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_CreateDocumentOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*CreateDocumentOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_CreateDocumentOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_KnowledgeOperationMetadata, https://pkg.go.dev/builtin#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 (\*CreateDocumentOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_CreateDocumentOperation) Name() https://pkg.go.dev/builtin#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 (\*CreateDocumentOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_CreateDocumentOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Document, https://pkg.go.dev/builtin#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 (\*CreateDocumentOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_CreateDocumentOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Document, https://pkg.go.dev/builtin#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.

## CreateGeneratorEvaluationOperation

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

CreateGeneratorEvaluationOperation manages a long-running operation from CreateGeneratorEvaluation.

### func (\*CreateGeneratorEvaluationOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient_CreateGeneratorEvaluationOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*CreateGeneratorEvaluationOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient_CreateGeneratorEvaluationOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GeneratorEvaluationOperationMetadata, https://pkg.go.dev/builtin#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 (\*CreateGeneratorEvaluationOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient_CreateGeneratorEvaluationOperation) Name() https://pkg.go.dev/builtin#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 (\*CreateGeneratorEvaluationOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient_CreateGeneratorEvaluationOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GeneratorEvaluation, https://pkg.go.dev/builtin#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 (\*CreateGeneratorEvaluationOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient_CreateGeneratorEvaluationOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GeneratorEvaluation, https://pkg.go.dev/builtin#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.

## DeleteDocumentOperation

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

DeleteDocumentOperation manages a long-running operation from DeleteDocument.

### func (\*DeleteDocumentOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_DeleteDocumentOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*DeleteDocumentOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_DeleteDocumentOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_KnowledgeOperationMetadata, https://pkg.go.dev/builtin#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 (\*DeleteDocumentOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_DeleteDocumentOperation) Name() https://pkg.go.dev/builtin#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 (\*DeleteDocumentOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_DeleteDocumentOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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 (\*DeleteDocumentOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_DeleteDocumentOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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.

## DocumentIterator

    type DocumentIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Document, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

DocumentIterator manages a stream of \*dialogflowpb.Document.

### func (\*DocumentIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentIterator) All() iter.Seq2[*dialogflowpb.Document, error]

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

### func (\*DocumentIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Document, https://pkg.go.dev/builtin#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 (\*DocumentIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentIterator) PageInfo() *iterator.PageInfo

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

## DocumentsCallOptions

    type DocumentsCallOptions struct {
    	ListDocuments   []gax.CallOption
    	GetDocument     []gax.CallOption
    	CreateDocument  []gax.CallOption
    	ImportDocuments []gax.CallOption
    	DeleteDocument  []gax.CallOption
    	UpdateDocument  []gax.CallOption
    	ReloadDocument  []gax.CallOption
    	GetLocation     []gax.CallOption
    	ListLocations   []gax.CallOption
    	CancelOperation []gax.CallOption
    	GetOperation    []gax.CallOption
    	ListOperations  []gax.CallOption
    }

DocumentsCallOptions contains the retry settings for each method of DocumentsClient.

## DocumentsClient

    type DocumentsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsCallOptions

    	// 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
    }

DocumentsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing knowledge
Documents.

### func NewDocumentsClient

    func NewDocumentsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient, https://pkg.go.dev/builtin#error)

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

Service for managing knowledge
Documents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewDocumentsRESTClient

    func NewDocumentsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient, https://pkg.go.dev/builtin#error)

NewDocumentsRESTClient creates a new documents rest client.

Service for managing knowledge
Documents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_NewDocumentsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*DocumentsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*DocumentsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*DocumentsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) 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 (\*DocumentsClient) CreateDocument

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) CreateDocument(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateDocumentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_CreateDocumentOperation, https://pkg.go.dev/builtin#error)

CreateDocument creates a new document.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>).
The returned Operation type has the following method-specific fields:

    metadata:
    KnowledgeOperationMetadata

    response: Document

Note: The projects.agent.knowledgeBases.documents resource is deprecated;
only use projects.knowledgeBases.documents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateDocumentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateDocumentRequest.
    	}
    	op, err := c.CreateDocument(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*DocumentsClient) CreateDocumentOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) CreateDocumentOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_CreateDocumentOperation

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

### func (\*DocumentsClient) DeleteDocument

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) DeleteDocument(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteDocumentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_DeleteDocumentOperation, https://pkg.go.dev/builtin#error)

DeleteDocument deletes the specified document.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>).
The returned Operation type has the following method-specific fields:

    metadata:
    KnowledgeOperationMetadata

    response: An Empty
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: The projects.agent.knowledgeBases.documents resource is deprecated;
only use projects.knowledgeBases.documents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteDocumentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteDocumentRequest.
    	}
    	op, err := c.DeleteDocument(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*DocumentsClient) DeleteDocumentOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) DeleteDocumentOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient_DeleteDocumentOperation

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

### func (\*DocumentsClient) GetDocument

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) GetDocument(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetDocumentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Document, https://pkg.go.dev/builtin#error)

GetDocument retrieves the specified document.

Note: The projects.agent.knowledgeBases.documents resource is deprecated;
only use projects.knowledgeBases.documents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetDocumentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetDocumentRequest.
    	}
    	resp, err := c.GetDocument(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*DocumentsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewDocumentsClient(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 (\*DocumentsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*DocumentsClient) ImportDocuments

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) ImportDocuments(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ImportDocumentsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportDocumentsOperation, https://pkg.go.dev/builtin#error)

ImportDocuments create documents by importing data from external sources.
Dialogflow supports up to 350 documents in each request. If you try to
import more, Dialogflow will return an error.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>).
The returned Operation type has the following method-specific fields:

    metadata:
    KnowledgeOperationMetadata

    response:
    ImportDocumentsResponse

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ImportDocumentsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ImportDocumentsRequest.
    	}
    	op, err := c.ImportDocuments(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*DocumentsClient) ImportDocumentsOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) ImportDocumentsOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportDocumentsOperation

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

### func (\*DocumentsClient) ListDocuments

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) ListDocuments(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListDocumentsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentIterator

ListDocuments returns the list of all documents of the knowledge base.

Note: The projects.agent.knowledgeBases.documents resource is deprecated;
only use projects.knowledgeBases.documents.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListDocumentsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListDocumentsRequest.
    	}
    	it := c.ListDocuments(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.(*dialogflowpb.ListDocumentsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*DocumentsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewDocumentsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewDocumentsClient(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 (\*DocumentsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*DocumentsClient) ReloadDocument

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) ReloadDocument(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ReloadDocumentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ReloadDocumentOperation, https://pkg.go.dev/builtin#error)

ReloadDocument reloads the specified document from its specified source, content_uri or
content. The previously loaded content of the document will be deleted.
Note: Even when the content of the document has not changed, there still
may be side effects because of internal implementation changes.
Note: If the document source is Google Cloud Storage URI, its metadata will
be replaced with the custom metadata from Google Cloud Storage if the
import_gcs_custom_metadata field is set to true in the request.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>).
The returned Operation type has the following method-specific fields:

    metadata:
    KnowledgeOperationMetadata

    response: Document

Note: The projects.agent.knowledgeBases.documents resource is deprecated;
only use projects.knowledgeBases.documents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ReloadDocumentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ReloadDocumentRequest.
    	}
    	op, err := c.ReloadDocument(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*DocumentsClient) ReloadDocumentOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) ReloadDocumentOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ReloadDocumentOperation

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

### func (\*DocumentsClient) UpdateDocument

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) UpdateDocument(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateDocumentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_UpdateDocumentOperation, https://pkg.go.dev/builtin#error)

UpdateDocument updates the specified document.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>).
The returned Operation type has the following method-specific fields:

    metadata:
    KnowledgeOperationMetadata

    response: Document

Note: The projects.agent.knowledgeBases.documents resource is deprecated;
only use projects.knowledgeBases.documents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewDocumentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateDocumentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateDocumentRequest.
    	}
    	op, err := c.UpdateDocument(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*DocumentsClient) UpdateDocumentOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_DocumentsClient) UpdateDocumentOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_UpdateDocumentOperation

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

## EncryptionSpecCallOptions

    type EncryptionSpecCallOptions struct {
    	GetEncryptionSpec        []gax.CallOption
    	InitializeEncryptionSpec []gax.CallOption
    	GetLocation              []gax.CallOption
    	ListLocations            []gax.CallOption
    	CancelOperation          []gax.CallOption
    	GetOperation             []gax.CallOption
    	ListOperations           []gax.CallOption
    }

EncryptionSpecCallOptions contains the retry settings for each method of EncryptionSpecClient.

## EncryptionSpecClient

    type EncryptionSpecClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecCallOptions

    	// 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
    }

EncryptionSpecClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Manages encryption spec settings for Dialogflow and Agent Assist.

### func NewEncryptionSpecClient

    func NewEncryptionSpecClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient, https://pkg.go.dev/builtin#error)

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

Manages encryption spec settings for Dialogflow and Agent Assist.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewEncryptionSpecRESTClient

    func NewEncryptionSpecRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient, https://pkg.go.dev/builtin#error)

NewEncryptionSpecRESTClient creates a new encryption spec service rest client.

Manages encryption spec settings for Dialogflow and Agent Assist.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*EncryptionSpecClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*EncryptionSpecClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*EncryptionSpecClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient) 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 (\*EncryptionSpecClient) GetEncryptionSpec

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient) GetEncryptionSpec(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetEncryptionSpecRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_EncryptionSpec, https://pkg.go.dev/builtin#error)

GetEncryptionSpec gets location-level encryption key specification.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetEncryptionSpecRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetEncryptionSpecRequest.
    	}
    	resp, err := c.GetEncryptionSpec(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*EncryptionSpecClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecClient(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 (\*EncryptionSpecClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*EncryptionSpecClient) InitializeEncryptionSpec

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient) InitializeEncryptionSpec(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_InitializeEncryptionSpecRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_InitializeEncryptionSpecOperation, https://pkg.go.dev/builtin#error)

InitializeEncryptionSpec initializes a location-level encryption key specification. An error will
be thrown if the location has resources already created before the
initialization. Once the encryption specification is initialized at a
location, it is immutable and all newly created resources under the
location will be encrypted with the existing specification.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.InitializeEncryptionSpecRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#InitializeEncryptionSpecRequest.
    	}
    	op, err := c.InitializeEncryptionSpec(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*EncryptionSpecClient) InitializeEncryptionSpecOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient) InitializeEncryptionSpecOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_InitializeEncryptionSpecOperation

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

### func (\*EncryptionSpecClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecClient(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 (\*EncryptionSpecClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EncryptionSpecClient_NewEncryptionSpecClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_ListOperations(ctx, req).All() {
    		if err != nil {
    			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
    		}
    		// TODO: Use resp.
    		_ = resp
    	}
    }

## EntityTypeIterator

    type EntityTypeIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.EntityType, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

EntityTypeIterator manages a stream of \*dialogflowpb.EntityType.

### func (\*EntityTypeIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypeIterator) All() iter.Seq2[*dialogflowpb.EntityType, error]

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

### func (\*EntityTypeIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypeIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_EntityType, https://pkg.go.dev/builtin#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 (\*EntityTypeIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypeIterator) PageInfo() *iterator.PageInfo

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

## EntityTypesCallOptions

    type EntityTypesCallOptions struct {
    	ListEntityTypes        []gax.CallOption
    	GetEntityType          []gax.CallOption
    	CreateEntityType       []gax.CallOption
    	UpdateEntityType       []gax.CallOption
    	DeleteEntityType       []gax.CallOption
    	BatchUpdateEntityTypes []gax.CallOption
    	BatchDeleteEntityTypes []gax.CallOption
    	BatchCreateEntities    []gax.CallOption
    	BatchUpdateEntities    []gax.CallOption
    	BatchDeleteEntities    []gax.CallOption
    	GetLocation            []gax.CallOption
    	ListLocations          []gax.CallOption
    	CancelOperation        []gax.CallOption
    	GetOperation           []gax.CallOption
    	ListOperations         []gax.CallOption
    }

EntityTypesCallOptions contains the retry settings for each method of EntityTypesClient.

## EntityTypesClient

    type EntityTypesClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesCallOptions

    	// 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
    }

EntityTypesClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing
EntityTypes.

### func NewEntityTypesClient

    func NewEntityTypesClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient, https://pkg.go.dev/builtin#error)

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

Service for managing
EntityTypes.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewEntityTypesRESTClient

    func NewEntityTypesRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient, https://pkg.go.dev/builtin#error)

NewEntityTypesRESTClient creates a new entity types rest client.

Service for managing
EntityTypes.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_NewEntityTypesRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*EntityTypesClient) BatchCreateEntities

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) BatchCreateEntities(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchCreateEntitiesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchCreateEntitiesOperation, https://pkg.go.dev/builtin#error)

BatchCreateEntities creates multiple new entities in the specified entity type.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response: An Empty
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.BatchCreateEntitiesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#BatchCreateEntitiesRequest.
    	}
    	op, err := c.BatchCreateEntities(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*EntityTypesClient) BatchCreateEntitiesOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) BatchCreateEntitiesOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchCreateEntitiesOperation

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

### func (\*EntityTypesClient) BatchDeleteEntities

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) BatchDeleteEntities(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchDeleteEntitiesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntitiesOperation, https://pkg.go.dev/builtin#error)

BatchDeleteEntities deletes entities in the specified entity type.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response: An Empty
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.BatchDeleteEntitiesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#BatchDeleteEntitiesRequest.
    	}
    	op, err := c.BatchDeleteEntities(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*EntityTypesClient) BatchDeleteEntitiesOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) BatchDeleteEntitiesOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntitiesOperation

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

### func (\*EntityTypesClient) BatchDeleteEntityTypes

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) BatchDeleteEntityTypes(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchDeleteEntityTypesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntityTypesOperation, https://pkg.go.dev/builtin#error)

BatchDeleteEntityTypes deletes entity types in the specified agent.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response: An Empty
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.BatchDeleteEntityTypesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#BatchDeleteEntityTypesRequest.
    	}
    	op, err := c.BatchDeleteEntityTypes(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*EntityTypesClient) BatchDeleteEntityTypesOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) BatchDeleteEntityTypesOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchDeleteEntityTypesOperation

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

### func (\*EntityTypesClient) BatchUpdateEntities

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) BatchUpdateEntities(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchUpdateEntitiesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntitiesOperation, https://pkg.go.dev/builtin#error)

BatchUpdateEntities updates or creates multiple entities in the specified entity type. This
method does not affect entities in the entity type that aren't explicitly
specified in the request.

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response: An Empty
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.BatchUpdateEntitiesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#BatchUpdateEntitiesRequest.
    	}
    	op, err := c.BatchUpdateEntities(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*EntityTypesClient) BatchUpdateEntitiesOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) BatchUpdateEntitiesOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntitiesOperation

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

### func (\*EntityTypesClient) BatchUpdateEntityTypes

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) BatchUpdateEntityTypes(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchUpdateEntityTypesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntityTypesOperation, https://pkg.go.dev/builtin#error)

BatchUpdateEntityTypes updates/Creates multiple entity types in the specified agent.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response:
    BatchUpdateEntityTypesResponse

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.BatchUpdateEntityTypesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#BatchUpdateEntityTypesRequest.
    	}
    	op, err := c.BatchUpdateEntityTypes(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*EntityTypesClient) BatchUpdateEntityTypesOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) BatchUpdateEntityTypesOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient_BatchUpdateEntityTypesOperation

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

### func (\*EntityTypesClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*EntityTypesClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*EntityTypesClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) 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 (\*EntityTypesClient) CreateEntityType

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) CreateEntityType(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateEntityTypeRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_EntityType, https://pkg.go.dev/builtin#error)

CreateEntityType creates an entity type in the specified agent.

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateEntityTypeRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateEntityTypeRequest.
    	}
    	resp, err := c.CreateEntityType(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*EntityTypesClient) DeleteEntityType

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) DeleteEntityType(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteEntityTypeRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteEntityType deletes the specified entity type.

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteEntityTypeRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteEntityTypeRequest.
    	}
    	err = c.DeleteEntityType(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*EntityTypesClient) GetEntityType

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) GetEntityType(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetEntityTypeRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_EntityType, https://pkg.go.dev/builtin#error)

GetEntityType retrieves the specified entity type.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetEntityTypeRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetEntityTypeRequest.
    	}
    	resp, err := c.GetEntityType(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*EntityTypesClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEntityTypesClient(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 (\*EntityTypesClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*EntityTypesClient) ListEntityTypes

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) ListEntityTypes(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListEntityTypesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypeIterator

ListEntityTypes returns the list of all entity types in the specified agent.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListEntityTypesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListEntityTypesRequest.
    	}
    	it := c.ListEntityTypes(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.(*dialogflowpb.ListEntityTypesResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*EntityTypesClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewEntityTypesClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEntityTypesClient(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 (\*EntityTypesClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*EntityTypesClient) UpdateEntityType

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EntityTypesClient) UpdateEntityType(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateEntityTypeRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_EntityType, https://pkg.go.dev/builtin#error)

UpdateEntityType updates the specified entity type.

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateEntityTypeRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateEntityTypeRequest.
    	}
    	resp, err := c.UpdateEntityType(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## EnvironmentHistory_EntryIterator

    type EnvironmentHistory_EntryIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.EnvironmentHistory_Entry, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

EnvironmentHistory_EntryIterator manages a stream of \*dialogflowpb.EnvironmentHistory_Entry.

### func (\*EnvironmentHistory_EntryIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentHistory_EntryIterator) All() iter.Seq2[*dialogflowpb.EnvironmentHistory_Entry, error]

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

### func (\*EnvironmentHistory_EntryIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentHistory_EntryIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_EnvironmentHistory_Entry, https://pkg.go.dev/builtin#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 (\*EnvironmentHistory_EntryIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentHistory_EntryIterator) PageInfo() *iterator.PageInfo

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

## EnvironmentIterator

    type EnvironmentIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Environment, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

EnvironmentIterator manages a stream of \*dialogflowpb.Environment.

### func (\*EnvironmentIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentIterator) All() iter.Seq2[*dialogflowpb.Environment, error]

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

### func (\*EnvironmentIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Environment, https://pkg.go.dev/builtin#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 (\*EnvironmentIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentIterator) PageInfo() *iterator.PageInfo

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

## EnvironmentsCallOptions

    type EnvironmentsCallOptions struct {
    	ListEnvironments      []gax.CallOption
    	GetEnvironment        []gax.CallOption
    	CreateEnvironment     []gax.CallOption
    	UpdateEnvironment     []gax.CallOption
    	DeleteEnvironment     []gax.CallOption
    	GetEnvironmentHistory []gax.CallOption
    	GetLocation           []gax.CallOption
    	ListLocations         []gax.CallOption
    	CancelOperation       []gax.CallOption
    	GetOperation          []gax.CallOption
    	ListOperations        []gax.CallOption
    }

EnvironmentsCallOptions contains the retry settings for each method of EnvironmentsClient.

## EnvironmentsClient

    type EnvironmentsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsCallOptions
    	// contains filtered or unexported fields
    }

EnvironmentsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing
Environments.

### func NewEnvironmentsClient

    func NewEnvironmentsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient, https://pkg.go.dev/builtin#error)

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

Service for managing
Environments.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewEnvironmentsRESTClient

    func NewEnvironmentsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient, https://pkg.go.dev/builtin#error)

NewEnvironmentsRESTClient creates a new environments rest client.

Service for managing
Environments.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient_NewEnvironmentsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*EnvironmentsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*EnvironmentsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*EnvironmentsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) 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 (\*EnvironmentsClient) CreateEnvironment

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) CreateEnvironment(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateEnvironmentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Environment, https://pkg.go.dev/builtin#error)

CreateEnvironment creates an agent environment.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateEnvironmentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateEnvironmentRequest.
    	}
    	resp, err := c.CreateEnvironment(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*EnvironmentsClient) DeleteEnvironment

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) DeleteEnvironment(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteEnvironmentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteEnvironment deletes the specified agent environment.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteEnvironmentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteEnvironmentRequest.
    	}
    	err = c.DeleteEnvironment(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*EnvironmentsClient) GetEnvironment

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) GetEnvironment(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetEnvironmentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Environment, https://pkg.go.dev/builtin#error)

GetEnvironment retrieves the specified agent environment.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetEnvironmentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetEnvironmentRequest.
    	}
    	resp, err := c.GetEnvironment(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*EnvironmentsClient) GetEnvironmentHistory

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) GetEnvironmentHistory(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetEnvironmentHistoryRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentHistory_EntryIterator

GetEnvironmentHistory gets the history of the specified environment.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetEnvironmentHistoryRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetEnvironmentHistoryRequest.
    	}
    	it := c.GetEnvironmentHistory(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.(*dialogflowpb.EnvironmentHistory)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*EnvironmentsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEnvironmentsClient(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 (\*EnvironmentsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*EnvironmentsClient) ListEnvironments

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) ListEnvironments(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListEnvironmentsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentIterator

ListEnvironments returns the list of all non-draft environments of the specified agent.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListEnvironmentsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListEnvironmentsRequest.
    	}
    	it := c.ListEnvironments(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.(*dialogflowpb.ListEnvironmentsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*EnvironmentsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewEnvironmentsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEnvironmentsClient(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 (\*EnvironmentsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*EnvironmentsClient) UpdateEnvironment

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_EnvironmentsClient) UpdateEnvironment(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateEnvironmentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Environment, https://pkg.go.dev/builtin#error)

UpdateEnvironment updates the specified agent environment.

This method allows you to deploy new agent versions into the environment.
When an environment is pointed to a new agent version by setting
environment.agent_version, the environment is temporarily set to the
LOADING state. During that time, the environment keeps on serving the
previous version of the agent. After the new agent version is done loading,
the environment is set back to the RUNNING state.
You can use "-" as Environment ID in environment name to update version
in "draft" environment. WARNING: this will negate all recent changes to
draft and can't be undone. You may want to save the draft to a version
before calling this function.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewEnvironmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateEnvironmentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateEnvironmentRequest.
    	}
    	resp, err := c.UpdateEnvironment(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## ExportAgentOperation

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

ExportAgentOperation manages a long-running operation from ExportAgent.

### func (\*ExportAgentOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ExportAgentOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*ExportAgentOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ExportAgentOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*ExportAgentOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ExportAgentOperation) Name() https://pkg.go.dev/builtin#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 (\*ExportAgentOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ExportAgentOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ExportAgentResponse, https://pkg.go.dev/builtin#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 (\*ExportAgentOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ExportAgentOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ExportAgentResponse, https://pkg.go.dev/builtin#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.

## FulfillmentsCallOptions

    type FulfillmentsCallOptions struct {
    	GetFulfillment    []gax.CallOption
    	UpdateFulfillment []gax.CallOption
    	GetLocation       []gax.CallOption
    	ListLocations     []gax.CallOption
    	CancelOperation   []gax.CallOption
    	GetOperation      []gax.CallOption
    	ListOperations    []gax.CallOption
    }

FulfillmentsCallOptions contains the retry settings for each method of FulfillmentsClient.

## FulfillmentsClient

    type FulfillmentsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsCallOptions
    	// contains filtered or unexported fields
    }

FulfillmentsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing
Fulfillments.

### func NewFulfillmentsClient

    func NewFulfillmentsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient, https://pkg.go.dev/builtin#error)

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

Service for managing
Fulfillments.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewFulfillmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewFulfillmentsRESTClient

    func NewFulfillmentsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient, https://pkg.go.dev/builtin#error)

NewFulfillmentsRESTClient creates a new fulfillments rest client.

Service for managing
Fulfillments.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient_NewFulfillmentsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*FulfillmentsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewFulfillmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*FulfillmentsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*FulfillmentsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient) 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 (\*FulfillmentsClient) GetFulfillment

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient) GetFulfillment(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetFulfillmentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Fulfillment, https://pkg.go.dev/builtin#error)

GetFulfillment retrieves the fulfillment.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewFulfillmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetFulfillmentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetFulfillmentRequest.
    	}
    	resp, err := c.GetFulfillment(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*FulfillmentsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewFulfillmentsClient(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 (\*FulfillmentsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewFulfillmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*FulfillmentsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewFulfillmentsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewFulfillmentsClient(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 (\*FulfillmentsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewFulfillmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	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 := dialogflow.NewFulfillmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*FulfillmentsClient) UpdateFulfillment

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_FulfillmentsClient) UpdateFulfillment(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateFulfillmentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Fulfillment, https://pkg.go.dev/builtin#error)

UpdateFulfillment updates the fulfillment.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewFulfillmentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateFulfillmentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateFulfillmentRequest.
    	}
    	resp, err := c.UpdateFulfillment(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## GeneratorEvaluationIterator

    type GeneratorEvaluationIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.GeneratorEvaluation, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

GeneratorEvaluationIterator manages a stream of \*dialogflowpb.GeneratorEvaluation.

### func (\*GeneratorEvaluationIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationIterator) All() iter.Seq2[*dialogflowpb.GeneratorEvaluation, error]

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

### func (\*GeneratorEvaluationIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GeneratorEvaluation, https://pkg.go.dev/builtin#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 (\*GeneratorEvaluationIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationIterator) PageInfo() *iterator.PageInfo

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

## GeneratorEvaluationsCallOptions

    type GeneratorEvaluationsCallOptions struct {
    	CreateGeneratorEvaluation []gax.CallOption
    	GetGeneratorEvaluation    []gax.CallOption
    	ListGeneratorEvaluations  []gax.CallOption
    	DeleteGeneratorEvaluation []gax.CallOption
    	GetLocation               []gax.CallOption
    	ListLocations             []gax.CallOption
    	CancelOperation           []gax.CallOption
    	GetOperation              []gax.CallOption
    	ListOperations            []gax.CallOption
    }

GeneratorEvaluationsCallOptions contains the retry settings for each method of GeneratorEvaluationsClient.

## GeneratorEvaluationsClient

    type GeneratorEvaluationsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsCallOptions

    	// 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
    }

GeneratorEvaluationsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing generator evaluations.

### func NewGeneratorEvaluationsClient

    func NewGeneratorEvaluationsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient, https://pkg.go.dev/builtin#error)

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

Service for managing generator evaluations.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewGeneratorEvaluationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewGeneratorEvaluationsRESTClient

    func NewGeneratorEvaluationsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient, https://pkg.go.dev/builtin#error)

NewGeneratorEvaluationsRESTClient creates a new generator evaluations rest client.

Service for managing generator evaluations.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient_NewGeneratorEvaluationsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*GeneratorEvaluationsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorEvaluationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*GeneratorEvaluationsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*GeneratorEvaluationsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) 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 (\*GeneratorEvaluationsClient) CreateGeneratorEvaluation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) CreateGeneratorEvaluation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateGeneratorEvaluationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient_CreateGeneratorEvaluationOperation, https://pkg.go.dev/builtin#error)

CreateGeneratorEvaluation creates evaluation of a generator.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewGeneratorEvaluationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateGeneratorEvaluationRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateGeneratorEvaluationRequest.
    	}
    	op, err := c.CreateGeneratorEvaluation(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*GeneratorEvaluationsClient) CreateGeneratorEvaluationOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) CreateGeneratorEvaluationOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient_CreateGeneratorEvaluationOperation

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

### func (\*GeneratorEvaluationsClient) DeleteGeneratorEvaluation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) DeleteGeneratorEvaluation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteGeneratorEvaluationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteGeneratorEvaluation deletes an evaluation of generator.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewGeneratorEvaluationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteGeneratorEvaluationRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteGeneratorEvaluationRequest.
    	}
    	err = c.DeleteGeneratorEvaluation(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*GeneratorEvaluationsClient) GetGeneratorEvaluation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) GetGeneratorEvaluation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetGeneratorEvaluationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GeneratorEvaluation, https://pkg.go.dev/builtin#error)

GetGeneratorEvaluation gets an evaluation of generator.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewGeneratorEvaluationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetGeneratorEvaluationRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetGeneratorEvaluationRequest.
    	}
    	resp, err := c.GetGeneratorEvaluation(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*GeneratorEvaluationsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorEvaluationsClient(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 (\*GeneratorEvaluationsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorEvaluationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*GeneratorEvaluationsClient) ListGeneratorEvaluations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) ListGeneratorEvaluations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListGeneratorEvaluationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationIterator

ListGeneratorEvaluations lists evaluations of generator.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewGeneratorEvaluationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListGeneratorEvaluationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListGeneratorEvaluationsRequest.
    	}
    	it := c.ListGeneratorEvaluations(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.(*dialogflowpb.ListGeneratorEvaluationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewGeneratorEvaluationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*GeneratorEvaluationsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewGeneratorEvaluationsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorEvaluationsClient(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 (\*GeneratorEvaluationsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorEvaluationsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorEvaluationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorEvaluationsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_ListOperations(ctx, req).All() {
    		if err != nil {
    			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
    		}
    		// TODO: Use resp.
    		_ = resp
    	}
    }

## GeneratorIterator

    type GeneratorIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Generator, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

GeneratorIterator manages a stream of \*dialogflowpb.Generator.

### func (\*GeneratorIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorIterator) All() iter.Seq2[*dialogflowpb.Generator, error]

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

### func (\*GeneratorIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Generator, https://pkg.go.dev/builtin#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 (\*GeneratorIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorIterator) PageInfo() *iterator.PageInfo

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

## GeneratorsCallOptions

    type GeneratorsCallOptions struct {
    	CreateGenerator []gax.CallOption
    	GetGenerator    []gax.CallOption
    	ListGenerators  []gax.CallOption
    	DeleteGenerator []gax.CallOption
    	UpdateGenerator []gax.CallOption
    	GetLocation     []gax.CallOption
    	ListLocations   []gax.CallOption
    	CancelOperation []gax.CallOption
    	GetOperation    []gax.CallOption
    	ListOperations  []gax.CallOption
    }

GeneratorsCallOptions contains the retry settings for each method of GeneratorsClient.

## GeneratorsClient

    type GeneratorsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsCallOptions
    	// contains filtered or unexported fields
    }

GeneratorsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Generator Service for LLM powered Agent Assist. This service manages the
configurations of user owned Generators, such as description, context and
instruction, input/output format, etc. The generator resources will be used
inside a conversation and will be triggered by TriggerEvent to query LLM for
answers.

### func NewGeneratorsClient

    func NewGeneratorsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient, https://pkg.go.dev/builtin#error)

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

Generator Service for LLM powered Agent Assist. This service manages the
configurations of user owned Generators, such as description, context and
instruction, input/output format, etc. The generator resources will be used
inside a conversation and will be triggered by TriggerEvent to query LLM for
answers.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewGeneratorsRESTClient

    func NewGeneratorsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient, https://pkg.go.dev/builtin#error)

NewGeneratorsRESTClient creates a new generators rest client.

Generator Service for LLM powered Agent Assist. This service manages the
configurations of user owned Generators, such as description, context and
instruction, input/output format, etc. The generator resources will be used
inside a conversation and will be triggered by TriggerEvent to query LLM for
answers.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient_NewGeneratorsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*GeneratorsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*GeneratorsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*GeneratorsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) 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 (\*GeneratorsClient) CreateGenerator

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) CreateGenerator(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateGeneratorRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Generator, https://pkg.go.dev/builtin#error)

CreateGenerator creates a generator.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateGeneratorRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateGeneratorRequest.
    	}
    	resp, err := c.CreateGenerator(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*GeneratorsClient) DeleteGenerator

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) DeleteGenerator(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteGeneratorRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteGenerator deletes a generator.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteGeneratorRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteGeneratorRequest.
    	}
    	err = c.DeleteGenerator(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*GeneratorsClient) GetGenerator

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) GetGenerator(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetGeneratorRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Generator, https://pkg.go.dev/builtin#error)

GetGenerator retrieves a generator.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetGeneratorRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetGeneratorRequest.
    	}
    	resp, err := c.GetGenerator(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*GeneratorsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorsClient(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 (\*GeneratorsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*GeneratorsClient) ListGenerators

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) ListGenerators(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListGeneratorsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorIterator

ListGenerators lists generators.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListGeneratorsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListGeneratorsRequest.
    	}
    	it := c.ListGenerators(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.(*dialogflowpb.ListGeneratorsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*GeneratorsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewGeneratorsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorsClient(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 (\*GeneratorsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*GeneratorsClient) UpdateGenerator

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_GeneratorsClient) UpdateGenerator(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateGeneratorRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Generator, https://pkg.go.dev/builtin#error)

UpdateGenerator updates a generator.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewGeneratorsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateGeneratorRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateGeneratorRequest.
    	}
    	resp, err := c.UpdateGenerator(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## ImportAgentOperation

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

ImportAgentOperation manages a long-running operation from ImportAgent.

### func (\*ImportAgentOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportAgentOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*ImportAgentOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportAgentOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*ImportAgentOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportAgentOperation) Name() https://pkg.go.dev/builtin#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 (\*ImportAgentOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportAgentOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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 (\*ImportAgentOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportAgentOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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.

## ImportDocumentsOperation

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

ImportDocumentsOperation manages a long-running operation from ImportDocuments.

### func (\*ImportDocumentsOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportDocumentsOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*ImportDocumentsOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportDocumentsOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_KnowledgeOperationMetadata, https://pkg.go.dev/builtin#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 (\*ImportDocumentsOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportDocumentsOperation) Name() https://pkg.go.dev/builtin#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 (\*ImportDocumentsOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportDocumentsOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ImportDocumentsResponse, https://pkg.go.dev/builtin#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 (\*ImportDocumentsOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ImportDocumentsOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ImportDocumentsResponse, https://pkg.go.dev/builtin#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.

## InitializeEncryptionSpecOperation

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

InitializeEncryptionSpecOperation manages a long-running operation from InitializeEncryptionSpec.

### func (\*InitializeEncryptionSpecOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_InitializeEncryptionSpecOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*InitializeEncryptionSpecOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_InitializeEncryptionSpecOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_InitializeEncryptionSpecMetadata, https://pkg.go.dev/builtin#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 (\*InitializeEncryptionSpecOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_InitializeEncryptionSpecOperation) Name() https://pkg.go.dev/builtin#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 (\*InitializeEncryptionSpecOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_InitializeEncryptionSpecOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_InitializeEncryptionSpecResponse, https://pkg.go.dev/builtin#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 (\*InitializeEncryptionSpecOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_InitializeEncryptionSpecOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_InitializeEncryptionSpecResponse, https://pkg.go.dev/builtin#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.

## IntentIterator

    type IntentIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Intent, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

IntentIterator manages a stream of \*dialogflowpb.Intent.

### func (\*IntentIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentIterator) All() iter.Seq2[*dialogflowpb.Intent, error]

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

### func (\*IntentIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Intent, https://pkg.go.dev/builtin#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 (\*IntentIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentIterator) PageInfo() *iterator.PageInfo

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

## IntentsCallOptions

    type IntentsCallOptions struct {
    	ListIntents        []gax.CallOption
    	GetIntent          []gax.CallOption
    	CreateIntent       []gax.CallOption
    	UpdateIntent       []gax.CallOption
    	DeleteIntent       []gax.CallOption
    	BatchUpdateIntents []gax.CallOption
    	BatchDeleteIntents []gax.CallOption
    	GetLocation        []gax.CallOption
    	ListLocations      []gax.CallOption
    	CancelOperation    []gax.CallOption
    	GetOperation       []gax.CallOption
    	ListOperations     []gax.CallOption
    }

IntentsCallOptions contains the retry settings for each method of IntentsClient.

## IntentsClient

    type IntentsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsCallOptions

    	// 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
    }

IntentsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing Intents.

### func NewIntentsClient

    func NewIntentsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient, https://pkg.go.dev/builtin#error)

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

Service for managing Intents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewIntentsRESTClient

    func NewIntentsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient, https://pkg.go.dev/builtin#error)

NewIntentsRESTClient creates a new intents rest client.

Service for managing Intents.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_NewIntentsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*IntentsClient) BatchDeleteIntents

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) BatchDeleteIntents(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchDeleteIntentsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchDeleteIntentsOperation, https://pkg.go.dev/builtin#error)

BatchDeleteIntents deletes intents in the specified agent.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response: An Empty
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.BatchDeleteIntentsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#BatchDeleteIntentsRequest.
    	}
    	op, err := c.BatchDeleteIntents(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*IntentsClient) BatchDeleteIntentsOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) BatchDeleteIntentsOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchDeleteIntentsOperation

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

### func (\*IntentsClient) BatchUpdateIntents

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) BatchUpdateIntents(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_BatchUpdateIntentsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchUpdateIntentsOperation, https://pkg.go.dev/builtin#error)

BatchUpdateIntents updates/Creates multiple intents in the specified agent.

This method is a long-running
operation (at <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>).
The returned Operation type has the following method-specific fields:

    metadata: An empty Struct
    message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)

    response:
    BatchUpdateIntentsResponse

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.BatchUpdateIntentsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#BatchUpdateIntentsRequest.
    	}
    	op, err := c.BatchUpdateIntents(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}

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

### func (\*IntentsClient) BatchUpdateIntentsOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) BatchUpdateIntentsOperation(name https://pkg.go.dev/builtin#string) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient_BatchUpdateIntentsOperation

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

### func (\*IntentsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*IntentsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*IntentsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) 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 (\*IntentsClient) CreateIntent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) CreateIntent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateIntentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Intent, https://pkg.go.dev/builtin#error)

CreateIntent creates an intent in the specified agent.

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateIntentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateIntentRequest.
    	}
    	resp, err := c.CreateIntent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*IntentsClient) DeleteIntent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) DeleteIntent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteIntentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteIntent deletes the specified intent and its direct or indirect followup intents.

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteIntentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteIntentRequest.
    	}
    	err = c.DeleteIntent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*IntentsClient) GetIntent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) GetIntent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetIntentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Intent, https://pkg.go.dev/builtin#error)

GetIntent retrieves the specified intent.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetIntentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetIntentRequest.
    	}
    	resp, err := c.GetIntent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*IntentsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewIntentsClient(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 (\*IntentsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*IntentsClient) ListIntents

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) ListIntents(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListIntentsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentIterator

ListIntents returns the list of all intents in the specified agent.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListIntentsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListIntentsRequest.
    	}
    	it := c.ListIntents(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.(*dialogflowpb.ListIntentsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*IntentsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewIntentsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewIntentsClient(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 (\*IntentsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*IntentsClient) UpdateIntent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_IntentsClient) UpdateIntent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateIntentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Intent, https://pkg.go.dev/builtin#error)

UpdateIntent updates the specified intent.

Note: You should always train an agent prior to sending it queries. See the
training
documentation (at <https://cloud.google.com/dialogflow/es/docs/training>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewIntentsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateIntentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateIntentRequest.
    	}
    	resp, err := c.UpdateIntent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## KnowledgeBaseIterator

    type KnowledgeBaseIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.KnowledgeBase, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

KnowledgeBaseIterator manages a stream of \*dialogflowpb.KnowledgeBase.

### func (\*KnowledgeBaseIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBaseIterator) All() iter.Seq2[*dialogflowpb.KnowledgeBase, error]

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

### func (\*KnowledgeBaseIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBaseIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_KnowledgeBase, https://pkg.go.dev/builtin#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 (\*KnowledgeBaseIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBaseIterator) PageInfo() *iterator.PageInfo

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

## KnowledgeBasesCallOptions

    type KnowledgeBasesCallOptions struct {
    	ListKnowledgeBases  []gax.CallOption
    	GetKnowledgeBase    []gax.CallOption
    	CreateKnowledgeBase []gax.CallOption
    	DeleteKnowledgeBase []gax.CallOption
    	UpdateKnowledgeBase []gax.CallOption
    	GetLocation         []gax.CallOption
    	ListLocations       []gax.CallOption
    	CancelOperation     []gax.CallOption
    	GetOperation        []gax.CallOption
    	ListOperations      []gax.CallOption
    }

KnowledgeBasesCallOptions contains the retry settings for each method of KnowledgeBasesClient.

## KnowledgeBasesClient

    type KnowledgeBasesClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesCallOptions
    	// contains filtered or unexported fields
    }

KnowledgeBasesClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing
KnowledgeBases.

### func NewKnowledgeBasesClient

    func NewKnowledgeBasesClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient, https://pkg.go.dev/builtin#error)

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

Service for managing
KnowledgeBases.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewKnowledgeBasesRESTClient

    func NewKnowledgeBasesRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient, https://pkg.go.dev/builtin#error)

NewKnowledgeBasesRESTClient creates a new knowledge bases rest client.

Service for managing
KnowledgeBases.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient_NewKnowledgeBasesRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*KnowledgeBasesClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*KnowledgeBasesClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*KnowledgeBasesClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) 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 (\*KnowledgeBasesClient) CreateKnowledgeBase

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) CreateKnowledgeBase(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateKnowledgeBaseRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_KnowledgeBase, https://pkg.go.dev/builtin#error)

CreateKnowledgeBase creates a knowledge base.

Note: The projects.agent.knowledgeBases resource is deprecated;
only use projects.knowledgeBases.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateKnowledgeBaseRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateKnowledgeBaseRequest.
    	}
    	resp, err := c.CreateKnowledgeBase(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*KnowledgeBasesClient) DeleteKnowledgeBase

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) DeleteKnowledgeBase(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteKnowledgeBaseRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteKnowledgeBase deletes the specified knowledge base.

Note: The projects.agent.knowledgeBases resource is deprecated;
only use projects.knowledgeBases.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteKnowledgeBaseRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteKnowledgeBaseRequest.
    	}
    	err = c.DeleteKnowledgeBase(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*KnowledgeBasesClient) GetKnowledgeBase

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) GetKnowledgeBase(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetKnowledgeBaseRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_KnowledgeBase, https://pkg.go.dev/builtin#error)

GetKnowledgeBase retrieves the specified knowledge base.

Note: The projects.agent.knowledgeBases resource is deprecated;
only use projects.knowledgeBases.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetKnowledgeBaseRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetKnowledgeBaseRequest.
    	}
    	resp, err := c.GetKnowledgeBase(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*KnowledgeBasesClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewKnowledgeBasesClient(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 (\*KnowledgeBasesClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*KnowledgeBasesClient) ListKnowledgeBases

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) ListKnowledgeBases(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListKnowledgeBasesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBaseIterator

ListKnowledgeBases returns the list of all knowledge bases of the specified agent.

Note: The projects.agent.knowledgeBases resource is deprecated;
only use projects.knowledgeBases.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListKnowledgeBasesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListKnowledgeBasesRequest.
    	}
    	it := c.ListKnowledgeBases(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.(*dialogflowpb.ListKnowledgeBasesResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*KnowledgeBasesClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewKnowledgeBasesClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewKnowledgeBasesClient(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 (\*KnowledgeBasesClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*KnowledgeBasesClient) UpdateKnowledgeBase

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_KnowledgeBasesClient) UpdateKnowledgeBase(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateKnowledgeBaseRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_KnowledgeBase, https://pkg.go.dev/builtin#error)

UpdateKnowledgeBase updates the specified knowledge base.

Note: The projects.agent.knowledgeBases resource is deprecated;
only use projects.knowledgeBases.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewKnowledgeBasesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateKnowledgeBaseRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateKnowledgeBaseRequest.
    	}
    	resp, err := c.UpdateKnowledgeBase(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*locationpb.Location, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

LocationIterator manages a stream of \*locationpb.Location.

### func (\*LocationIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator) All() iter.Seq2[*locationpb.Location, error]

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

### func (\*LocationIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator) Next() (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#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 *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator) PageInfo() *iterator.PageInfo

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

## MessageIterator

    type MessageIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Message, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

MessageIterator manages a stream of \*dialogflowpb.Message.

### func (\*MessageIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_MessageIterator) All() iter.Seq2[*dialogflowpb.Message, error]

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

### func (\*MessageIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_MessageIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Message, https://pkg.go.dev/builtin#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 (\*MessageIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_MessageIterator) PageInfo() *iterator.PageInfo

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

## 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*longrunningpb.Operation, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

OperationIterator manages a stream of \*longrunningpb.Operation.

### func (\*OperationIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]

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

### func (\*OperationIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator) Next() (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#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 (\*OperationIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator) PageInfo() *iterator.PageInfo

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

## ParticipantIterator

    type ParticipantIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Participant, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

ParticipantIterator manages a stream of \*dialogflowpb.Participant.

### func (\*ParticipantIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantIterator) All() iter.Seq2[*dialogflowpb.Participant, error]

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

### func (\*ParticipantIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Participant, https://pkg.go.dev/builtin#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 (\*ParticipantIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantIterator) PageInfo() *iterator.PageInfo

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

## ParticipantsCallOptions

    type ParticipantsCallOptions struct {
    	CreateParticipant                     []gax.CallOption
    	GetParticipant                        []gax.CallOption
    	ListParticipants                      []gax.CallOption
    	UpdateParticipant                     []gax.CallOption
    	AnalyzeContent                        []gax.CallOption
    	StreamingAnalyzeContent               []gax.CallOption
    	StreamingReactiveCompanionSuggestions []gax.CallOption
    	BidiStreamingAnalyzeContent           []gax.CallOption
    	SuggestArticles                       []gax.CallOption
    	SuggestFaqAnswers                     []gax.CallOption
    	SuggestSmartReplies                   []gax.CallOption
    	SuggestKnowledgeAssist                []gax.CallOption
    	ListSuggestions                       []gax.CallOption
    	CompileSuggestion                     []gax.CallOption
    	GetLocation                           []gax.CallOption
    	ListLocations                         []gax.CallOption
    	CancelOperation                       []gax.CallOption
    	GetOperation                          []gax.CallOption
    	ListOperations                        []gax.CallOption
    }

ParticipantsCallOptions contains the retry settings for each method of ParticipantsClient.

## ParticipantsClient

    type ParticipantsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsCallOptions
    	// contains filtered or unexported fields
    }

ParticipantsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing
Participants.

### func NewParticipantsClient

    func NewParticipantsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient, https://pkg.go.dev/builtin#error)

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

Service for managing
Participants.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewParticipantsRESTClient

    func NewParticipantsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient, https://pkg.go.dev/builtin#error)

NewParticipantsRESTClient creates a new participants rest client.

Service for managing
Participants.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient_NewParticipantsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*ParticipantsClient) AnalyzeContent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) AnalyzeContent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_AnalyzeContentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_AnalyzeContentResponse, https://pkg.go.dev/builtin#error)

AnalyzeContent adds a text (chat, for example), or audio (phone recording, for example)
message from a participant into the conversation.

Note: Always use agent versions for production traffic
sent to virtual agents. See Versions and
environments (at <https://cloud.google.com/dialogflow/es/docs/agents-versions>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.AnalyzeContentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#AnalyzeContentRequest.
    	}
    	resp, err := c.AnalyzeContent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ParticipantsClient) BidiStreamingAnalyzeContent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) BidiStreamingAnalyzeContent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Participants_BidiStreamingAnalyzeContentClient, https://pkg.go.dev/builtin#error)

BidiStreamingAnalyzeContent bidirectional endless streaming version of
StreamingAnalyzeContent.

This method is not supported for the REST transport.

#### Example

    package main

    import (
    	"context"
    	"io"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()
    	stream, err := c.BidiStreamingAnalyzeContent(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	go func() {
    		reqs := []*dialogflowpb.BidiStreamingAnalyzeContentRequest{
    			// 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 (\*ParticipantsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ParticipantsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*ParticipantsClient) CompileSuggestion
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) CompileSuggestion(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CompileSuggestionRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CompileSuggestionResponse, https://pkg.go.dev/builtin#error)

CompileSuggestion deprecated. use
SuggestArticles
and
SuggestFaqAnswers
instead.

Gets suggestions for a participant based on specific historical
messages.

Note that
ListSuggestions
will only list the auto-generated suggestions, while
CompileSuggestion
will try to compile suggestion based on the provided conversation context
in the real time.

Deprecated: CompileSuggestion may be removed in a future version.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CompileSuggestionRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CompileSuggestionRequest.
    	}
    	resp, err := c.CompileSuggestion(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ParticipantsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) 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 (\*ParticipantsClient) CreateParticipant

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) CreateParticipant(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateParticipantRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Participant, https://pkg.go.dev/builtin#error)

CreateParticipant creates a new participant in a conversation.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateParticipantRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateParticipantRequest.
    	}
    	resp, err := c.CreateParticipant(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ParticipantsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewParticipantsClient(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 (\*ParticipantsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ParticipantsClient) GetParticipant

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) GetParticipant(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetParticipantRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Participant, https://pkg.go.dev/builtin#error)

GetParticipant retrieves a conversation participant.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetParticipantRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetParticipantRequest.
    	}
    	resp, err := c.GetParticipant(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ParticipantsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewParticipantsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewParticipantsClient(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 (\*ParticipantsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*ParticipantsClient) ListParticipants

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) ListParticipants(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListParticipantsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantIterator

ListParticipants returns the list of all participants in the specified conversation.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListParticipantsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListParticipantsRequest.
    	}
    	it := c.ListParticipants(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.(*dialogflowpb.ListParticipantsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ParticipantsClient) ListSuggestions
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) ListSuggestions(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListSuggestionsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SuggestionIterator

ListSuggestions deprecated: Use inline suggestion, event based suggestion or
Suggestion\* API instead.
See
\[HumanAgentAssistantConfig.name (at http://HumanAgentAssistantConfig.name)\]\[google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name (at <http://google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name>)\]
for more details. Removal Date: 2020-09-01.

Retrieves suggestions for live agents.

This method should be used by human agent client software to fetch auto
generated suggestions in real-time, while the conversation with an end user
is in progress. The functionality is implemented in terms of the
list
pagination (at <https://cloud.google.com/apis/design/design_patterns#list_pagination>)
design pattern. The client app should use the next_page_token field
to fetch the next batch of suggestions. suggestions are sorted by
create_time in descending order.
To fetch latest suggestion, just set page_size to 1.
To fetch new suggestions without duplication, send request with filter
create_time_epoch_microseconds \> \[first item's create_time of previous request\] and empty page_token.

Deprecated: ListSuggestions may be removed in a future version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListSuggestionsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListSuggestionsRequest.
    	}
    	it := c.ListSuggestions(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.(*dialogflowpb.ListSuggestionsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ParticipantsClient) StreamingAnalyzeContent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) StreamingAnalyzeContent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Participants_StreamingAnalyzeContentClient, https://pkg.go.dev/builtin#error)

StreamingAnalyzeContent adds a text (e.g., chat) or audio (e.g., phone recording) message from a
participant into the conversation.
Note: This method is only available through the gRPC API (not REST).

The top-level message sent to the client by the server is
StreamingAnalyzeContentResponse. Multiple response messages can be
returned in order. The first one or more messages contain the
recognition_result field. Each result represents a more complete
transcript of what the user said. The next message contains the
reply_text field, and potentially the reply_audio and/or the
automated_agent_reply fields.

Note: Always use agent versions for production traffic
sent to virtual agents. See Versions and
environments (at <https://cloud.google.com/dialogflow/es/docs/agents-versions>).

This method is not supported for the REST transport.

#### Example

    package main

    import (
    	"context"
    	"io"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()
    	stream, err := c.StreamingAnalyzeContent(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	go func() {
    		reqs := []*dialogflowpb.StreamingAnalyzeContentRequest{
    			// 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 (\*ParticipantsClient) StreamingReactiveCompanionSuggestions

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) StreamingReactiveCompanionSuggestions(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Participants_StreamingReactiveCompanionSuggestionsClient, https://pkg.go.dev/builtin#error)

StreamingReactiveCompanionSuggestions external streaming API for human-agent queries to the companion bot.

This method is not supported for the REST transport.

#### Example

    package main

    import (
    	"context"
    	"io"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()
    	stream, err := c.StreamingReactiveCompanionSuggestions(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	go func() {
    		reqs := []*dialogflowpb.StreamingReactiveCompanionSuggestionsRequest{
    			// 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 (\*ParticipantsClient) SuggestArticles

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) SuggestArticles(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SuggestArticlesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SuggestArticlesResponse, https://pkg.go.dev/builtin#error)

SuggestArticles gets suggested articles for a participant based on specific historical
messages.

Note that
ListSuggestions
will only list the auto-generated suggestions, while
CompileSuggestion
will try to compile suggestion based on the provided conversation context
in the real time.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.SuggestArticlesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#SuggestArticlesRequest.
    	}
    	resp, err := c.SuggestArticles(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ParticipantsClient) SuggestFaqAnswers

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) SuggestFaqAnswers(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SuggestFaqAnswersRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SuggestFaqAnswersResponse, https://pkg.go.dev/builtin#error)

SuggestFaqAnswers gets suggested faq answers for a participant based on specific historical
messages.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.SuggestFaqAnswersRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#SuggestFaqAnswersRequest.
    	}
    	resp, err := c.SuggestFaqAnswers(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ParticipantsClient) SuggestKnowledgeAssist

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) SuggestKnowledgeAssist(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SuggestKnowledgeAssistRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SuggestKnowledgeAssistResponse, https://pkg.go.dev/builtin#error)

SuggestKnowledgeAssist gets knowledge assist suggestions based on historical messages.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.SuggestKnowledgeAssistRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#SuggestKnowledgeAssistRequest.
    	}
    	resp, err := c.SuggestKnowledgeAssist(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ParticipantsClient) SuggestSmartReplies

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) SuggestSmartReplies(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SuggestSmartRepliesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SuggestSmartRepliesResponse, https://pkg.go.dev/builtin#error)

SuggestSmartReplies gets smart replies for a participant based on specific historical
messages.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.SuggestSmartRepliesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#SuggestSmartRepliesRequest.
    	}
    	resp, err := c.SuggestSmartReplies(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*ParticipantsClient) UpdateParticipant

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ParticipantsClient) UpdateParticipant(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateParticipantRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Participant, https://pkg.go.dev/builtin#error)

UpdateParticipant updates the specified participant.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewParticipantsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateParticipantRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateParticipantRequest.
    	}
    	resp, err := c.UpdateParticipant(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## PhoneNumberIterator

    type PhoneNumberIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.PhoneNumber, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

PhoneNumberIterator manages a stream of \*dialogflowpb.PhoneNumber.

### func (\*PhoneNumberIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumberIterator) All() iter.Seq2[*dialogflowpb.PhoneNumber, error]

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

### func (\*PhoneNumberIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumberIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_PhoneNumber, https://pkg.go.dev/builtin#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 (\*PhoneNumberIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumberIterator) PageInfo() *iterator.PageInfo

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

## PhoneNumbersCallOptions

    type PhoneNumbersCallOptions struct {
    	ListPhoneNumbers    []gax.CallOption
    	UpdatePhoneNumber   []gax.CallOption
    	DeletePhoneNumber   []gax.CallOption
    	UndeletePhoneNumber []gax.CallOption
    	GetLocation         []gax.CallOption
    	ListLocations       []gax.CallOption
    	CancelOperation     []gax.CallOption
    	GetOperation        []gax.CallOption
    	ListOperations      []gax.CallOption
    }

PhoneNumbersCallOptions contains the retry settings for each method of PhoneNumbersClient.

## PhoneNumbersClient

    type PhoneNumbersClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersCallOptions
    	// contains filtered or unexported fields
    }

PhoneNumbersClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing
PhoneNumbers.

### func NewPhoneNumbersClient

    func NewPhoneNumbersClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient, https://pkg.go.dev/builtin#error)

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

Service for managing
PhoneNumbers.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewPhoneNumbersClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewPhoneNumbersRESTClient

    func NewPhoneNumbersRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient, https://pkg.go.dev/builtin#error)

NewPhoneNumbersRESTClient creates a new phone numbers rest client.

Service for managing
PhoneNumbers.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient_NewPhoneNumbersRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*PhoneNumbersClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewPhoneNumbersClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*PhoneNumbersClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*PhoneNumbersClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) 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 (\*PhoneNumbersClient) DeletePhoneNumber

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) DeletePhoneNumber(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeletePhoneNumberRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_PhoneNumber, https://pkg.go.dev/builtin#error)

DeletePhoneNumber requests deletion of a PhoneNumber. The PhoneNumber is moved into the
DELETE_REQUESTED
state immediately, and is deleted approximately 30 days later. This method
may only be called on a PhoneNumber in the
\[ACTIVE\]\[google.cloud.dialogflow.v2beta1.PhoneNumber.LifecycleState.ACTIVE (at <http://google.cloud.dialogflow.v2beta1.PhoneNumber.LifecycleState.ACTIVE>)\]
state.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewPhoneNumbersClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeletePhoneNumberRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeletePhoneNumberRequest.
    	}
    	resp, err := c.DeletePhoneNumber(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*PhoneNumbersClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewPhoneNumbersClient(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 (\*PhoneNumbersClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewPhoneNumbersClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*PhoneNumbersClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewPhoneNumbersClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewPhoneNumbersClient(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 (\*PhoneNumbersClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewPhoneNumbersClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewPhoneNumbersClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*PhoneNumbersClient) ListPhoneNumbers

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) ListPhoneNumbers(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListPhoneNumbersRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumberIterator

ListPhoneNumbers returns the list of all phone numbers in the specified project.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewPhoneNumbersClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListPhoneNumbersRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListPhoneNumbersRequest.
    	}
    	it := c.ListPhoneNumbers(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.(*dialogflowpb.ListPhoneNumbersResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewPhoneNumbersClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*PhoneNumbersClient) UndeletePhoneNumber

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) UndeletePhoneNumber(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UndeletePhoneNumberRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_PhoneNumber, https://pkg.go.dev/builtin#error)

UndeletePhoneNumber cancels the deletion request for a PhoneNumber. This method may only be
called on a PhoneNumber in the
DELETE_REQUESTED
state.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewPhoneNumbersClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UndeletePhoneNumberRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UndeletePhoneNumberRequest.
    	}
    	resp, err := c.UndeletePhoneNumber(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*PhoneNumbersClient) UpdatePhoneNumber

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_PhoneNumbersClient) UpdatePhoneNumber(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdatePhoneNumberRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_PhoneNumber, https://pkg.go.dev/builtin#error)

UpdatePhoneNumber updates the specified PhoneNumber.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewPhoneNumbersClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdatePhoneNumberRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdatePhoneNumberRequest.
    	}
    	resp, err := c.UpdatePhoneNumber(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## ReloadDocumentOperation

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

ReloadDocumentOperation manages a long-running operation from ReloadDocument.

### func (\*ReloadDocumentOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ReloadDocumentOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*ReloadDocumentOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ReloadDocumentOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_KnowledgeOperationMetadata, https://pkg.go.dev/builtin#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 (\*ReloadDocumentOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ReloadDocumentOperation) Name() https://pkg.go.dev/builtin#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 (\*ReloadDocumentOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ReloadDocumentOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Document, https://pkg.go.dev/builtin#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 (\*ReloadDocumentOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ReloadDocumentOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Document, https://pkg.go.dev/builtin#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.

## RestoreAgentOperation

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

RestoreAgentOperation manages a long-running operation from RestoreAgent.

### func (\*RestoreAgentOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_RestoreAgentOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*RestoreAgentOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_RestoreAgentOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*RestoreAgentOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_RestoreAgentOperation) Name() https://pkg.go.dev/builtin#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 (\*RestoreAgentOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_RestoreAgentOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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 (\*RestoreAgentOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_RestoreAgentOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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.

## SessionEntityTypeIterator

    type SessionEntityTypeIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.SessionEntityType, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

SessionEntityTypeIterator manages a stream of \*dialogflowpb.SessionEntityType.

### func (\*SessionEntityTypeIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypeIterator) All() iter.Seq2[*dialogflowpb.SessionEntityType, error]

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

### func (\*SessionEntityTypeIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypeIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SessionEntityType, https://pkg.go.dev/builtin#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 (\*SessionEntityTypeIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypeIterator) PageInfo() *iterator.PageInfo

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

## SessionEntityTypesCallOptions

    type SessionEntityTypesCallOptions struct {
    	ListSessionEntityTypes  []gax.CallOption
    	GetSessionEntityType    []gax.CallOption
    	CreateSessionEntityType []gax.CallOption
    	UpdateSessionEntityType []gax.CallOption
    	DeleteSessionEntityType []gax.CallOption
    	GetLocation             []gax.CallOption
    	ListLocations           []gax.CallOption
    	CancelOperation         []gax.CallOption
    	GetOperation            []gax.CallOption
    	ListOperations          []gax.CallOption
    }

SessionEntityTypesCallOptions contains the retry settings for each method of SessionEntityTypesClient.

## SessionEntityTypesClient

    type SessionEntityTypesClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesCallOptions
    	// contains filtered or unexported fields
    }

SessionEntityTypesClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing
SessionEntityTypes.

### func NewSessionEntityTypesClient

    func NewSessionEntityTypesClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient, https://pkg.go.dev/builtin#error)

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

Service for managing
SessionEntityTypes.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewSessionEntityTypesRESTClient

    func NewSessionEntityTypesRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient, https://pkg.go.dev/builtin#error)

NewSessionEntityTypesRESTClient creates a new session entity types rest client.

Service for managing
SessionEntityTypes.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient_NewSessionEntityTypesRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*SessionEntityTypesClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*SessionEntityTypesClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*SessionEntityTypesClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) 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 (\*SessionEntityTypesClient) CreateSessionEntityType

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) CreateSessionEntityType(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateSessionEntityTypeRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SessionEntityType, https://pkg.go.dev/builtin#error)

CreateSessionEntityType creates a session entity type.

If the specified session entity type already exists, overrides the
session entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateSessionEntityTypeRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateSessionEntityTypeRequest.
    	}
    	resp, err := c.CreateSessionEntityType(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*SessionEntityTypesClient) DeleteSessionEntityType

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) DeleteSessionEntityType(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteSessionEntityTypeRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteSessionEntityType deletes the specified session entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteSessionEntityTypeRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteSessionEntityTypeRequest.
    	}
    	err = c.DeleteSessionEntityType(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*SessionEntityTypesClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionEntityTypesClient(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 (\*SessionEntityTypesClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*SessionEntityTypesClient) GetSessionEntityType

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) GetSessionEntityType(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetSessionEntityTypeRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SessionEntityType, https://pkg.go.dev/builtin#error)

GetSessionEntityType retrieves the specified session entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetSessionEntityTypeRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetSessionEntityTypeRequest.
    	}
    	resp, err := c.GetSessionEntityType(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*SessionEntityTypesClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewSessionEntityTypesClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionEntityTypesClient(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 (\*SessionEntityTypesClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*SessionEntityTypesClient) ListSessionEntityTypes

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) ListSessionEntityTypes(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListSessionEntityTypesRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypeIterator

ListSessionEntityTypes returns the list of all session entity types in the specified session.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListSessionEntityTypesRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListSessionEntityTypesRequest.
    	}
    	it := c.ListSessionEntityTypes(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.(*dialogflowpb.ListSessionEntityTypesResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*SessionEntityTypesClient) UpdateSessionEntityType

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionEntityTypesClient) UpdateSessionEntityType(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateSessionEntityTypeRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SessionEntityType, https://pkg.go.dev/builtin#error)

UpdateSessionEntityType updates the specified session entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSessionEntityTypesClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateSessionEntityTypeRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateSessionEntityTypeRequest.
    	}
    	resp, err := c.UpdateSessionEntityType(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## SessionsCallOptions

    type SessionsCallOptions struct {
    	DetectIntent          []gax.CallOption
    	StreamingDetectIntent []gax.CallOption
    	GetLocation           []gax.CallOption
    	ListLocations         []gax.CallOption
    	CancelOperation       []gax.CallOption
    	GetOperation          []gax.CallOption
    	ListOperations        []gax.CallOption
    }

SessionsCallOptions contains the retry settings for each method of SessionsClient.

## SessionsClient

    type SessionsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsCallOptions
    	// contains filtered or unexported fields
    }

SessionsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service used for session interactions.

For more information, see the API interactions
guide (at <https://cloud.google.com/dialogflow/docs/api-overview>).

### func NewSessionsClient

    func NewSessionsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient, https://pkg.go.dev/builtin#error)

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

A service used for session interactions.

For more information, see the API interactions
guide (at <https://cloud.google.com/dialogflow/docs/api-overview>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewSessionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewSessionsRESTClient

    func NewSessionsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient, https://pkg.go.dev/builtin#error)

NewSessionsRESTClient creates a new sessions rest client.

A service used for session interactions.

For more information, see the API interactions
guide (at <https://cloud.google.com/dialogflow/docs/api-overview>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient_NewSessionsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*SessionsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*SessionsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*SessionsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient) 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 (\*SessionsClient) DetectIntent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient) DetectIntent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DetectIntentRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DetectIntentResponse, https://pkg.go.dev/builtin#error)

DetectIntent processes a natural language query and returns structured, actionable data
as a result. This method is not idempotent, because it may cause contexts
and session entity types to be updated, which in turn might affect
results of future queries.

If you might use
Agent Assist (at <https://cloud.google.com/dialogflow/docs/#aa>)
or other CCAI products now or in the future, consider using
AnalyzeContent
instead of DetectIntent. AnalyzeContent has additional
functionality for Agent Assist and other CCAI products.

Note: Always use agent versions for production traffic.
See Versions and
environments (at <https://cloud.google.com/dialogflow/es/docs/agents-versions>).

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSessionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DetectIntentRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DetectIntentRequest.
    	}
    	resp, err := c.DetectIntent(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*SessionsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionsClient(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 (\*SessionsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*SessionsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewSessionsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionsClient(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 (\*SessionsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSessionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	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 := dialogflow.NewSessionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*SessionsClient) StreamingDetectIntent

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SessionsClient) StreamingDetectIntent(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Sessions_StreamingDetectIntentClient, https://pkg.go.dev/builtin#error)

StreamingDetectIntent processes a natural language query in audio format in a streaming fashion
and returns structured, actionable data as a result. This method is only
available via the gRPC API (not REST).

If you might use
Agent Assist (at <https://cloud.google.com/dialogflow/docs/#aa>)
or other CCAI products now or in the future, consider using
StreamingAnalyzeContent
instead of StreamingDetectIntent. StreamingAnalyzeContent has
additional functionality for Agent Assist and other CCAI products.

Note: Always use agent versions for production traffic.
See Versions and
environments (at <https://cloud.google.com/dialogflow/es/docs/agents-versions>).

This method is not supported for the REST transport.

#### Example

    package main

    import (
    	"context"
    	"io"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSessionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()
    	stream, err := c.StreamingDetectIntent(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	go func() {
    		reqs := []*dialogflowpb.StreamingDetectIntentRequest{
    			// 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
    	}
    }

## SetSuggestionFeatureConfigOperation

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

SetSuggestionFeatureConfigOperation manages a long-running operation from SetSuggestionFeatureConfig.

### func (\*SetSuggestionFeatureConfigOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SetSuggestionFeatureConfigOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*SetSuggestionFeatureConfigOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SetSuggestionFeatureConfigOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SetSuggestionFeatureConfigOperationMetadata, https://pkg.go.dev/builtin#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 (\*SetSuggestionFeatureConfigOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SetSuggestionFeatureConfigOperation) Name() https://pkg.go.dev/builtin#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 (\*SetSuggestionFeatureConfigOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SetSuggestionFeatureConfigOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ConversationProfile, https://pkg.go.dev/builtin#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 (\*SetSuggestionFeatureConfigOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SetSuggestionFeatureConfigOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ConversationProfile, https://pkg.go.dev/builtin#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.

## SipTrunkIterator

    type SipTrunkIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.SipTrunk, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

SipTrunkIterator manages a stream of \*dialogflowpb.SipTrunk.

### func (\*SipTrunkIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunkIterator) All() iter.Seq2[*dialogflowpb.SipTrunk, error]

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

### func (\*SipTrunkIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunkIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SipTrunk, https://pkg.go.dev/builtin#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 (\*SipTrunkIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunkIterator) PageInfo() *iterator.PageInfo

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

## SipTrunksCallOptions

    type SipTrunksCallOptions struct {
    	CreateSipTrunk  []gax.CallOption
    	DeleteSipTrunk  []gax.CallOption
    	ListSipTrunks   []gax.CallOption
    	GetSipTrunk     []gax.CallOption
    	UpdateSipTrunk  []gax.CallOption
    	GetLocation     []gax.CallOption
    	ListLocations   []gax.CallOption
    	CancelOperation []gax.CallOption
    	GetOperation    []gax.CallOption
    	ListOperations  []gax.CallOption
    }

SipTrunksCallOptions contains the retry settings for each method of SipTrunksClient.

## SipTrunksClient

    type SipTrunksClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksCallOptions
    	// contains filtered or unexported fields
    }

SipTrunksClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing SipTrunks.

### func NewSipTrunksClient

    func NewSipTrunksClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient, https://pkg.go.dev/builtin#error)

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

Service for managing SipTrunks.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewSipTrunksRESTClient

    func NewSipTrunksRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient, https://pkg.go.dev/builtin#error)

NewSipTrunksRESTClient creates a new sip trunks rest client.

Service for managing SipTrunks.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient_NewSipTrunksRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*SipTrunksClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*SipTrunksClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*SipTrunksClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) 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 (\*SipTrunksClient) CreateSipTrunk

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) CreateSipTrunk(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateSipTrunkRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SipTrunk, https://pkg.go.dev/builtin#error)

CreateSipTrunk creates a SipTrunk for a specified location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateSipTrunkRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateSipTrunkRequest.
    	}
    	resp, err := c.CreateSipTrunk(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*SipTrunksClient) DeleteSipTrunk

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) DeleteSipTrunk(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteSipTrunkRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteSipTrunk deletes a specified SipTrunk.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteSipTrunkRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteSipTrunkRequest.
    	}
    	err = c.DeleteSipTrunk(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*SipTrunksClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSipTrunksClient(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 (\*SipTrunksClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*SipTrunksClient) GetSipTrunk

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) GetSipTrunk(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetSipTrunkRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SipTrunk, https://pkg.go.dev/builtin#error)

GetSipTrunk retrieves the specified SipTrunk.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetSipTrunkRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetSipTrunkRequest.
    	}
    	resp, err := c.GetSipTrunk(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*SipTrunksClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewSipTrunksClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSipTrunksClient(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 (\*SipTrunksClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*SipTrunksClient) ListSipTrunks

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) ListSipTrunks(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListSipTrunksRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunkIterator

ListSipTrunks returns a list of SipTrunks in the specified location.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListSipTrunksRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListSipTrunksRequest.
    	}
    	it := c.ListSipTrunks(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.(*dialogflowpb.ListSipTrunksResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*SipTrunksClient) UpdateSipTrunk

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SipTrunksClient) UpdateSipTrunk(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateSipTrunkRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_SipTrunk, https://pkg.go.dev/builtin#error)

UpdateSipTrunk updates the specified SipTrunk.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewSipTrunksClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateSipTrunkRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateSipTrunkRequest.
    	}
    	resp, err := c.UpdateSipTrunk(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

## SuggestionIterator

    type SuggestionIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Suggestion, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

SuggestionIterator manages a stream of \*dialogflowpb.Suggestion.

### func (\*SuggestionIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SuggestionIterator) All() iter.Seq2[*dialogflowpb.Suggestion, error]

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

### func (\*SuggestionIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SuggestionIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Suggestion, https://pkg.go.dev/builtin#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 (\*SuggestionIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_SuggestionIterator) PageInfo() *iterator.PageInfo

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

## 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Tool, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

ToolIterator manages a stream of \*dialogflowpb.Tool.

### func (\*ToolIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolIterator) All() iter.Seq2[*dialogflowpb.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 *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Tool, https://pkg.go.dev/builtin#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 *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolIterator) PageInfo() *iterator.PageInfo

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

## ToolsCallOptions

    type ToolsCallOptions struct {
    	CreateTool      []gax.CallOption
    	GetTool         []gax.CallOption
    	ListTools       []gax.CallOption
    	DeleteTool      []gax.CallOption
    	UpdateTool      []gax.CallOption
    	GetLocation     []gax.CallOption
    	ListLocations   []gax.CallOption
    	CancelOperation []gax.CallOption
    	GetOperation    []gax.CallOption
    	ListOperations  []gax.CallOption
    }

ToolsCallOptions contains the retry settings for each method of ToolsClient.

## ToolsClient

    type ToolsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsCallOptions
    	// contains filtered or unexported fields
    }

ToolsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Tool Service for LLM powered Agent Assist. Tools can be used to interact with
remote APIs (e.g. fetching orders) to retrieve additional information as
input to LLM.

### func NewToolsClient

    func NewToolsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient, https://pkg.go.dev/builtin#error)

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

Tool Service for LLM powered Agent Assist. Tools can be used to interact with
remote APIs (e.g. fetching orders) to retrieve additional information as
input to LLM.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewToolsRESTClient

    func NewToolsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient, https://pkg.go.dev/builtin#error)

NewToolsRESTClient creates a new tools rest client.

Tool Service for LLM powered Agent Assist. Tools can be used to interact with
remote APIs (e.g. fetching orders) to retrieve additional information as
input to LLM.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient_NewToolsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*ToolsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ToolsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*ToolsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) 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 (\*ToolsClient) CreateTool

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) CreateTool(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateToolRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Tool, https://pkg.go.dev/builtin#error)

CreateTool creates a tool.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ToolsClient) DeleteTool

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) DeleteTool(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteToolRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteTool deletes a tool.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ToolsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewToolsClient(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 (\*ToolsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ToolsClient) GetTool

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) GetTool(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetToolRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Tool, https://pkg.go.dev/builtin#error)

GetTool retrieves a tool.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*ToolsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewToolsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewToolsClient(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 (\*ToolsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*ToolsClient) ListTools

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) ListTools(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListToolsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolIterator

ListTools lists tools.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListToolsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#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.(*dialogflowpb.ListToolsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListToolsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#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 (\*ToolsClient) UpdateTool

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_ToolsClient) UpdateTool(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateToolRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Tool, https://pkg.go.dev/builtin#error)

UpdateTool updates a tool.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewToolsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

## TrainAgentOperation

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

TrainAgentOperation manages a long-running operation from TrainAgent.

### func (\*TrainAgentOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_TrainAgentOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*TrainAgentOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_TrainAgentOperation) Metadata() (*https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb.https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct, https://pkg.go.dev/builtin#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 (\*TrainAgentOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_TrainAgentOperation) Name() https://pkg.go.dev/builtin#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 (\*TrainAgentOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_TrainAgentOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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 (\*TrainAgentOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_TrainAgentOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#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.

## UpdateDocumentOperation

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

UpdateDocumentOperation manages a long-running operation from UpdateDocument.

### func (\*UpdateDocumentOperation) Done

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_UpdateDocumentOperation) Done() https://pkg.go.dev/builtin#bool

Done reports whether the long-running operation has completed.

### func (\*UpdateDocumentOperation) Metadata

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_UpdateDocumentOperation) Metadata() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_KnowledgeOperationMetadata, https://pkg.go.dev/builtin#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 (\*UpdateDocumentOperation) Name

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_UpdateDocumentOperation) Name() https://pkg.go.dev/builtin#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 (\*UpdateDocumentOperation) Poll

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_UpdateDocumentOperation) Poll(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Document, https://pkg.go.dev/builtin#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 (\*UpdateDocumentOperation) Wait

    func (op *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_UpdateDocumentOperation) Wait(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Document, https://pkg.go.dev/builtin#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.

## VersionIterator

    type VersionIterator 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 https://pkg.go.dev/builtin#int, pageToken https://pkg.go.dev/builtin#string) (results []*dialogflowpb.Version, nextPageToken https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error)
    	// contains filtered or unexported fields
    }

VersionIterator manages a stream of \*dialogflowpb.Version.

### func (\*VersionIterator) All

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionIterator) All() iter.Seq2[*dialogflowpb.Version, error]

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

### func (\*VersionIterator) Next

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionIterator) Next() (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Version, https://pkg.go.dev/builtin#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 (\*VersionIterator) PageInfo

    func (it *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionIterator) PageInfo() *iterator.PageInfo

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

## VersionsCallOptions

    type VersionsCallOptions struct {
    	ListVersions    []gax.CallOption
    	GetVersion      []gax.CallOption
    	CreateVersion   []gax.CallOption
    	UpdateVersion   []gax.CallOption
    	DeleteVersion   []gax.CallOption
    	GetLocation     []gax.CallOption
    	ListLocations   []gax.CallOption
    	CancelOperation []gax.CallOption
    	GetOperation    []gax.CallOption
    	ListOperations  []gax.CallOption
    }

VersionsCallOptions contains the retry settings for each method of VersionsClient.

## VersionsClient

    type VersionsClient struct {

    	// The call options for this service.
    	CallOptions *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsCallOptions
    	// contains filtered or unexported fields
    }

VersionsClient is a client for interacting with Dialogflow API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing Versions.

### func NewVersionsClient

    func NewVersionsClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient, https://pkg.go.dev/builtin#error)

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

Service for managing Versions.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func NewVersionsRESTClient

    func NewVersionsRESTClient(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, opts ...option.ClientOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient, https://pkg.go.dev/builtin#error)

NewVersionsRESTClient creates a new versions rest client.

Service for managing Versions.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    )

    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 := dialogflow.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1.html#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient_NewVersionsRESTClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	// TODO: Use client.
    	_ = c
    }

### func (\*VersionsClient) CancelOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) CancelOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*VersionsClient) Close

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) Close() https://pkg.go.dev/builtin#error

Close closes the connection to the API service. **Always** call Close() when
the client is no longer required.

### func (\*VersionsClient) Connection
(deprecated)

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) 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 (\*VersionsClient) CreateVersion

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) CreateVersion(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_CreateVersionRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Version, https://pkg.go.dev/builtin#error)

CreateVersion creates an agent version.

The new version points to the agent instance in the "default" environment.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.CreateVersionRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#CreateVersionRequest.
    	}
    	resp, err := c.CreateVersion(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*VersionsClient) DeleteVersion

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) DeleteVersion(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_DeleteVersionRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) https://pkg.go.dev/builtin#error

DeleteVersion delete the specified agent version.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.DeleteVersionRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#DeleteVersionRequest.
    	}
    	err = c.DeleteVersion(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    }

### func (\*VersionsClient) GetLocation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) GetLocation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#Location, https://pkg.go.dev/builtin#error)

GetLocation gets information about a location.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewVersionsClient(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 (\*VersionsClient) GetOperation

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) GetOperation(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#Operation, https://pkg.go.dev/builtin#error)

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

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*VersionsClient) GetVersion

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) GetVersion(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_GetVersionRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Version, https://pkg.go.dev/builtin#error)

GetVersion retrieves the specified agent version.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.GetVersionRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#GetVersionRequest.
    	}
    	resp, err := c.GetVersion(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }

### func (\*VersionsClient) ListLocations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) ListLocations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location.https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_LocationIterator

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the \[ListLocationsRequest.name (at http://ListLocationsRequest.name)\]\[google.cloud.location.ListLocationsRequest.name (at <http://google.cloud.location.ListLocationsRequest.name>)\] field: \*
Global locations: If name is empty, the method lists the
public locations available to all projects. \* Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	"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 := dialogflow.NewVersionsClient(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)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewVersionsClient(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 (\*VersionsClient) ListOperations

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) ListOperations(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb.https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_OperationIterator

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

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
    	}
    	it := c.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_ListOperationsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"

    	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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &longrunningpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_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.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen/longrunningpb.html#cloud_google_com_go_longrunning_autogen_longrunningpb_UnimplementedOperationsServer_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 (\*VersionsClient) ListVersions

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) ListVersions(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_ListVersionsRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionIterator

ListVersions returns the list of all versions of the specified agent.

#### Examples

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    	"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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.ListVersionsRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#ListVersionsRequest.
    	}
    	it := c.ListVersions(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.(*dialogflowpb.ListVersionsResponse)
    	}
    }

##### all

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

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

### func (\*VersionsClient) UpdateVersion

    func (c *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1#cloud_google_com_go_dialogflow_apiv2beta1_VersionsClient) UpdateVersion(ctx https://pkg.go.dev/context.https://pkg.go.dev/context#Context, req *https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_UpdateVersionRequest, opts ...https://pkg.go.dev/github.com/googleapis/gax-go/v2.https://pkg.go.dev/github.com/googleapis/gax-go/v2#CallOption) (*https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb.https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/apiv2beta1/dialogflowpb#cloud_google_com_go_dialogflow_apiv2beta1_dialogflowpb_Version, https://pkg.go.dev/builtin#error)

UpdateVersion updates the specified agent version.

Note that this method does not allow you to update the state of the agent
the given version points to. It allows you to update only mutable
properties of the version resource.

#### Example

    package main

    import (
    	"context"

    	dialogflow "cloud.google.com/go/dialogflow/apiv2beta1"
    	dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb"
    )

    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 := dialogflow.NewVersionsClient(ctx)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	defer c.Close()

    	req := &dialogflowpb.UpdateVersionRequest{
    		// TODO: Fill request struct fields.
    		// See https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb#UpdateVersionRequest.
    	}
    	resp, err := c.UpdateVersion(ctx, req)
    	if err != nil {
    		// TODO: Handle error.
    	}
    	// TODO: Use resp.
    	_ = resp
    }