Documentation
¶
Overview ¶
Package geminidataanalytics is an auto-generated package for the Data Analytics API with Gemini.
NOTE: This package is in beta. It is not stable, and may be subject to changes.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage ¶
To get started with this package, create a client.
// go get cloud.google.com/go/geminidataanalytics/apiv1beta@latest
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client, mentioned above.
req := &geminidataanalyticspb.CreateDataAgentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#CreateDataAgentRequest.
}
op, err := c.CreateDataAgent(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
Use of Context ¶
The ctx passed to NewDataAgentClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Index ¶
- func DefaultAuthScopes() []string
- type ConversationIterator
- type CreateDataAgentOperation
- func (op *CreateDataAgentOperation) Done() bool
- func (op *CreateDataAgentOperation) Metadata() (*geminidataanalyticspb.OperationMetadata, error)
- func (op *CreateDataAgentOperation) Name() string
- func (op *CreateDataAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, error)
- func (op *CreateDataAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, error)
- type DataAgentCallOptions
- type DataAgentClient
- func (c *DataAgentClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *DataAgentClient) Close() error
- func (c *DataAgentClient) Connection() *grpc.ClientConndeprecated
- func (c *DataAgentClient) CreateDataAgent(ctx context.Context, req *geminidataanalyticspb.CreateDataAgentRequest, ...) (*CreateDataAgentOperation, error)
- func (c *DataAgentClient) CreateDataAgentOperation(name string) *CreateDataAgentOperation
- func (c *DataAgentClient) CreateDataAgentSync(ctx context.Context, req *geminidataanalyticspb.CreateDataAgentRequest, ...) (*geminidataanalyticspb.DataAgent, error)
- func (c *DataAgentClient) DeleteDataAgent(ctx context.Context, req *geminidataanalyticspb.DeleteDataAgentRequest, ...) (*DeleteDataAgentOperation, error)
- func (c *DataAgentClient) DeleteDataAgentOperation(name string) *DeleteDataAgentOperation
- func (c *DataAgentClient) DeleteDataAgentSync(ctx context.Context, req *geminidataanalyticspb.DeleteDataAgentRequest, ...) error
- func (c *DataAgentClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *DataAgentClient) GetDataAgent(ctx context.Context, req *geminidataanalyticspb.GetDataAgentRequest, ...) (*geminidataanalyticspb.DataAgent, error)
- func (c *DataAgentClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *DataAgentClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *DataAgentClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *DataAgentClient) ListAccessibleDataAgents(ctx context.Context, ...) *DataAgentIterator
- func (c *DataAgentClient) ListDataAgents(ctx context.Context, req *geminidataanalyticspb.ListDataAgentsRequest, ...) *DataAgentIterator
- func (c *DataAgentClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *DataAgentClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *DataAgentClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *DataAgentClient) UpdateDataAgent(ctx context.Context, req *geminidataanalyticspb.UpdateDataAgentRequest, ...) (*UpdateDataAgentOperation, error)
- func (c *DataAgentClient) UpdateDataAgentOperation(name string) *UpdateDataAgentOperation
- func (c *DataAgentClient) UpdateDataAgentSync(ctx context.Context, req *geminidataanalyticspb.UpdateDataAgentRequest, ...) (*geminidataanalyticspb.DataAgent, error)
- type DataAgentIterator
- type DataChatCallOptions
- type DataChatClient
- func (c *DataChatClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *DataChatClient) Chat(ctx context.Context, req *geminidataanalyticspb.ChatRequest, ...) (geminidataanalyticspb.DataChatService_ChatClient, error)
- func (c *DataChatClient) Close() error
- func (c *DataChatClient) Connection() *grpc.ClientConndeprecated
- func (c *DataChatClient) CreateConversation(ctx context.Context, req *geminidataanalyticspb.CreateConversationRequest, ...) (*geminidataanalyticspb.Conversation, error)
- func (c *DataChatClient) DeleteConversation(ctx context.Context, req *geminidataanalyticspb.DeleteConversationRequest, ...) error
- func (c *DataChatClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *DataChatClient) GetConversation(ctx context.Context, req *geminidataanalyticspb.GetConversationRequest, ...) (*geminidataanalyticspb.Conversation, error)
- func (c *DataChatClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *DataChatClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *DataChatClient) ListConversations(ctx context.Context, req *geminidataanalyticspb.ListConversationsRequest, ...) *ConversationIterator
- func (c *DataChatClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *DataChatClient) ListMessages(ctx context.Context, req *geminidataanalyticspb.ListMessagesRequest, ...) *StorageMessageIterator
- func (c *DataChatClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *DataChatClient) QueryData(ctx context.Context, req *geminidataanalyticspb.QueryDataRequest, ...) (*geminidataanalyticspb.QueryDataResponse, error)
- type DeleteDataAgentOperation
- func (op *DeleteDataAgentOperation) Done() bool
- func (op *DeleteDataAgentOperation) Metadata() (*geminidataanalyticspb.OperationMetadata, error)
- func (op *DeleteDataAgentOperation) Name() string
- func (op *DeleteDataAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteDataAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type LocationIterator
- type OperationIterator
- type StorageMessageIterator
- type UpdateDataAgentOperation
- func (op *UpdateDataAgentOperation) Done() bool
- func (op *UpdateDataAgentOperation) Metadata() (*geminidataanalyticspb.OperationMetadata, error)
- func (op *UpdateDataAgentOperation) Name() string
- func (op *UpdateDataAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, error)
- func (op *UpdateDataAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, error)
Examples ¶
- DataAgentClient.CancelOperation
- DataAgentClient.CreateDataAgent
- DataAgentClient.CreateDataAgentSync
- DataAgentClient.DeleteDataAgent
- DataAgentClient.DeleteDataAgentSync
- DataAgentClient.DeleteOperation
- DataAgentClient.GetDataAgent
- DataAgentClient.GetIamPolicy
- DataAgentClient.GetLocation
- DataAgentClient.GetOperation
- DataAgentClient.ListAccessibleDataAgents
- DataAgentClient.ListAccessibleDataAgents (All)
- DataAgentClient.ListDataAgents
- DataAgentClient.ListDataAgents (All)
- DataAgentClient.ListLocations
- DataAgentClient.ListLocations (All)
- DataAgentClient.ListOperations
- DataAgentClient.ListOperations (All)
- DataAgentClient.SetIamPolicy
- DataAgentClient.UpdateDataAgent
- DataAgentClient.UpdateDataAgentSync
- DataChatClient.CancelOperation
- DataChatClient.CreateConversation
- DataChatClient.DeleteConversation
- DataChatClient.DeleteOperation
- DataChatClient.GetConversation
- DataChatClient.GetLocation
- DataChatClient.GetOperation
- DataChatClient.ListConversations
- DataChatClient.ListConversations (All)
- DataChatClient.ListLocations
- DataChatClient.ListLocations (All)
- DataChatClient.ListMessages
- DataChatClient.ListMessages (All)
- DataChatClient.ListOperations
- DataChatClient.ListOperations (All)
- DataChatClient.QueryData
- NewDataAgentClient
- NewDataAgentRESTClient
- NewDataChatClient
- NewDataChatRESTClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type ConversationIterator ¶
type ConversationIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*geminidataanalyticspb.Conversation, nextPageToken string, err error)
// contains filtered or unexported fields
}
ConversationIterator manages a stream of *geminidataanalyticspb.Conversation.
func (*ConversationIterator) All ¶
func (it *ConversationIterator) All() iter.Seq2[*geminidataanalyticspb.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 *ConversationIterator) Next() (*geminidataanalyticspb.Conversation, 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 *ConversationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CreateDataAgentOperation ¶
type CreateDataAgentOperation struct {
// contains filtered or unexported fields
}
CreateDataAgentOperation manages a long-running operation from CreateDataAgent.
func (*CreateDataAgentOperation) Done ¶
func (op *CreateDataAgentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateDataAgentOperation) Metadata ¶
func (op *CreateDataAgentOperation) Metadata() (*geminidataanalyticspb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateDataAgentOperation) Name ¶
func (op *CreateDataAgentOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateDataAgentOperation) Poll ¶
func (op *CreateDataAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, 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 (*CreateDataAgentOperation) Wait ¶
func (op *CreateDataAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DataAgentCallOptions ¶
type DataAgentCallOptions struct {
ListDataAgents []gax.CallOption
ListAccessibleDataAgents []gax.CallOption
GetDataAgent []gax.CallOption
CreateDataAgent []gax.CallOption
CreateDataAgentSync []gax.CallOption
UpdateDataAgent []gax.CallOption
UpdateDataAgentSync []gax.CallOption
DeleteDataAgent []gax.CallOption
DeleteDataAgentSync []gax.CallOption
GetIamPolicy []gax.CallOption
SetIamPolicy []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
DataAgentCallOptions contains the retry settings for each method of DataAgentClient.
type DataAgentClient ¶
type DataAgentClient struct {
// The call options for this service.
CallOptions *DataAgentCallOptions
// 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
}
DataAgentClient is a client for interacting with Data Analytics API with Gemini. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service describing handlers for resources.
func NewDataAgentClient ¶
func NewDataAgentClient(ctx context.Context, opts ...option.ClientOption) (*DataAgentClient, error)
NewDataAgentClient creates a new data agent service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service describing handlers for resources.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewDataAgentRESTClient ¶
func NewDataAgentRESTClient(ctx context.Context, opts ...option.ClientOption) (*DataAgentClient, error)
NewDataAgentRESTClient creates a new data agent service rest client.
Service describing handlers for resources.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*DataAgentClient) CancelOperation ¶
func (c *DataAgentClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DataAgentClient) Close ¶
func (c *DataAgentClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DataAgentClient) Connection
deprecated
func (c *DataAgentClient) 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 (*DataAgentClient) CreateDataAgent ¶
func (c *DataAgentClient) CreateDataAgent(ctx context.Context, req *geminidataanalyticspb.CreateDataAgentRequest, opts ...gax.CallOption) (*CreateDataAgentOperation, error)
CreateDataAgent creates a new DataAgent in a given project and location.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.CreateDataAgentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#CreateDataAgentRequest.
}
op, err := c.CreateDataAgent(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAgentClient) CreateDataAgentOperation ¶
func (c *DataAgentClient) CreateDataAgentOperation(name string) *CreateDataAgentOperation
CreateDataAgentOperation returns a new CreateDataAgentOperation from a given name. The name must be that of a previously created CreateDataAgentOperation, possibly from a different process.
func (*DataAgentClient) CreateDataAgentSync ¶ added in v0.6.0
func (c *DataAgentClient) CreateDataAgentSync(ctx context.Context, req *geminidataanalyticspb.CreateDataAgentRequest, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, error)
CreateDataAgentSync creates a new DataAgent in a given project and location synchronously.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.CreateDataAgentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#CreateDataAgentRequest.
}
resp, err := c.CreateDataAgentSync(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAgentClient) DeleteDataAgent ¶
func (c *DataAgentClient) DeleteDataAgent(ctx context.Context, req *geminidataanalyticspb.DeleteDataAgentRequest, opts ...gax.CallOption) (*DeleteDataAgentOperation, error)
DeleteDataAgent deletes a single DataAgent.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.DeleteDataAgentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#DeleteDataAgentRequest.
}
op, err := c.DeleteDataAgent(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*DataAgentClient) DeleteDataAgentOperation ¶
func (c *DataAgentClient) DeleteDataAgentOperation(name string) *DeleteDataAgentOperation
DeleteDataAgentOperation returns a new DeleteDataAgentOperation from a given name. The name must be that of a previously created DeleteDataAgentOperation, possibly from a different process.
func (*DataAgentClient) DeleteDataAgentSync ¶ added in v0.6.0
func (c *DataAgentClient) DeleteDataAgentSync(ctx context.Context, req *geminidataanalyticspb.DeleteDataAgentRequest, opts ...gax.CallOption) error
DeleteDataAgentSync deletes a single DataAgent synchronously.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.DeleteDataAgentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#DeleteDataAgentRequest.
}
err = c.DeleteDataAgentSync(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DataAgentClient) DeleteOperation ¶
func (c *DataAgentClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DataAgentClient) GetDataAgent ¶
func (c *DataAgentClient) GetDataAgent(ctx context.Context, req *geminidataanalyticspb.GetDataAgentRequest, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, error)
GetDataAgent gets details of a single DataAgent.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.GetDataAgentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#GetDataAgentRequest.
}
resp, err := c.GetDataAgent(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAgentClient) GetIamPolicy ¶
func (c *DataAgentClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the IAM policy for DataAgent
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
iampb "cloud.google.com/go/iam/apiv1/iampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.GetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
}
resp, err := c.GetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAgentClient) GetLocation ¶
func (c *DataAgentClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(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 (*DataAgentClient) GetOperation ¶
func (c *DataAgentClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAgentClient) ListAccessibleDataAgents ¶
func (c *DataAgentClient) ListAccessibleDataAgents(ctx context.Context, req *geminidataanalyticspb.ListAccessibleDataAgentsRequest, opts ...gax.CallOption) *DataAgentIterator
ListAccessibleDataAgents lists DataAgents that are accessible to the caller in a given project and location.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
"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 := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.ListAccessibleDataAgentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#ListAccessibleDataAgentsRequest.
}
it := c.ListAccessibleDataAgents(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.(*geminidataanalyticspb.ListAccessibleDataAgentsResponse)
}
}
Example (All) ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.ListAccessibleDataAgentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#ListAccessibleDataAgentsRequest.
}
for resp, err := range c.ListAccessibleDataAgents(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataAgentClient) ListDataAgents ¶
func (c *DataAgentClient) ListDataAgents(ctx context.Context, req *geminidataanalyticspb.ListDataAgentsRequest, opts ...gax.CallOption) *DataAgentIterator
ListDataAgents lists DataAgents in a given project and location.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
"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 := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.ListDataAgentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#ListDataAgentsRequest.
}
it := c.ListDataAgents(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.(*geminidataanalyticspb.ListDataAgentsResponse)
}
}
Example (All) ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.ListDataAgentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#ListDataAgentsRequest.
}
for resp, err := range c.ListDataAgents(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataAgentClient) ListLocations ¶
func (c *DataAgentClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
it := c.ListLocations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*locationpb.ListLocationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(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 (*DataAgentClient) ListOperations ¶
func (c *DataAgentClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataAgentClient) SetIamPolicy ¶
func (c *DataAgentClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the IAM policy for a DataAgent.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
iampb "cloud.google.com/go/iam/apiv1/iampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.SetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
}
resp, err := c.SetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAgentClient) UpdateDataAgent ¶
func (c *DataAgentClient) UpdateDataAgent(ctx context.Context, req *geminidataanalyticspb.UpdateDataAgentRequest, opts ...gax.CallOption) (*UpdateDataAgentOperation, error)
UpdateDataAgent updates the parameters of a single DataAgent.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.UpdateDataAgentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#UpdateDataAgentRequest.
}
op, err := c.UpdateDataAgent(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAgentClient) UpdateDataAgentOperation ¶
func (c *DataAgentClient) UpdateDataAgentOperation(name string) *UpdateDataAgentOperation
UpdateDataAgentOperation returns a new UpdateDataAgentOperation from a given name. The name must be that of a previously created UpdateDataAgentOperation, possibly from a different process.
func (*DataAgentClient) UpdateDataAgentSync ¶ added in v0.6.0
func (c *DataAgentClient) UpdateDataAgentSync(ctx context.Context, req *geminidataanalyticspb.UpdateDataAgentRequest, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, error)
UpdateDataAgentSync updates the parameters of a single DataAgent synchronously.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataAgentClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.UpdateDataAgentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#UpdateDataAgentRequest.
}
resp, err := c.UpdateDataAgentSync(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
type DataAgentIterator ¶
type DataAgentIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*geminidataanalyticspb.DataAgent, nextPageToken string, err error)
// contains filtered or unexported fields
}
DataAgentIterator manages a stream of *geminidataanalyticspb.DataAgent.
func (*DataAgentIterator) All ¶
func (it *DataAgentIterator) All() iter.Seq2[*geminidataanalyticspb.DataAgent, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DataAgentIterator) Next ¶
func (it *DataAgentIterator) Next() (*geminidataanalyticspb.DataAgent, 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 (*DataAgentIterator) PageInfo ¶
func (it *DataAgentIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DataChatCallOptions ¶
type DataChatCallOptions struct {
Chat []gax.CallOption
CreateConversation []gax.CallOption
DeleteConversation []gax.CallOption
GetConversation []gax.CallOption
ListConversations []gax.CallOption
ListMessages []gax.CallOption
QueryData []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
DataChatCallOptions contains the retry settings for each method of DataChatClient.
type DataChatClient ¶
type DataChatClient struct {
// The call options for this service.
CallOptions *DataChatCallOptions
// contains filtered or unexported fields
}
DataChatClient is a client for interacting with Data Analytics API with Gemini. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service to ask a natural language question on top of BigQuery and Looker Studio datasources to get back streamed responses of various kinds to help provide a rich conversational answer.
func NewDataChatClient ¶
func NewDataChatClient(ctx context.Context, opts ...option.ClientOption) (*DataChatClient, error)
NewDataChatClient creates a new data chat service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service to ask a natural language question on top of BigQuery and Looker Studio datasources to get back streamed responses of various kinds to help provide a rich conversational answer.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewDataChatRESTClient ¶
func NewDataChatRESTClient(ctx context.Context, opts ...option.ClientOption) (*DataChatClient, error)
NewDataChatRESTClient creates a new data chat service rest client.
Service to ask a natural language question on top of BigQuery and Looker Studio datasources to get back streamed responses of various kinds to help provide a rich conversational answer.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*DataChatClient) CancelOperation ¶
func (c *DataChatClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DataChatClient) Chat ¶
func (c *DataChatClient) Chat(ctx context.Context, req *geminidataanalyticspb.ChatRequest, opts ...gax.CallOption) (geminidataanalyticspb.DataChatService_ChatClient, error)
Chat answers a data question by generating a stream of Message objects.
func (*DataChatClient) Close ¶
func (c *DataChatClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DataChatClient) Connection
deprecated
func (c *DataChatClient) 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 (*DataChatClient) CreateConversation ¶
func (c *DataChatClient) CreateConversation(ctx context.Context, req *geminidataanalyticspb.CreateConversationRequest, opts ...gax.CallOption) (*geminidataanalyticspb.Conversation, error)
CreateConversation creates a new conversation to persist the conversation history. Each conversation will have multiple messages associated with it.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.CreateConversationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#CreateConversationRequest.
}
resp, err := c.CreateConversation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataChatClient) DeleteConversation ¶ added in v0.3.0
func (c *DataChatClient) DeleteConversation(ctx context.Context, req *geminidataanalyticspb.DeleteConversationRequest, opts ...gax.CallOption) error
DeleteConversation deletes a conversation.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.DeleteConversationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#DeleteConversationRequest.
}
err = c.DeleteConversation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DataChatClient) DeleteOperation ¶
func (c *DataChatClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DataChatClient) GetConversation ¶
func (c *DataChatClient) GetConversation(ctx context.Context, req *geminidataanalyticspb.GetConversationRequest, opts ...gax.CallOption) (*geminidataanalyticspb.Conversation, error)
GetConversation gets details of a single conversation by using conversation id and parent.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.GetConversationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#GetConversationRequest.
}
resp, err := c.GetConversation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataChatClient) GetLocation ¶
func (c *DataChatClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(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 (*DataChatClient) GetOperation ¶
func (c *DataChatClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataChatClient) ListConversations ¶
func (c *DataChatClient) ListConversations(ctx context.Context, req *geminidataanalyticspb.ListConversationsRequest, opts ...gax.CallOption) *ConversationIterator
ListConversations lists all conversations for a given parent.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
"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 := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.ListConversationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#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.(*geminidataanalyticspb.ListConversationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.ListConversationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#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 (*DataChatClient) ListLocations ¶
func (c *DataChatClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
it := c.ListLocations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*locationpb.ListLocationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(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 (*DataChatClient) ListMessages ¶
func (c *DataChatClient) ListMessages(ctx context.Context, req *geminidataanalyticspb.ListMessagesRequest, opts ...gax.CallOption) *StorageMessageIterator
ListMessages lists all messages for a given conversation.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
"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 := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.ListMessagesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#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.(*geminidataanalyticspb.ListMessagesResponse)
}
}
Example (All) ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.ListMessagesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#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 (*DataChatClient) ListOperations ¶
func (c *DataChatClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataChatClient) QueryData ¶ added in v0.4.0
func (c *DataChatClient) QueryData(ctx context.Context, req *geminidataanalyticspb.QueryDataRequest, opts ...gax.CallOption) (*geminidataanalyticspb.QueryDataResponse, error)
QueryData queries data from a natural language user query.
Example ¶
package main
import (
"context"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
geminidataanalyticspb "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := geminidataanalytics.NewDataChatClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &geminidataanalyticspb.QueryDataRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb#QueryDataRequest.
}
resp, err := c.QueryData(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
type DeleteDataAgentOperation ¶
type DeleteDataAgentOperation struct {
// contains filtered or unexported fields
}
DeleteDataAgentOperation manages a long-running operation from DeleteDataAgent.
func (*DeleteDataAgentOperation) Done ¶
func (op *DeleteDataAgentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteDataAgentOperation) Metadata ¶
func (op *DeleteDataAgentOperation) Metadata() (*geminidataanalyticspb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteDataAgentOperation) Name ¶
func (op *DeleteDataAgentOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteDataAgentOperation) Poll ¶
func (op *DeleteDataAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDataAgentOperation) Wait ¶
func (op *DeleteDataAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type LocationIterator ¶
type LocationIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)
// contains filtered or unexported fields
}
LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) All ¶
func (it *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 *LocationIterator) Next() (*locationpb.Location, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*LocationIterator) PageInfo ¶
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type OperationIterator ¶
type OperationIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
// contains filtered or unexported fields
}
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All ¶
func (it *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 *OperationIterator) Next() (*longrunningpb.Operation, 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 *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type StorageMessageIterator ¶
type StorageMessageIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*geminidataanalyticspb.StorageMessage, nextPageToken string, err error)
// contains filtered or unexported fields
}
StorageMessageIterator manages a stream of *geminidataanalyticspb.StorageMessage.
func (*StorageMessageIterator) All ¶
func (it *StorageMessageIterator) All() iter.Seq2[*geminidataanalyticspb.StorageMessage, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*StorageMessageIterator) Next ¶
func (it *StorageMessageIterator) Next() (*geminidataanalyticspb.StorageMessage, 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 (*StorageMessageIterator) PageInfo ¶
func (it *StorageMessageIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type UpdateDataAgentOperation ¶
type UpdateDataAgentOperation struct {
// contains filtered or unexported fields
}
UpdateDataAgentOperation manages a long-running operation from UpdateDataAgent.
func (*UpdateDataAgentOperation) Done ¶
func (op *UpdateDataAgentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateDataAgentOperation) Metadata ¶
func (op *UpdateDataAgentOperation) Metadata() (*geminidataanalyticspb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateDataAgentOperation) Name ¶
func (op *UpdateDataAgentOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateDataAgentOperation) Poll ¶
func (op *UpdateDataAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, 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 (*UpdateDataAgentOperation) Wait ¶
func (op *UpdateDataAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*geminidataanalyticspb.DataAgent, 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.