visionai

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

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:

Example usage

To get started with this package, create a client.

ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require 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.

ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require 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()

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.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

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

Types

type AddApplicationStreamInputOperation

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

AddApplicationStreamInputOperation manages a long-running operation from AddApplicationStreamInput.

func (*AddApplicationStreamInputOperation) Done

Done reports whether the long-running operation has completed.

func (*AddApplicationStreamInputOperation) Metadata

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

func (*AddApplicationStreamInputOperation) Name

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

func (*AddApplicationStreamInputOperation) Poll

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

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

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

func (*AddApplicationStreamInputOperation) Wait

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

See documentation of Poll for error-handling information.

type 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) 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.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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) Next

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

func (*AnnotationIterator) PageInfo

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

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

type 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.

type 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
}
Output:

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
}
Output:

func (*AppPlatformClient) AddApplicationStreamInput

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
}
Output:

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

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.
	}
}
Output:

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

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
}
Output:

func (*AppPlatformClient) CreateApplicationInstances

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
}
Output:

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

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
}
Output:

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

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
}
Output:

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

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.
	}
}
Output:

func (*AppPlatformClient) DeleteApplicationInstances

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
}
Output:

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

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.
	}
}
Output:

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

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.
	}
}
Output:

func (*AppPlatformClient) DeleteProcessor

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.
	}
}
Output:

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

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
}
Output:

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

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
}
Output:

func (*AppPlatformClient) GetDraft

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
}
Output:

func (*AppPlatformClient) GetInstance

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
}
Output:

func (*AppPlatformClient) GetOperation

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
}
Output:

func (*AppPlatformClient) GetProcessor

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
}
Output:

func (*AppPlatformClient) ListApplications

ListApplications lists Applications 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"
	"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
	}
}
Output:

func (*AppPlatformClient) ListDrafts

ListDrafts lists Drafts 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"
	"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
	}
}
Output:

func (*AppPlatformClient) ListInstances

ListInstances lists Instances 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"
	"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
	}
}
Output:

func (*AppPlatformClient) ListOperations

ListOperations 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"
	"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
	}
}
Output:

func (*AppPlatformClient) ListPrebuiltProcessors

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
}
Output:

func (*AppPlatformClient) ListProcessors

ListProcessors lists Processors 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"
	"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
	}
}
Output:

func (*AppPlatformClient) RemoveApplicationStreamInput

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
}
Output:

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

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
}
Output:

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

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
}
Output:

func (*AppPlatformClient) UpdateApplicationInstances

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
}
Output:

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

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
}
Output:

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

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
}
Output:

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

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
}
Output:

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.

type 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) Next

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

func (*ApplicationIterator) PageInfo

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

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

type 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) 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.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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) 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.

type 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) Next

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

func (*CollectionItemIterator) PageInfo

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

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

type 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) Next

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

func (*CollectionIterator) PageInfo

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

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

type 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) 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.

type 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

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

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

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

See documentation of Poll for error-handling information.

type CreateApplicationInstancesOperation

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

CreateApplicationInstancesOperation manages a long-running operation from CreateApplicationInstances.

func (*CreateApplicationInstancesOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateApplicationInstancesOperation) Metadata

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

func (*CreateApplicationInstancesOperation) Name

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

func (*CreateApplicationInstancesOperation) Poll

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

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

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

func (*CreateApplicationInstancesOperation) Wait

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

See documentation of Poll for error-handling information.

type 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

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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type CreateIndexEndpointOperation

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

CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint.

func (*CreateIndexEndpointOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateIndexEndpointOperation) Metadata

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

func (*CreateIndexEndpointOperation) Name

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

func (*CreateIndexEndpointOperation) Poll

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

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

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

func (*CreateIndexEndpointOperation) Wait

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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) Next

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

func (*DataSchemaIterator) PageInfo

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

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

type 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

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.

type DeleteApplicationInstancesOperation

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

DeleteApplicationInstancesOperation manages a long-running operation from DeleteApplicationInstances.

func (*DeleteApplicationInstancesOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteApplicationInstancesOperation) Metadata

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

func (*DeleteApplicationInstancesOperation) Name

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

func (*DeleteApplicationInstancesOperation) Poll

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

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

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

func (*DeleteApplicationInstancesOperation) Wait

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

See documentation of Poll for error-handling information.

type 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

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

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

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

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

See documentation of Poll for error-handling information.

type 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

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.

type 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

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.

type 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

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

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

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

See documentation of Poll for error-handling information.

type 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

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.

type 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

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.

type DeleteIndexEndpointOperation

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

DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint.

func (*DeleteIndexEndpointOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteIndexEndpointOperation) Metadata

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

func (*DeleteIndexEndpointOperation) Name

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

func (*DeleteIndexEndpointOperation) Poll

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

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

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

func (*DeleteIndexEndpointOperation) Wait

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

See documentation of Poll for error-handling information.

type 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

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.

type 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

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.

type 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

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.

type 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

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 (*DeleteProcessorOperation) Name

func (op *DeleteProcessorOperation) 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 (*DeleteProcessorOperation) Poll

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

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

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

func (*DeleteProcessorOperation) Wait

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

See documentation of Poll for error-handling information.

type DeleteSeriesOperation

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

DeleteSeriesOperation manages a long-running operation from DeleteSeries.

func (*DeleteSeriesOperation) Done

func (op *DeleteSeriesOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteSeriesOperation) Metadata

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

func (*DeleteSeriesOperation) Name

func (op *DeleteSeriesOperation) 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 (*DeleteSeriesOperation) Poll

func (op *DeleteSeriesOperation) 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 (*DeleteSeriesOperation) Wait

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

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

See documentation of Poll for error-handling information.

type DeleteStreamOperation

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

DeleteStreamOperation manages a long-running operation from DeleteStream.

func (*DeleteStreamOperation) Done

func (op *DeleteStreamOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteStreamOperation) Metadata

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

func (*DeleteStreamOperation) Name

func (op *DeleteStreamOperation) 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 (*DeleteStreamOperation) Poll

func (op *DeleteStreamOperation) 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 (*DeleteStreamOperation) Wait

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

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

See documentation of Poll for error-handling information.

type DeployApplicationOperation

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

DeployApplicationOperation manages a long-running operation from DeployApplication.

func (*DeployApplicationOperation) Done

func (op *DeployApplicationOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeployApplicationOperation) Metadata

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

func (*DeployApplicationOperation) Name

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

func (*DeployApplicationOperation) Poll

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

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

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

func (*DeployApplicationOperation) Wait

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

See documentation of Poll for error-handling information.

type DeployIndexOperation

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

DeployIndexOperation manages a long-running operation from DeployIndex.

func (*DeployIndexOperation) Done

func (op *DeployIndexOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeployIndexOperation) Metadata

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

func (*DeployIndexOperation) Name

func (op *DeployIndexOperation) 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 (*DeployIndexOperation) Poll

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

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

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

func (*DeployIndexOperation) Wait

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

See documentation of Poll for error-handling information.

type DraftIterator

type DraftIterator 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.Draft, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DraftIterator manages a stream of *visionaipb.Draft.

func (*DraftIterator) Next

func (it *DraftIterator) Next() (*visionaipb.Draft, 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 (*DraftIterator) PageInfo

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

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

type EventIterator

type EventIterator 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.Event, nextPageToken string, err error)
	// contains filtered or unexported fields
}

EventIterator manages a stream of *visionaipb.Event.

func (*EventIterator) Next

func (it *EventIterator) Next() (*visionaipb.Event, 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 (*EventIterator) PageInfo

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

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

type GetStreamThumbnailOperation

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

GetStreamThumbnailOperation manages a long-running operation from GetStreamThumbnail.

func (*GetStreamThumbnailOperation) Done

func (op *GetStreamThumbnailOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*GetStreamThumbnailOperation) Metadata

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

func (*GetStreamThumbnailOperation) Name

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

func (*GetStreamThumbnailOperation) Poll

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

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

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

func (*GetStreamThumbnailOperation) Wait

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

See documentation of Poll for error-handling information.

type HealthCheckCallOptions

type HealthCheckCallOptions struct {
	HealthCheck     []gax.CallOption
	CancelOperation []gax.CallOption
	DeleteOperation []gax.CallOption
	GetOperation    []gax.CallOption
	ListOperations  []gax.CallOption
}

HealthCheckCallOptions contains the retry settings for each method of HealthCheckClient.

type HealthCheckClient

type HealthCheckClient struct {

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

HealthCheckClient 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.

HealthCheckService provides an interface for Vertex AI Vision Cluster Health Check.

func NewHealthCheckClient

func NewHealthCheckClient(ctx context.Context, opts ...option.ClientOption) (*HealthCheckClient, error)

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

HealthCheckService provides an interface for Vertex AI Vision Cluster Health Check.

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

	// TODO: Use client.
	_ = c
}
Output:

func NewHealthCheckRESTClient

func NewHealthCheckRESTClient(ctx context.Context, opts ...option.ClientOption) (*HealthCheckClient, error)

NewHealthCheckRESTClient creates a new health check service rest client.

HealthCheckService provides an interface for Vertex AI Vision Cluster Health Check.

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

	// TODO: Use client.
	_ = c
}
Output:

