Vision AI API v1 - Package cloud.google.com/go/visionai/apiv1 (v0.4.6) Stay organized with collections Save and categorize content based on your preferences.
Package visionai is an auto-generated package for theVision AI API.
General documentation
For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/visionai/apiv1@latestctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed.The methods of Client are safe for concurrent use by multiple goroutines.The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client, mentioned above.
req:=&visionaipb.BatchRunProcessRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#BatchRunProcessRequest.}op,err:=c.BatchRunProcess(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp
Use of Context
The ctx passed to NewLiveVideoAnalyticsClient is used for authentication requests andfor creating the underlying connection, but is not used for subsequent calls.Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Functions
func DefaultAuthScopes
funcDefaultAuthScopes()[]stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
AddApplicationStreamInputOperation
typeAddApplicationStreamInputOperationstruct{// contains filtered or unexported fields}AddApplicationStreamInputOperation manages a long-running operation from AddApplicationStreamInput.
func (*AddApplicationStreamInputOperation) Done
func(op*AddApplicationStreamInputOperation)Done()boolDone reports whether the long-running operation has completed.
func (*AddApplicationStreamInputOperation) Metadata
func(op*AddApplicationStreamInputOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*AddApplicationStreamInputOperation) Name
func(op*AddApplicationStreamInputOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*AddApplicationStreamInputOperation) Poll
func(op*AddApplicationStreamInputOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.AddApplicationStreamInputResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*AddApplicationStreamInputOperation) Wait
func(op*AddApplicationStreamInputOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.AddApplicationStreamInputResponse,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
AnalysisIterator
typeAnalysisIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Analysis,nextPageTokenstring,errerror)// contains filtered or unexported fields}AnalysisIterator manages a stream of *visionaipb.Analysis.
func (*AnalysisIterator) All
func(it*AnalysisIterator)All()iter.Seq2[*visionaipb.Analysis,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*AnalysisIterator) Next
func(it*AnalysisIterator)Next()(*visionaipb.Analysis,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*AnalysisIterator) PageInfo
func(it*AnalysisIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AnalyzeAssetOperation
typeAnalyzeAssetOperationstruct{// contains filtered or unexported fields}AnalyzeAssetOperation manages a long-running operation from AnalyzeAsset.
func (*AnalyzeAssetOperation) Done
func(op*AnalyzeAssetOperation)Done()boolDone reports whether the long-running operation has completed.
func (*AnalyzeAssetOperation) Metadata
func(op*AnalyzeAssetOperation)Metadata()(*visionaipb.AnalyzeAssetMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*AnalyzeAssetOperation) Name
func(op*AnalyzeAssetOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*AnalyzeAssetOperation) Poll
func(op*AnalyzeAssetOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.AnalyzeAssetResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*AnalyzeAssetOperation) Wait
func(op*AnalyzeAssetOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.AnalyzeAssetResponse,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
AnalyzeCorpusOperation
typeAnalyzeCorpusOperationstruct{// contains filtered or unexported fields}AnalyzeCorpusOperation manages a long-running operation from AnalyzeCorpus.
func (*AnalyzeCorpusOperation) Done
func(op*AnalyzeCorpusOperation)Done()boolDone reports whether the long-running operation has completed.
func (*AnalyzeCorpusOperation) Metadata
func(op*AnalyzeCorpusOperation)Metadata()(*visionaipb.AnalyzeCorpusMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*AnalyzeCorpusOperation) Name
func(op*AnalyzeCorpusOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*AnalyzeCorpusOperation) Poll
func(op*AnalyzeCorpusOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.AnalyzeCorpusResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*AnalyzeCorpusOperation) Wait
func(op*AnalyzeCorpusOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.AnalyzeCorpusResponse,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
AnnotationIterator
typeAnnotationIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Annotation,nextPageTokenstring,errerror)// contains filtered or unexported fields}AnnotationIterator manages a stream of *visionaipb.Annotation.
func (*AnnotationIterator) All
func(it*AnnotationIterator)All()iter.Seq2[*visionaipb.Annotation,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*AnnotationIterator) Next
func(it*AnnotationIterator)Next()(*visionaipb.Annotation,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*AnnotationIterator) PageInfo
func(it*AnnotationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AppPlatformCallOptions
typeAppPlatformCallOptionsstruct{ListApplications[]gax.CallOptionGetApplication[]gax.CallOptionCreateApplication[]gax.CallOptionUpdateApplication[]gax.CallOptionDeleteApplication[]gax.CallOptionDeployApplication[]gax.CallOptionUndeployApplication[]gax.CallOptionAddApplicationStreamInput[]gax.CallOptionRemoveApplicationStreamInput[]gax.CallOptionUpdateApplicationStreamInput[]gax.CallOptionListInstances[]gax.CallOptionGetInstance[]gax.CallOptionCreateApplicationInstances[]gax.CallOptionDeleteApplicationInstances[]gax.CallOptionUpdateApplicationInstances[]gax.CallOptionListDrafts[]gax.CallOptionGetDraft[]gax.CallOptionCreateDraft[]gax.CallOptionUpdateDraft[]gax.CallOptionDeleteDraft[]gax.CallOptionListProcessors[]gax.CallOptionListPrebuiltProcessors[]gax.CallOptionGetProcessor[]gax.CallOptionCreateProcessor[]gax.CallOptionUpdateProcessor[]gax.CallOptionDeleteProcessor[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}AppPlatformCallOptions contains the retry settings for each method of AppPlatformClient.
AppPlatformClient
typeAppPlatformClientstruct{// 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
funcNewAppPlatformClient(ctxcontext.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
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewAppPlatformRESTClient
funcNewAppPlatformRESTClient(ctxcontext.Context,opts...option.ClientOption)(*AppPlatformClient,error)NewAppPlatformRESTClient creates a new app platform rest client.
Service describing handlers for resources
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*AppPlatformClient) AddApplicationStreamInput
func(c*AppPlatformClient)AddApplicationStreamInput(ctxcontext.Context,req*visionaipb.AddApplicationStreamInputRequest,opts...gax.CallOption)(*AddApplicationStreamInputOperation,error)AddApplicationStreamInput adds target stream input to the Application.If the Application is deployed, the corresponding new Application instancewill be created. If the stream has already been in the Application, the RPCwill fail.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) AddApplicationStreamInputOperation
func(c*AppPlatformClient)AddApplicationStreamInputOperation(namestring)*AddApplicationStreamInputOperationAddApplicationStreamInputOperation returns a new AddApplicationStreamInputOperation from a given name.The name must be that of a previously created AddApplicationStreamInputOperation, possibly from a different process.
func (*AppPlatformClient) CancelOperation
func(c*AppPlatformClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*AppPlatformClient) Close
func(c*AppPlatformClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*AppPlatformClient) Connection (deprecated)
func(c*AppPlatformClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*AppPlatformClient) CreateApplication
func(c*AppPlatformClient)CreateApplication(ctxcontext.Context,req*visionaipb.CreateApplicationRequest,opts...gax.CallOption)(*CreateApplicationOperation,error)CreateApplication creates a new Application in a given project and location.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) CreateApplicationInstances
func(c*AppPlatformClient)CreateApplicationInstances(ctxcontext.Context,req*visionaipb.CreateApplicationInstancesRequest,opts...gax.CallOption)(*CreateApplicationInstancesOperation,error)CreateApplicationInstances adds target stream input to the Application.If the Application is deployed, the corresponding new Application instancewill be created. If the stream has already been in the Application, the RPCwill fail.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) CreateApplicationInstancesOperation
func(c*AppPlatformClient)CreateApplicationInstancesOperation(namestring)*CreateApplicationInstancesOperationCreateApplicationInstancesOperation 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(namestring)*CreateApplicationOperationCreateApplicationOperation returns a new CreateApplicationOperation from a given name.The name must be that of a previously created CreateApplicationOperation, possibly from a different process.
func (*AppPlatformClient) CreateDraft
func(c*AppPlatformClient)CreateDraft(ctxcontext.Context,req*visionaipb.CreateDraftRequest,opts...gax.CallOption)(*CreateDraftOperation,error)CreateDraft creates a new Draft in a given project and location.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) CreateDraftOperation
func(c*AppPlatformClient)CreateDraftOperation(namestring)*CreateDraftOperationCreateDraftOperation returns a new CreateDraftOperation from a given name.The name must be that of a previously created CreateDraftOperation, possibly from a different process.
func (*AppPlatformClient) CreateProcessor
func(c*AppPlatformClient)CreateProcessor(ctxcontext.Context,req*visionaipb.CreateProcessorRequest,opts...gax.CallOption)(*CreateProcessorOperation,error)CreateProcessor creates a new Processor in a given project and location.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) CreateProcessorOperation
func(c*AppPlatformClient)CreateProcessorOperation(namestring)*CreateProcessorOperationCreateProcessorOperation returns a new CreateProcessorOperation from a given name.The name must be that of a previously created CreateProcessorOperation, possibly from a different process.
func (*AppPlatformClient) DeleteApplication
func(c*AppPlatformClient)DeleteApplication(ctxcontext.Context,req*visionaipb.DeleteApplicationRequest,opts...gax.CallOption)(*DeleteApplicationOperation,error)DeleteApplication deletes a single Application.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*AppPlatformClient) DeleteApplicationInstances
func(c*AppPlatformClient)DeleteApplicationInstances(ctxcontext.Context,req*visionaipb.DeleteApplicationInstancesRequest,opts...gax.CallOption)(*DeleteApplicationInstancesOperation,error)DeleteApplicationInstances remove target stream input to the Application, if the Application isdeployed, the corresponding instance based will be deleted. If the streamis not in the Application, the RPC will fail.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) DeleteApplicationInstancesOperation
func(c*AppPlatformClient)DeleteApplicationInstancesOperation(namestring)*DeleteApplicationInstancesOperationDeleteApplicationInstancesOperation 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(namestring)*DeleteApplicationOperationDeleteApplicationOperation returns a new DeleteApplicationOperation from a given name.The name must be that of a previously created DeleteApplicationOperation, possibly from a different process.
func (*AppPlatformClient) DeleteDraft
func(c*AppPlatformClient)DeleteDraft(ctxcontext.Context,req*visionaipb.DeleteDraftRequest,opts...gax.CallOption)(*DeleteDraftOperation,error)DeleteDraft deletes a single Draft.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*AppPlatformClient) DeleteDraftOperation
func(c*AppPlatformClient)DeleteDraftOperation(namestring)*DeleteDraftOperationDeleteDraftOperation returns a new DeleteDraftOperation from a given name.The name must be that of a previously created DeleteDraftOperation, possibly from a different process.
func (*AppPlatformClient) DeleteOperation
func(c*AppPlatformClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*AppPlatformClient) DeleteProcessor
func(c*AppPlatformClient)DeleteProcessor(ctxcontext.Context,req*visionaipb.DeleteProcessorRequest,opts...gax.CallOption)(*DeleteProcessorOperation,error)DeleteProcessor deletes a single Processor.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*AppPlatformClient) DeleteProcessorOperation
func(c*AppPlatformClient)DeleteProcessorOperation(namestring)*DeleteProcessorOperationDeleteProcessorOperation returns a new DeleteProcessorOperation from a given name.The name must be that of a previously created DeleteProcessorOperation, possibly from a different process.
func (*AppPlatformClient) DeployApplication
func(c*AppPlatformClient)DeployApplication(ctxcontext.Context,req*visionaipb.DeployApplicationRequest,opts...gax.CallOption)(*DeployApplicationOperation,error)DeployApplication deploys a single Application.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) DeployApplicationOperation
func(c*AppPlatformClient)DeployApplicationOperation(namestring)*DeployApplicationOperationDeployApplicationOperation returns a new DeployApplicationOperation from a given name.The name must be that of a previously created DeployApplicationOperation, possibly from a different process.
func (*AppPlatformClient) GetApplication
func(c*AppPlatformClient)GetApplication(ctxcontext.Context,req*visionaipb.GetApplicationRequest,opts...gax.CallOption)(*visionaipb.Application,error)GetApplication gets details of a single Application.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) GetDraft
func(c*AppPlatformClient)GetDraft(ctxcontext.Context,req*visionaipb.GetDraftRequest,opts...gax.CallOption)(*visionaipb.Draft,error)GetDraft gets details of a single Draft.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) GetInstance
func(c*AppPlatformClient)GetInstance(ctxcontext.Context,req*visionaipb.GetInstanceRequest,opts...gax.CallOption)(*visionaipb.Instance,error)GetInstance gets details of a single Instance.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) GetOperation
func(c*AppPlatformClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) GetProcessor
func(c*AppPlatformClient)GetProcessor(ctxcontext.Context,req*visionaipb.GetProcessorRequest,opts...gax.CallOption)(*visionaipb.Processor,error)GetProcessor gets details of a single Processor.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) ListApplications
func(c*AppPlatformClient)ListApplications(ctxcontext.Context,req*visionaipb.ListApplicationsRequest,opts...gax.CallOption)*ApplicationIteratorListApplications lists Applications in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListApplicationsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListApplicationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListApplicationsRequest.}forresp,err:=rangec.ListApplications(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*AppPlatformClient) ListDrafts
func(c*AppPlatformClient)ListDrafts(ctxcontext.Context,req*visionaipb.ListDraftsRequest,opts...gax.CallOption)*DraftIteratorListDrafts lists Drafts in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListDraftsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListDraftsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListDraftsRequest.}forresp,err:=rangec.ListDrafts(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*AppPlatformClient) ListInstances
func(c*AppPlatformClient)ListInstances(ctxcontext.Context,req*visionaipb.ListInstancesRequest,opts...gax.CallOption)*InstanceIteratorListInstances lists Instances in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListInstancesResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListInstancesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListInstancesRequest.}forresp,err:=rangec.ListInstances(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*AppPlatformClient) ListOperations
func(c*AppPlatformClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*longrunningpb.ListOperationsResponse)}}all
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*AppPlatformClient) ListPrebuiltProcessors
func(c*AppPlatformClient)ListPrebuiltProcessors(ctxcontext.Context,req*visionaipb.ListPrebuiltProcessorsRequest,opts...gax.CallOption)(*visionaipb.ListPrebuiltProcessorsResponse,error)ListPrebuiltProcessors listPrebuiltProcessors is a custom pass-through verb that Lists PrebuiltProcessors.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) ListProcessors
func(c*AppPlatformClient)ListProcessors(ctxcontext.Context,req*visionaipb.ListProcessorsRequest,opts...gax.CallOption)*ProcessorIteratorListProcessors lists Processors in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListProcessorsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListProcessorsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListProcessorsRequest.}forresp,err:=rangec.ListProcessors(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*AppPlatformClient) RemoveApplicationStreamInput
func(c*AppPlatformClient)RemoveApplicationStreamInput(ctxcontext.Context,req*visionaipb.RemoveApplicationStreamInputRequest,opts...gax.CallOption)(*RemoveApplicationStreamInputOperation,error)RemoveApplicationStreamInput remove target stream input to the Application, if the Application isdeployed, the corresponding instance based will be deleted. If the streamis not in the Application, the RPC will fail.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) RemoveApplicationStreamInputOperation
func(c*AppPlatformClient)RemoveApplicationStreamInputOperation(namestring)*RemoveApplicationStreamInputOperationRemoveApplicationStreamInputOperation returns a new RemoveApplicationStreamInputOperation from a given name.The name must be that of a previously created RemoveApplicationStreamInputOperation, possibly from a different process.
func (*AppPlatformClient) UndeployApplication
func(c*AppPlatformClient)UndeployApplication(ctxcontext.Context,req*visionaipb.UndeployApplicationRequest,opts...gax.CallOption)(*UndeployApplicationOperation,error)UndeployApplication undeploys a single Application.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) UndeployApplicationOperation
func(c*AppPlatformClient)UndeployApplicationOperation(namestring)*UndeployApplicationOperationUndeployApplicationOperation returns a new UndeployApplicationOperation from a given name.The name must be that of a previously created UndeployApplicationOperation, possibly from a different process.
func (*AppPlatformClient) UpdateApplication
func(c*AppPlatformClient)UpdateApplication(ctxcontext.Context,req*visionaipb.UpdateApplicationRequest,opts...gax.CallOption)(*UpdateApplicationOperation,error)UpdateApplication updates the parameters of a single Application.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) UpdateApplicationInstances
func(c*AppPlatformClient)UpdateApplicationInstances(ctxcontext.Context,req*visionaipb.UpdateApplicationInstancesRequest,opts...gax.CallOption)(*UpdateApplicationInstancesOperation,error)UpdateApplicationInstances adds target stream input to the Application.If the Application is deployed, the corresponding new Application instancewill be created. If the stream has already been in the Application, the RPCwill fail.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) UpdateApplicationInstancesOperation
func(c*AppPlatformClient)UpdateApplicationInstancesOperation(namestring)*UpdateApplicationInstancesOperationUpdateApplicationInstancesOperation 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(namestring)*UpdateApplicationOperationUpdateApplicationOperation returns a new UpdateApplicationOperation from a given name.The name must be that of a previously created UpdateApplicationOperation, possibly from a different process.
func (*AppPlatformClient) UpdateApplicationStreamInput
func(c*AppPlatformClient)UpdateApplicationStreamInput(ctxcontext.Context,req*visionaipb.UpdateApplicationStreamInputRequest,opts...gax.CallOption)(*UpdateApplicationStreamInputOperation,error)UpdateApplicationStreamInput update target stream input to the Application, if the Application isdeployed, the corresponding instance based will be deployed. ForCreateOrUpdate behavior, set allow_missing to true.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) UpdateApplicationStreamInputOperation
func(c*AppPlatformClient)UpdateApplicationStreamInputOperation(namestring)*UpdateApplicationStreamInputOperationUpdateApplicationStreamInputOperation returns a new UpdateApplicationStreamInputOperation from a given name.The name must be that of a previously created UpdateApplicationStreamInputOperation, possibly from a different process.
func (*AppPlatformClient) UpdateDraft
func(c*AppPlatformClient)UpdateDraft(ctxcontext.Context,req*visionaipb.UpdateDraftRequest,opts...gax.CallOption)(*UpdateDraftOperation,error)UpdateDraft updates the parameters of a single Draft.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) UpdateDraftOperation
func(c*AppPlatformClient)UpdateDraftOperation(namestring)*UpdateDraftOperationUpdateDraftOperation returns a new UpdateDraftOperation from a given name.The name must be that of a previously created UpdateDraftOperation, possibly from a different process.
func (*AppPlatformClient) UpdateProcessor
func(c*AppPlatformClient)UpdateProcessor(ctxcontext.Context,req*visionaipb.UpdateProcessorRequest,opts...gax.CallOption)(*UpdateProcessorOperation,error)UpdateProcessor updates the parameters of a single Processor.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewAppPlatformClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AppPlatformClient) UpdateProcessorOperation
func(c*AppPlatformClient)UpdateProcessorOperation(namestring)*UpdateProcessorOperationUpdateProcessorOperation returns a new UpdateProcessorOperation from a given name.The name must be that of a previously created UpdateProcessorOperation, possibly from a different process.
ApplicationIterator
typeApplicationIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Application,nextPageTokenstring,errerror)// contains filtered or unexported fields}ApplicationIterator manages a stream of *visionaipb.Application.
func (*ApplicationIterator) All
func(it*ApplicationIterator)All()iter.Seq2[*visionaipb.Application,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ApplicationIterator) Next
func(it*ApplicationIterator)Next()(*visionaipb.Application,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ApplicationIterator) PageInfo
func(it*ApplicationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AssetIterator
typeAssetIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Asset,nextPageTokenstring,errerror)// contains filtered or unexported fields}AssetIterator manages a stream of *visionaipb.Asset.
func (*AssetIterator) All
func(it*AssetIterator)All()iter.Seq2[*visionaipb.Asset,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*AssetIterator) Next
func(it*AssetIterator)Next()(*visionaipb.Asset,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*AssetIterator) PageInfo
func(it*AssetIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
BatchRunProcessOperation
typeBatchRunProcessOperationstruct{// contains filtered or unexported fields}BatchRunProcessOperation manages a long-running operation from BatchRunProcess.
func (*BatchRunProcessOperation) Done
func(op*BatchRunProcessOperation)Done()boolDone reports whether the long-running operation has completed.
func (*BatchRunProcessOperation) Metadata
func(op*BatchRunProcessOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*BatchRunProcessOperation) Name
func(op*BatchRunProcessOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*BatchRunProcessOperation) Poll
func(op*BatchRunProcessOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.BatchRunProcessResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*BatchRunProcessOperation) Wait
func(op*BatchRunProcessOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.BatchRunProcessResponse,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
ClusterIterator
typeClusterIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Cluster,nextPageTokenstring,errerror)// contains filtered or unexported fields}ClusterIterator manages a stream of *visionaipb.Cluster.
func (*ClusterIterator) All
func(it*ClusterIterator)All()iter.Seq2[*visionaipb.Cluster,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ClusterIterator) Next
func(it*ClusterIterator)Next()(*visionaipb.Cluster,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ClusterIterator) PageInfo
func(it*ClusterIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CollectionItemIterator
typeCollectionItemIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.CollectionItem,nextPageTokenstring,errerror)// contains filtered or unexported fields}CollectionItemIterator manages a stream of *visionaipb.CollectionItem.
func (*CollectionItemIterator) All
func(it*CollectionItemIterator)All()iter.Seq2[*visionaipb.CollectionItem,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*CollectionItemIterator) Next
func(it*CollectionItemIterator)Next()(*visionaipb.CollectionItem,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*CollectionItemIterator) PageInfo
func(it*CollectionItemIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CollectionIterator
typeCollectionIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Collection,nextPageTokenstring,errerror)// contains filtered or unexported fields}CollectionIterator manages a stream of *visionaipb.Collection.
func (*CollectionIterator) All
func(it*CollectionIterator)All()iter.Seq2[*visionaipb.Collection,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*CollectionIterator) Next
func(it*CollectionIterator)Next()(*visionaipb.Collection,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*CollectionIterator) PageInfo
func(it*CollectionIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CorpusIterator
typeCorpusIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Corpus,nextPageTokenstring,errerror)// contains filtered or unexported fields}CorpusIterator manages a stream of *visionaipb.Corpus.
func (*CorpusIterator) All
func(it*CorpusIterator)All()iter.Seq2[*visionaipb.Corpus,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*CorpusIterator) Next
func(it*CorpusIterator)Next()(*visionaipb.Corpus,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*CorpusIterator) PageInfo
func(it*CorpusIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CreateAnalysisOperation
typeCreateAnalysisOperationstruct{// contains filtered or unexported fields}CreateAnalysisOperation manages a long-running operation from CreateAnalysis.
func (*CreateAnalysisOperation) Done
func(op*CreateAnalysisOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateAnalysisOperation) Metadata
func(op*CreateAnalysisOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateAnalysisOperation) Name
func(op*CreateAnalysisOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateAnalysisOperation) Poll
func(op*CreateAnalysisOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Analysis,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateAnalysisOperation) Wait
func(op*CreateAnalysisOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Analysis,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateApplicationInstancesOperation
typeCreateApplicationInstancesOperationstruct{// contains filtered or unexported fields}CreateApplicationInstancesOperation manages a long-running operation from CreateApplicationInstances.
func (*CreateApplicationInstancesOperation) Done
func(op*CreateApplicationInstancesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateApplicationInstancesOperation) Metadata
func(op*CreateApplicationInstancesOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateApplicationInstancesOperation) Name
func(op*CreateApplicationInstancesOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateApplicationInstancesOperation) Poll
func(op*CreateApplicationInstancesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.CreateApplicationInstancesResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateApplicationInstancesOperation) Wait
func(op*CreateApplicationInstancesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.CreateApplicationInstancesResponse,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateApplicationOperation
typeCreateApplicationOperationstruct{// contains filtered or unexported fields}CreateApplicationOperation manages a long-running operation from CreateApplication.
func (*CreateApplicationOperation) Done
func(op*CreateApplicationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateApplicationOperation) Metadata
func(op*CreateApplicationOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateApplicationOperation) Name
func(op*CreateApplicationOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateApplicationOperation) Poll
func(op*CreateApplicationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Application,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateApplicationOperation) Wait
func(op*CreateApplicationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Application,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateClusterOperation
typeCreateClusterOperationstruct{// contains filtered or unexported fields}CreateClusterOperation manages a long-running operation from CreateCluster.
func (*CreateClusterOperation) Done
func(op*CreateClusterOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateClusterOperation) Metadata
func(op*CreateClusterOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateClusterOperation) Name
func(op*CreateClusterOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateClusterOperation) Poll
func(op*CreateClusterOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Cluster,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateClusterOperation) Wait
func(op*CreateClusterOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Cluster,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateCollectionOperation
typeCreateCollectionOperationstruct{// contains filtered or unexported fields}CreateCollectionOperation manages a long-running operation from CreateCollection.
func (*CreateCollectionOperation) Done
func(op*CreateCollectionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateCollectionOperation) Metadata
func(op*CreateCollectionOperation)Metadata()(*visionaipb.CreateCollectionMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateCollectionOperation) Name
func(op*CreateCollectionOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateCollectionOperation) Poll
func(op*CreateCollectionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Collection,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateCollectionOperation) Wait
func(op*CreateCollectionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Collection,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateCorpusOperation
typeCreateCorpusOperationstruct{// contains filtered or unexported fields}CreateCorpusOperation manages a long-running operation from CreateCorpus.
func (*CreateCorpusOperation) Done
func(op*CreateCorpusOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateCorpusOperation) Metadata
func(op*CreateCorpusOperation)Metadata()(*visionaipb.CreateCorpusMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateCorpusOperation) Name
func(op*CreateCorpusOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateCorpusOperation) Poll
func(op*CreateCorpusOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Corpus,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateCorpusOperation) Wait
func(op*CreateCorpusOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Corpus,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateDraftOperation
typeCreateDraftOperationstruct{// contains filtered or unexported fields}CreateDraftOperation manages a long-running operation from CreateDraft.
func (*CreateDraftOperation) Done
func(op*CreateDraftOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateDraftOperation) Metadata
func(op*CreateDraftOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateDraftOperation) Name
func(op*CreateDraftOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateDraftOperation) Poll
func(op*CreateDraftOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Draft,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateDraftOperation) Wait
func(op*CreateDraftOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Draft,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateEventOperation
typeCreateEventOperationstruct{// contains filtered or unexported fields}CreateEventOperation manages a long-running operation from CreateEvent.
func (*CreateEventOperation) Done
func(op*CreateEventOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateEventOperation) Metadata
func(op*CreateEventOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateEventOperation) Name
func(op*CreateEventOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateEventOperation) Poll
func(op*CreateEventOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Event,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateEventOperation) Wait
func(op*CreateEventOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Event,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateIndexEndpointOperation
typeCreateIndexEndpointOperationstruct{// contains filtered or unexported fields}CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint.
func (*CreateIndexEndpointOperation) Done
func(op*CreateIndexEndpointOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateIndexEndpointOperation) Metadata
func(op*CreateIndexEndpointOperation)Metadata()(*visionaipb.CreateIndexEndpointMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateIndexEndpointOperation) Name
func(op*CreateIndexEndpointOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateIndexEndpointOperation) Poll
func(op*CreateIndexEndpointOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.IndexEndpoint,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateIndexEndpointOperation) Wait
func(op*CreateIndexEndpointOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.IndexEndpoint,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateIndexOperation
typeCreateIndexOperationstruct{// contains filtered or unexported fields}CreateIndexOperation manages a long-running operation from CreateIndex.
func (*CreateIndexOperation) Done
func(op*CreateIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateIndexOperation) Metadata
func(op*CreateIndexOperation)Metadata()(*visionaipb.CreateIndexMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateIndexOperation) Name
func(op*CreateIndexOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateIndexOperation) Poll
func(op*CreateIndexOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Index,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateIndexOperation) Wait
func(op*CreateIndexOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Index,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateOperatorOperation
typeCreateOperatorOperationstruct{// contains filtered or unexported fields}CreateOperatorOperation manages a long-running operation from CreateOperator.
func (*CreateOperatorOperation) Done
func(op*CreateOperatorOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateOperatorOperation) Metadata
func(op*CreateOperatorOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateOperatorOperation) Name
func(op*CreateOperatorOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateOperatorOperation) Poll
func(op*CreateOperatorOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Operator,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateOperatorOperation) Wait
func(op*CreateOperatorOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Operator,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateProcessOperation
typeCreateProcessOperationstruct{// contains filtered or unexported fields}CreateProcessOperation manages a long-running operation from CreateProcess.
func (*CreateProcessOperation) Done
func(op*CreateProcessOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateProcessOperation) Metadata
func(op*CreateProcessOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateProcessOperation) Name
func(op*CreateProcessOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateProcessOperation) Poll
func(op*CreateProcessOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Process,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateProcessOperation) Wait
func(op*CreateProcessOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Process,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateProcessorOperation
typeCreateProcessorOperationstruct{// contains filtered or unexported fields}CreateProcessorOperation manages a long-running operation from CreateProcessor.
func (*CreateProcessorOperation) Done
func(op*CreateProcessorOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateProcessorOperation) Metadata
func(op*CreateProcessorOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateProcessorOperation) Name
func(op*CreateProcessorOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateProcessorOperation) Poll
func(op*CreateProcessorOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Processor,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateProcessorOperation) Wait
func(op*CreateProcessorOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Processor,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateSeriesOperation
typeCreateSeriesOperationstruct{// contains filtered or unexported fields}CreateSeriesOperation manages a long-running operation from CreateSeries.
func (*CreateSeriesOperation) Done
func(op*CreateSeriesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateSeriesOperation) Metadata
func(op*CreateSeriesOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateSeriesOperation) Name
func(op*CreateSeriesOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateSeriesOperation) Poll
func(op*CreateSeriesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Series,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateSeriesOperation) Wait
func(op*CreateSeriesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Series,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateStreamOperation
typeCreateStreamOperationstruct{// contains filtered or unexported fields}CreateStreamOperation manages a long-running operation from CreateStream.
func (*CreateStreamOperation) Done
func(op*CreateStreamOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateStreamOperation) Metadata
func(op*CreateStreamOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateStreamOperation) Name
func(op*CreateStreamOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateStreamOperation) Poll
func(op*CreateStreamOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Stream,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateStreamOperation) Wait
func(op*CreateStreamOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Stream,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DataSchemaIterator
typeDataSchemaIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.DataSchema,nextPageTokenstring,errerror)// contains filtered or unexported fields}DataSchemaIterator manages a stream of *visionaipb.DataSchema.
func (*DataSchemaIterator) All
func(it*DataSchemaIterator)All()iter.Seq2[*visionaipb.DataSchema,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DataSchemaIterator) Next
func(it*DataSchemaIterator)Next()(*visionaipb.DataSchema,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DataSchemaIterator) PageInfo
func(it*DataSchemaIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DeleteAnalysisOperation
typeDeleteAnalysisOperationstruct{// contains filtered or unexported fields}DeleteAnalysisOperation manages a long-running operation from DeleteAnalysis.
func (*DeleteAnalysisOperation) Done
func(op*DeleteAnalysisOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteAnalysisOperation) Metadata
func(op*DeleteAnalysisOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteAnalysisOperation) Name
func(op*DeleteAnalysisOperation)Name()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteApplicationInstancesOperation
typeDeleteApplicationInstancesOperationstruct{// contains filtered or unexported fields}DeleteApplicationInstancesOperation manages a long-running operation from DeleteApplicationInstances.
func (*DeleteApplicationInstancesOperation) Done
func(op*DeleteApplicationInstancesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteApplicationInstancesOperation) Metadata
func(op*DeleteApplicationInstancesOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteApplicationInstancesOperation) Name
func(op*DeleteApplicationInstancesOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteApplicationInstancesOperation) Poll
func(op*DeleteApplicationInstancesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Instance,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteApplicationInstancesOperation) Wait
func(op*DeleteApplicationInstancesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Instance,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteApplicationOperation
typeDeleteApplicationOperationstruct{// contains filtered or unexported fields}DeleteApplicationOperation manages a long-running operation from DeleteApplication.
func (*DeleteApplicationOperation) Done
func(op*DeleteApplicationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteApplicationOperation) Metadata
func(op*DeleteApplicationOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteApplicationOperation) Name
func(op*DeleteApplicationOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteApplicationOperation) Poll
func(op*DeleteApplicationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteApplicationOperation) Wait
func(op*DeleteApplicationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteAssetOperation
typeDeleteAssetOperationstruct{// contains filtered or unexported fields}DeleteAssetOperation manages a long-running operation from DeleteAsset.
func (*DeleteAssetOperation) Done
func(op*DeleteAssetOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteAssetOperation) Metadata
func(op*DeleteAssetOperation)Metadata()(*visionaipb.DeleteAssetMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteAssetOperation) Name
func(op*DeleteAssetOperation)Name()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteClusterOperation
typeDeleteClusterOperationstruct{// contains filtered or unexported fields}DeleteClusterOperation manages a long-running operation from DeleteCluster.
func (*DeleteClusterOperation) Done
func(op*DeleteClusterOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteClusterOperation) Metadata
func(op*DeleteClusterOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteClusterOperation) Name
func(op*DeleteClusterOperation)Name()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteCollectionOperation
typeDeleteCollectionOperationstruct{// contains filtered or unexported fields}DeleteCollectionOperation manages a long-running operation from DeleteCollection.
func (*DeleteCollectionOperation) Done
func(op*DeleteCollectionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteCollectionOperation) Metadata
func(op*DeleteCollectionOperation)Metadata()(*visionaipb.DeleteCollectionMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteCollectionOperation) Name
func(op*DeleteCollectionOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteCollectionOperation) Poll
func(op*DeleteCollectionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteCollectionOperation) Wait
func(op*DeleteCollectionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteDraftOperation
typeDeleteDraftOperationstruct{// contains filtered or unexported fields}DeleteDraftOperation manages a long-running operation from DeleteDraft.
func (*DeleteDraftOperation) Done
func(op*DeleteDraftOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteDraftOperation) Metadata
func(op*DeleteDraftOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteDraftOperation) Name
func(op*DeleteDraftOperation)Name()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteEventOperation
typeDeleteEventOperationstruct{// contains filtered or unexported fields}DeleteEventOperation manages a long-running operation from DeleteEvent.
func (*DeleteEventOperation) Done
func(op*DeleteEventOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteEventOperation) Metadata
func(op*DeleteEventOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteEventOperation) Name
func(op*DeleteEventOperation)Name()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteIndexEndpointOperation
typeDeleteIndexEndpointOperationstruct{// contains filtered or unexported fields}DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint.
func (*DeleteIndexEndpointOperation) Done
func(op*DeleteIndexEndpointOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteIndexEndpointOperation) Metadata
func(op*DeleteIndexEndpointOperation)Metadata()(*visionaipb.DeleteIndexEndpointMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteIndexEndpointOperation) Name
func(op*DeleteIndexEndpointOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteIndexEndpointOperation) Poll
func(op*DeleteIndexEndpointOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteIndexEndpointOperation) Wait
func(op*DeleteIndexEndpointOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteIndexOperation
typeDeleteIndexOperationstruct{// contains filtered or unexported fields}DeleteIndexOperation manages a long-running operation from DeleteIndex.
func (*DeleteIndexOperation) Done
func(op*DeleteIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteIndexOperation) Metadata
func(op*DeleteIndexOperation)Metadata()(*visionaipb.DeleteIndexMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteIndexOperation) Name
func(op*DeleteIndexOperation)Name()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteOperatorOperation
typeDeleteOperatorOperationstruct{// contains filtered or unexported fields}DeleteOperatorOperation manages a long-running operation from DeleteOperator.
func (*DeleteOperatorOperation) Done
func(op*DeleteOperatorOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteOperatorOperation) Metadata
func(op*DeleteOperatorOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteOperatorOperation) Name
func(op*DeleteOperatorOperation)Name()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteProcessOperation
typeDeleteProcessOperationstruct{// contains filtered or unexported fields}DeleteProcessOperation manages a long-running operation from DeleteProcess.
func (*DeleteProcessOperation) Done
func(op*DeleteProcessOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteProcessOperation) Metadata
func(op*DeleteProcessOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteProcessOperation) Name
func(op*DeleteProcessOperation)Name()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteProcessorOperation
typeDeleteProcessorOperationstruct{// contains filtered or unexported fields}DeleteProcessorOperation manages a long-running operation from DeleteProcessor.
func (*DeleteProcessorOperation) Done
func(op*DeleteProcessorOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteProcessorOperation) Metadata
func(op*DeleteProcessorOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteProcessorOperation) Name
func(op*DeleteProcessorOperation)Name()stringName 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
func(op*DeleteProcessorOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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
func(op*DeleteProcessorOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteSeriesOperation
typeDeleteSeriesOperationstruct{// contains filtered or unexported fields}DeleteSeriesOperation manages a long-running operation from DeleteSeries.
func (*DeleteSeriesOperation) Done
func(op*DeleteSeriesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteSeriesOperation) Metadata
func(op*DeleteSeriesOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteSeriesOperation) Name
func(op*DeleteSeriesOperation)Name()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteStreamOperation
typeDeleteStreamOperationstruct{// contains filtered or unexported fields}DeleteStreamOperation manages a long-running operation from DeleteStream.
func (*DeleteStreamOperation) Done
func(op*DeleteStreamOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteStreamOperation) Metadata
func(op*DeleteStreamOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteStreamOperation) Name
func(op*DeleteStreamOperation)Name()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeployApplicationOperation
typeDeployApplicationOperationstruct{// contains filtered or unexported fields}DeployApplicationOperation manages a long-running operation from DeployApplication.
func (*DeployApplicationOperation) Done
func(op*DeployApplicationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeployApplicationOperation) Metadata
func(op*DeployApplicationOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeployApplicationOperation) Name
func(op*DeployApplicationOperation)Name()stringName 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
func(op*DeployApplicationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.DeployApplicationResponse,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 andthe 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
func(op*DeployApplicationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.DeployApplicationResponse,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.
DeployIndexOperation
typeDeployIndexOperationstruct{// contains filtered or unexported fields}DeployIndexOperation manages a long-running operation from DeployIndex.
func (*DeployIndexOperation) Done
func(op*DeployIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeployIndexOperation) Metadata
func(op*DeployIndexOperation)Metadata()(*visionaipb.DeployIndexMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeployIndexOperation) Name
func(op*DeployIndexOperation)Name()stringName 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
func(op*DeployIndexOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.DeployIndexResponse,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 andthe 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
func(op*DeployIndexOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.DeployIndexResponse,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.
DraftIterator
typeDraftIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Draft,nextPageTokenstring,errerror)// contains filtered or unexported fields}DraftIterator manages a stream of *visionaipb.Draft.
func (*DraftIterator) All
func(it*DraftIterator)All()iter.Seq2[*visionaipb.Draft,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DraftIterator) PageInfo
func(it*DraftIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
EventIterator
typeEventIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Event,nextPageTokenstring,errerror)// contains filtered or unexported fields}EventIterator manages a stream of *visionaipb.Event.
func (*EventIterator) All
func(it*EventIterator)All()iter.Seq2[*visionaipb.Event,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*EventIterator) PageInfo
func(it*EventIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
GetStreamThumbnailOperation
typeGetStreamThumbnailOperationstruct{// contains filtered or unexported fields}GetStreamThumbnailOperation manages a long-running operation from GetStreamThumbnail.
func (*GetStreamThumbnailOperation) Done
func(op*GetStreamThumbnailOperation)Done()boolDone reports whether the long-running operation has completed.
func (*GetStreamThumbnailOperation) Metadata
func(op*GetStreamThumbnailOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*GetStreamThumbnailOperation) Name
func(op*GetStreamThumbnailOperation)Name()stringName 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
func(op*GetStreamThumbnailOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.GetStreamThumbnailResponse,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 andthe 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
func(op*GetStreamThumbnailOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.GetStreamThumbnailResponse,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.
HealthCheckCallOptions
typeHealthCheckCallOptionsstruct{HealthCheck[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}HealthCheckCallOptions contains the retry settings for each method of HealthCheckClient.
HealthCheckClient
typeHealthCheckClientstruct{// 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 HealthCheck.
func NewHealthCheckClient
funcNewHealthCheckClient(ctxcontext.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 HealthCheck.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewHealthCheckClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewHealthCheckRESTClient
funcNewHealthCheckRESTClient(ctxcontext.Context,opts...option.ClientOption)(*HealthCheckClient,error)NewHealthCheckRESTClient creates a new health check service rest client.
HealthCheckService provides an interface for Vertex AI Vision Cluster HealthCheck.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewHealthCheckRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*HealthCheckClient) CancelOperation
func(c*HealthCheckClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewHealthCheckClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*HealthCheckClient) Close
func(c*HealthCheckClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*HealthCheckClient) Connection (deprecated)
func(c*HealthCheckClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*HealthCheckClient) DeleteOperation
func(c*HealthCheckClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewHealthCheckClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*HealthCheckClient) GetOperation
func(c*HealthCheckClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewHealthCheckClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*HealthCheckClient) HealthCheck
func(c*HealthCheckClient)HealthCheck(ctxcontext.Context,req*visionaipb.HealthCheckRequest,opts...gax.CallOption)(*visionaipb.HealthCheckResponse,error)HealthCheck healthCheck method checks the health status of the cluster.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewHealthCheckClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*HealthCheckClient) ListOperations
func(c*HealthCheckClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewHealthCheckClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*longrunningpb.ListOperationsResponse)}}all
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewHealthCheckClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}ImportAssetsOperation
typeImportAssetsOperationstruct{// contains filtered or unexported fields}ImportAssetsOperation manages a long-running operation from ImportAssets.
func (*ImportAssetsOperation) Done
func(op*ImportAssetsOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ImportAssetsOperation) Metadata
func(op*ImportAssetsOperation)Metadata()(*visionaipb.ImportAssetsMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*ImportAssetsOperation) Name
func(op*ImportAssetsOperation)Name()stringName 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
func(op*ImportAssetsOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.ImportAssetsResponse,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 andthe 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
func(op*ImportAssetsOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.ImportAssetsResponse,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.
IndexAssetOperation
typeIndexAssetOperationstruct{// contains filtered or unexported fields}IndexAssetOperation manages a long-running operation from IndexAsset.
func (*IndexAssetOperation) Done
func(op*IndexAssetOperation)Done()boolDone reports whether the long-running operation has completed.
func (*IndexAssetOperation) Metadata
func(op*IndexAssetOperation)Metadata()(*visionaipb.IndexAssetMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*IndexAssetOperation) Name
func(op*IndexAssetOperation)Name()stringName 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
func(op*IndexAssetOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.IndexAssetResponse,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 andthe 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
func(op*IndexAssetOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.IndexAssetResponse,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.
IndexEndpointIterator
typeIndexEndpointIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.IndexEndpoint,nextPageTokenstring,errerror)// contains filtered or unexported fields}IndexEndpointIterator manages a stream of *visionaipb.IndexEndpoint.
func (*IndexEndpointIterator) All
func(it*IndexEndpointIterator)All()iter.Seq2[*visionaipb.IndexEndpoint,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*IndexEndpointIterator) Next
func(it*IndexEndpointIterator)Next()(*visionaipb.IndexEndpoint,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*IndexEndpointIterator) PageInfo
func(it*IndexEndpointIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
IndexIterator
typeIndexIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Index,nextPageTokenstring,errerror)// contains filtered or unexported fields}IndexIterator manages a stream of *visionaipb.Index.
func (*IndexIterator) All
func(it*IndexIterator)All()iter.Seq2[*visionaipb.Index,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*IndexIterator) PageInfo
func(it*IndexIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
IndexedAssetIterator
typeIndexedAssetIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.IndexedAsset,nextPageTokenstring,errerror)// contains filtered or unexported fields}IndexedAssetIterator manages a stream of *visionaipb.IndexedAsset.
func (*IndexedAssetIterator) All
func(it*IndexedAssetIterator)All()iter.Seq2[*visionaipb.IndexedAsset,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*IndexedAssetIterator) Next
func(it*IndexedAssetIterator)Next()(*visionaipb.IndexedAsset,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*IndexedAssetIterator) PageInfo
func(it*IndexedAssetIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
InstanceIterator
typeInstanceIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Instance,nextPageTokenstring,errerror)// contains filtered or unexported fields}InstanceIterator manages a stream of *visionaipb.Instance.
func (*InstanceIterator) All
func(it*InstanceIterator)All()iter.Seq2[*visionaipb.Instance,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*InstanceIterator) PageInfo
func(it*InstanceIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
LiveVideoAnalyticsCallOptions
typeLiveVideoAnalyticsCallOptionsstruct{ListPublicOperators[]gax.CallOptionResolveOperatorInfo[]gax.CallOptionListOperators[]gax.CallOptionGetOperator[]gax.CallOptionCreateOperator[]gax.CallOptionUpdateOperator[]gax.CallOptionDeleteOperator[]gax.CallOptionListAnalyses[]gax.CallOptionGetAnalysis[]gax.CallOptionCreateAnalysis[]gax.CallOptionUpdateAnalysis[]gax.CallOptionDeleteAnalysis[]gax.CallOptionListProcesses[]gax.CallOptionGetProcess[]gax.CallOptionCreateProcess[]gax.CallOptionUpdateProcess[]gax.CallOptionDeleteProcess[]gax.CallOptionBatchRunProcess[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}LiveVideoAnalyticsCallOptions contains the retry settings for each method of LiveVideoAnalyticsClient.
LiveVideoAnalyticsClient
typeLiveVideoAnalyticsClientstruct{// 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 runLive Video Analytics (LVA) on the streaming inputs.
func NewLiveVideoAnalyticsClient
funcNewLiveVideoAnalyticsClient(ctxcontext.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 runLive Video Analytics (LVA) on the streaming inputs.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewLiveVideoAnalyticsRESTClient
funcNewLiveVideoAnalyticsRESTClient(ctxcontext.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 runLive Video Analytics (LVA) on the streaming inputs.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*LiveVideoAnalyticsClient) BatchRunProcess
func(c*LiveVideoAnalyticsClient)BatchRunProcess(ctxcontext.Context,req*visionaipb.BatchRunProcessRequest,opts...gax.CallOption)(*BatchRunProcessOperation,error)BatchRunProcess run all of the processes to “completion”. Max time for each process isthe LRO time limit.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) BatchRunProcessOperation
func(c*LiveVideoAnalyticsClient)BatchRunProcessOperation(namestring)*BatchRunProcessOperationBatchRunProcessOperation 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
func(c*LiveVideoAnalyticsClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*LiveVideoAnalyticsClient) Close
func(c*LiveVideoAnalyticsClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*LiveVideoAnalyticsClient) Connection (deprecated)
func(c*LiveVideoAnalyticsClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*LiveVideoAnalyticsClient) CreateAnalysis
func(c*LiveVideoAnalyticsClient)CreateAnalysis(ctxcontext.Context,req*visionaipb.CreateAnalysisRequest,opts...gax.CallOption)(*CreateAnalysisOperation,error)CreateAnalysis creates a new Analysis in a given project and location.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) CreateAnalysisOperation
func(c*LiveVideoAnalyticsClient)CreateAnalysisOperation(namestring)*CreateAnalysisOperationCreateAnalysisOperation 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
func(c*LiveVideoAnalyticsClient)CreateOperator(ctxcontext.Context,req*visionaipb.CreateOperatorRequest,opts...gax.CallOption)(*CreateOperatorOperation,error)CreateOperator creates a new Operator in a given project and location.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) CreateOperatorOperation
func(c*LiveVideoAnalyticsClient)CreateOperatorOperation(namestring)*CreateOperatorOperationCreateOperatorOperation 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
func(c*LiveVideoAnalyticsClient)CreateProcess(ctxcontext.Context,req*visionaipb.CreateProcessRequest,opts...gax.CallOption)(*CreateProcessOperation,error)CreateProcess creates a new Process in a given project and location.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) CreateProcessOperation
func(c*LiveVideoAnalyticsClient)CreateProcessOperation(namestring)*CreateProcessOperationCreateProcessOperation 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
func(c*LiveVideoAnalyticsClient)DeleteAnalysis(ctxcontext.Context,req*visionaipb.DeleteAnalysisRequest,opts...gax.CallOption)(*DeleteAnalysisOperation,error)DeleteAnalysis deletes a single Analysis.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*LiveVideoAnalyticsClient) DeleteAnalysisOperation
func(c*LiveVideoAnalyticsClient)DeleteAnalysisOperation(namestring)*DeleteAnalysisOperationDeleteAnalysisOperation 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
func(c*LiveVideoAnalyticsClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*LiveVideoAnalyticsClient) DeleteOperator
func(c*LiveVideoAnalyticsClient)DeleteOperator(ctxcontext.Context,req*visionaipb.DeleteOperatorRequest,opts...gax.CallOption)(*DeleteOperatorOperation,error)DeleteOperator deletes a single Operator.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*LiveVideoAnalyticsClient) DeleteOperatorOperation
func(c*LiveVideoAnalyticsClient)DeleteOperatorOperation(namestring)*DeleteOperatorOperationDeleteOperatorOperation 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
func(c*LiveVideoAnalyticsClient)DeleteProcess(ctxcontext.Context,req*visionaipb.DeleteProcessRequest,opts...gax.CallOption)(*DeleteProcessOperation,error)DeleteProcess deletes a single Process.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*LiveVideoAnalyticsClient) DeleteProcessOperation
func(c*LiveVideoAnalyticsClient)DeleteProcessOperation(namestring)*DeleteProcessOperationDeleteProcessOperation 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
func(c*LiveVideoAnalyticsClient)GetAnalysis(ctxcontext.Context,req*visionaipb.GetAnalysisRequest,opts...gax.CallOption)(*visionaipb.Analysis,error)GetAnalysis gets details of a single Analysis.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) GetOperation
func(c*LiveVideoAnalyticsClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) GetOperator
func(c*LiveVideoAnalyticsClient)GetOperator(ctxcontext.Context,req*visionaipb.GetOperatorRequest,opts...gax.CallOption)(*visionaipb.Operator,error)GetOperator gets details of a single Operator.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) GetProcess
func(c*LiveVideoAnalyticsClient)GetProcess(ctxcontext.Context,req*visionaipb.GetProcessRequest,opts...gax.CallOption)(*visionaipb.Process,error)GetProcess gets details of a single Process.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) ListAnalyses
func(c*LiveVideoAnalyticsClient)ListAnalyses(ctxcontext.Context,req*visionaipb.ListAnalysesRequest,opts...gax.CallOption)*AnalysisIteratorListAnalyses lists Analyses in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListAnalysesResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListAnalysesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAnalysesRequest.}forresp,err:=rangec.ListAnalyses(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*LiveVideoAnalyticsClient) ListOperations
func(c*LiveVideoAnalyticsClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*longrunningpb.ListOperationsResponse)}}all
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*LiveVideoAnalyticsClient) ListOperators
func(c*LiveVideoAnalyticsClient)ListOperators(ctxcontext.Context,req*visionaipb.ListOperatorsRequest,opts...gax.CallOption)*OperatorIteratorListOperators lists Operators in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListOperatorsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListOperatorsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListOperatorsRequest.}forresp,err:=rangec.ListOperators(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*LiveVideoAnalyticsClient) ListProcesses
func(c*LiveVideoAnalyticsClient)ListProcesses(ctxcontext.Context,req*visionaipb.ListProcessesRequest,opts...gax.CallOption)*ProcessIteratorListProcesses lists Processes in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListProcessesResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListProcessesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListProcessesRequest.}forresp,err:=rangec.ListProcesses(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*LiveVideoAnalyticsClient) ListPublicOperators
func(c*LiveVideoAnalyticsClient)ListPublicOperators(ctxcontext.Context,req*visionaipb.ListPublicOperatorsRequest,opts...gax.CallOption)*OperatorIteratorListPublicOperators listPublicOperators returns all the operators in public registry.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListPublicOperatorsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListPublicOperatorsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListPublicOperatorsRequest.}forresp,err:=rangec.ListPublicOperators(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*LiveVideoAnalyticsClient) ResolveOperatorInfo
func(c*LiveVideoAnalyticsClient)ResolveOperatorInfo(ctxcontext.Context,req*visionaipb.ResolveOperatorInfoRequest,opts...gax.CallOption)(*visionaipb.ResolveOperatorInfoResponse,error)ResolveOperatorInfo resolveOperatorInfo returns the operator information based on the request.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) UpdateAnalysis
func(c*LiveVideoAnalyticsClient)UpdateAnalysis(ctxcontext.Context,req*visionaipb.UpdateAnalysisRequest,opts...gax.CallOption)(*UpdateAnalysisOperation,error)UpdateAnalysis updates the parameters of a single Analysis.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) UpdateAnalysisOperation
func(c*LiveVideoAnalyticsClient)UpdateAnalysisOperation(namestring)*UpdateAnalysisOperationUpdateAnalysisOperation 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
func(c*LiveVideoAnalyticsClient)UpdateOperator(ctxcontext.Context,req*visionaipb.UpdateOperatorRequest,opts...gax.CallOption)(*UpdateOperatorOperation,error)UpdateOperator updates the parameters of a single Operator.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) UpdateOperatorOperation
func(c*LiveVideoAnalyticsClient)UpdateOperatorOperation(namestring)*UpdateOperatorOperationUpdateOperatorOperation 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
func(c*LiveVideoAnalyticsClient)UpdateProcess(ctxcontext.Context,req*visionaipb.UpdateProcessRequest,opts...gax.CallOption)(*UpdateProcessOperation,error)UpdateProcess updates the parameters of a single Process.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewLiveVideoAnalyticsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LiveVideoAnalyticsClient) UpdateProcessOperation
func(c*LiveVideoAnalyticsClient)UpdateProcessOperation(namestring)*UpdateProcessOperationUpdateProcessOperation returns a new UpdateProcessOperation from a given name.The name must be that of a previously created UpdateProcessOperation, possibly from a different process.
MaterializeChannelOperation
typeMaterializeChannelOperationstruct{// contains filtered or unexported fields}MaterializeChannelOperation manages a long-running operation from MaterializeChannel.
func (*MaterializeChannelOperation) Done
func(op*MaterializeChannelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*MaterializeChannelOperation) Metadata
func(op*MaterializeChannelOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*MaterializeChannelOperation) Name
func(op*MaterializeChannelOperation)Name()stringName 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
func(op*MaterializeChannelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Channel,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 andthe 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
func(op*MaterializeChannelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Channel,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.
OperationIterator
typeOperationIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*longrunningpb.Operation,nextPageTokenstring,errerror)// contains filtered or unexported fields}OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All
func(it*OperationIterator)All()iter.Seq2[*longrunningpb.Operation,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*OperationIterator) Next
func(it*OperationIterator)Next()(*longrunningpb.Operation,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo
func(it*OperationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
OperatorIterator
typeOperatorIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Operator,nextPageTokenstring,errerror)// contains filtered or unexported fields}OperatorIterator manages a stream of *visionaipb.Operator.
func (*OperatorIterator) All
func(it*OperatorIterator)All()iter.Seq2[*visionaipb.Operator,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*OperatorIterator) PageInfo
func(it*OperatorIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ProcessIterator
typeProcessIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Process,nextPageTokenstring,errerror)// contains filtered or unexported fields}ProcessIterator manages a stream of *visionaipb.Process.
func (*ProcessIterator) All
func(it*ProcessIterator)All()iter.Seq2[*visionaipb.Process,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ProcessIterator) PageInfo
func(it*ProcessIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ProcessorIterator
typeProcessorIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Processor,nextPageTokenstring,errerror)// contains filtered or unexported fields}ProcessorIterator manages a stream of *visionaipb.Processor.
func (*ProcessorIterator) All
func(it*ProcessorIterator)All()iter.Seq2[*visionaipb.Processor,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ProcessorIterator) Next
func(it*ProcessorIterator)Next()(*visionaipb.Processor,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ProcessorIterator) PageInfo
func(it*ProcessorIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RemoveApplicationStreamInputOperation
typeRemoveApplicationStreamInputOperationstruct{// contains filtered or unexported fields}RemoveApplicationStreamInputOperation manages a long-running operation from RemoveApplicationStreamInput.
func (*RemoveApplicationStreamInputOperation) Done
func(op*RemoveApplicationStreamInputOperation)Done()boolDone reports whether the long-running operation has completed.
func (*RemoveApplicationStreamInputOperation) Metadata
func(op*RemoveApplicationStreamInputOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*RemoveApplicationStreamInputOperation) Name
func(op*RemoveApplicationStreamInputOperation)Name()stringName 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
func(op*RemoveApplicationStreamInputOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.RemoveApplicationStreamInputResponse,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 andthe 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
func(op*RemoveApplicationStreamInputOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.RemoveApplicationStreamInputResponse,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.
RemoveIndexAssetOperation
typeRemoveIndexAssetOperationstruct{// contains filtered or unexported fields}RemoveIndexAssetOperation manages a long-running operation from RemoveIndexAsset.
func (*RemoveIndexAssetOperation) Done
func(op*RemoveIndexAssetOperation)Done()boolDone reports whether the long-running operation has completed.
func (*RemoveIndexAssetOperation) Metadata
func(op*RemoveIndexAssetOperation)Metadata()(*visionaipb.RemoveIndexAssetMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*RemoveIndexAssetOperation) Name
func(op*RemoveIndexAssetOperation)Name()stringName 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
func(op*RemoveIndexAssetOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.RemoveIndexAssetResponse,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 andthe 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
func(op*RemoveIndexAssetOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.RemoveIndexAssetResponse,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.
SearchConfigIterator
typeSearchConfigIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.SearchConfig,nextPageTokenstring,errerror)// contains filtered or unexported fields}SearchConfigIterator manages a stream of *visionaipb.SearchConfig.
func (*SearchConfigIterator) All
func(it*SearchConfigIterator)All()iter.Seq2[*visionaipb.SearchConfig,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*SearchConfigIterator) Next
func(it*SearchConfigIterator)Next()(*visionaipb.SearchConfig,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*SearchConfigIterator) PageInfo
func(it*SearchConfigIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
SearchHypernymIterator
typeSearchHypernymIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.SearchHypernym,nextPageTokenstring,errerror)// contains filtered or unexported fields}SearchHypernymIterator manages a stream of *visionaipb.SearchHypernym.
func (*SearchHypernymIterator) All
func(it*SearchHypernymIterator)All()iter.Seq2[*visionaipb.SearchHypernym,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*SearchHypernymIterator) Next
func(it*SearchHypernymIterator)Next()(*visionaipb.SearchHypernym,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*SearchHypernymIterator) PageInfo
func(it*SearchHypernymIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
SearchResultItemIterator
typeSearchResultItemIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.SearchResultItem,nextPageTokenstring,errerror)// contains filtered or unexported fields}SearchResultItemIterator manages a stream of *visionaipb.SearchResultItem.
func (*SearchResultItemIterator) All
func(it*SearchResultItemIterator)All()iter.Seq2[*visionaipb.SearchResultItem,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*SearchResultItemIterator) Next
func(it*SearchResultItemIterator)Next()(*visionaipb.SearchResultItem,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*SearchResultItemIterator) PageInfo
func(it*SearchResultItemIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
SeriesIterator
typeSeriesIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Series,nextPageTokenstring,errerror)// contains filtered or unexported fields}SeriesIterator manages a stream of *visionaipb.Series.
func (*SeriesIterator) All
func(it*SeriesIterator)All()iter.Seq2[*visionaipb.Series,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*SeriesIterator) PageInfo
func(it*SeriesIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
StreamIterator
typeStreamIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*visionaipb.Stream,nextPageTokenstring,errerror)// contains filtered or unexported fields}StreamIterator manages a stream of *visionaipb.Stream.
func (*StreamIterator) All
func(it*StreamIterator)All()iter.Seq2[*visionaipb.Stream,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*StreamIterator) PageInfo
func(it*StreamIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
StreamingCallOptions
typeStreamingCallOptionsstruct{SendPackets[]gax.CallOptionReceivePackets[]gax.CallOptionReceiveEvents[]gax.CallOptionAcquireLease[]gax.CallOptionRenewLease[]gax.CallOptionReleaseLease[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}StreamingCallOptions contains the retry settings for each method of StreamingClient.
StreamingClient
typeStreamingClientstruct{// 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
funcNewStreamingClient(ctxcontext.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
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewStreamingRESTClient
funcNewStreamingRESTClient(ctxcontext.Context,opts...option.ClientOption)(*StreamingClient,error)NewStreamingRESTClient creates a new streaming service rest client.
Streaming service for receiving and sending packets.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*StreamingClient) AcquireLease
func(c*StreamingClient)AcquireLease(ctxcontext.Context,req*visionaipb.AcquireLeaseRequest,opts...gax.CallOption)(*visionaipb.Lease,error)AcquireLease acquireLease acquires a lease.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamingClient) CancelOperation
func(c*StreamingClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*StreamingClient) Close
func(c*StreamingClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*StreamingClient) Connection (deprecated)
func(c*StreamingClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*StreamingClient) DeleteOperation
func(c*StreamingClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*StreamingClient) GetOperation
func(c*StreamingClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamingClient) ListOperations
func(c*StreamingClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*longrunningpb.ListOperationsResponse)}}all
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*StreamingClient) ReceiveEvents
func(c*StreamingClient)ReceiveEvents(ctxcontext.Context,opts...gax.CallOption)(visionaipb.StreamingService_ReceiveEventsClient,error)ReceiveEvents receive events given the stream name.
This method is not supported for the REST transport.
Example
packagemainimport("context""io"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()stream,err:=c.ReceiveEvents(ctx)iferr!=nil{// TODO: Handle error.}gofunc(){reqs:=[]*visionaipb.ReceiveEventsRequest{// TODO: Create requests.}for_,req:=rangereqs{iferr:=stream.Send(req);err!=nil{// TODO: Handle error.}}stream.CloseSend()}()for{resp,err:=stream.Recv()iferr==io.EOF{break}iferr!=nil{// TODO: handle error.}// TODO: Use resp._=resp}}func (*StreamingClient) ReceivePackets
func(c*StreamingClient)ReceivePackets(ctxcontext.Context,opts...gax.CallOption)(visionaipb.StreamingService_ReceivePacketsClient,error)ReceivePackets receive packets from the series.
This method is not supported for the REST transport.
Example
packagemainimport("context""io"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()stream,err:=c.ReceivePackets(ctx)iferr!=nil{// TODO: Handle error.}gofunc(){reqs:=[]*visionaipb.ReceivePacketsRequest{// TODO: Create requests.}for_,req:=rangereqs{iferr:=stream.Send(req);err!=nil{// TODO: Handle error.}}stream.CloseSend()}()for{resp,err:=stream.Recv()iferr==io.EOF{break}iferr!=nil{// TODO: handle error.}// TODO: Use resp._=resp}}func (*StreamingClient) ReleaseLease
func(c*StreamingClient)ReleaseLease(ctxcontext.Context,req*visionaipb.ReleaseLeaseRequest,opts...gax.CallOption)(*visionaipb.ReleaseLeaseResponse,error)ReleaseLease rleaseLease releases a lease.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamingClient) RenewLease
func(c*StreamingClient)RenewLease(ctxcontext.Context,req*visionaipb.RenewLeaseRequest,opts...gax.CallOption)(*visionaipb.Lease,error)RenewLease renewLease renews a lease.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamingClient) SendPackets
func(c*StreamingClient)SendPackets(ctxcontext.Context,opts...gax.CallOption)(visionaipb.StreamingService_SendPacketsClient,error)SendPackets send packets to the series.
This method is not supported for the REST transport.
Example
packagemainimport("context""io"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()stream,err:=c.SendPackets(ctx)iferr!=nil{// TODO: Handle error.}gofunc(){reqs:=[]*visionaipb.SendPacketsRequest{// TODO: Create requests.}for_,req:=rangereqs{iferr:=stream.Send(req);err!=nil{// TODO: Handle error.}}stream.CloseSend()}()for{resp,err:=stream.Recv()iferr==io.EOF{break}iferr!=nil{// TODO: handle error.}// TODO: Use resp._=resp}}StreamsCallOptions
typeStreamsCallOptionsstruct{ListClusters[]gax.CallOptionGetCluster[]gax.CallOptionCreateCluster[]gax.CallOptionUpdateCluster[]gax.CallOptionDeleteCluster[]gax.CallOptionListStreams[]gax.CallOptionGetStream[]gax.CallOptionCreateStream[]gax.CallOptionUpdateStream[]gax.CallOptionDeleteStream[]gax.CallOptionGetStreamThumbnail[]gax.CallOptionGenerateStreamHlsToken[]gax.CallOptionListEvents[]gax.CallOptionGetEvent[]gax.CallOptionCreateEvent[]gax.CallOptionUpdateEvent[]gax.CallOptionDeleteEvent[]gax.CallOptionListSeries[]gax.CallOptionGetSeries[]gax.CallOptionCreateSeries[]gax.CallOptionUpdateSeries[]gax.CallOptionDeleteSeries[]gax.CallOptionMaterializeChannel[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}StreamsCallOptions contains the retry settings for each method of StreamsClient.
StreamsClient
typeStreamsClientstruct{// 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 sameteam. Vision API is for people to annotate their image while Vision AI is ane2e solution for customer to build their own computer vision application.
func NewStreamsClient
funcNewStreamsClient(ctxcontext.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 sameteam. Vision API is for people to annotate their image while Vision AI is ane2e solution for customer to build their own computer vision application.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewStreamsRESTClient
funcNewStreamsRESTClient(ctxcontext.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 sameteam. Vision API is for people to annotate their image while Vision AI is ane2e solution for customer to build their own computer vision application.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*StreamsClient) CancelOperation
func(c*StreamsClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*StreamsClient) Close
func(c*StreamsClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*StreamsClient) Connection (deprecated)
func(c*StreamsClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*StreamsClient) CreateCluster
func(c*StreamsClient)CreateCluster(ctxcontext.Context,req*visionaipb.CreateClusterRequest,opts...gax.CallOption)(*CreateClusterOperation,error)CreateCluster creates a new Cluster in a given project and location.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) CreateClusterOperation
func(c*StreamsClient)CreateClusterOperation(namestring)*CreateClusterOperationCreateClusterOperation 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
func(c*StreamsClient)CreateEvent(ctxcontext.Context,req*visionaipb.CreateEventRequest,opts...gax.CallOption)(*CreateEventOperation,error)CreateEvent creates a new Event in a given project and location.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) CreateEventOperation
func(c*StreamsClient)CreateEventOperation(namestring)*CreateEventOperationCreateEventOperation 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
func(c*StreamsClient)CreateSeries(ctxcontext.Context,req*visionaipb.CreateSeriesRequest,opts...gax.CallOption)(*CreateSeriesOperation,error)CreateSeries creates a new Series in a given project and location.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) CreateSeriesOperation
func(c*StreamsClient)CreateSeriesOperation(namestring)*CreateSeriesOperationCreateSeriesOperation 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
func(c*StreamsClient)CreateStream(ctxcontext.Context,req*visionaipb.CreateStreamRequest,opts...gax.CallOption)(*CreateStreamOperation,error)CreateStream creates a new Stream in a given project and location.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) CreateStreamOperation
func(c*StreamsClient)CreateStreamOperation(namestring)*CreateStreamOperationCreateStreamOperation 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
func(c*StreamsClient)DeleteCluster(ctxcontext.Context,req*visionaipb.DeleteClusterRequest,opts...gax.CallOption)(*DeleteClusterOperation,error)DeleteCluster deletes a single Cluster.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*StreamsClient) DeleteClusterOperation
func(c*StreamsClient)DeleteClusterOperation(namestring)*DeleteClusterOperationDeleteClusterOperation 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
func(c*StreamsClient)DeleteEvent(ctxcontext.Context,req*visionaipb.DeleteEventRequest,opts...gax.CallOption)(*DeleteEventOperation,error)DeleteEvent deletes a single Event.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*StreamsClient) DeleteEventOperation
func(c*StreamsClient)DeleteEventOperation(namestring)*DeleteEventOperationDeleteEventOperation 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(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*StreamsClient) DeleteSeries
func(c*StreamsClient)DeleteSeries(ctxcontext.Context,req*visionaipb.DeleteSeriesRequest,opts...gax.CallOption)(*DeleteSeriesOperation,error)DeleteSeries deletes a single Series.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*StreamsClient) DeleteSeriesOperation
func(c*StreamsClient)DeleteSeriesOperation(namestring)*DeleteSeriesOperationDeleteSeriesOperation 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
func(c*StreamsClient)DeleteStream(ctxcontext.Context,req*visionaipb.DeleteStreamRequest,opts...gax.CallOption)(*DeleteStreamOperation,error)DeleteStream deletes a single Stream.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*StreamsClient) DeleteStreamOperation
func(c*StreamsClient)DeleteStreamOperation(namestring)*DeleteStreamOperationDeleteStreamOperation 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
func(c*StreamsClient)GenerateStreamHlsToken(ctxcontext.Context,req*visionaipb.GenerateStreamHlsTokenRequest,opts...gax.CallOption)(*visionaipb.GenerateStreamHlsTokenResponse,error)GenerateStreamHlsToken generate the JWT auth token required to get the stream HLS contents.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) GetCluster
func(c*StreamsClient)GetCluster(ctxcontext.Context,req*visionaipb.GetClusterRequest,opts...gax.CallOption)(*visionaipb.Cluster,error)GetCluster gets details of a single Cluster.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) GetEvent
func(c*StreamsClient)GetEvent(ctxcontext.Context,req*visionaipb.GetEventRequest,opts...gax.CallOption)(*visionaipb.Event,error)GetEvent gets details of a single Event.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) GetOperation
func(c*StreamsClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) GetSeries
func(c*StreamsClient)GetSeries(ctxcontext.Context,req*visionaipb.GetSeriesRequest,opts...gax.CallOption)(*visionaipb.Series,error)GetSeries gets details of a single Series.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) GetStream
func(c*StreamsClient)GetStream(ctxcontext.Context,req*visionaipb.GetStreamRequest,opts...gax.CallOption)(*visionaipb.Stream,error)GetStream gets details of a single Stream.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) GetStreamThumbnail
func(c*StreamsClient)GetStreamThumbnail(ctxcontext.Context,req*visionaipb.GetStreamThumbnailRequest,opts...gax.CallOption)(*GetStreamThumbnailOperation,error)GetStreamThumbnail gets the thumbnail (image snapshot) of a single Stream.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) GetStreamThumbnailOperation
func(c*StreamsClient)GetStreamThumbnailOperation(namestring)*GetStreamThumbnailOperationGetStreamThumbnailOperation 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
func(c*StreamsClient)ListClusters(ctxcontext.Context,req*visionaipb.ListClustersRequest,opts...gax.CallOption)*ClusterIteratorListClusters lists Clusters in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListClustersResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListClustersRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListClustersRequest.}forresp,err:=rangec.ListClusters(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*StreamsClient) ListEvents
func(c*StreamsClient)ListEvents(ctxcontext.Context,req*visionaipb.ListEventsRequest,opts...gax.CallOption)*EventIteratorListEvents lists Events in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListEventsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListEventsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListEventsRequest.}forresp,err:=rangec.ListEvents(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*StreamsClient) ListOperations
func(c*StreamsClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*longrunningpb.ListOperationsResponse)}}all
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*StreamsClient) ListSeries
func(c*StreamsClient)ListSeries(ctxcontext.Context,req*visionaipb.ListSeriesRequest,opts...gax.CallOption)*SeriesIteratorListSeries lists Series in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListSeriesResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListSeriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSeriesRequest.}forresp,err:=rangec.ListSeries(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*StreamsClient) ListStreams
func(c*StreamsClient)ListStreams(ctxcontext.Context,req*visionaipb.ListStreamsRequest,opts...gax.CallOption)*StreamIteratorListStreams lists Streams in a given project and location.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListStreamsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListStreamsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListStreamsRequest.}forresp,err:=rangec.ListStreams(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*StreamsClient) MaterializeChannel
func(c*StreamsClient)MaterializeChannel(ctxcontext.Context,req*visionaipb.MaterializeChannelRequest,opts...gax.CallOption)(*MaterializeChannelOperation,error)MaterializeChannel materialize a channel.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) MaterializeChannelOperation
func(c*StreamsClient)MaterializeChannelOperation(namestring)*MaterializeChannelOperationMaterializeChannelOperation 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
func(c*StreamsClient)UpdateCluster(ctxcontext.Context,req*visionaipb.UpdateClusterRequest,opts...gax.CallOption)(*UpdateClusterOperation,error)UpdateCluster updates the parameters of a single Cluster.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) UpdateClusterOperation
func(c*StreamsClient)UpdateClusterOperation(namestring)*UpdateClusterOperationUpdateClusterOperation 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
func(c*StreamsClient)UpdateEvent(ctxcontext.Context,req*visionaipb.UpdateEventRequest,opts...gax.CallOption)(*UpdateEventOperation,error)UpdateEvent updates the parameters of a single Event.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) UpdateEventOperation
func(c*StreamsClient)UpdateEventOperation(namestring)*UpdateEventOperationUpdateEventOperation 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
func(c*StreamsClient)UpdateSeries(ctxcontext.Context,req*visionaipb.UpdateSeriesRequest,opts...gax.CallOption)(*UpdateSeriesOperation,error)UpdateSeries updates the parameters of a single Event.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) UpdateSeriesOperation
func(c*StreamsClient)UpdateSeriesOperation(namestring)*UpdateSeriesOperationUpdateSeriesOperation 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
func(c*StreamsClient)UpdateStream(ctxcontext.Context,req*visionaipb.UpdateStreamRequest,opts...gax.CallOption)(*UpdateStreamOperation,error)UpdateStream updates the parameters of a single Stream.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewStreamsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*StreamsClient) UpdateStreamOperation
func(c*StreamsClient)UpdateStreamOperation(namestring)*UpdateStreamOperationUpdateStreamOperation returns a new UpdateStreamOperation from a given name.The name must be that of a previously created UpdateStreamOperation, possibly from a different process.
UndeployApplicationOperation
typeUndeployApplicationOperationstruct{// contains filtered or unexported fields}UndeployApplicationOperation manages a long-running operation from UndeployApplication.
func (*UndeployApplicationOperation) Done
func(op*UndeployApplicationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UndeployApplicationOperation) Metadata
func(op*UndeployApplicationOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UndeployApplicationOperation) Name
func(op*UndeployApplicationOperation)Name()stringName 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
func(op*UndeployApplicationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.UndeployApplicationResponse,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 andthe 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
func(op*UndeployApplicationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.UndeployApplicationResponse,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.
UndeployIndexOperation
typeUndeployIndexOperationstruct{// contains filtered or unexported fields}UndeployIndexOperation manages a long-running operation from UndeployIndex.
func (*UndeployIndexOperation) Done
func(op*UndeployIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UndeployIndexOperation) Metadata
func(op*UndeployIndexOperation)Metadata()(*visionaipb.UndeployIndexMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UndeployIndexOperation) Name
func(op*UndeployIndexOperation)Name()stringName 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
func(op*UndeployIndexOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.UndeployIndexResponse,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 andthe 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
func(op*UndeployIndexOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.UndeployIndexResponse,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.
UpdateAnalysisOperation
typeUpdateAnalysisOperationstruct{// contains filtered or unexported fields}UpdateAnalysisOperation manages a long-running operation from UpdateAnalysis.
func (*UpdateAnalysisOperation) Done
func(op*UpdateAnalysisOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateAnalysisOperation) Metadata
func(op*UpdateAnalysisOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateAnalysisOperation) Name
func(op*UpdateAnalysisOperation)Name()stringName 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
func(op*UpdateAnalysisOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Analysis,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateAnalysisOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Analysis,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateApplicationInstancesOperation
typeUpdateApplicationInstancesOperationstruct{// contains filtered or unexported fields}UpdateApplicationInstancesOperation manages a long-running operation from UpdateApplicationInstances.
func (*UpdateApplicationInstancesOperation) Done
func(op*UpdateApplicationInstancesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateApplicationInstancesOperation) Metadata
func(op*UpdateApplicationInstancesOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateApplicationInstancesOperation) Name
func(op*UpdateApplicationInstancesOperation)Name()stringName 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
func(op*UpdateApplicationInstancesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.UpdateApplicationInstancesResponse,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 andthe 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
func(op*UpdateApplicationInstancesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.UpdateApplicationInstancesResponse,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.
UpdateApplicationOperation
typeUpdateApplicationOperationstruct{// contains filtered or unexported fields}UpdateApplicationOperation manages a long-running operation from UpdateApplication.
func (*UpdateApplicationOperation) Done
func(op*UpdateApplicationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateApplicationOperation) Metadata
func(op*UpdateApplicationOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateApplicationOperation) Name
func(op*UpdateApplicationOperation)Name()stringName 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
func(op*UpdateApplicationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Application,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateApplicationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Application,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateApplicationStreamInputOperation
typeUpdateApplicationStreamInputOperationstruct{// contains filtered or unexported fields}UpdateApplicationStreamInputOperation manages a long-running operation from UpdateApplicationStreamInput.
func (*UpdateApplicationStreamInputOperation) Done
func(op*UpdateApplicationStreamInputOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateApplicationStreamInputOperation) Metadata
func(op*UpdateApplicationStreamInputOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateApplicationStreamInputOperation) Name
func(op*UpdateApplicationStreamInputOperation)Name()stringName 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
func(op*UpdateApplicationStreamInputOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.UpdateApplicationStreamInputResponse,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 andthe 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
func(op*UpdateApplicationStreamInputOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.UpdateApplicationStreamInputResponse,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.
UpdateClusterOperation
typeUpdateClusterOperationstruct{// contains filtered or unexported fields}UpdateClusterOperation manages a long-running operation from UpdateCluster.
func (*UpdateClusterOperation) Done
func(op*UpdateClusterOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateClusterOperation) Metadata
func(op*UpdateClusterOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateClusterOperation) Name
func(op*UpdateClusterOperation)Name()stringName 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
func(op*UpdateClusterOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Cluster,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateClusterOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Cluster,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateDraftOperation
typeUpdateDraftOperationstruct{// contains filtered or unexported fields}UpdateDraftOperation manages a long-running operation from UpdateDraft.
func (*UpdateDraftOperation) Done
func(op*UpdateDraftOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateDraftOperation) Metadata
func(op*UpdateDraftOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateDraftOperation) Name
func(op*UpdateDraftOperation)Name()stringName 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
func(op*UpdateDraftOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Draft,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateDraftOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Draft,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateEventOperation
typeUpdateEventOperationstruct{// contains filtered or unexported fields}UpdateEventOperation manages a long-running operation from UpdateEvent.
func (*UpdateEventOperation) Done
func(op*UpdateEventOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateEventOperation) Metadata
func(op*UpdateEventOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateEventOperation) Name
func(op*UpdateEventOperation)Name()stringName 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
func(op*UpdateEventOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Event,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateEventOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Event,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateIndexEndpointOperation
typeUpdateIndexEndpointOperationstruct{// contains filtered or unexported fields}UpdateIndexEndpointOperation manages a long-running operation from UpdateIndexEndpoint.
func (*UpdateIndexEndpointOperation) Done
func(op*UpdateIndexEndpointOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateIndexEndpointOperation) Metadata
func(op*UpdateIndexEndpointOperation)Metadata()(*visionaipb.UpdateIndexEndpointMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateIndexEndpointOperation) Name
func(op*UpdateIndexEndpointOperation)Name()stringName 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
func(op*UpdateIndexEndpointOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.IndexEndpoint,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateIndexEndpointOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.IndexEndpoint,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateIndexOperation
typeUpdateIndexOperationstruct{// contains filtered or unexported fields}UpdateIndexOperation manages a long-running operation from UpdateIndex.
func (*UpdateIndexOperation) Done
func(op*UpdateIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateIndexOperation) Metadata
func(op*UpdateIndexOperation)Metadata()(*visionaipb.UpdateIndexMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateIndexOperation) Name
func(op*UpdateIndexOperation)Name()stringName 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
func(op*UpdateIndexOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Index,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateIndexOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Index,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateOperatorOperation
typeUpdateOperatorOperationstruct{// contains filtered or unexported fields}UpdateOperatorOperation manages a long-running operation from UpdateOperator.
func (*UpdateOperatorOperation) Done
func(op*UpdateOperatorOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateOperatorOperation) Metadata
func(op*UpdateOperatorOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateOperatorOperation) Name
func(op*UpdateOperatorOperation)Name()stringName 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
func(op*UpdateOperatorOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Operator,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateOperatorOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Operator,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateProcessOperation
typeUpdateProcessOperationstruct{// contains filtered or unexported fields}UpdateProcessOperation manages a long-running operation from UpdateProcess.
func (*UpdateProcessOperation) Done
func(op*UpdateProcessOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateProcessOperation) Metadata
func(op*UpdateProcessOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateProcessOperation) Name
func(op*UpdateProcessOperation)Name()stringName 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
func(op*UpdateProcessOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Process,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateProcessOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Process,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateProcessorOperation
typeUpdateProcessorOperationstruct{// contains filtered or unexported fields}UpdateProcessorOperation manages a long-running operation from UpdateProcessor.
func (*UpdateProcessorOperation) Done
func(op*UpdateProcessorOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateProcessorOperation) Metadata
func(op*UpdateProcessorOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateProcessorOperation) Name
func(op*UpdateProcessorOperation)Name()stringName 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
func(op*UpdateProcessorOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Processor,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateProcessorOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Processor,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateSeriesOperation
typeUpdateSeriesOperationstruct{// contains filtered or unexported fields}UpdateSeriesOperation manages a long-running operation from UpdateSeries.
func (*UpdateSeriesOperation) Done
func(op*UpdateSeriesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateSeriesOperation) Metadata
func(op*UpdateSeriesOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateSeriesOperation) Name
func(op*UpdateSeriesOperation)Name()stringName 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
func(op*UpdateSeriesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Series,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateSeriesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Series,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateStreamOperation
typeUpdateStreamOperationstruct{// contains filtered or unexported fields}UpdateStreamOperation manages a long-running operation from UpdateStream.
func (*UpdateStreamOperation) Done
func(op*UpdateStreamOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateStreamOperation) Metadata
func(op*UpdateStreamOperation)Metadata()(*visionaipb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateStreamOperation) Name
func(op*UpdateStreamOperation)Name()stringName 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
func(op*UpdateStreamOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Stream,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe 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
func(op*UpdateStreamOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.Stream,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UploadAssetOperation
typeUploadAssetOperationstruct{// contains filtered or unexported fields}UploadAssetOperation manages a long-running operation from UploadAsset.
func (*UploadAssetOperation) Done
func(op*UploadAssetOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UploadAssetOperation) Metadata
func(op*UploadAssetOperation)Metadata()(*visionaipb.UploadAssetMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UploadAssetOperation) Name
func(op*UploadAssetOperation)Name()stringName 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
func(op*UploadAssetOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.UploadAssetResponse,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 andthe 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
func(op*UploadAssetOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*visionaipb.UploadAssetResponse,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.
WarehouseCallOptions
typeWarehouseCallOptionsstruct{CreateAsset[]gax.CallOptionUpdateAsset[]gax.CallOptionGetAsset[]gax.CallOptionListAssets[]gax.CallOptionDeleteAsset[]gax.CallOptionUploadAsset[]gax.CallOptionGenerateRetrievalUrl[]gax.CallOptionAnalyzeAsset[]gax.CallOptionIndexAsset[]gax.CallOptionRemoveIndexAsset[]gax.CallOptionViewIndexedAssets[]gax.CallOptionCreateIndex[]gax.CallOptionUpdateIndex[]gax.CallOptionGetIndex[]gax.CallOptionListIndexes[]gax.CallOptionDeleteIndex[]gax.CallOptionCreateCorpus[]gax.CallOptionGetCorpus[]gax.CallOptionUpdateCorpus[]gax.CallOptionListCorpora[]gax.CallOptionDeleteCorpus[]gax.CallOptionAnalyzeCorpus[]gax.CallOptionCreateDataSchema[]gax.CallOptionUpdateDataSchema[]gax.CallOptionGetDataSchema[]gax.CallOptionDeleteDataSchema[]gax.CallOptionListDataSchemas[]gax.CallOptionCreateAnnotation[]gax.CallOptionGetAnnotation[]gax.CallOptionListAnnotations[]gax.CallOptionUpdateAnnotation[]gax.CallOptionDeleteAnnotation[]gax.CallOptionIngestAsset[]gax.CallOptionClipAsset[]gax.CallOptionGenerateHlsUri[]gax.CallOptionImportAssets[]gax.CallOptionCreateSearchConfig[]gax.CallOptionUpdateSearchConfig[]gax.CallOptionGetSearchConfig[]gax.CallOptionDeleteSearchConfig[]gax.CallOptionListSearchConfigs[]gax.CallOptionCreateSearchHypernym[]gax.CallOptionUpdateSearchHypernym[]gax.CallOptionGetSearchHypernym[]gax.CallOptionDeleteSearchHypernym[]gax.CallOptionListSearchHypernyms[]gax.CallOptionSearchAssets[]gax.CallOptionSearchIndexEndpoint[]gax.CallOptionCreateIndexEndpoint[]gax.CallOptionGetIndexEndpoint[]gax.CallOptionListIndexEndpoints[]gax.CallOptionUpdateIndexEndpoint[]gax.CallOptionDeleteIndexEndpoint[]gax.CallOptionDeployIndex[]gax.CallOptionUndeployIndex[]gax.CallOptionCreateCollection[]gax.CallOptionDeleteCollection[]gax.CallOptionGetCollection[]gax.CallOptionUpdateCollection[]gax.CallOptionListCollections[]gax.CallOptionAddCollectionItem[]gax.CallOptionRemoveCollectionItem[]gax.CallOptionViewCollectionItems[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}WarehouseCallOptions contains the retry settings for each method of WarehouseClient.
WarehouseClient
typeWarehouseClientstruct{// 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
funcNewWarehouseClient(ctxcontext.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
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewWarehouseRESTClient
funcNewWarehouseRESTClient(ctxcontext.Context,opts...option.ClientOption)(*WarehouseClient,error)NewWarehouseRESTClient creates a new warehouse rest client.
Service that manages media content + metadata for streaming.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*WarehouseClient) AddCollectionItem
func(c*WarehouseClient)AddCollectionItem(ctxcontext.Context,req*visionaipb.AddCollectionItemRequest,opts...gax.CallOption)(*visionaipb.AddCollectionItemResponse,error)AddCollectionItem adds an item into a Collection.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) AnalyzeAsset
func(c*WarehouseClient)AnalyzeAsset(ctxcontext.Context,req*visionaipb.AnalyzeAssetRequest,opts...gax.CallOption)(*AnalyzeAssetOperation,error)AnalyzeAsset analyze asset to power search capability.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) AnalyzeAssetOperation
func(c*WarehouseClient)AnalyzeAssetOperation(namestring)*AnalyzeAssetOperationAnalyzeAssetOperation 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
func(c*WarehouseClient)AnalyzeCorpus(ctxcontext.Context,req*visionaipb.AnalyzeCorpusRequest,opts...gax.CallOption)(*AnalyzeCorpusOperation,error)AnalyzeCorpus analyzes a corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) AnalyzeCorpusOperation
func(c*WarehouseClient)AnalyzeCorpusOperation(namestring)*AnalyzeCorpusOperationAnalyzeCorpusOperation 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(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) ClipAsset
func(c*WarehouseClient)ClipAsset(ctxcontext.Context,req*visionaipb.ClipAssetRequest,opts...gax.CallOption)(*visionaipb.ClipAssetResponse,error)ClipAsset supported by STREAM_VIDEO corpus type.Generates clips for downloading. The api takes in a time range, andgenerates a clip of the first content available after start_time andbefore end_time, which may overflow beyond these bounds.Returned clips are truncated if the total size of the clips are largerthan 100MB.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) Close
func(c*WarehouseClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*WarehouseClient) Connection (deprecated)
func(c*WarehouseClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*WarehouseClient) CreateAnnotation
func(c*WarehouseClient)CreateAnnotation(ctxcontext.Context,req*visionaipb.CreateAnnotationRequest,opts...gax.CallOption)(*visionaipb.Annotation,error)CreateAnnotation creates annotation inside asset.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) CreateAsset
func(c*WarehouseClient)CreateAsset(ctxcontext.Context,req*visionaipb.CreateAssetRequest,opts...gax.CallOption)(*visionaipb.Asset,error)CreateAsset creates an asset inside corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) CreateCollection
func(c*WarehouseClient)CreateCollection(ctxcontext.Context,req*visionaipb.CreateCollectionRequest,opts...gax.CallOption)(*CreateCollectionOperation,error)CreateCollection creates a collection.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) CreateCollectionOperation
func(c*WarehouseClient)CreateCollectionOperation(namestring)*CreateCollectionOperationCreateCollectionOperation 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
func(c*WarehouseClient)CreateCorpus(ctxcontext.Context,req*visionaipb.CreateCorpusRequest,opts...gax.CallOption)(*CreateCorpusOperation,error)CreateCorpus creates a corpus inside a project.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) CreateCorpusOperation
func(c*WarehouseClient)CreateCorpusOperation(namestring)*CreateCorpusOperationCreateCorpusOperation 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
func(c*WarehouseClient)CreateDataSchema(ctxcontext.Context,req*visionaipb.CreateDataSchemaRequest,opts...gax.CallOption)(*visionaipb.DataSchema,error)CreateDataSchema creates data schema inside corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) CreateIndex
func(c*WarehouseClient)CreateIndex(ctxcontext.Context,req*visionaipb.CreateIndexRequest,opts...gax.CallOption)(*CreateIndexOperation,error)CreateIndex creates an Index under the corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) CreateIndexEndpoint
func(c*WarehouseClient)CreateIndexEndpoint(ctxcontext.Context,req*visionaipb.CreateIndexEndpointRequest,opts...gax.CallOption)(*CreateIndexEndpointOperation,error)CreateIndexEndpoint creates an IndexEndpoint.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) CreateIndexEndpointOperation
func(c*WarehouseClient)CreateIndexEndpointOperation(namestring)*CreateIndexEndpointOperationCreateIndexEndpointOperation 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(namestring)*CreateIndexOperationCreateIndexOperation 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
func(c*WarehouseClient)CreateSearchConfig(ctxcontext.Context,req*visionaipb.CreateSearchConfigRequest,opts...gax.CallOption)(*visionaipb.SearchConfig,error)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 existingSearchConfig.
Request must contain at least one non-empty search_criteria_property orfacet_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 matchoptions.For property-specific rules, please reference the comments forFacetProperty and SearchCriteriaProperty.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) CreateSearchHypernym
func(c*WarehouseClient)CreateSearchHypernym(ctxcontext.Context,req*visionaipb.CreateSearchHypernymRequest,opts...gax.CallOption)(*visionaipb.SearchHypernym,error)CreateSearchHypernym creates a SearchHypernym inside a corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) DeleteAnnotation
func(c*WarehouseClient)DeleteAnnotation(ctxcontext.Context,req*visionaipb.DeleteAnnotationRequest,opts...gax.CallOption)errorDeleteAnnotation deletes annotation inside asset.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) DeleteAsset
func(c*WarehouseClient)DeleteAsset(ctxcontext.Context,req*visionaipb.DeleteAssetRequest,opts...gax.CallOption)(*DeleteAssetOperation,error)DeleteAsset deletes asset inside corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) DeleteAssetOperation
func(c*WarehouseClient)DeleteAssetOperation(namestring)*DeleteAssetOperationDeleteAssetOperation 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
func(c*WarehouseClient)DeleteCollection(ctxcontext.Context,req*visionaipb.DeleteCollectionRequest,opts...gax.CallOption)(*DeleteCollectionOperation,error)DeleteCollection deletes a collection.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) DeleteCollectionOperation
func(c*WarehouseClient)DeleteCollectionOperation(namestring)*DeleteCollectionOperationDeleteCollectionOperation 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(ctxcontext.Context,req*visionaipb.DeleteCorpusRequest,opts...gax.CallOption)errorDeleteCorpus deletes a corpus only if its empty.Returns empty response.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) DeleteDataSchema
func(c*WarehouseClient)DeleteDataSchema(ctxcontext.Context,req*visionaipb.DeleteDataSchemaRequest,opts...gax.CallOption)errorDeleteDataSchema deletes data schema inside corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) DeleteIndex
func(c*WarehouseClient)DeleteIndex(ctxcontext.Context,req*visionaipb.DeleteIndexRequest,opts...gax.CallOption)(*DeleteIndexOperation,error)DeleteIndex delete a single Index. In order to delete an index, the caller mustmake sure that it is not deployed to any index endpoint.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) DeleteIndexEndpoint
func(c*WarehouseClient)DeleteIndexEndpoint(ctxcontext.Context,req*visionaipb.DeleteIndexEndpointRequest,opts...gax.CallOption)(*DeleteIndexEndpointOperation,error)DeleteIndexEndpoint deletes an IndexEndpoint.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) DeleteIndexEndpointOperation
func(c*WarehouseClient)DeleteIndexEndpointOperation(namestring)*DeleteIndexEndpointOperationDeleteIndexEndpointOperation 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(namestring)*DeleteIndexOperationDeleteIndexOperation 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(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) DeleteSearchConfig
func(c*WarehouseClient)DeleteSearchConfig(ctxcontext.Context,req*visionaipb.DeleteSearchConfigRequest,opts...gax.CallOption)errorDeleteSearchConfig deletes a search configuration inside a corpus.
For a DeleteSearchConfigRequest to be valid,Request.search_configuration.name must already exist.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) DeleteSearchHypernym
func(c*WarehouseClient)DeleteSearchHypernym(ctxcontext.Context,req*visionaipb.DeleteSearchHypernymRequest,opts...gax.CallOption)errorDeleteSearchHypernym deletes a SearchHypernym inside a corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}}func (*WarehouseClient) DeployIndex
func(c*WarehouseClient)DeployIndex(ctxcontext.Context,req*visionaipb.DeployIndexRequest,opts...gax.CallOption)(*DeployIndexOperation,error)DeployIndex deploys an Index to IndexEndpoint.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) DeployIndexOperation
func(c*WarehouseClient)DeployIndexOperation(namestring)*DeployIndexOperationDeployIndexOperation 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
func(c*WarehouseClient)GenerateHlsUri(ctxcontext.Context,req*visionaipb.GenerateHlsUriRequest,opts...gax.CallOption)(*visionaipb.GenerateHlsUriResponse,error)GenerateHlsUri generates a uri for an HLS manifest. The api takes in a collection of timeranges, and generates a URI for an HLS manifest that covers all therequested time ranges.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GenerateRetrievalUrl
func(c*WarehouseClient)GenerateRetrievalUrl(ctxcontext.Context,req*visionaipb.GenerateRetrievalUrlRequest,opts...gax.CallOption)(*visionaipb.GenerateRetrievalUrlResponse,error)GenerateRetrievalUrl generates a signed url for downloading the asset.For video warehouse, please see comment of UploadAsset about how to allowretrieval of cloud storage files in a different project.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GetAnnotation
func(c*WarehouseClient)GetAnnotation(ctxcontext.Context,req*visionaipb.GetAnnotationRequest,opts...gax.CallOption)(*visionaipb.Annotation,error)GetAnnotation reads annotation inside asset.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GetAsset
func(c*WarehouseClient)GetAsset(ctxcontext.Context,req*visionaipb.GetAssetRequest,opts...gax.CallOption)(*visionaipb.Asset,error)GetAsset reads an asset inside corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GetCollection
func(c*WarehouseClient)GetCollection(ctxcontext.Context,req*visionaipb.GetCollectionRequest,opts...gax.CallOption)(*visionaipb.Collection,error)GetCollection gets a collection.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GetCorpus
func(c*WarehouseClient)GetCorpus(ctxcontext.Context,req*visionaipb.GetCorpusRequest,opts...gax.CallOption)(*visionaipb.Corpus,error)GetCorpus gets corpus details inside a project.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GetDataSchema
func(c*WarehouseClient)GetDataSchema(ctxcontext.Context,req*visionaipb.GetDataSchemaRequest,opts...gax.CallOption)(*visionaipb.DataSchema,error)GetDataSchema gets data schema inside corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GetIndex
func(c*WarehouseClient)GetIndex(ctxcontext.Context,req*visionaipb.GetIndexRequest,opts...gax.CallOption)(*visionaipb.Index,error)GetIndex gets the details of a single Index under a Corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GetIndexEndpoint
func(c*WarehouseClient)GetIndexEndpoint(ctxcontext.Context,req*visionaipb.GetIndexEndpointRequest,opts...gax.CallOption)(*visionaipb.IndexEndpoint,error)GetIndexEndpoint gets an IndexEndpoint.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GetOperation
func(c*WarehouseClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GetSearchConfig
func(c*WarehouseClient)GetSearchConfig(ctxcontext.Context,req*visionaipb.GetSearchConfigRequest,opts...gax.CallOption)(*visionaipb.SearchConfig,error)GetSearchConfig gets a search configuration inside a corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) GetSearchHypernym
func(c*WarehouseClient)GetSearchHypernym(ctxcontext.Context,req*visionaipb.GetSearchHypernymRequest,opts...gax.CallOption)(*visionaipb.SearchHypernym,error)GetSearchHypernym gets a SearchHypernym inside a corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) ImportAssets
func(c*WarehouseClient)ImportAssets(ctxcontext.Context,req*visionaipb.ImportAssetsRequest,opts...gax.CallOption)(*ImportAssetsOperation,error)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 acloud storage uri) and its annotations.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) ImportAssetsOperation
func(c*WarehouseClient)ImportAssetsOperation(namestring)*ImportAssetsOperationImportAssetsOperation 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
func(c*WarehouseClient)IndexAsset(ctxcontext.Context,req*visionaipb.IndexAssetRequest,opts...gax.CallOption)(*IndexAssetOperation,error)IndexAsset index one asset for search.Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) IndexAssetOperation
func(c*WarehouseClient)IndexAssetOperation(namestring)*IndexAssetOperationIndexAssetOperation 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
func(c*WarehouseClient)IngestAsset(ctxcontext.Context,opts...gax.CallOption)(visionaipb.Warehouse_IngestAssetClient,error)IngestAsset ingests data for the asset. It is not allowed to ingest a data chunk whichis already expired according to TTL.This method is only available via the gRPC API (not HTTP sincebi-directional streaming is not supported via HTTP).
This method is not supported for the REST transport.
Example
packagemainimport("context""io"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()stream,err:=c.IngestAsset(ctx)iferr!=nil{// TODO: Handle error.}gofunc(){reqs:=[]*visionaipb.IngestAssetRequest{// TODO: Create requests.}for_,req:=rangereqs{iferr:=stream.Send(req);err!=nil{// TODO: Handle error.}}stream.CloseSend()}()for{resp,err:=stream.Recv()iferr==io.EOF{break}iferr!=nil{// TODO: handle error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ListAnnotations
func(c*WarehouseClient)ListAnnotations(ctxcontext.Context,req*visionaipb.ListAnnotationsRequest,opts...gax.CallOption)*AnnotationIteratorListAnnotations lists a list of annotations inside asset.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListAnnotationsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListAnnotationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAnnotationsRequest.}forresp,err:=rangec.ListAnnotations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ListAssets
func(c*WarehouseClient)ListAssets(ctxcontext.Context,req*visionaipb.ListAssetsRequest,opts...gax.CallOption)*AssetIteratorListAssets lists an list of assets inside corpus.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListAssetsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListAssetsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAssetsRequest.}forresp,err:=rangec.ListAssets(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ListCollections
func(c*WarehouseClient)ListCollections(ctxcontext.Context,req*visionaipb.ListCollectionsRequest,opts...gax.CallOption)*CollectionIteratorListCollections lists collections inside a corpus.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListCollectionsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListCollectionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListCollectionsRequest.}forresp,err:=rangec.ListCollections(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ListCorpora
func(c*WarehouseClient)ListCorpora(ctxcontext.Context,req*visionaipb.ListCorporaRequest,opts...gax.CallOption)*CorpusIteratorListCorpora lists all corpora in a project.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListCorporaResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListCorporaRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListCorporaRequest.}forresp,err:=rangec.ListCorpora(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ListDataSchemas
func(c*WarehouseClient)ListDataSchemas(ctxcontext.Context,req*visionaipb.ListDataSchemasRequest,opts...gax.CallOption)*DataSchemaIteratorListDataSchemas lists a list of data schemas inside corpus.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListDataSchemasResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListDataSchemasRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListDataSchemasRequest.}forresp,err:=rangec.ListDataSchemas(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ListIndexEndpoints
func(c*WarehouseClient)ListIndexEndpoints(ctxcontext.Context,req*visionaipb.ListIndexEndpointsRequest,opts...gax.CallOption)*IndexEndpointIteratorListIndexEndpoints lists all IndexEndpoints in a project.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListIndexEndpointsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListIndexEndpointsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListIndexEndpointsRequest.}forresp,err:=rangec.ListIndexEndpoints(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ListIndexes
func(c*WarehouseClient)ListIndexes(ctxcontext.Context,req*visionaipb.ListIndexesRequest,opts...gax.CallOption)*IndexIteratorListIndexes list all Indexes in a given Corpus.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListIndexesResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListIndexesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListIndexesRequest.}forresp,err:=rangec.ListIndexes(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ListOperations
func(c*WarehouseClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*longrunningpb.ListOperationsResponse)}}all
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"visionai"cloud.google.com/go/visionai/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ListSearchConfigs
func(c*WarehouseClient)ListSearchConfigs(ctxcontext.Context,req*visionaipb.ListSearchConfigsRequest,opts...gax.CallOption)*SearchConfigIteratorListSearchConfigs lists all search configurations inside a corpus.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListSearchConfigsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListSearchConfigsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSearchConfigsRequest.}forresp,err:=rangec.ListSearchConfigs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ListSearchHypernyms
func(c*WarehouseClient)ListSearchHypernyms(ctxcontext.Context,req*visionaipb.ListSearchHypernymsRequest,opts...gax.CallOption)*SearchHypernymIteratorListSearchHypernyms lists SearchHypernyms inside a corpus.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ListSearchHypernymsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ListSearchHypernymsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSearchHypernymsRequest.}forresp,err:=rangec.ListSearchHypernyms(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) RemoveCollectionItem
func(c*WarehouseClient)RemoveCollectionItem(ctxcontext.Context,req*visionaipb.RemoveCollectionItemRequest,opts...gax.CallOption)(*visionaipb.RemoveCollectionItemResponse,error)RemoveCollectionItem removes an item from a collection.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) RemoveIndexAsset
func(c*WarehouseClient)RemoveIndexAsset(ctxcontext.Context,req*visionaipb.RemoveIndexAssetRequest,opts...gax.CallOption)(*RemoveIndexAssetOperation,error)RemoveIndexAsset remove one asset’s index data for search.Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) RemoveIndexAssetOperation
func(c*WarehouseClient)RemoveIndexAssetOperation(namestring)*RemoveIndexAssetOperationRemoveIndexAssetOperation 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
func(c*WarehouseClient)SearchAssets(ctxcontext.Context,req*visionaipb.SearchAssetsRequest,opts...gax.CallOption)*SearchResultItemIteratorSearchAssets search media asset.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.SearchAssetsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.SearchAssetsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#SearchAssetsRequest.}forresp,err:=rangec.SearchAssets(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) SearchIndexEndpoint
func(c*WarehouseClient)SearchIndexEndpoint(ctxcontext.Context,req*visionaipb.SearchIndexEndpointRequest,opts...gax.CallOption)*SearchResultItemIteratorSearchIndexEndpoint search a deployed index endpoint (IMAGE corpus type only).
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.SearchIndexEndpointResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.SearchIndexEndpointRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#SearchIndexEndpointRequest.}forresp,err:=rangec.SearchIndexEndpoint(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) UndeployIndex
func(c*WarehouseClient)UndeployIndex(ctxcontext.Context,req*visionaipb.UndeployIndexRequest,opts...gax.CallOption)(*UndeployIndexOperation,error)UndeployIndex undeploys an Index from IndexEndpoint.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UndeployIndexOperation
func(c*WarehouseClient)UndeployIndexOperation(namestring)*UndeployIndexOperationUndeployIndexOperation 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
func(c*WarehouseClient)UpdateAnnotation(ctxcontext.Context,req*visionaipb.UpdateAnnotationRequest,opts...gax.CallOption)(*visionaipb.Annotation,error)UpdateAnnotation updates annotation inside asset.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UpdateAsset
func(c*WarehouseClient)UpdateAsset(ctxcontext.Context,req*visionaipb.UpdateAssetRequest,opts...gax.CallOption)(*visionaipb.Asset,error)UpdateAsset updates an asset inside corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UpdateCollection
func(c*WarehouseClient)UpdateCollection(ctxcontext.Context,req*visionaipb.UpdateCollectionRequest,opts...gax.CallOption)(*visionaipb.Collection,error)UpdateCollection updates a collection.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UpdateCorpus
func(c*WarehouseClient)UpdateCorpus(ctxcontext.Context,req*visionaipb.UpdateCorpusRequest,opts...gax.CallOption)(*visionaipb.Corpus,error)UpdateCorpus updates a corpus in a project.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UpdateDataSchema
func(c*WarehouseClient)UpdateDataSchema(ctxcontext.Context,req*visionaipb.UpdateDataSchemaRequest,opts...gax.CallOption)(*visionaipb.DataSchema,error)UpdateDataSchema updates data schema inside corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UpdateIndex
func(c*WarehouseClient)UpdateIndex(ctxcontext.Context,req*visionaipb.UpdateIndexRequest,opts...gax.CallOption)(*UpdateIndexOperation,error)UpdateIndex updates an Index under the corpus.Users can perform a metadata-only update or trigger a full index rebuildwith different update_mask values.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UpdateIndexEndpoint
func(c*WarehouseClient)UpdateIndexEndpoint(ctxcontext.Context,req*visionaipb.UpdateIndexEndpointRequest,opts...gax.CallOption)(*UpdateIndexEndpointOperation,error)UpdateIndexEndpoint updates an IndexEndpoint.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UpdateIndexEndpointOperation
func(c*WarehouseClient)UpdateIndexEndpointOperation(namestring)*UpdateIndexEndpointOperationUpdateIndexEndpointOperation 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(namestring)*UpdateIndexOperationUpdateIndexOperation 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
func(c*WarehouseClient)UpdateSearchConfig(ctxcontext.Context,req*visionaipb.UpdateSearchConfigRequest,opts...gax.CallOption)(*visionaipb.SearchConfig,error)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 orfacet_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 matchoptions.For property-specific rules, please reference the comments forFacetProperty and SearchCriteriaProperty.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UpdateSearchHypernym
func(c*WarehouseClient)UpdateSearchHypernym(ctxcontext.Context,req*visionaipb.UpdateSearchHypernymRequest,opts...gax.CallOption)(*visionaipb.SearchHypernym,error)UpdateSearchHypernym updates a SearchHypernym inside a corpus.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UploadAsset
func(c*WarehouseClient)UploadAsset(ctxcontext.Context,req*visionaipb.UploadAssetRequest,opts...gax.CallOption)(*UploadAssetOperation,error)UploadAsset upload asset by specifing the asset Cloud Storage uri.For video warehouse, it requires users who call this API have read accessto the cloud storage file. Once it is uploaded, it can be retrieved byGenerateRetrievalUrl API which by default, only can retrieve cloud storagefiles from the same project of the warehouse. To allow retrieval cloudstorage files that are in a separate project, it requires to find thevision ai service account (Go to IAM, check checkbox to show “IncludeGoogle-provided role grants”, search for “Cloud Vision AI Service Agent”)and grant the read access of the cloud storage files to that serviceaccount.
Example
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*WarehouseClient) UploadAssetOperation
func(c*WarehouseClient)UploadAssetOperation(namestring)*UploadAssetOperationUploadAssetOperation 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
func(c*WarehouseClient)ViewCollectionItems(ctxcontext.Context,req*visionaipb.ViewCollectionItemsRequest,opts...gax.CallOption)*CollectionItemIteratorViewCollectionItems view items inside a collection.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ViewCollectionItemsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ViewCollectionItemsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ViewCollectionItemsRequest.}forresp,err:=rangec.ViewCollectionItems(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*WarehouseClient) ViewIndexedAssets
func(c*WarehouseClient)ViewIndexedAssets(ctxcontext.Context,req*visionaipb.ViewIndexedAssetsRequest,opts...gax.CallOption)*IndexedAssetIteratorViewIndexedAssets lists assets inside an index.
Examples
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*visionaipb.ViewIndexedAssetsResponse)}}all
packagemainimport("context"visionai"cloud.google.com/go/visionai/apiv1"visionaipb"cloud.google.com/go/visionai/apiv1/visionaipb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=visionai.NewWarehouseClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&visionaipb.ViewIndexedAssetsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ViewIndexedAssetsRequest.}forresp,err:=rangec.ViewIndexedAssets(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.