Package visionai is an auto-generated package for the Vision AI API.
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/visionai/apiv1@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 := visionai.NewLiveVideoAnalyticsClient(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 := &visionaipb.BatchRunProcessRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#BatchRunProcessRequest. } op, err := c.BatchRunProcess(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 NewLiveVideoAnalyticsClient 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() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
AddApplicationStreamInputOperation
type AddApplicationStreamInputOperation struct {
// contains filtered or unexported fields
}
AddApplicationStreamInputOperation manages a long-running operation from AddApplicationStreamInput.
func (*AddApplicationStreamInputOperation) Done
func (op *AddApplicationStreamInputOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*AddApplicationStreamInputOperation) Metadata
func (op *AddApplicationStreamInputOperation) Metadata() (*visionaipb.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 (*AddApplicationStreamInputOperation) Name
func (op *AddApplicationStreamInputOperation) 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 (*AddApplicationStreamInputOperation) Poll
func (op *AddApplicationStreamInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AddApplicationStreamInputResponse, 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 (*AddApplicationStreamInputOperation) Wait
func (op *AddApplicationStreamInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AddApplicationStreamInputResponse, 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.
AnalysisIterator
type AnalysisIterator 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 []*visionaipb.Analysis, nextPageToken string, err error)
// contains filtered or unexported fields
}
AnalysisIterator manages a stream of *visionaipb.Analysis.
func (*AnalysisIterator) All
func (it *AnalysisIterator) All() iter.Seq2[*visionaipb.Analysis, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*AnalysisIterator) Next
func (it *AnalysisIterator) Next() (*visionaipb.Analysis, 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 (*AnalysisIterator) PageInfo
func (it *AnalysisIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AnalyzeAssetOperation
type AnalyzeAssetOperation struct {
// contains filtered or unexported fields
}
AnalyzeAssetOperation manages a long-running operation from AnalyzeAsset.
func (*AnalyzeAssetOperation) Done
func (op *AnalyzeAssetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*AnalyzeAssetOperation) Metadata
func (op *AnalyzeAssetOperation) Metadata() (*visionaipb.AnalyzeAssetMetadata, 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 (*AnalyzeAssetOperation) Name
func (op *AnalyzeAssetOperation) 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 (*AnalyzeAssetOperation) Poll
func (op *AnalyzeAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeAssetResponse, 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 (*AnalyzeAssetOperation) Wait
func (op *AnalyzeAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeAssetResponse, 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.
AnalyzeCorpusOperation
type AnalyzeCorpusOperation struct {
// contains filtered or unexported fields
}
AnalyzeCorpusOperation manages a long-running operation from AnalyzeCorpus.
func (*AnalyzeCorpusOperation) Done
func (op *AnalyzeCorpusOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*AnalyzeCorpusOperation) Metadata
func (op *AnalyzeCorpusOperation) Metadata() (*visionaipb.AnalyzeCorpusMetadata, 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 (*AnalyzeCorpusOperation) Name
func (op *AnalyzeCorpusOperation) 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 (*AnalyzeCorpusOperation) Poll
func (op *AnalyzeCorpusOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeCorpusResponse, 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 (*AnalyzeCorpusOperation) Wait
func (op *AnalyzeCorpusOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeCorpusResponse, 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.
AnnotationIterator
type AnnotationIterator 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 []*visionaipb.Annotation, nextPageToken string, err error)
// contains filtered or unexported fields
}
AnnotationIterator manages a stream of *visionaipb.Annotation.
func (*AnnotationIterator) All
func (it *AnnotationIterator) All() iter.Seq2[*visionaipb.Annotation, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*AnnotationIterator) Next
func (it *AnnotationIterator) Next() (*visionaipb.Annotation, 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 (*AnnotationIterator) PageInfo
func (it *AnnotationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AppPlatformCallOptions
type AppPlatformCallOptions struct {
ListApplications []gax.CallOption
GetApplication []gax.CallOption
CreateApplication []gax.CallOption
UpdateApplication []gax.CallOption
DeleteApplication []gax.CallOption
DeployApplication []gax.CallOption
UndeployApplication []gax.CallOption
AddApplicationStreamInput []gax.CallOption
RemoveApplicationStreamInput []gax.CallOption
UpdateApplicationStreamInput []gax.CallOption
ListInstances []gax.CallOption
GetInstance []gax.CallOption
CreateApplicationInstances []gax.CallOption
DeleteApplicationInstances []gax.CallOption
UpdateApplicationInstances []gax.CallOption
ListDrafts []gax.CallOption
GetDraft []gax.CallOption
CreateDraft []gax.CallOption
UpdateDraft []gax.CallOption
DeleteDraft []gax.CallOption
ListProcessors []gax.CallOption
ListPrebuiltProcessors []gax.CallOption
GetProcessor []gax.CallOption
CreateProcessor []gax.CallOption
UpdateProcessor []gax.CallOption
DeleteProcessor []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
AppPlatformCallOptions contains the retry settings for each method of AppPlatformClient.
AppPlatformClient
type AppPlatformClient struct {
// The call options for this service.
CallOptions *AppPlatformCallOptions
// 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
}
AppPlatformClient is a client for interacting with Vision AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service describing handlers for resources
func NewAppPlatformClient
func NewAppPlatformClient(ctx context.Context, opts ...option.ClientOption) (*AppPlatformClient, error)
NewAppPlatformClient creates a new app platform 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"
visionai "cloud.google.com/go/visionai/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewAppPlatformRESTClient
func NewAppPlatformRESTClient(ctx context.Context, opts ...option.ClientOption) (*AppPlatformClient, error)
NewAppPlatformRESTClient creates a new app platform rest client.
Service describing handlers for resources
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*AppPlatformClient) AddApplicationStreamInput
func (c *AppPlatformClient) AddApplicationStreamInput(ctx context.Context, req *visionaipb.AddApplicationStreamInputRequest, opts ...gax.CallOption) (*AddApplicationStreamInputOperation, error)
AddApplicationStreamInput adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.AddApplicationStreamInputRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AddApplicationStreamInputRequest.
}
op, err := c.AddApplicationStreamInput(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) AddApplicationStreamInputOperation
func (c *AppPlatformClient) AddApplicationStreamInputOperation(name string) *AddApplicationStreamInputOperation
AddApplicationStreamInputOperation returns a new AddApplicationStreamInputOperation from a given name. The name must be that of a previously created AddApplicationStreamInputOperation, possibly from a different process.
func (*AppPlatformClient) CancelOperation
func (c *AppPlatformClient) 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"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
visionai "cloud.google.com/go/visionai/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(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 (*AppPlatformClient) Close
func (c *AppPlatformClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*AppPlatformClient) Connection (deprecated)
func (c *AppPlatformClient) 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 (*AppPlatformClient) CreateApplication
func (c *AppPlatformClient) CreateApplication(ctx context.Context, req *visionaipb.CreateApplicationRequest, opts ...gax.CallOption) (*CreateApplicationOperation, error)
CreateApplication creates a new Application in a given project and location.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.CreateApplicationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateApplicationRequest.
}
op, err := c.CreateApplication(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) CreateApplicationInstances
func (c *AppPlatformClient) CreateApplicationInstances(ctx context.Context, req *visionaipb.CreateApplicationInstancesRequest, opts ...gax.CallOption) (*CreateApplicationInstancesOperation, error)
CreateApplicationInstances adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.CreateApplicationInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateApplicationInstancesRequest.
}
op, err := c.CreateApplicationInstances(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) CreateApplicationInstancesOperation
func (c *AppPlatformClient) CreateApplicationInstancesOperation(name string) *CreateApplicationInstancesOperation
CreateApplicationInstancesOperation returns a new CreateApplicationInstancesOperation from a given name. The name must be that of a previously created CreateApplicationInstancesOperation, possibly from a different process.
func (*AppPlatformClient) CreateApplicationOperation
func (c *AppPlatformClient) CreateApplicationOperation(name string) *CreateApplicationOperation
CreateApplicationOperation returns a new CreateApplicationOperation from a given name. The name must be that of a previously created CreateApplicationOperation, possibly from a different process.
func (*AppPlatformClient) CreateDraft
func (c *AppPlatformClient) CreateDraft(ctx context.Context, req *visionaipb.CreateDraftRequest, opts ...gax.CallOption) (*CreateDraftOperation, error)
CreateDraft creates a new Draft in a given project and location.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.CreateDraftRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateDraftRequest.
}
op, err := c.CreateDraft(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) CreateDraftOperation
func (c *AppPlatformClient) CreateDraftOperation(name string) *CreateDraftOperation
CreateDraftOperation returns a new CreateDraftOperation from a given name. The name must be that of a previously created CreateDraftOperation, possibly from a different process.
func (*AppPlatformClient) CreateProcessor
func (c *AppPlatformClient) CreateProcessor(ctx context.Context, req *visionaipb.CreateProcessorRequest, opts ...gax.CallOption) (*CreateProcessorOperation, error)
CreateProcessor creates a new Processor in a given project and location.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.CreateProcessorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateProcessorRequest.
}
op, err := c.CreateProcessor(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) CreateProcessorOperation
func (c *AppPlatformClient) CreateProcessorOperation(name string) *CreateProcessorOperation
CreateProcessorOperation returns a new CreateProcessorOperation from a given name. The name must be that of a previously created CreateProcessorOperation, possibly from a different process.
func (*AppPlatformClient) DeleteApplication
func (c *AppPlatformClient) DeleteApplication(ctx context.Context, req *visionaipb.DeleteApplicationRequest, opts ...gax.CallOption) (*DeleteApplicationOperation, error)
DeleteApplication deletes a single Application.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.DeleteApplicationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteApplicationRequest.
}
op, err := c.DeleteApplication(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*AppPlatformClient) DeleteApplicationInstances
func (c *AppPlatformClient) DeleteApplicationInstances(ctx context.Context, req *visionaipb.DeleteApplicationInstancesRequest, opts ...gax.CallOption) (*DeleteApplicationInstancesOperation, error)
DeleteApplicationInstances remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.DeleteApplicationInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteApplicationInstancesRequest.
}
op, err := c.DeleteApplicationInstances(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) DeleteApplicationInstancesOperation
func (c *AppPlatformClient) DeleteApplicationInstancesOperation(name string) *DeleteApplicationInstancesOperation
DeleteApplicationInstancesOperation returns a new DeleteApplicationInstancesOperation from a given name. The name must be that of a previously created DeleteApplicationInstancesOperation, possibly from a different process.
func (*AppPlatformClient) DeleteApplicationOperation
func (c *AppPlatformClient) DeleteApplicationOperation(name string) *DeleteApplicationOperation
DeleteApplicationOperation returns a new DeleteApplicationOperation from a given name. The name must be that of a previously created DeleteApplicationOperation, possibly from a different process.
func (*AppPlatformClient) DeleteDraft
func (c *AppPlatformClient) DeleteDraft(ctx context.Context, req *visionaipb.DeleteDraftRequest, opts ...gax.CallOption) (*DeleteDraftOperation, error)
DeleteDraft deletes a single Draft.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.DeleteDraftRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteDraftRequest.
}
op, err := c.DeleteDraft(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*AppPlatformClient) DeleteDraftOperation
func (c *AppPlatformClient) DeleteDraftOperation(name string) *DeleteDraftOperation
DeleteDraftOperation returns a new DeleteDraftOperation from a given name. The name must be that of a previously created DeleteDraftOperation, possibly from a different process.
func (*AppPlatformClient) DeleteOperation
func (c *AppPlatformClient) 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"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
visionai "cloud.google.com/go/visionai/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(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 (*AppPlatformClient) DeleteProcessor
func (c *AppPlatformClient) DeleteProcessor(ctx context.Context, req *visionaipb.DeleteProcessorRequest, opts ...gax.CallOption) (*DeleteProcessorOperation, error)
DeleteProcessor deletes a single Processor.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.DeleteProcessorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteProcessorRequest.
}
op, err := c.DeleteProcessor(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*AppPlatformClient) DeleteProcessorOperation
func (c *AppPlatformClient) DeleteProcessorOperation(name string) *DeleteProcessorOperation
DeleteProcessorOperation returns a new DeleteProcessorOperation from a given name. The name must be that of a previously created DeleteProcessorOperation, possibly from a different process.
func (*AppPlatformClient) DeployApplication
func (c *AppPlatformClient) DeployApplication(ctx context.Context, req *visionaipb.DeployApplicationRequest, opts ...gax.CallOption) (*DeployApplicationOperation, error)
DeployApplication deploys a single Application.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.DeployApplicationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeployApplicationRequest.
}
op, err := c.DeployApplication(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) DeployApplicationOperation
func (c *AppPlatformClient) DeployApplicationOperation(name string) *DeployApplicationOperation
DeployApplicationOperation returns a new DeployApplicationOperation from a given name. The name must be that of a previously created DeployApplicationOperation, possibly from a different process.
func (*AppPlatformClient) GetApplication
func (c *AppPlatformClient) GetApplication(ctx context.Context, req *visionaipb.GetApplicationRequest, opts ...gax.CallOption) (*visionaipb.Application, error)
GetApplication gets details of a single Application.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.GetApplicationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetApplicationRequest.
}
resp, err := c.GetApplication(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) GetDraft
func (c *AppPlatformClient) GetDraft(ctx context.Context, req *visionaipb.GetDraftRequest, opts ...gax.CallOption) (*visionaipb.Draft, error)
GetDraft gets details of a single Draft.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.GetDraftRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetDraftRequest.
}
resp, err := c.GetDraft(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) GetInstance
func (c *AppPlatformClient) GetInstance(ctx context.Context, req *visionaipb.GetInstanceRequest, opts ...gax.CallOption) (*visionaipb.Instance, error)
GetInstance gets details of a single Instance.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.GetInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetInstanceRequest.
}
resp, err := c.GetInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) GetOperation
func (c *AppPlatformClient) 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"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
visionai "cloud.google.com/go/visionai/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(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 (*AppPlatformClient) GetProcessor
func (c *AppPlatformClient) GetProcessor(ctx context.Context, req *visionaipb.GetProcessorRequest, opts ...gax.CallOption) (*visionaipb.Processor, error)
GetProcessor gets details of a single Processor.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.GetProcessorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetProcessorRequest.
}
resp, err := c.GetProcessor(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) ListApplications
func (c *AppPlatformClient) ListApplications(ctx context.Context, req *visionaipb.ListApplicationsRequest, opts ...gax.CallOption) *ApplicationIterator
ListApplications lists Applications in a given project and location.
Examples
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
"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 := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.ListApplicationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListApplicationsRequest.
}
it := c.ListApplications(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.(*visionaipb.ListApplicationsResponse)
}
}
all
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.ListApplicationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListApplicationsRequest.
}
for resp, err := range c.ListApplications(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*AppPlatformClient) ListDrafts
func (c *AppPlatformClient) ListDrafts(ctx context.Context, req *visionaipb.ListDraftsRequest, opts ...gax.CallOption) *DraftIterator
ListDrafts lists Drafts in a given project and location.
Examples
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
"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 := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.ListDraftsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListDraftsRequest.
}
it := c.ListDrafts(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.(*visionaipb.ListDraftsResponse)
}
}
all
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.ListDraftsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListDraftsRequest.
}
for resp, err := range c.ListDrafts(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*AppPlatformClient) ListInstances
func (c *AppPlatformClient) ListInstances(ctx context.Context, req *visionaipb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator
ListInstances lists Instances in a given project and location.
Examples
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
"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 := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.ListInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListInstancesRequest.
}
it := c.ListInstances(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.(*visionaipb.ListInstancesResponse)
}
}
all
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.ListInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListInstancesRequest.
}
for resp, err := range c.ListInstances(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*AppPlatformClient) ListOperations
func (c *AppPlatformClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
visionai "cloud.google.com/go/visionai/apiv1"
"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 := visionai.NewAppPlatformClient(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)
}
}
all
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
visionai "cloud.google.com/go/visionai/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(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 (*AppPlatformClient) ListPrebuiltProcessors
func (c *AppPlatformClient) ListPrebuiltProcessors(ctx context.Context, req *visionaipb.ListPrebuiltProcessorsRequest, opts ...gax.CallOption) (*visionaipb.ListPrebuiltProcessorsResponse, error)
ListPrebuiltProcessors listPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.ListPrebuiltProcessorsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListPrebuiltProcessorsRequest.
}
resp, err := c.ListPrebuiltProcessors(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) ListProcessors
func (c *AppPlatformClient) ListProcessors(ctx context.Context, req *visionaipb.ListProcessorsRequest, opts ...gax.CallOption) *ProcessorIterator
ListProcessors lists Processors in a given project and location.
Examples
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
"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 := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.ListProcessorsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListProcessorsRequest.
}
it := c.ListProcessors(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.(*visionaipb.ListProcessorsResponse)
}
}
all
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.ListProcessorsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListProcessorsRequest.
}
for resp, err := range c.ListProcessors(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*AppPlatformClient) RemoveApplicationStreamInput
func (c *AppPlatformClient) RemoveApplicationStreamInput(ctx context.Context, req *visionaipb.RemoveApplicationStreamInputRequest, opts ...gax.CallOption) (*RemoveApplicationStreamInputOperation, error)
RemoveApplicationStreamInput remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.RemoveApplicationStreamInputRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#RemoveApplicationStreamInputRequest.
}
op, err := c.RemoveApplicationStreamInput(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) RemoveApplicationStreamInputOperation
func (c *AppPlatformClient) RemoveApplicationStreamInputOperation(name string) *RemoveApplicationStreamInputOperation
RemoveApplicationStreamInputOperation returns a new RemoveApplicationStreamInputOperation from a given name. The name must be that of a previously created RemoveApplicationStreamInputOperation, possibly from a different process.
func (*AppPlatformClient) UndeployApplication
func (c *AppPlatformClient) UndeployApplication(ctx context.Context, req *visionaipb.UndeployApplicationRequest, opts ...gax.CallOption) (*UndeployApplicationOperation, error)
UndeployApplication undeploys a single Application.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.UndeployApplicationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UndeployApplicationRequest.
}
op, err := c.UndeployApplication(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) UndeployApplicationOperation
func (c *AppPlatformClient) UndeployApplicationOperation(name string) *UndeployApplicationOperation
UndeployApplicationOperation returns a new UndeployApplicationOperation from a given name. The name must be that of a previously created UndeployApplicationOperation, possibly from a different process.
func (*AppPlatformClient) UpdateApplication
func (c *AppPlatformClient) UpdateApplication(ctx context.Context, req *visionaipb.UpdateApplicationRequest, opts ...gax.CallOption) (*UpdateApplicationOperation, error)
UpdateApplication updates the parameters of a single Application.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.UpdateApplicationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateApplicationRequest.
}
op, err := c.UpdateApplication(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) UpdateApplicationInstances
func (c *AppPlatformClient) UpdateApplicationInstances(ctx context.Context, req *visionaipb.UpdateApplicationInstancesRequest, opts ...gax.CallOption) (*UpdateApplicationInstancesOperation, error)
UpdateApplicationInstances adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.UpdateApplicationInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateApplicationInstancesRequest.
}
op, err := c.UpdateApplicationInstances(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) UpdateApplicationInstancesOperation
func (c *AppPlatformClient) UpdateApplicationInstancesOperation(name string) *UpdateApplicationInstancesOperation
UpdateApplicationInstancesOperation returns a new UpdateApplicationInstancesOperation from a given name. The name must be that of a previously created UpdateApplicationInstancesOperation, possibly from a different process.
func (*AppPlatformClient) UpdateApplicationOperation
func (c *AppPlatformClient) UpdateApplicationOperation(name string) *UpdateApplicationOperation
UpdateApplicationOperation returns a new UpdateApplicationOperation from a given name. The name must be that of a previously created UpdateApplicationOperation, possibly from a different process.
func (*AppPlatformClient) UpdateApplicationStreamInput
func (c *AppPlatformClient) UpdateApplicationStreamInput(ctx context.Context, req *visionaipb.UpdateApplicationStreamInputRequest, opts ...gax.CallOption) (*UpdateApplicationStreamInputOperation, error)
UpdateApplicationStreamInput update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing to true.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.UpdateApplicationStreamInputRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateApplicationStreamInputRequest.
}
op, err := c.UpdateApplicationStreamInput(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) UpdateApplicationStreamInputOperation
func (c *AppPlatformClient) UpdateApplicationStreamInputOperation(name string) *UpdateApplicationStreamInputOperation
UpdateApplicationStreamInputOperation returns a new UpdateApplicationStreamInputOperation from a given name. The name must be that of a previously created UpdateApplicationStreamInputOperation, possibly from a different process.
func (*AppPlatformClient) UpdateDraft
func (c *AppPlatformClient) UpdateDraft(ctx context.Context, req *visionaipb.UpdateDraftRequest, opts ...gax.CallOption) (*UpdateDraftOperation, error)
UpdateDraft updates the parameters of a single Draft.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.UpdateDraftRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateDraftRequest.
}
op, err := c.UpdateDraft(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) UpdateDraftOperation
func (c *AppPlatformClient) UpdateDraftOperation(name string) *UpdateDraftOperation
UpdateDraftOperation returns a new UpdateDraftOperation from a given name. The name must be that of a previously created UpdateDraftOperation, possibly from a different process.
func (*AppPlatformClient) UpdateProcessor
func (c *AppPlatformClient) UpdateProcessor(ctx context.Context, req *visionaipb.UpdateProcessorRequest, opts ...gax.CallOption) (*UpdateProcessorOperation, error)
UpdateProcessor updates the parameters of a single Processor.
Example
package main
import (
"context"
visionai "cloud.google.com/go/visionai/apiv1"
visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := visionai.NewAppPlatformClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &visionaipb.UpdateProcessorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateProcessorRequest.
}
op, err := c.UpdateProcessor(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AppPlatformClient) UpdateProcessorOperation
func (c *AppPlatformClient) UpdateProcessorOperation(name string) *UpdateProcessorOperation
UpdateProcessorOperation returns a new UpdateProcessorOperation from a given name. The name must be that of a previously created UpdateProcessorOperation, possibly from a different process.
ApplicationIterator
type ApplicationIterator 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 []*visionaipb.Application, nextPageToken string, err error)
// contains filtered or unexported fields
}
ApplicationIterator manages a stream of *visionaipb.Application.
func (*ApplicationIterator) All
func (it *ApplicationIterator) All() iter.Seq2[*visionaipb.Application, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ApplicationIterator) Next
func (it *ApplicationIterator) Next() (*visionaipb.Application, 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 (*ApplicationIterator) PageInfo
func (it *ApplicationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AssetIterator
type AssetIterator 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 []*visionaipb.Asset, nextPageToken string, err error)
// contains filtered or unexported fields
}
AssetIterator manages a stream of *visionaipb.Asset.
func (*AssetIterator) All
func (it *AssetIterator) All() iter.Seq2[*visionaipb.Asset, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*AssetIterator) Next
func (it *AssetIterator) Next() (*visionaipb.Asset, 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 (*AssetIterator) PageInfo
func (it *AssetIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
BatchRunProcessOperation
type BatchRunProcessOperation struct {
// contains filtered or unexported fields
}
BatchRunProcessOperation manages a long-running operation from BatchRunProcess.
func (*BatchRunProcessOperation) Done
func (op *BatchRunProcessOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*BatchRunProcessOperation) Metadata
func (op *BatchRunProcessOperation) Metadata() (*visionaipb.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 (*BatchRunProcessOperation) Name
func (op *BatchRunProcessOperation) 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 (*BatchRunProcessOperation) Poll
func (op *BatchRunProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.BatchRunProcessResponse, 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 (*BatchRunProcessOperation) Wait
func (op *BatchRunProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.BatchRunProcessResponse, 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.
ClusterIterator
type ClusterIterator 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 []*visionaipb.Cluster, nextPageToken string, err error)
// contains filtered or unexported fields
}
ClusterIterator manages a stream of *visionaipb.Cluster.
func (*ClusterIterator) All
func (it *ClusterIterator) All() iter.Seq2[*visionaipb.Cluster, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ClusterIterator) Next
func (it *ClusterIterator) Next() (*visionaipb.Cluster, 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 (*ClusterIterator) PageInfo
func (it *ClusterIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CollectionItemIterator
type CollectionItemIterator 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 []*visionaipb.CollectionItem, nextPageToken string, err error)
// contains filtered or unexported fields
}
CollectionItemIterator manages a stream of *visionaipb.CollectionItem.
func (*CollectionItemIterator) All
func (it *CollectionItemIterator) All() iter.Seq2[*visionaipb.CollectionItem, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CollectionItemIterator) Next
func (it *CollectionItemIterator) Next() (*visionaipb.CollectionItem, 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 (*CollectionItemIterator) PageInfo
func (it *CollectionItemIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CollectionIterator
type CollectionIterator 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 []*visionaipb.Collection, nextPageToken string, err error)
// contains filtered or unexported fields
}
CollectionIterator manages a stream of *visionaipb.Collection.
func (*CollectionIterator) All
func (it *CollectionIterator) All() iter.Seq2[*visionaipb.Collection, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CollectionIterator) Next
func (it *CollectionIterator) Next() (*visionaipb.Collection, 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 (*CollectionIterator) PageInfo
func (it *CollectionIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CorpusIterator
type CorpusIterator 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 []*visionaipb.Corpus, nextPageToken string, err error)
// contains filtered or unexported fields
}
CorpusIterator manages a stream of *visionaipb.Corpus.
func (*CorpusIterator) All
func (it *CorpusIterator) All() iter.Seq2[*visionaipb.Corpus, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CorpusIterator) Next
func (it *CorpusIterator) Next() (*visionaipb.Corpus, 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 (*CorpusIterator) PageInfo
func (it *CorpusIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CreateAnalysisOperation
type CreateAnalysisOperation struct {
// contains filtered or unexported fields
}
CreateAnalysisOperation manages a long-running operation from CreateAnalysis.
func (*CreateAnalysisOperation) Done
func (op *CreateAnalysisOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateAnalysisOperation) Metadata
func (op *CreateAnalysisOperation) Metadata() (*visionaipb.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 (*CreateAnalysisOperation) Name
func (op *CreateAnalysisOperation) 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 (*CreateAnalysisOperation) Poll
func (op *CreateAnalysisOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, 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 (*CreateAnalysisOperation) Wait
func (op *CreateAnalysisOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, 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.
CreateApplicationInstancesOperation
type CreateApplicationInstancesOperation struct {
// contains filtered or unexported fields
}
CreateApplicationInstancesOperation manages a long-running operation from CreateApplicationInstances.
func (*CreateApplicationInstancesOperation) Done
func (op *CreateApplicationInstancesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateApplicationInstancesOperation) Metadata
func (op *CreateApplicationInstancesOperation) Metadata() (*visionaipb.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 (*CreateApplicationInstancesOperation) Name
func (op *CreateApplicationInstancesOperation) 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 (*CreateApplicationInstancesOperation) Poll
func (op *CreateApplicationInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.CreateApplicationInstancesResponse, 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 (*CreateApplicationInstancesOperation) Wait
func (op *CreateApplicationInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.CreateApplicationInstancesResponse, 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.
CreateApplicationOperation
type CreateApplicationOperation struct {
// contains filtered or unexported fields
}
CreateApplicationOperation manages a long-running operation from CreateApplication.
func (*CreateApplicationOperation) Done
func (op *CreateApplicationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateApplicationOperation) Metadata
func (op *CreateApplicationOperation) Metadata() (*visionaipb.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 (*CreateApplicationOperation) Name
func (op *CreateApplicationOperation) 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 (*CreateApplicationOperation) Poll
func (op *CreateApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, 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 (*CreateApplicationOperation) Wait
func (op *CreateApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, 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.
CreateClusterOperation
type CreateClusterOperation struct {
// contains filtered or unexported fields
}
CreateClusterOperation manages a long-running operation from CreateCluster.
func (*CreateClusterOperation) Done
func (op *CreateClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateClusterOperation) Metadata
func (op *CreateClusterOperation) Metadata() (*visionaipb.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 (*CreateClusterOperation) Name
func (op *CreateClusterOperation) 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 (*CreateClusterOperation) Poll
func (op *CreateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, 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 (*CreateClusterOperation) Wait
func (op *CreateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, 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.
CreateCollectionOperation
type CreateCollectionOperation struct {
// contains filtered or unexported fields
}
CreateCollectionOperation manages a long-running operation from CreateCollection.
func (*CreateCollectionOperation) Done
func (op *CreateCollectionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateCollectionOperation) Metadata
func (op *CreateCollectionOperation) Metadata() (*visionaipb.CreateCollectionMetadata, 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 (*CreateCollectionOperation) Name
func (op *CreateCollectionOperation) 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 (*CreateCollectionOperation) Poll
func (op *CreateCollectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Collection, 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 (*CreateCollectionOperation) Wait
func (op *CreateCollectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Collection, 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.
CreateCorpusOperation
type CreateCorpusOperation struct {
// contains filtered or unexported fields
}
CreateCorpusOperation manages a long-running operation from CreateCorpus.
func (*CreateCorpusOperation) Done
func (op *CreateCorpusOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateCorpusOperation) Metadata
func (op *CreateCorpusOperation) Metadata() (*visionaipb.CreateCorpusMetadata, 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 (*CreateCorpusOperation) Name
func (op *CreateCorpusOperation) 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 (*CreateCorpusOperation) Poll
func (op *CreateCorpusOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Corpus, 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 (*CreateCorpusOperation) Wait
func (op *CreateCorpusOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Corpus, 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.
CreateDraftOperation
type CreateDraftOperation struct {
// contains filtered or unexported fields
}
CreateDraftOperation manages a long-running operation from CreateDraft.
func (*CreateDraftOperation) Done
func (op *CreateDraftOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateDraftOperation) Metadata
func (op *CreateDraftOperation) Metadata() (*visionaipb.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 (*CreateDraftOperation) Name
func (op *CreateDraftOperation) 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 (*CreateDraftOperation) Poll
func (op *CreateDraftOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, 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 (*CreateDraftOperation) Wait
func (op *CreateDraftOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, 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.
CreateEventOperation
type CreateEventOperation struct {
// contains filtered or unexported fields
}
CreateEventOperation manages a long-running operation from CreateEvent.
func (*CreateEventOperation) Done
func (op *CreateEventOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateEventOperation) Metadata
func (op *CreateEventOperation) Metadata() (*visionaipb.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 (*CreateEventOperation) Name
func (op *CreateEventOperation) 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 (*CreateEventOperation) Poll
func (op *CreateEventOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, 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 (*CreateEventOperation) Wait
func (op *CreateEventOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, 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.
CreateIndexEndpointOperation
type CreateIndexEndpointOperation struct {
// contains filtered or unexported fields
}
CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint.
func (*CreateIndexEndpointOperation) Done
func (op *CreateIndexEndpointOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateIndexEndpointOperation) Metadata
func (op *CreateIndexEndpointOperation) Metadata() (*visionaipb.CreateIndexEndpointMetadata, 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 (*CreateIndexEndpointOperation) Name
func (op *CreateIndexEndpointOperation) 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 (*CreateIndexEndpointOperation) Poll
func (op *CreateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, 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 (*CreateIndexEndpointOperation) Wait
func (op *CreateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, 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.
CreateIndexOperation
type CreateIndexOperation struct {
// contains filtered or unexported fields
}
CreateIndexOperation manages a long-running operation from CreateIndex.
func (*CreateIndexOperation) Done
func (op *CreateIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateIndexOperation) Metadata
func (op *CreateIndexOperation) Metadata() (*visionaipb.CreateIndexMetadata, 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 (*CreateIndexOperation) Name
func (op *CreateIndexOperation) 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 (*CreateIndexOperation) Poll
func (op *CreateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, 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 (*CreateIndexOperation) Wait
func (op *CreateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, 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.
CreateOperatorOperation
type CreateOperatorOperation struct {
// contains filtered or unexported fields
}
CreateOperatorOperation manages a long-running operation from CreateOperator.
func (*CreateOperatorOperation) Done
func (op *CreateOperatorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateOperatorOperation) Metadata
func (op *CreateOperatorOperation) Metadata() (*visionaipb.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 (*CreateOperatorOperation) Name
func (op *CreateOperatorOperation) 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 (*CreateOperatorOperation) Poll
func (op *CreateOperatorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, 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 (*CreateOperatorOperation) Wait
func (op *CreateOperatorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, 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.
CreateProcessOperation
type CreateProcessOperation struct {
// contains filtered or unexported fields
}
CreateProcessOperation manages a long-running operation from CreateProcess.
func (*CreateProcessOperation) Done
func (op *CreateProcessOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateProcessOperation) Metadata
func (op *CreateProcessOperation) Metadata() (*visionaipb.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 (*CreateProcessOperation) Name
func (op *CreateProcessOperation) 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 (*CreateProcessOperation) Poll
func (op *CreateProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, 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 (*CreateProcessOperation) Wait
func (op *CreateProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, 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.
CreateProcessorOperation
type CreateProcessorOperation struct {
// contains filtered or unexported fields
}
CreateProcessorOperation manages a long-running operation from CreateProcessor.
func (*CreateProcessorOperation) Done
func (op *CreateProcessorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateProcessorOperation) Metadata
func (op *CreateProcessorOperation) Metadata() (*visionaipb.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 (*CreateProcessorOperation) Name
func (op *CreateProcessorOperation) 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 (*CreateProcessorOperation) Poll
func (op *CreateProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, 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 (*CreateProcessorOperation) Wait
func (op *CreateProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, 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.
CreateSeriesOperation
type CreateSeriesOperation struct {
// contains filtered or unexported fields
}
CreateSeriesOperation manages a long-running operation from CreateSeries.
func (*CreateSeriesOperation) Done
func (op *CreateSeriesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateSeriesOperation) Metadata
func (op *CreateSeriesOperation) Metadata() (*visionaipb.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 (*CreateSeriesOperation) Name
func (op *CreateSeriesOperation) 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 (*CreateSeriesOperation) Poll
func (op *CreateSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, 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 (*CreateSeriesOperation) Wait
func (op *CreateSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, 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.
CreateStreamOperation
type CreateStreamOperation struct {
// contains filtered or unexported fields
}
CreateStreamOperation manages a long-running operation from CreateStream.
func (*CreateStreamOperation) Done
func (op *CreateStreamOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateStreamOperation) Metadata
func (op *CreateStreamOperation) Metadata() (*visionaipb.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 (*CreateStreamOperation) Name
func (op *CreateStreamOperation) 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 (*CreateStreamOperation) Poll
func (op *CreateStreamOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, 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 (*CreateStreamOperation) Wait
func (op *CreateStreamOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, 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.
DataSchemaIterator
type DataSchemaIterator 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 []*visionaipb.DataSchema, nextPageToken string, err error)
// contains filtered or unexported fields
}
DataSchemaIterator manages a stream of *visionaipb.DataSchema.
func (*DataSchemaIterator) All
func (it *DataSchemaIterator) All() iter.Seq2[*visionaipb.DataSchema, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DataSchemaIterator) Next
func (it *DataSchemaIterator) Next() (*visionaipb.DataSchema, 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 (*DataSchemaIterator) PageInfo
func (it *DataSchemaIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DeleteAnalysisOperation
type DeleteAnalysisOperation struct {
// contains filtered or unexported fields
}
DeleteAnalysisOperation manages a long-running operation from DeleteAnalysis.
func (*DeleteAnalysisOperation) Done
func (op *DeleteAnalysisOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteAnalysisOperation) Metadata
func (op *DeleteAnalysisOperation) Metadata() (*visionaipb.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 (*DeleteAnalysisOperation) Name
func (op *DeleteAnalysisOperation) 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 (*DeleteAnalysisOperation) Poll
func (op *DeleteAnalysisOperation) 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 (*DeleteAnalysisOperation) Wait
func (op *DeleteAnalysisOperation) 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.
DeleteApplicationInstancesOperation
type DeleteApplicationInstancesOperation struct {
// contains filtered or unexported fields
}
DeleteApplicationInstancesOperation manages a long-running operation from DeleteApplicationInstances.
func (*DeleteApplicationInstancesOperation) Done
func (op *DeleteApplicationInstancesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteApplicationInstancesOperation) Metadata
func (op *DeleteApplicationInstancesOperation) Metadata() (*visionaipb.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 (*DeleteApplicationInstancesOperation) Name
func (op *DeleteApplicationInstancesOperation) 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 (*DeleteApplicationInstancesOperation) Poll
func (op *DeleteApplicationInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Instance, 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 (*DeleteApplicationInstancesOperation) Wait
func (op *DeleteApplicationInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Instance, 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.
DeleteApplicationOperation
type DeleteApplicationOperation struct {
// contains filtered or unexported fields
}
DeleteApplicationOperation manages a long-running operation from DeleteApplication.
func (*DeleteApplicationOperation) Done
func (op *DeleteApplicationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteApplicationOperation) Metadata
func (op *DeleteApplicationOperation) Metadata() (*visionaipb.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 (*DeleteApplicationOperation) Name
func (op *DeleteApplicationOperation) 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 (*DeleteApplicationOperation) Poll
func (op *DeleteApplicationOperation) 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 (*DeleteApplicationOperation) Wait
func (op *DeleteApplicationOperation) 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.
DeleteAssetOperation
type DeleteAssetOperation struct {
// contains filtered or unexported fields
}
DeleteAssetOperation manages a long-running operation from DeleteAsset.
func (*DeleteAssetOperation) Done
func (op *DeleteAssetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteAssetOperation) Metadata
func (op *DeleteAssetOperation) Metadata() (*visionaipb.DeleteAssetMetadata, 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 (*DeleteAssetOperation) Name
func (op *DeleteAssetOperation) 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 (*DeleteAssetOperation) Poll
func (op *DeleteAssetOperation) 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 (*DeleteAssetOperation) Wait
func (op *DeleteAssetOperation) 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.
DeleteClusterOperation
type DeleteClusterOperation struct {
// contains filtered or unexported fields
}
DeleteClusterOperation manages a long-running operation from DeleteCluster.
func (*DeleteClusterOperation) Done
func (op *DeleteClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteClusterOperation) Metadata
func (op *DeleteClusterOperation) Metadata() (*visionaipb.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 (*DeleteClusterOperation) Name
func (op *DeleteClusterOperation) 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 (*DeleteClusterOperation) Poll
func (op *DeleteClusterOperation) 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 (*DeleteClusterOperation) Wait
func (op *DeleteClusterOperation) 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.
DeleteCollectionOperation
type DeleteCollectionOperation struct {
// contains filtered or unexported fields
}
DeleteCollectionOperation manages a long-running operation from DeleteCollection.
func (*DeleteCollectionOperation) Done
func (op *DeleteCollectionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteCollectionOperation) Metadata
func (op *DeleteCollectionOperation) Metadata() (*visionaipb.DeleteCollectionMetadata, 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 (*DeleteCollectionOperation) Name
func (op *DeleteCollectionOperation) 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 (*DeleteCollectionOperation) Poll
func (op *DeleteCollectionOperation) 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 (*DeleteCollectionOperation) Wait
func (op *DeleteCollectionOperation) 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.
DeleteDraftOperation
type DeleteDraftOperation struct {
// contains filtered or unexported fields
}
DeleteDraftOperation manages a long-running operation from DeleteDraft.
func (*DeleteDraftOperation) Done
func (op *DeleteDraftOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteDraftOperation) Metadata
func (op *DeleteDraftOperation) Metadata() (*visionaipb.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 (*DeleteDraftOperation) Name
func (op *DeleteDraftOperation) 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 (*DeleteDraftOperation) Poll
func (op *DeleteDraftOperation) 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 (*DeleteDraftOperation) Wait
func (op *DeleteDraftOperation) 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.
DeleteEventOperation
type DeleteEventOperation struct {
// contains filtered or unexported fields
}
DeleteEventOperation manages a long-running operation from DeleteEvent.
func (*DeleteEventOperation) Done
func (op *DeleteEventOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteEventOperation) Metadata
func (op *DeleteEventOperation) Metadata() (*visionaipb.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 (*DeleteEventOperation) Name
func (op *DeleteEventOperation) 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 (*DeleteEventOperation) Poll
func (op *DeleteEventOperation) 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 (*DeleteEventOperation) Wait
func (op *DeleteEventOperation) 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.
DeleteIndexEndpointOperation
type DeleteIndexEndpointOperation struct {
// contains filtered or unexported fields
}
DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint.
func (*DeleteIndexEndpointOperation) Done
func (op *DeleteIndexEndpointOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteIndexEndpointOperation) Metadata
func (op *DeleteIndexEndpointOperation) Metadata() (*visionaipb.DeleteIndexEndpointMetadata, 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 (*DeleteIndexEndpointOperation) Name
func (op *DeleteIndexEndpointOperation) 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 (*DeleteIndexEndpointOperation) Poll
func (op *DeleteIndexEndpointOperation) 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 (*DeleteIndexEndpointOperation) Wait
func (op *DeleteIndexEndpointOperation) 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.
DeleteIndexOperation
type DeleteIndexOperation struct {
// contains filtered or unexported fields
}
DeleteIndexOperation manages a long-running operation from DeleteIndex.
func (*DeleteIndexOperation) Done
func (op *DeleteIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteIndexOperation) Metadata
func (op *DeleteIndexOperation) Metadata() (*visionaipb.DeleteIndexMetadata, 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 (*DeleteIndexOperation) Name
func (op *DeleteIndexOperation) 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 (*DeleteIndexOperation) Poll
func (op *DeleteIndexOperation) 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 (*DeleteIndexOperation) Wait
func (op *DeleteIndexOperation) 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.
DeleteOperatorOperation
type DeleteOperatorOperation struct {
// contains filtered or unexported fields
}
DeleteOperatorOperation manages a long-running operation from DeleteOperator.
func (*DeleteOperatorOperation) Done
func (op *DeleteOperatorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteOperatorOperation) Metadata
func (op *DeleteOperatorOperation) Metadata() (*visionaipb.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 (*DeleteOperatorOperation) Name
func (op *DeleteOperatorOperation) 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 (*DeleteOperatorOperation) Poll
func (op *DeleteOperatorOperation) 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 (*DeleteOperatorOperation) Wait
func (op *DeleteOperatorOperation) 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.
DeleteProcessOperation
type DeleteProcessOperation struct {
// contains filtered or unexported fields
}
DeleteProcessOperation manages a long-running operation from DeleteProcess.
func (*DeleteProcessOperation) Done
func (op *DeleteProcessOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteProcessOperation) Metadata
func (op *DeleteProcessOperation) Metadata() (*visionaipb.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 (*DeleteProcessOperation) Name
func (op *DeleteProcessOperation) 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 (*DeleteProcessOperation) Poll
func (op *DeleteProcessOperation) 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 (*DeleteProcessOperation) Wait
func (op *DeleteProcessOperation) 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.
DeleteProcessorOperation
type DeleteProcessorOperation struct {
// contains filtered or unexported fields
}
DeleteProcessorOperation manages a long-running operation from DeleteProcessor.
func (*DeleteProcessorOperation) Done
func (op *DeleteProcessorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteProcessorOperation) Metadata
func (op *DeleteProcessorOperation) Metadata() (*visionaipb.OperationMetadata,