func (*HealthCheckClient) CancelOperation

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.NewHealthCheckClient(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.
	}
}
Output:

func (*HealthCheckClient) Close

func (c *HealthCheckClient) Close() error

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

func (*HealthCheckClient) Connection deprecated

func (c *HealthCheckClient) 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 (*HealthCheckClient) DeleteOperation

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.NewHealthCheckClient(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.
	}
}
Output:

func (*HealthCheckClient) GetOperation

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.NewHealthCheckClient(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
}
Output:

func (*HealthCheckClient) HealthCheck

HealthCheck healthCheck method checks the health status of the cluster.

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

	req := &visionaipb.HealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#HealthCheckRequest.
	}
	resp, err := c.HealthCheck(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*HealthCheckClient) ListOperations

ListOperations 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"
	"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.NewHealthCheckClient(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
	}
}
Output:

type ImportAssetsOperation

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

ImportAssetsOperation manages a long-running operation from ImportAssets.

func (*ImportAssetsOperation) Done

func (op *ImportAssetsOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ImportAssetsOperation) Metadata

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

func (*ImportAssetsOperation) Name

func (op *ImportAssetsOperation) 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 (*ImportAssetsOperation) Poll

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

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

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

func (*ImportAssetsOperation) Wait

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

See documentation of Poll for error-handling information.

type IndexAssetOperation

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

IndexAssetOperation manages a long-running operation from IndexAsset.

func (*IndexAssetOperation) Done

func (op *IndexAssetOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*IndexAssetOperation) Metadata

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

func (*IndexAssetOperation) Name

func (op *IndexAssetOperation) 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 (*IndexAssetOperation) Poll

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

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

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

func (*IndexAssetOperation) Wait

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

See documentation of Poll for error-handling information.

type IndexEndpointIterator

type IndexEndpointIterator 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.IndexEndpoint, nextPageToken string, err error)
	// contains filtered or unexported fields
}

IndexEndpointIterator manages a stream of *visionaipb.IndexEndpoint.

func (*IndexEndpointIterator) Next

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

func (*IndexEndpointIterator) PageInfo

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

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

type IndexIterator

type IndexIterator 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.Index, nextPageToken string, err error)
	// contains filtered or unexported fields
}

IndexIterator manages a stream of *visionaipb.Index.

func (*IndexIterator) Next

func (it *IndexIterator) Next() (*visionaipb.Index, 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 (*IndexIterator) PageInfo

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

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

type IndexedAssetIterator

type IndexedAssetIterator 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.IndexedAsset, nextPageToken string, err error)
	// contains filtered or unexported fields
}

IndexedAssetIterator manages a stream of *visionaipb.IndexedAsset.

func (*IndexedAssetIterator) Next

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

func (*IndexedAssetIterator) PageInfo

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

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

type InstanceIterator

type InstanceIterator 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.Instance, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InstanceIterator manages a stream of *visionaipb.Instance.

func (*InstanceIterator) Next

func (it *InstanceIterator) Next() (*visionaipb.Instance, 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 (*InstanceIterator) PageInfo

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

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

type LiveVideoAnalyticsCallOptions

type LiveVideoAnalyticsCallOptions struct {
	ListPublicOperators []gax.CallOption
	ResolveOperatorInfo []gax.CallOption
	ListOperators       []gax.CallOption
	GetOperator         []gax.CallOption
	CreateOperator      []gax.CallOption
	UpdateOperator      []gax.CallOption
	DeleteOperator      []gax.CallOption
	ListAnalyses        []gax.CallOption
	GetAnalysis         []gax.CallOption
	CreateAnalysis      []gax.CallOption
	UpdateAnalysis      []gax.CallOption
	DeleteAnalysis      []gax.CallOption
	ListProcesses       []gax.CallOption
	GetProcess          []gax.CallOption
	CreateProcess       []gax.CallOption
	UpdateProcess       []gax.CallOption
	DeleteProcess       []gax.CallOption
	BatchRunProcess     []gax.CallOption
	CancelOperation     []gax.CallOption
	DeleteOperation     []gax.CallOption
	GetOperation        []gax.CallOption
	ListOperations      []gax.CallOption
}

LiveVideoAnalyticsCallOptions contains the retry settings for each method of LiveVideoAnalyticsClient.

type LiveVideoAnalyticsClient

type LiveVideoAnalyticsClient struct {

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

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

LiveVideoAnalyticsClient 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. The service enables clients to run Live Video Analytics (LVA) on the streaming inputs.

func NewLiveVideoAnalyticsClient

func NewLiveVideoAnalyticsClient(ctx context.Context, opts ...option.ClientOption) (*LiveVideoAnalyticsClient, error)

NewLiveVideoAnalyticsClient creates a new live video analytics 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. The service enables clients to run Live Video Analytics (LVA) on the streaming inputs.

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

	// TODO: Use client.
	_ = c
}
Output:

func NewLiveVideoAnalyticsRESTClient

func NewLiveVideoAnalyticsRESTClient(ctx context.Context, opts ...option.ClientOption) (*LiveVideoAnalyticsClient, error)

NewLiveVideoAnalyticsRESTClient creates a new live video analytics rest client.

Service describing handlers for resources. The service enables clients to run Live Video Analytics (LVA) on the streaming inputs.

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

	// TODO: Use client.
	_ = c
}
Output:

func (*LiveVideoAnalyticsClient) BatchRunProcess

BatchRunProcess run all of the processes to “completion”. Max time for each process is the LRO time limit.

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

	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
}
Output:

func (*LiveVideoAnalyticsClient) BatchRunProcessOperation

func (c *LiveVideoAnalyticsClient) BatchRunProcessOperation(name string) *BatchRunProcessOperation

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

func (*LiveVideoAnalyticsClient) CancelOperation

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.NewLiveVideoAnalyticsClient(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.
	}
}
Output:

func (*LiveVideoAnalyticsClient) Close

func (c *LiveVideoAnalyticsClient) Close() error

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

func (*LiveVideoAnalyticsClient) Connection deprecated

func (c *LiveVideoAnalyticsClient) 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 (*LiveVideoAnalyticsClient) CreateAnalysis

CreateAnalysis creates a new Analysis 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.NewLiveVideoAnalyticsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.CreateAnalysisRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateAnalysisRequest.
	}
	op, err := c.CreateAnalysis(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*LiveVideoAnalyticsClient) CreateAnalysisOperation

func (c *LiveVideoAnalyticsClient) CreateAnalysisOperation(name string) *CreateAnalysisOperation

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

func (*LiveVideoAnalyticsClient) CreateOperator

CreateOperator creates a new Operator 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.NewLiveVideoAnalyticsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.CreateOperatorRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateOperatorRequest.
	}
	op, err := c.CreateOperator(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*LiveVideoAnalyticsClient) CreateOperatorOperation

func (c *LiveVideoAnalyticsClient) CreateOperatorOperation(name string) *CreateOperatorOperation

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

func (*LiveVideoAnalyticsClient) CreateProcess

CreateProcess creates a new Process 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.NewLiveVideoAnalyticsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.CreateProcessRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateProcessRequest.
	}
	op, err := c.CreateProcess(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*LiveVideoAnalyticsClient) CreateProcessOperation

func (c *LiveVideoAnalyticsClient) CreateProcessOperation(name string) *CreateProcessOperation

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

func (*LiveVideoAnalyticsClient) DeleteAnalysis

DeleteAnalysis deletes a single Analysis.

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

	req := &visionaipb.DeleteAnalysisRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteAnalysisRequest.
	}
	op, err := c.DeleteAnalysis(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*LiveVideoAnalyticsClient) DeleteAnalysisOperation

func (c *LiveVideoAnalyticsClient) DeleteAnalysisOperation(name string) *DeleteAnalysisOperation

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

func (*LiveVideoAnalyticsClient) DeleteOperation

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.NewLiveVideoAnalyticsClient(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.
	}
}
Output:

func (*LiveVideoAnalyticsClient) DeleteOperator

DeleteOperator deletes a single Operator.

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

	req := &visionaipb.DeleteOperatorRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteOperatorRequest.
	}
	op, err := c.DeleteOperator(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*LiveVideoAnalyticsClient) DeleteOperatorOperation

func (c *LiveVideoAnalyticsClient) DeleteOperatorOperation(name string) *DeleteOperatorOperation

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

func (*LiveVideoAnalyticsClient) DeleteProcess

DeleteProcess deletes a single Process.

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

	req := &visionaipb.DeleteProcessRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteProcessRequest.
	}
	op, err := c.DeleteProcess(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*LiveVideoAnalyticsClient) DeleteProcessOperation

func (c *LiveVideoAnalyticsClient) DeleteProcessOperation(name string) *DeleteProcessOperation

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

func (*LiveVideoAnalyticsClient) GetAnalysis

GetAnalysis gets details of a single Analysis.

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

	req := &visionaipb.GetAnalysisRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetAnalysisRequest.
	}
	resp, err := c.GetAnalysis(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*LiveVideoAnalyticsClient) GetOperation

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.NewLiveVideoAnalyticsClient(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
}
Output:

func (*LiveVideoAnalyticsClient) GetOperator

GetOperator gets details of a single Operator.

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

	req := &visionaipb.GetOperatorRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetOperatorRequest.
	}
	resp, err := c.GetOperator(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*LiveVideoAnalyticsClient) GetProcess

GetProcess gets details of a single Process.

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

	req := &visionaipb.GetProcessRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetProcessRequest.
	}
	resp, err := c.GetProcess(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*LiveVideoAnalyticsClient) ListAnalyses

ListAnalyses lists Analyses 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"
	"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.NewLiveVideoAnalyticsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.ListAnalysesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAnalysesRequest.
	}
	it := c.ListAnalyses(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*LiveVideoAnalyticsClient) ListOperations

ListOperations 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"
	"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.NewLiveVideoAnalyticsClient(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
	}
}
Output:

func (*LiveVideoAnalyticsClient) ListOperators

ListOperators lists Operators 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"
	"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.NewLiveVideoAnalyticsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.ListOperatorsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListOperatorsRequest.
	}
	it := c.ListOperators(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*LiveVideoAnalyticsClient) ListProcesses

ListProcesses lists Processes 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"
	"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.NewLiveVideoAnalyticsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.ListProcessesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListProcessesRequest.
	}
	it := c.ListProcesses(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*LiveVideoAnalyticsClient) ListPublicOperators

ListPublicOperators listPublicOperators returns all the operators in public registry.

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

	req := &visionaipb.ListPublicOperatorsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListPublicOperatorsRequest.
	}
	it := c.ListPublicOperators(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*LiveVideoAnalyticsClient) ResolveOperatorInfo

ResolveOperatorInfo resolveOperatorInfo returns the operator information based on the request.

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

	req := &visionaipb.ResolveOperatorInfoRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ResolveOperatorInfoRequest.
	}
	resp, err := c.ResolveOperatorInfo(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*LiveVideoAnalyticsClient) UpdateAnalysis

UpdateAnalysis updates the parameters of a single Analysis.

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

	req := &visionaipb.UpdateAnalysisRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateAnalysisRequest.
	}
	op, err := c.UpdateAnalysis(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*LiveVideoAnalyticsClient) UpdateAnalysisOperation

func (c *LiveVideoAnalyticsClient) UpdateAnalysisOperation(name string) *UpdateAnalysisOperation

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

func (*LiveVideoAnalyticsClient) UpdateOperator

UpdateOperator updates the parameters of a single Operator.

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

	req := &visionaipb.UpdateOperatorRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateOperatorRequest.
	}
	op, err := c.UpdateOperator(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*LiveVideoAnalyticsClient) UpdateOperatorOperation

func (c *LiveVideoAnalyticsClient) UpdateOperatorOperation(name string) *UpdateOperatorOperation

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

func (*LiveVideoAnalyticsClient) UpdateProcess

UpdateProcess updates the parameters of a single Process.

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

	req := &visionaipb.UpdateProcessRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateProcessRequest.
	}
	op, err := c.UpdateProcess(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*LiveVideoAnalyticsClient) UpdateProcessOperation

func (c *LiveVideoAnalyticsClient) UpdateProcessOperation(name string) *UpdateProcessOperation

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

type MaterializeChannelOperation

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

MaterializeChannelOperation manages a long-running operation from MaterializeChannel.

func (*MaterializeChannelOperation) Done

func (op *MaterializeChannelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*MaterializeChannelOperation) Metadata

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

func (*MaterializeChannelOperation) Name

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

func (*MaterializeChannelOperation) Poll

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

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

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

func (*MaterializeChannelOperation) Wait

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

See documentation of Poll for error-handling information.

type OperationIterator

type OperationIterator struct {

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

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

OperationIterator manages a stream of *longrunningpb.Operation.

func (*OperationIterator) Next

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

func (*OperationIterator) PageInfo

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

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

type OperatorIterator

type OperatorIterator 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.Operator, nextPageToken string, err error)
	// contains filtered or unexported fields
}

OperatorIterator manages a stream of *visionaipb.Operator.

func (*OperatorIterator) Next

func (it *OperatorIterator) Next() (*visionaipb.Operator, 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 (*OperatorIterator) PageInfo

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

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

type ProcessIterator

type ProcessIterator 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.Process, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ProcessIterator manages a stream of *visionaipb.Process.

func (*ProcessIterator) Next

func (it *ProcessIterator) Next() (*visionaipb.Process, 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 (*ProcessIterator) PageInfo

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

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

type ProcessorIterator

type ProcessorIterator 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.Processor, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ProcessorIterator manages a stream of *visionaipb.Processor.

func (*ProcessorIterator) Next

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

func (*ProcessorIterator) PageInfo

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

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

type RemoveApplicationStreamInputOperation

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

RemoveApplicationStreamInputOperation manages a long-running operation from RemoveApplicationStreamInput.

func (*RemoveApplicationStreamInputOperation) Done

Done reports whether the long-running operation has completed.

func (*RemoveApplicationStreamInputOperation) Metadata

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

func (*RemoveApplicationStreamInputOperation) Name

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

func (*RemoveApplicationStreamInputOperation) Poll

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

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

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

func (*RemoveApplicationStreamInputOperation) Wait

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

See documentation of Poll for error-handling information.

type RemoveIndexAssetOperation

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

RemoveIndexAssetOperation manages a long-running operation from RemoveIndexAsset.

func (*RemoveIndexAssetOperation) Done

func (op *RemoveIndexAssetOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*RemoveIndexAssetOperation) Metadata

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

func (*RemoveIndexAssetOperation) Name

func (op *RemoveIndexAssetOperation) 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 (*RemoveIndexAssetOperation) Poll

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

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

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

func (*RemoveIndexAssetOperation) Wait

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

See documentation of Poll for error-handling information.

type SearchConfigIterator

type SearchConfigIterator 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.SearchConfig, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SearchConfigIterator manages a stream of *visionaipb.SearchConfig.

func (*SearchConfigIterator) Next

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

func (*SearchConfigIterator) PageInfo

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

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

type SearchHypernymIterator

type SearchHypernymIterator 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.SearchHypernym, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SearchHypernymIterator manages a stream of *visionaipb.SearchHypernym.

func (*SearchHypernymIterator) Next

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

func (*SearchHypernymIterator) PageInfo

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

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

type SearchResultItemIterator

type SearchResultItemIterator 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.SearchResultItem, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SearchResultItemIterator manages a stream of *visionaipb.SearchResultItem.

func (*SearchResultItemIterator) Next

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

func (*SearchResultItemIterator) PageInfo

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

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

type SeriesIterator

type SeriesIterator 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.Series, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SeriesIterator manages a stream of *visionaipb.Series.

func (*SeriesIterator) Next

func (it *SeriesIterator) Next() (*visionaipb.Series, 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 (*SeriesIterator) PageInfo

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

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

type StreamIterator

type StreamIterator 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.Stream, nextPageToken string, err error)
	// contains filtered or unexported fields
}

StreamIterator manages a stream of *visionaipb.Stream.

func (*StreamIterator) Next

func (it *StreamIterator) Next() (*visionaipb.Stream, 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 (*StreamIterator) PageInfo

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

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

type StreamingCallOptions

type StreamingCallOptions struct {
	SendPackets     []gax.CallOption
	ReceivePackets  []gax.CallOption
	ReceiveEvents   []gax.CallOption
	AcquireLease    []gax.CallOption
	RenewLease      []gax.CallOption
	ReleaseLease    []gax.CallOption
	CancelOperation []gax.CallOption
	DeleteOperation []gax.CallOption
	GetOperation    []gax.CallOption
	ListOperations  []gax.CallOption
}

StreamingCallOptions contains the retry settings for each method of StreamingClient.

type StreamingClient

type StreamingClient struct {

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

StreamingClient 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.

Streaming service for receiving and sending packets.

func NewStreamingClient

func NewStreamingClient(ctx context.Context, opts ...option.ClientOption) (*StreamingClient, error)

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

Streaming service for receiving and sending packets.

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

	// TODO: Use client.
	_ = c
}
Output:

func NewStreamingRESTClient

func NewStreamingRESTClient(ctx context.Context, opts ...option.ClientOption) (*StreamingClient, error)

NewStreamingRESTClient creates a new streaming service rest client.

Streaming service for receiving and sending packets.

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

	// TODO: Use client.
	_ = c
}
Output:

func (*StreamingClient) AcquireLease

AcquireLease acquireLease acquires a lease.

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

	req := &visionaipb.AcquireLeaseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AcquireLeaseRequest.
	}
	resp, err := c.AcquireLease(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*StreamingClient) CancelOperation

func (c *StreamingClient) 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.NewStreamingClient(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.
	}
}
Output:

func (*StreamingClient) Close

func (c *StreamingClient) Close() error

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

func (*StreamingClient) Connection deprecated

func (c *StreamingClient) 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 (*StreamingClient) DeleteOperation

func (c *StreamingClient) 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.NewStreamingClient(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.
	}
}
Output:

func (*StreamingClient) GetOperation

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.NewStreamingClient(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
}
Output:

func (*StreamingClient) ListOperations

ListOperations 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"
	"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.NewStreamingClient(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
	}
}
Output:

func (*StreamingClient) ReceiveEvents

ReceiveEvents receive events given the stream name.

This method is not supported for the REST transport.

Example
package main

import (
	"context"
	"io"

	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.NewStreamingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()
	stream, err := c.ReceiveEvents(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	go func() {
		reqs := []*visionaipb.ReceiveEventsRequest{
			// TODO: Create requests.
		}
		for _, req := range reqs {
			if err := stream.Send(req); err != nil {
				// TODO: Handle error.
			}
		}
		stream.CloseSend()
	}()
	for {
		resp, err := stream.Recv()
		if err == io.EOF {
			break
		}
		if err != nil {
			// TODO: handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*StreamingClient) ReceivePackets

ReceivePackets receive packets from the series.

This method is not supported for the REST transport.

Example
package main

import (
	"context"
	"io"

	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.NewStreamingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()
	stream, err := c.ReceivePackets(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	go func() {
		reqs := []*visionaipb.ReceivePacketsRequest{
			// TODO: Create requests.
		}
		for _, req := range reqs {
			if err := stream.Send(req); err != nil {
				// TODO: Handle error.
			}
		}
		stream.CloseSend()
	}()
	for {
		resp, err := stream.Recv()
		if err == io.EOF {
			break
		}
		if err != nil {
			// TODO: handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*StreamingClient) ReleaseLease

ReleaseLease rleaseLease releases a lease.

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

	req := &visionaipb.ReleaseLeaseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ReleaseLeaseRequest.
	}
	resp, err := c.ReleaseLease(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*StreamingClient) RenewLease

RenewLease renewLease renews a lease.

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

	req := &visionaipb.RenewLeaseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#RenewLeaseRequest.
	}
	resp, err := c.RenewLease(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*StreamingClient) SendPackets

SendPackets send packets to the series.

This method is not supported for the REST transport.

Example
package main

import (
	"context"
	"io"

	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.NewStreamingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()
	stream, err := c.SendPackets(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	go func() {
		reqs := []*visionaipb.SendPacketsRequest{
			// TODO: Create requests.
		}
		for _, req := range reqs {
			if err := stream.Send(req); err != nil {
				// TODO: Handle error.
			}
		}
		stream.CloseSend()
	}()
	for {
		resp, err := stream.Recv()
		if err == io.EOF {
			break
		}
		if err != nil {
			// TODO: handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

type StreamsCallOptions

type StreamsCallOptions struct {
	ListClusters           []gax.CallOption
	GetCluster             []gax.CallOption
	CreateCluster          []gax.CallOption
	UpdateCluster          []gax.CallOption
	DeleteCluster          []gax.CallOption
	ListStreams            []gax.CallOption
	GetStream              []gax.CallOption
	CreateStream           []gax.CallOption
	UpdateStream           []gax.CallOption
	DeleteStream           []gax.CallOption
	GetStreamThumbnail     []gax.CallOption
	GenerateStreamHlsToken []gax.CallOption
	ListEvents             []gax.CallOption
	GetEvent               []gax.CallOption
	CreateEvent            []gax.CallOption
	UpdateEvent            []gax.CallOption
	DeleteEvent            []gax.CallOption
	ListSeries             []gax.CallOption
	GetSeries              []gax.CallOption
	CreateSeries           []gax.CallOption
	UpdateSeries           []gax.CallOption
	DeleteSeries           []gax.CallOption
	MaterializeChannel     []gax.CallOption
	CancelOperation        []gax.CallOption
	DeleteOperation        []gax.CallOption
	GetOperation           []gax.CallOption
	ListOperations         []gax.CallOption
}

StreamsCallOptions contains the retry settings for each method of StreamsClient.

type StreamsClient

type StreamsClient struct {

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

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

StreamsClient 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. Vision API and Vision AI API are two independent APIs developed by the same team. Vision API is for people to annotate their image while Vision AI is an e2e solution for customer to build their own computer vision application.

func NewStreamsClient

func NewStreamsClient(ctx context.Context, opts ...option.ClientOption) (*StreamsClient, error)

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

Service describing handlers for resources. Vision API and Vision AI API are two independent APIs developed by the same team. Vision API is for people to annotate their image while Vision AI is an e2e solution for customer to build their own computer vision application.

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

	// TODO: Use client.
	_ = c
}
Output:

func NewStreamsRESTClient

func NewStreamsRESTClient(ctx context.Context, opts ...option.ClientOption) (*StreamsClient, error)

NewStreamsRESTClient creates a new streams service rest client.

Service describing handlers for resources. Vision API and Vision AI API are two independent APIs developed by the same team. Vision API is for people to annotate their image while Vision AI is an e2e solution for customer to build their own computer vision application.

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

	// TODO: Use client.
	_ = c
}
Output:

func (*StreamsClient) CancelOperation

func (c *StreamsClient) 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.NewStreamsClient(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.
	}
}
Output:

func (*StreamsClient) Close

func (c *StreamsClient) Close() error

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

func (*StreamsClient) Connection deprecated

func (c *StreamsClient) 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 (*StreamsClient) CreateCluster

CreateCluster creates a new Cluster 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.NewStreamsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.CreateClusterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateClusterRequest.
	}
	op, err := c.CreateCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) CreateClusterOperation

func (c *StreamsClient) CreateClusterOperation(name string) *CreateClusterOperation

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

func (*StreamsClient) CreateEvent

CreateEvent creates a new Event 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.NewStreamsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.CreateEventRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateEventRequest.
	}
	op, err := c.CreateEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) CreateEventOperation

func (c *StreamsClient) CreateEventOperation(name string) *CreateEventOperation

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

func (*StreamsClient) CreateSeries

CreateSeries creates a new Series 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.NewStreamsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.CreateSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateSeriesRequest.
	}
	op, err := c.CreateSeries(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) CreateSeriesOperation

func (c *StreamsClient) CreateSeriesOperation(name string) *CreateSeriesOperation

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

func (*StreamsClient) CreateStream

CreateStream creates a new Stream 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.NewStreamsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.CreateStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateStreamRequest.
	}
	op, err := c.CreateStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) CreateStreamOperation

func (c *StreamsClient) CreateStreamOperation(name string) *CreateStreamOperation

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

func (*StreamsClient) DeleteCluster

DeleteCluster deletes a single Cluster.

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

	req := &visionaipb.DeleteClusterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteClusterRequest.
	}
	op, err := c.DeleteCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) DeleteClusterOperation

func (c *StreamsClient) DeleteClusterOperation(name string) *DeleteClusterOperation

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

func (*StreamsClient) DeleteEvent

DeleteEvent deletes a single Event.

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

	req := &visionaipb.DeleteEventRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteEventRequest.
	}
	op, err := c.DeleteEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) DeleteEventOperation

func (c *StreamsClient) DeleteEventOperation(name string) *DeleteEventOperation

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

func (*StreamsClient) DeleteOperation

func (c *StreamsClient) 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.NewStreamsClient(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.
	}
}
Output:

func (*StreamsClient) DeleteSeries

DeleteSeries deletes a single Series.

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

	req := &visionaipb.DeleteSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteSeriesRequest.
	}
	op, err := c.DeleteSeries(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) DeleteSeriesOperation

func (c *StreamsClient) DeleteSeriesOperation(name string) *DeleteSeriesOperation

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

func (*StreamsClient) DeleteStream

DeleteStream deletes a single Stream.

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

	req := &visionaipb.DeleteStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteStreamRequest.
	}
	op, err := c.DeleteStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) DeleteStreamOperation

func (c *StreamsClient) DeleteStreamOperation(name string) *DeleteStreamOperation

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

func (*StreamsClient) GenerateStreamHlsToken

GenerateStreamHlsToken generate the JWT auth token required to get the stream HLS contents.

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

	req := &visionaipb.GenerateStreamHlsTokenRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GenerateStreamHlsTokenRequest.
	}
	resp, err := c.GenerateStreamHlsToken(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*StreamsClient) GetCluster

GetCluster gets details of a single Cluster.

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

	req := &visionaipb.GetClusterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetClusterRequest.
	}
	resp, err := c.GetCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*StreamsClient) GetEvent

GetEvent gets details of a single Event.

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

	req := &visionaipb.GetEventRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetEventRequest.
	}
	resp, err := c.GetEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*StreamsClient) GetOperation

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.NewStreamsClient(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
}
Output:

func (*StreamsClient) GetSeries

GetSeries gets details of a single Series.

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

	req := &visionaipb.GetSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetSeriesRequest.
	}
	resp, err := c.GetSeries(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*StreamsClient) GetStream

GetStream gets details of a single Stream.

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

	req := &visionaipb.GetStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetStreamRequest.
	}
	resp, err := c.GetStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*StreamsClient) GetStreamThumbnail

GetStreamThumbnail gets the thumbnail (image snapshot) of a single Stream.

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

	req := &visionaipb.GetStreamThumbnailRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetStreamThumbnailRequest.
	}
	op, err := c.GetStreamThumbnail(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) GetStreamThumbnailOperation

func (c *StreamsClient) GetStreamThumbnailOperation(name string) *GetStreamThumbnailOperation

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

func (*StreamsClient) ListClusters

ListClusters lists Clusters 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"
	"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.NewStreamsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.ListClustersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListClustersRequest.
	}
	it := c.ListClusters(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*StreamsClient) ListEvents

ListEvents lists Events 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"
	"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.NewStreamsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.ListEventsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListEventsRequest.
	}
	it := c.ListEvents(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*StreamsClient) ListOperations

ListOperations 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"
	"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.NewStreamsClient(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
	}
}
Output:

func (*StreamsClient) ListSeries

ListSeries lists Series 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"
	"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.NewStreamsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.ListSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSeriesRequest.
	}
	it := c.ListSeries(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*StreamsClient) ListStreams

ListStreams lists Streams 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"
	"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.NewStreamsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &visionaipb.ListStreamsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListStreamsRequest.
	}
	it := c.ListStreams(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*StreamsClient) MaterializeChannel

MaterializeChannel materialize a channel.

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

	req := &visionaipb.MaterializeChannelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#MaterializeChannelRequest.
	}
	op, err := c.MaterializeChannel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) MaterializeChannelOperation

func (c *StreamsClient) MaterializeChannelOperation(name string) *MaterializeChannelOperation

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

func (*StreamsClient) UpdateCluster

UpdateCluster updates the parameters of a single Cluster.

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

	req := &visionaipb.UpdateClusterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateClusterRequest.
	}
	op, err := c.UpdateCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) UpdateClusterOperation

func (c *StreamsClient) UpdateClusterOperation(name string) *UpdateClusterOperation

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

func (*StreamsClient) UpdateEvent

UpdateEvent updates the parameters of a single Event.

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

	req := &visionaipb.UpdateEventRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateEventRequest.
	}
	op, err := c.UpdateEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) UpdateEventOperation

func (c *StreamsClient) UpdateEventOperation(name string) *UpdateEventOperation

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

func (*StreamsClient) UpdateSeries

UpdateSeries updates the parameters of a single Event.

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

	req := &visionaipb.UpdateSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateSeriesRequest.
	}
	op, err := c.UpdateSeries(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) UpdateSeriesOperation

func (c *StreamsClient) UpdateSeriesOperation(name string) *UpdateSeriesOperation

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

func (*StreamsClient) UpdateStream

UpdateStream updates the parameters of a single Stream.

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

	req := &visionaipb.UpdateStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateStreamRequest.
	}
	op, err := c.UpdateStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*StreamsClient) UpdateStreamOperation

func (c *StreamsClient) UpdateStreamOperation(name string) *UpdateStreamOperation

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

type UndeployApplicationOperation

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

UndeployApplicationOperation manages a long-running operation from UndeployApplication.

func (*UndeployApplicationOperation) Done

Done reports whether the long-running operation has completed.

func (*UndeployApplicationOperation) Metadata

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

func (*UndeployApplicationOperation) Name

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

func (*UndeployApplicationOperation) Poll

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

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

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

func (*UndeployApplicationOperation) Wait

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

See documentation of Poll for error-handling information.

type UndeployIndexOperation

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

UndeployIndexOperation manages a long-running operation from UndeployIndex.

func (*UndeployIndexOperation) Done

func (op *UndeployIndexOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UndeployIndexOperation) Metadata

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

func (*UndeployIndexOperation) Name

func (op *UndeployIndexOperation) 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 (*UndeployIndexOperation) Poll

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

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

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

func (*UndeployIndexOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateAnalysisOperation

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

UpdateAnalysisOperation manages a long-running operation from UpdateAnalysis.

func (*UpdateAnalysisOperation) Done

func (op *UpdateAnalysisOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateAnalysisOperation) Metadata

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

func (*UpdateAnalysisOperation) Name

func (op *UpdateAnalysisOperation) 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 (*UpdateAnalysisOperation) Poll

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

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

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

func (*UpdateAnalysisOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateApplicationInstancesOperation

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

UpdateApplicationInstancesOperation manages a long-running operation from UpdateApplicationInstances.

func (*UpdateApplicationInstancesOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateApplicationInstancesOperation) Metadata

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

func (*UpdateApplicationInstancesOperation) Name

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

func (*UpdateApplicationInstancesOperation) Poll

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

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

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

func (*UpdateApplicationInstancesOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateApplicationOperation

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

UpdateApplicationOperation manages a long-running operation from UpdateApplication.

func (*UpdateApplicationOperation) Done

func (op *UpdateApplicationOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateApplicationOperation) Metadata

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

func (*UpdateApplicationOperation) Name

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

func (*UpdateApplicationOperation) Poll

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

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

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

func (*UpdateApplicationOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateApplicationStreamInputOperation

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

UpdateApplicationStreamInputOperation manages a long-running operation from UpdateApplicationStreamInput.

func (*UpdateApplicationStreamInputOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateApplicationStreamInputOperation) Metadata

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

func (*UpdateApplicationStreamInputOperation) Name

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

func (*UpdateApplicationStreamInputOperation) Poll

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

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

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

func (*UpdateApplicationStreamInputOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateClusterOperation

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

UpdateClusterOperation manages a long-running operation from UpdateCluster.

func (*UpdateClusterOperation) Done

func (op *UpdateClusterOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateClusterOperation) Metadata

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

func (*UpdateClusterOperation) Name

func (op *UpdateClusterOperation) 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 (*UpdateClusterOperation) Poll

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

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

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

func (*UpdateClusterOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateDraftOperation

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

UpdateDraftOperation manages a long-running operation from UpdateDraft.

func (*UpdateDraftOperation) Done

func (op *UpdateDraftOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateDraftOperation) Metadata

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

func (*UpdateDraftOperation) Name

func (op *UpdateDraftOperation) 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 (*UpdateDraftOperation) Poll

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

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

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

func (*UpdateDraftOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateEventOperation

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

UpdateEventOperation manages a long-running operation from UpdateEvent.

func (*UpdateEventOperation) Done

func (op *UpdateEventOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateEventOperation) Metadata

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

func (*UpdateEventOperation) Name

func (op *UpdateEventOperation) 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 (*UpdateEventOperation) Poll

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

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

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

func (*UpdateEventOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateIndexEndpointOperation

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

UpdateIndexEndpointOperation manages a long-running operation from UpdateIndexEndpoint.

func (*UpdateIndexEndpointOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateIndexEndpointOperation) Metadata

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

func (*UpdateIndexEndpointOperation) Name

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

func (*UpdateIndexEndpointOperation) Poll

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

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

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

func (*UpdateIndexEndpointOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateIndexOperation

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

UpdateIndexOperation manages a long-running operation from UpdateIndex.

func (*UpdateIndexOperation) Done

func (op *UpdateIndexOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateIndexOperation) Metadata

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

func (*UpdateIndexOperation) Name

func (op *UpdateIndexOperation) 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 (*UpdateIndexOperation) Poll

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

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

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

func (*UpdateIndexOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateOperatorOperation

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

UpdateOperatorOperation manages a long-running operation from UpdateOperator.

func (*UpdateOperatorOperation) Done

func (op *UpdateOperatorOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateOperatorOperation) Metadata

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

func (*UpdateOperatorOperation) Name

func (op *UpdateOperatorOperation) 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 (*UpdateOperatorOperation) Poll

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

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

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

func (*UpdateOperatorOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateProcessOperation

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

UpdateProcessOperation manages a long-running operation from UpdateProcess.

func (*UpdateProcessOperation) Done

func (op *UpdateProcessOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateProcessOperation) Metadata

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

func (*UpdateProcessOperation) Name

func (op *UpdateProcessOperation) 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 (*UpdateProcessOperation) Poll

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

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

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

func (*UpdateProcessOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateProcessorOperation

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

UpdateProcessorOperation manages a long-running operation from UpdateProcessor.

func (*UpdateProcessorOperation) Done

func (op *UpdateProcessorOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateProcessorOperation) Metadata

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

func (*UpdateProcessorOperation) Name

func (op *UpdateProcessorOperation) 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 (*UpdateProcessorOperation) Poll

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

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

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

func (*UpdateProcessorOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateSeriesOperation

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

UpdateSeriesOperation manages a long-running operation from UpdateSeries.

func (*UpdateSeriesOperation) Done

func (op *UpdateSeriesOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateSeriesOperation) Metadata

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

func (*UpdateSeriesOperation) Name

func (op *UpdateSeriesOperation) 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 (*UpdateSeriesOperation) Poll

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

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

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

func (*UpdateSeriesOperation) Wait

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

See documentation of Poll for error-handling information.

type UpdateStreamOperation

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

UpdateStreamOperation manages a long-running operation from UpdateStream.

func (*UpdateStreamOperation) Done

func (op *UpdateStreamOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateStreamOperation) Metadata

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

func (*UpdateStreamOperation) Name

func (op *UpdateStreamOperation) 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 (*UpdateStreamOperation) Poll

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

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

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

func (*UpdateStreamOperation) Wait

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

See documentation of Poll for error-handling information.

type UploadAssetOperation

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

UploadAssetOperation manages a long-running operation from UploadAsset.

func (*UploadAssetOperation) Done

func (op *UploadAssetOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UploadAssetOperation) Metadata

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

func (*UploadAssetOperation) Name

func (op *UploadAssetOperation) 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 (*UploadAssetOperation) Poll

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

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

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

func (*UploadAssetOperation) Wait

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

See documentation of Poll for error-handling information.

type WarehouseCallOptions

type WarehouseCallOptions struct {
	CreateAsset          []gax.CallOption
	UpdateAsset          []gax.CallOption
	GetAsset             []gax.CallOption
	ListAssets           []gax.CallOption
	DeleteAsset          []gax.CallOption
	UploadAsset          []gax.CallOption
	GenerateRetrievalUrl []gax.CallOption
	AnalyzeAsset         []gax.CallOption
	IndexAsset           []gax.CallOption
	RemoveIndexAsset     []gax.CallOption
	ViewIndexedAssets    []gax.CallOption
	CreateIndex          []gax.CallOption
	UpdateIndex          []gax.CallOption
	GetIndex             []gax.CallOption
	ListIndexes          []gax.CallOption
	DeleteIndex          []gax.CallOption
	CreateCorpus         []gax.CallOption
	GetCorpus            []gax.CallOption
	UpdateCorpus         []gax.CallOption
	ListCorpora          []gax.CallOption
	DeleteCorpus         []gax.CallOption
	AnalyzeCorpus        []gax.CallOption
	CreateDataSchema     []gax.CallOption
	UpdateDataSchema     []gax.CallOption
	GetDataSchema        []gax.CallOption
	DeleteDataSchema     []gax.CallOption
	ListDataSchemas      []gax.CallOption
	CreateAnnotation     []gax.CallOption
	GetAnnotation        []gax.CallOption
	ListAnnotations      []gax.CallOption
	UpdateAnnotation     []gax.CallOption
	DeleteAnnotation     []gax.CallOption
	IngestAsset          []gax.CallOption
	ClipAsset            []gax.CallOption
	GenerateHlsUri       []gax.CallOption
	ImportAssets         []gax.CallOption
	CreateSearchConfig   []gax.CallOption
	UpdateSearchConfig   []gax.CallOption
	GetSearchConfig      []gax.CallOption
	DeleteSearchConfig   []gax.CallOption
	ListSearchConfigs    []gax.CallOption
	CreateSearchHypernym []gax.CallOption
	UpdateSearchHypernym []gax.CallOption
	GetSearchHypernym    []gax.CallOption
	DeleteSearchHypernym []gax.CallOption
	ListSearchHypernyms  []gax.CallOption
	SearchAssets         []gax.CallOption
	SearchIndexEndpoint  []gax.CallOption
	CreateIndexEndpoint  []gax.CallOption
	GetIndexEndpoint     []gax.CallOption
	ListIndexEndpoints   []gax.CallOption
	UpdateIndexEndpoint  []gax.CallOption
	DeleteIndexEndpoint  []gax.CallOption
	DeployIndex          []gax.CallOption
	UndeployIndex        []gax.CallOption
	CreateCollection     []gax.CallOption
	DeleteCollection     []gax.CallOption
	GetCollection        []gax.CallOption
	UpdateCollection     []gax.CallOption
	ListCollections      []gax.CallOption
	AddCollectionItem    []gax.CallOption
	RemoveCollectionItem []gax.CallOption
	ViewCollectionItems  []gax.CallOption
	CancelOperation      []gax.CallOption
	DeleteOperation      []gax.CallOption
	GetOperation         []gax.CallOption
	ListOperations       []gax.CallOption
}

WarehouseCallOptions contains the retry settings for each method of WarehouseClient.

type WarehouseClient

type WarehouseClient struct {

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

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

WarehouseClient 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 that manages media content + metadata for streaming.

func NewWarehouseClient

func NewWarehouseClient(ctx context.Context, opts ...option.ClientOption) (*WarehouseClient, error)

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

Service that manages media content + metadata for streaming.

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

	// TODO: Use client.
	_ = c
}
Output:

func NewWarehouseRESTClient

func NewWarehouseRESTClient(ctx context.Context, opts ...option.ClientOption) (*WarehouseClient, error)

NewWarehouseRESTClient creates a new warehouse rest client.

Service that manages media content + metadata for streaming.

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

	// TODO: Use client.
	_ = c
}
Output:

func (*WarehouseClient) AddCollectionItem

AddCollectionItem adds an item into a Collection.

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

	req := &visionaipb.AddCollectionItemRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AddCollectionItemRequest.
	}
	resp, err := c.AddCollectionItem(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) AnalyzeAsset

AnalyzeAsset analyze asset to power search capability.

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

	req := &visionaipb.AnalyzeAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AnalyzeAssetRequest.
	}
	op, err := c.AnalyzeAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) AnalyzeAssetOperation

func (c *WarehouseClient) AnalyzeAssetOperation(name string) *AnalyzeAssetOperation

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

func (*WarehouseClient) AnalyzeCorpus

AnalyzeCorpus analyzes a corpus.

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

	req := &visionaipb.AnalyzeCorpusRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AnalyzeCorpusRequest.
	}
	op, err := c.AnalyzeCorpus(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) AnalyzeCorpusOperation

func (c *WarehouseClient) AnalyzeCorpusOperation(name string) *AnalyzeCorpusOperation

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

func (*WarehouseClient) CancelOperation

func (c *WarehouseClient) 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.NewWarehouseClient(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.
	}
}
Output:

func (*WarehouseClient) ClipAsset

ClipAsset generates clips for downloading. The api takes in a time range, and generates a clip of the first content available after start_time and before end_time, which may overflow beyond these bounds. Returned clips are truncated if the total size of the clips are larger than 100MB.

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

	req := &visionaipb.ClipAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ClipAssetRequest.
	}
	resp, err := c.ClipAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) Close

func (c *WarehouseClient) Close() error

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

func (*WarehouseClient) Connection deprecated

func (c *WarehouseClient) 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 (*WarehouseClient) CreateAnnotation

CreateAnnotation creates annotation inside asset.

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

	req := &visionaipb.CreateAnnotationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateAnnotationRequest.
	}
	resp, err := c.CreateAnnotation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) CreateAsset

CreateAsset creates an asset inside corpus.

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

	req := &visionaipb.CreateAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateAssetRequest.
	}
	resp, err := c.CreateAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) CreateCollection

CreateCollection creates a collection.

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

	req := &visionaipb.CreateCollectionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateCollectionRequest.
	}
	op, err := c.CreateCollection(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) CreateCollectionOperation

func (c *WarehouseClient) CreateCollectionOperation(name string) *CreateCollectionOperation

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

func (*WarehouseClient) CreateCorpus

CreateCorpus creates a corpus inside a project.

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

	req := &visionaipb.CreateCorpusRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateCorpusRequest.
	}
	op, err := c.CreateCorpus(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) CreateCorpusOperation

func (c *WarehouseClient) CreateCorpusOperation(name string) *CreateCorpusOperation

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

func (*WarehouseClient) CreateDataSchema

CreateDataSchema creates data schema inside corpus.

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

	req := &visionaipb.CreateDataSchemaRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateDataSchemaRequest.
	}
	resp, err := c.CreateDataSchema(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) CreateIndex

CreateIndex creates an Index under the corpus.

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

	req := &visionaipb.CreateIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateIndexRequest.
	}
	op, err := c.CreateIndex(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) CreateIndexEndpoint

CreateIndexEndpoint creates an IndexEndpoint.

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

	req := &visionaipb.CreateIndexEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateIndexEndpointRequest.
	}
	op, err := c.CreateIndexEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) CreateIndexEndpointOperation

func (c *WarehouseClient) CreateIndexEndpointOperation(name string) *CreateIndexEndpointOperation

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

func (*WarehouseClient) CreateIndexOperation

func (c *WarehouseClient) CreateIndexOperation(name string) *CreateIndexOperation

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

func (*WarehouseClient) CreateSearchConfig

CreateSearchConfig creates a search configuration inside a corpus.

Please follow the rules below to create a valid CreateSearchConfigRequest. — General Rules —

Request.search_config_id must not be associated with an existing SearchConfig.

Request must contain at least one non-empty search_criteria_property or facet_property.

mapped_fields must not be empty, and must map to existing UGA keys.

All mapped_fields must be of the same type.

All mapped_fields must share the same granularity.

All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.

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

	req := &visionaipb.CreateSearchConfigRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateSearchConfigRequest.
	}
	resp, err := c.CreateSearchConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) CreateSearchHypernym

CreateSearchHypernym creates a SearchHypernym inside a corpus.

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

	req := &visionaipb.CreateSearchHypernymRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateSearchHypernymRequest.
	}
	resp, err := c.CreateSearchHypernym(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) DeleteAnnotation

func (c *WarehouseClient) DeleteAnnotation(ctx context.Context, req *visionaipb.DeleteAnnotationRequest, opts ...gax.CallOption) error

DeleteAnnotation deletes annotation inside asset.

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

	req := &visionaipb.DeleteAnnotationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteAnnotationRequest.
	}
	err = c.DeleteAnnotation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*WarehouseClient) DeleteAsset

DeleteAsset deletes asset inside corpus.

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

	req := &visionaipb.DeleteAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteAssetRequest.
	}
	op, err := c.DeleteAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) DeleteAssetOperation

func (c *WarehouseClient) DeleteAssetOperation(name string) *DeleteAssetOperation

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

func (*WarehouseClient) DeleteCollection

DeleteCollection deletes a collection.

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

	req := &visionaipb.DeleteCollectionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteCollectionRequest.
	}
	op, err := c.DeleteCollection(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) DeleteCollectionOperation

func (c *WarehouseClient) DeleteCollectionOperation(name string) *DeleteCollectionOperation

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

func (*WarehouseClient) DeleteCorpus

func (c *WarehouseClient) DeleteCorpus(ctx context.Context, req *visionaipb.DeleteCorpusRequest, opts ...gax.CallOption) error

DeleteCorpus deletes a corpus only if its empty. Returns empty response.

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

	req := &visionaipb.DeleteCorpusRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteCorpusRequest.
	}
	err = c.DeleteCorpus(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*WarehouseClient) DeleteDataSchema

func (c *WarehouseClient) DeleteDataSchema(ctx context.Context, req *visionaipb.DeleteDataSchemaRequest, opts ...gax.CallOption) error

DeleteDataSchema deletes data schema inside corpus.

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

	req := &visionaipb.DeleteDataSchemaRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteDataSchemaRequest.
	}
	err = c.DeleteDataSchema(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*WarehouseClient) DeleteIndex

DeleteIndex delete a single Index. In order to delete an index, the caller must make sure that it is not deployed to any index endpoint.

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

	req := &visionaipb.DeleteIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteIndexRequest.
	}
	op, err := c.DeleteIndex(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) DeleteIndexEndpoint

DeleteIndexEndpoint deletes an IndexEndpoint.

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

	req := &visionaipb.DeleteIndexEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteIndexEndpointRequest.
	}
	op, err := c.DeleteIndexEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) DeleteIndexEndpointOperation

func (c *WarehouseClient) DeleteIndexEndpointOperation(name string) *DeleteIndexEndpointOperation

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

func (*WarehouseClient) DeleteIndexOperation

func (c *WarehouseClient) DeleteIndexOperation(name string) *DeleteIndexOperation

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

func (*WarehouseClient) DeleteOperation

func (c *WarehouseClient) 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.NewWarehouseClient(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.
	}
}
Output:

func (*WarehouseClient) DeleteSearchConfig

func (c *WarehouseClient) DeleteSearchConfig(ctx context.Context, req *visionaipb.DeleteSearchConfigRequest, opts ...gax.CallOption) error

DeleteSearchConfig deletes a search configuration inside a corpus.

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

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

	req := &visionaipb.DeleteSearchConfigRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteSearchConfigRequest.
	}
	err = c.DeleteSearchConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*WarehouseClient) DeleteSearchHypernym

func (c *WarehouseClient) DeleteSearchHypernym(ctx context.Context, req *visionaipb.DeleteSearchHypernymRequest, opts ...gax.CallOption) error

DeleteSearchHypernym deletes a SearchHypernym inside a corpus.

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

	req := &visionaipb.DeleteSearchHypernymRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteSearchHypernymRequest.
	}
	err = c.DeleteSearchHypernym(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*WarehouseClient) DeployIndex

DeployIndex deploys an Index to IndexEndpoint.

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

	req := &visionaipb.DeployIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeployIndexRequest.
	}
	op, err := c.DeployIndex(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) DeployIndexOperation

func (c *WarehouseClient) DeployIndexOperation(name string) *DeployIndexOperation

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

func (*WarehouseClient) GenerateHlsUri

GenerateHlsUri generates a uri for an HLS manifest. The api takes in a collection of time ranges, and generates a URI for an HLS manifest that covers all the requested time ranges.

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

	req := &visionaipb.GenerateHlsUriRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GenerateHlsUriRequest.
	}
	resp, err := c.GenerateHlsUri(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) GenerateRetrievalUrl

GenerateRetrievalUrl generates a signed url for downloading the asset. For video warehouse, please see comment of UploadAsset about how to allow retrieval of cloud storage files in a different project.

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

	req := &visionaipb.GenerateRetrievalUrlRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GenerateRetrievalUrlRequest.
	}
	resp, err := c.GenerateRetrievalUrl(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) GetAnnotation

GetAnnotation reads annotation inside asset.

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

	req := &visionaipb.GetAnnotationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetAnnotationRequest.
	}
	resp, err := c.GetAnnotation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) GetAsset

GetAsset reads an asset inside corpus.

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

	req := &visionaipb.GetAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetAssetRequest.
	}
	resp, err := c.GetAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) GetCollection

GetCollection gets a collection.

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

	req := &visionaipb.GetCollectionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetCollectionRequest.
	}
	resp, err := c.GetCollection(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) GetCorpus

GetCorpus gets corpus details inside a project.

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

	req := &visionaipb.GetCorpusRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetCorpusRequest.
	}
	resp, err := c.GetCorpus(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) GetDataSchema

GetDataSchema gets data schema inside corpus.

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

	req := &visionaipb.GetDataSchemaRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetDataSchemaRequest.
	}
	resp, err := c.GetDataSchema(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) GetIndex

GetIndex gets the details of a single Index under a Corpus.

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

	req := &visionaipb.GetIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetIndexRequest.
	}
	resp, err := c.GetIndex(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) GetIndexEndpoint

GetIndexEndpoint gets an IndexEndpoint.

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

	req := &visionaipb.GetIndexEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetIndexEndpointRequest.
	}
	resp, err := c.GetIndexEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) GetOperation

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.NewWarehouseClient(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
}
Output:

func (*WarehouseClient) GetSearchConfig

GetSearchConfig gets a search configuration inside a corpus.

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

	req := &visionaipb.GetSearchConfigRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetSearchConfigRequest.
	}
	resp, err := c.GetSearchConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) GetSearchHypernym

GetSearchHypernym gets a SearchHypernym inside a corpus.

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

	req := &visionaipb.GetSearchHypernymRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetSearchHypernymRequest.
	}
	resp, err := c.GetSearchHypernym(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) ImportAssets

ImportAssets imports assets (images plus annotations) from a meta file on cloud storage. Each row in the meta file is corresponding to an image (specified by a cloud storage uri) and its annotations.

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

	req := &visionaipb.ImportAssetsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ImportAssetsRequest.
	}
	op, err := c.ImportAssets(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) ImportAssetsOperation

func (c *WarehouseClient) ImportAssetsOperation(name string) *ImportAssetsOperation

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

func (*WarehouseClient) IndexAsset

IndexAsset index one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND

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

	req := &visionaipb.IndexAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#IndexAssetRequest.
	}
	op, err := c.IndexAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) IndexAssetOperation

func (c *WarehouseClient) IndexAssetOperation(name string) *IndexAssetOperation

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

func (*WarehouseClient) IngestAsset

IngestAsset ingests data for the asset. It is not allowed to ingest a data chunk which is already expired according to TTL. This method is only available via the gRPC API (not HTTP since bi-directional streaming is not supported via HTTP).

This method is not supported for the REST transport.

Example
package main

import (
	"context"
	"io"

	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.NewWarehouseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()
	stream, err := c.IngestAsset(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	go func() {
		reqs := []*visionaipb.IngestAssetRequest{
			// TODO: Create requests.
		}
		for _, req := range reqs {
			if err := stream.Send(req); err != nil {
				// TODO: Handle error.
			}
		}
		stream.CloseSend()
	}()
	for {
		resp, err := stream.Recv()
		if err == io.EOF {
			break
		}
		if err != nil {
			// TODO: handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) ListAnnotations

ListAnnotations lists a list of annotations inside asset.

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

	req := &visionaipb.ListAnnotationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAnnotationsRequest.
	}
	it := c.ListAnnotations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) ListAssets

ListAssets lists an list of assets inside corpus.

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

	req := &visionaipb.ListAssetsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAssetsRequest.
	}
	it := c.ListAssets(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) ListCollections

ListCollections lists collections inside a corpus.

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

	req := &visionaipb.ListCollectionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListCollectionsRequest.
	}
	it := c.ListCollections(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) ListCorpora

ListCorpora lists all corpora in a project.

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

	req := &visionaipb.ListCorporaRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListCorporaRequest.
	}
	it := c.ListCorpora(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) ListDataSchemas

ListDataSchemas lists a list of data schemas inside corpus.

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

	req := &visionaipb.ListDataSchemasRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListDataSchemasRequest.
	}
	it := c.ListDataSchemas(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) ListIndexEndpoints

ListIndexEndpoints lists all IndexEndpoints in a project.

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

	req := &visionaipb.ListIndexEndpointsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListIndexEndpointsRequest.
	}
	it := c.ListIndexEndpoints(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) ListIndexes

ListIndexes list all Indexes in a given Corpus.

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

	req := &visionaipb.ListIndexesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListIndexesRequest.
	}
	it := c.ListIndexes(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) ListOperations

ListOperations 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"
	"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.NewWarehouseClient(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
	}
}
Output:

func (*WarehouseClient) ListSearchConfigs

ListSearchConfigs lists all search configurations inside a corpus.

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

	req := &visionaipb.ListSearchConfigsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSearchConfigsRequest.
	}
	it := c.ListSearchConfigs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) ListSearchHypernyms

ListSearchHypernyms lists SearchHypernyms inside a corpus.

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

	req := &visionaipb.ListSearchHypernymsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSearchHypernymsRequest.
	}
	it := c.ListSearchHypernyms(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) RemoveCollectionItem

RemoveCollectionItem removes an item from a collection.

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

	req := &visionaipb.RemoveCollectionItemRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#RemoveCollectionItemRequest.
	}
	resp, err := c.RemoveCollectionItem(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) RemoveIndexAsset

RemoveIndexAsset remove one asset’s index data for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND

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

	req := &visionaipb.RemoveIndexAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#RemoveIndexAssetRequest.
	}
	op, err := c.RemoveIndexAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) RemoveIndexAssetOperation

func (c *WarehouseClient) RemoveIndexAssetOperation(name string) *RemoveIndexAssetOperation

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

func (*WarehouseClient) SearchAssets

SearchAssets search media asset.

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

	req := &visionaipb.SearchAssetsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#SearchAssetsRequest.
	}
	it := c.SearchAssets(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) SearchIndexEndpoint

SearchIndexEndpoint search a deployed index endpoint (IMAGE corpus type only).

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

	req := &visionaipb.SearchIndexEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#SearchIndexEndpointRequest.
	}
	it := c.SearchIndexEndpoint(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) UndeployIndex

UndeployIndex undeploys an Index from IndexEndpoint.

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

	req := &visionaipb.UndeployIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UndeployIndexRequest.
	}
	op, err := c.UndeployIndex(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) UndeployIndexOperation

func (c *WarehouseClient) UndeployIndexOperation(name string) *UndeployIndexOperation

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

func (*WarehouseClient) UpdateAnnotation

UpdateAnnotation updates annotation inside asset.

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

	req := &visionaipb.UpdateAnnotationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateAnnotationRequest.
	}
	resp, err := c.UpdateAnnotation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) UpdateAsset

UpdateAsset updates an asset inside corpus.

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

	req := &visionaipb.UpdateAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateAssetRequest.
	}
	resp, err := c.UpdateAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) UpdateCollection

UpdateCollection updates a collection.

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

	req := &visionaipb.UpdateCollectionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateCollectionRequest.
	}
	resp, err := c.UpdateCollection(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) UpdateCorpus

UpdateCorpus updates a corpus in a project.

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

	req := &visionaipb.UpdateCorpusRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateCorpusRequest.
	}
	resp, err := c.UpdateCorpus(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) UpdateDataSchema

UpdateDataSchema updates data schema inside corpus.

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

	req := &visionaipb.UpdateDataSchemaRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateDataSchemaRequest.
	}
	resp, err := c.UpdateDataSchema(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) UpdateIndex

UpdateIndex updates an Index under the corpus. Users can perform a metadata-only update or trigger a full index rebuild with different update_mask values.

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

	req := &visionaipb.UpdateIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateIndexRequest.
	}
	op, err := c.UpdateIndex(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) UpdateIndexEndpoint

UpdateIndexEndpoint updates an IndexEndpoint.

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

	req := &visionaipb.UpdateIndexEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateIndexEndpointRequest.
	}
	op, err := c.UpdateIndexEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) UpdateIndexEndpointOperation

func (c *WarehouseClient) UpdateIndexEndpointOperation(name string) *UpdateIndexEndpointOperation

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

func (*WarehouseClient) UpdateIndexOperation

func (c *WarehouseClient) UpdateIndexOperation(name string) *UpdateIndexOperation

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

func (*WarehouseClient) UpdateSearchConfig

UpdateSearchConfig updates a search configuration inside a corpus.

Please follow the rules below to create a valid UpdateSearchConfigRequest. — General Rules —

Request.search_configuration.name must already exist.

Request must contain at least one non-empty search_criteria_property or facet_property.

mapped_fields must not be empty, and must map to existing UGA keys.

All mapped_fields must be of the same type.

All mapped_fields must share the same granularity.

All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.

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

	req := &visionaipb.UpdateSearchConfigRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateSearchConfigRequest.
	}
	resp, err := c.UpdateSearchConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) UpdateSearchHypernym

UpdateSearchHypernym updates a SearchHypernym inside a corpus.

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

	req := &visionaipb.UpdateSearchHypernymRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateSearchHypernymRequest.
	}
	resp, err := c.UpdateSearchHypernym(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*WarehouseClient) UploadAsset

UploadAsset upload asset by specifing the asset Cloud Storage uri. For video warehouse, it requires users who call this API have read access to the cloud storage file. Once it is uploaded, it can be retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files from the same project of the warehouse. To allow retrieval cloud storage files that are in a separate project, it requires to find the vision ai service account (Go to IAM, check checkbox to show “Include Google-provided role grants”, search for “Cloud Vision AI Service Agent”) and grant the read access of the cloud storage files to that service account.

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

	req := &visionaipb.UploadAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UploadAssetRequest.
	}
	op, err := c.UploadAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*WarehouseClient) UploadAssetOperation

func (c *WarehouseClient) UploadAssetOperation(name string) *UploadAssetOperation

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

func (*WarehouseClient) ViewCollectionItems

ViewCollectionItems view items inside a collection.

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

	req := &visionaipb.ViewCollectionItemsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ViewCollectionItemsRequest.
	}
	it := c.ViewCollectionItems(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*WarehouseClient) ViewIndexedAssets

ViewIndexedAssets lists assets inside an index.

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

	req := &visionaipb.ViewIndexedAssetsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ViewIndexedAssetsRequest.
	}
	it := c.ViewIndexedAssets(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL