Documentation ¶
Overview ¶
Package visionai is an auto-generated package for the Vision AI API.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- 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.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.BatchRunProcessRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#BatchRunProcessRequest. } op, err := c.BatchRunProcess(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Use of Context ¶
The ctx passed to NewLiveVideoAnalyticsClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Index ¶
- func DefaultAuthScopes() []string
- type AddApplicationStreamInputOperation
- func (op *AddApplicationStreamInputOperation) Done() bool
- func (op *AddApplicationStreamInputOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *AddApplicationStreamInputOperation) Name() string
- func (op *AddApplicationStreamInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AddApplicationStreamInputResponse, error)
- func (op *AddApplicationStreamInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AddApplicationStreamInputResponse, error)
- type AnalysisIterator
- type AnalyzeAssetOperation
- func (op *AnalyzeAssetOperation) Done() bool
- func (op *AnalyzeAssetOperation) Metadata() (*visionaipb.AnalyzeAssetMetadata, error)
- func (op *AnalyzeAssetOperation) Name() string
- func (op *AnalyzeAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeAssetResponse, error)
- func (op *AnalyzeAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeAssetResponse, error)
- type AnalyzeCorpusOperation
- func (op *AnalyzeCorpusOperation) Done() bool
- func (op *AnalyzeCorpusOperation) Metadata() (*visionaipb.AnalyzeCorpusMetadata, error)
- func (op *AnalyzeCorpusOperation) Name() string
- func (op *AnalyzeCorpusOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeCorpusResponse, error)
- func (op *AnalyzeCorpusOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeCorpusResponse, error)
- type AnnotationIterator
- type AppPlatformCallOptions
- type AppPlatformClient
- func (c *AppPlatformClient) AddApplicationStreamInput(ctx context.Context, req *visionaipb.AddApplicationStreamInputRequest, ...) (*AddApplicationStreamInputOperation, error)
- func (c *AppPlatformClient) AddApplicationStreamInputOperation(name string) *AddApplicationStreamInputOperation
- func (c *AppPlatformClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *AppPlatformClient) Close() error
- func (c *AppPlatformClient) Connection() *grpc.ClientConndeprecated
- func (c *AppPlatformClient) CreateApplication(ctx context.Context, req *visionaipb.CreateApplicationRequest, ...) (*CreateApplicationOperation, error)
- func (c *AppPlatformClient) CreateApplicationInstances(ctx context.Context, req *visionaipb.CreateApplicationInstancesRequest, ...) (*CreateApplicationInstancesOperation, error)
- func (c *AppPlatformClient) CreateApplicationInstancesOperation(name string) *CreateApplicationInstancesOperation
- func (c *AppPlatformClient) CreateApplicationOperation(name string) *CreateApplicationOperation
- func (c *AppPlatformClient) CreateDraft(ctx context.Context, req *visionaipb.CreateDraftRequest, ...) (*CreateDraftOperation, error)
- func (c *AppPlatformClient) CreateDraftOperation(name string) *CreateDraftOperation
- func (c *AppPlatformClient) CreateProcessor(ctx context.Context, req *visionaipb.CreateProcessorRequest, ...) (*CreateProcessorOperation, error)
- func (c *AppPlatformClient) CreateProcessorOperation(name string) *CreateProcessorOperation
- func (c *AppPlatformClient) DeleteApplication(ctx context.Context, req *visionaipb.DeleteApplicationRequest, ...) (*DeleteApplicationOperation, error)
- func (c *AppPlatformClient) DeleteApplicationInstances(ctx context.Context, req *visionaipb.DeleteApplicationInstancesRequest, ...) (*DeleteApplicationInstancesOperation, error)
- func (c *AppPlatformClient) DeleteApplicationInstancesOperation(name string) *DeleteApplicationInstancesOperation
- func (c *AppPlatformClient) DeleteApplicationOperation(name string) *DeleteApplicationOperation
- func (c *AppPlatformClient) DeleteDraft(ctx context.Context, req *visionaipb.DeleteDraftRequest, ...) (*DeleteDraftOperation, error)
- func (c *AppPlatformClient) DeleteDraftOperation(name string) *DeleteDraftOperation
- func (c *AppPlatformClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *AppPlatformClient) DeleteProcessor(ctx context.Context, req *visionaipb.DeleteProcessorRequest, ...) (*DeleteProcessorOperation, error)
- func (c *AppPlatformClient) DeleteProcessorOperation(name string) *DeleteProcessorOperation
- func (c *AppPlatformClient) DeployApplication(ctx context.Context, req *visionaipb.DeployApplicationRequest, ...) (*DeployApplicationOperation, error)
- func (c *AppPlatformClient) DeployApplicationOperation(name string) *DeployApplicationOperation
- func (c *AppPlatformClient) GetApplication(ctx context.Context, req *visionaipb.GetApplicationRequest, ...) (*visionaipb.Application, error)
- func (c *AppPlatformClient) GetDraft(ctx context.Context, req *visionaipb.GetDraftRequest, opts ...gax.CallOption) (*visionaipb.Draft, error)
- func (c *AppPlatformClient) GetInstance(ctx context.Context, req *visionaipb.GetInstanceRequest, ...) (*visionaipb.Instance, error)
- func (c *AppPlatformClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *AppPlatformClient) GetProcessor(ctx context.Context, req *visionaipb.GetProcessorRequest, ...) (*visionaipb.Processor, error)
- func (c *AppPlatformClient) ListApplications(ctx context.Context, req *visionaipb.ListApplicationsRequest, ...) *ApplicationIterator
- func (c *AppPlatformClient) ListDrafts(ctx context.Context, req *visionaipb.ListDraftsRequest, opts ...gax.CallOption) *DraftIterator
- func (c *AppPlatformClient) ListInstances(ctx context.Context, req *visionaipb.ListInstancesRequest, ...) *InstanceIterator
- func (c *AppPlatformClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *AppPlatformClient) ListPrebuiltProcessors(ctx context.Context, req *visionaipb.ListPrebuiltProcessorsRequest, ...) (*visionaipb.ListPrebuiltProcessorsResponse, error)
- func (c *AppPlatformClient) ListProcessors(ctx context.Context, req *visionaipb.ListProcessorsRequest, ...) *ProcessorIterator
- func (c *AppPlatformClient) RemoveApplicationStreamInput(ctx context.Context, req *visionaipb.RemoveApplicationStreamInputRequest, ...) (*RemoveApplicationStreamInputOperation, error)
- func (c *AppPlatformClient) RemoveApplicationStreamInputOperation(name string) *RemoveApplicationStreamInputOperation
- func (c *AppPlatformClient) UndeployApplication(ctx context.Context, req *visionaipb.UndeployApplicationRequest, ...) (*UndeployApplicationOperation, error)
- func (c *AppPlatformClient) UndeployApplicationOperation(name string) *UndeployApplicationOperation
- func (c *AppPlatformClient) UpdateApplication(ctx context.Context, req *visionaipb.UpdateApplicationRequest, ...) (*UpdateApplicationOperation, error)
- func (c *AppPlatformClient) UpdateApplicationInstances(ctx context.Context, req *visionaipb.UpdateApplicationInstancesRequest, ...) (*UpdateApplicationInstancesOperation, error)
- func (c *AppPlatformClient) UpdateApplicationInstancesOperation(name string) *UpdateApplicationInstancesOperation
- func (c *AppPlatformClient) UpdateApplicationOperation(name string) *UpdateApplicationOperation
- func (c *AppPlatformClient) UpdateApplicationStreamInput(ctx context.Context, req *visionaipb.UpdateApplicationStreamInputRequest, ...) (*UpdateApplicationStreamInputOperation, error)
- func (c *AppPlatformClient) UpdateApplicationStreamInputOperation(name string) *UpdateApplicationStreamInputOperation
- func (c *AppPlatformClient) UpdateDraft(ctx context.Context, req *visionaipb.UpdateDraftRequest, ...) (*UpdateDraftOperation, error)
- func (c *AppPlatformClient) UpdateDraftOperation(name string) *UpdateDraftOperation
- func (c *AppPlatformClient) UpdateProcessor(ctx context.Context, req *visionaipb.UpdateProcessorRequest, ...) (*UpdateProcessorOperation, error)
- func (c *AppPlatformClient) UpdateProcessorOperation(name string) *UpdateProcessorOperation
- type ApplicationIterator
- type AssetIterator
- type BatchRunProcessOperation
- func (op *BatchRunProcessOperation) Done() bool
- func (op *BatchRunProcessOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *BatchRunProcessOperation) Name() string
- func (op *BatchRunProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.BatchRunProcessResponse, error)
- func (op *BatchRunProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.BatchRunProcessResponse, error)
- type ClusterIterator
- type CollectionItemIterator
- type CollectionIterator
- type CorpusIterator
- type CreateAnalysisOperation
- func (op *CreateAnalysisOperation) Done() bool
- func (op *CreateAnalysisOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateAnalysisOperation) Name() string
- func (op *CreateAnalysisOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, error)
- func (op *CreateAnalysisOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, error)
- type CreateApplicationInstancesOperation
- func (op *CreateApplicationInstancesOperation) Done() bool
- func (op *CreateApplicationInstancesOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateApplicationInstancesOperation) Name() string
- func (op *CreateApplicationInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.CreateApplicationInstancesResponse, error)
- func (op *CreateApplicationInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.CreateApplicationInstancesResponse, error)
- type CreateApplicationOperation
- func (op *CreateApplicationOperation) Done() bool
- func (op *CreateApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateApplicationOperation) Name() string
- func (op *CreateApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error)
- func (op *CreateApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error)
- type CreateClusterOperation
- func (op *CreateClusterOperation) Done() bool
- func (op *CreateClusterOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateClusterOperation) Name() string
- func (op *CreateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error)
- func (op *CreateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error)
- type CreateCollectionOperation
- func (op *CreateCollectionOperation) Done() bool
- func (op *CreateCollectionOperation) Metadata() (*visionaipb.CreateCollectionMetadata, error)
- func (op *CreateCollectionOperation) Name() string
- func (op *CreateCollectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Collection, error)
- func (op *CreateCollectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Collection, error)
- type CreateCorpusOperation
- func (op *CreateCorpusOperation) Done() bool
- func (op *CreateCorpusOperation) Metadata() (*visionaipb.CreateCorpusMetadata, error)
- func (op *CreateCorpusOperation) Name() string
- func (op *CreateCorpusOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Corpus, error)
- func (op *CreateCorpusOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Corpus, error)
- type CreateDraftOperation
- func (op *CreateDraftOperation) Done() bool
- func (op *CreateDraftOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateDraftOperation) Name() string
- func (op *CreateDraftOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error)
- func (op *CreateDraftOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error)
- type CreateEventOperation
- func (op *CreateEventOperation) Done() bool
- func (op *CreateEventOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateEventOperation) Name() string
- func (op *CreateEventOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error)
- func (op *CreateEventOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error)
- type CreateIndexEndpointOperation
- func (op *CreateIndexEndpointOperation) Done() bool
- func (op *CreateIndexEndpointOperation) Metadata() (*visionaipb.CreateIndexEndpointMetadata, error)
- func (op *CreateIndexEndpointOperation) Name() string
- func (op *CreateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error)
- func (op *CreateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error)
- type CreateIndexOperation
- func (op *CreateIndexOperation) Done() bool
- func (op *CreateIndexOperation) Metadata() (*visionaipb.CreateIndexMetadata, error)
- func (op *CreateIndexOperation) Name() string
- func (op *CreateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error)
- func (op *CreateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error)
- type CreateOperatorOperation
- func (op *CreateOperatorOperation) Done() bool
- func (op *CreateOperatorOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateOperatorOperation) Name() string
- func (op *CreateOperatorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error)
- func (op *CreateOperatorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error)
- type CreateProcessOperation
- func (op *CreateProcessOperation) Done() bool
- func (op *CreateProcessOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateProcessOperation) Name() string
- func (op *CreateProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error)
- func (op *CreateProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error)
- type CreateProcessorOperation
- func (op *CreateProcessorOperation) Done() bool
- func (op *CreateProcessorOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateProcessorOperation) Name() string
- func (op *CreateProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error)
- func (op *CreateProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error)
- type CreateSeriesOperation
- func (op *CreateSeriesOperation) Done() bool
- func (op *CreateSeriesOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateSeriesOperation) Name() string
- func (op *CreateSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error)
- func (op *CreateSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error)
- type CreateStreamOperation
- func (op *CreateStreamOperation) Done() bool
- func (op *CreateStreamOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *CreateStreamOperation) Name() string
- func (op *CreateStreamOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error)
- func (op *CreateStreamOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error)
- type DataSchemaIterator
- type DeleteAnalysisOperation
- func (op *DeleteAnalysisOperation) Done() bool
- func (op *DeleteAnalysisOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteAnalysisOperation) Name() string
- func (op *DeleteAnalysisOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteAnalysisOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteApplicationInstancesOperation
- func (op *DeleteApplicationInstancesOperation) Done() bool
- func (op *DeleteApplicationInstancesOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteApplicationInstancesOperation) Name() string
- func (op *DeleteApplicationInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Instance, error)
- func (op *DeleteApplicationInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Instance, error)
- type DeleteApplicationOperation
- func (op *DeleteApplicationOperation) Done() bool
- func (op *DeleteApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteApplicationOperation) Name() string
- func (op *DeleteApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteAssetOperation
- func (op *DeleteAssetOperation) Done() bool
- func (op *DeleteAssetOperation) Metadata() (*visionaipb.DeleteAssetMetadata, error)
- func (op *DeleteAssetOperation) Name() string
- func (op *DeleteAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteClusterOperation
- func (op *DeleteClusterOperation) Done() bool
- func (op *DeleteClusterOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteClusterOperation) Name() string
- func (op *DeleteClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteCollectionOperation
- func (op *DeleteCollectionOperation) Done() bool
- func (op *DeleteCollectionOperation) Metadata() (*visionaipb.DeleteCollectionMetadata, error)
- func (op *DeleteCollectionOperation) Name() string
- func (op *DeleteCollectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteCollectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteDraftOperation
- func (op *DeleteDraftOperation) Done() bool
- func (op *DeleteDraftOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteDraftOperation) Name() string
- func (op *DeleteDraftOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteDraftOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteEventOperation
- func (op *DeleteEventOperation) Done() bool
- func (op *DeleteEventOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteEventOperation) Name() string
- func (op *DeleteEventOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteEventOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteIndexEndpointOperation
- func (op *DeleteIndexEndpointOperation) Done() bool
- func (op *DeleteIndexEndpointOperation) Metadata() (*visionaipb.DeleteIndexEndpointMetadata, error)
- func (op *DeleteIndexEndpointOperation) Name() string
- func (op *DeleteIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteIndexOperation
- func (op *DeleteIndexOperation) Done() bool
- func (op *DeleteIndexOperation) Metadata() (*visionaipb.DeleteIndexMetadata, error)
- func (op *DeleteIndexOperation) Name() string
- func (op *DeleteIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteOperatorOperation
- func (op *DeleteOperatorOperation) Done() bool
- func (op *DeleteOperatorOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteOperatorOperation) Name() string
- func (op *DeleteOperatorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteOperatorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteProcessOperation
- func (op *DeleteProcessOperation) Done() bool
- func (op *DeleteProcessOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteProcessOperation) Name() string
- func (op *DeleteProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteProcessorOperation
- func (op *DeleteProcessorOperation) Done() bool
- func (op *DeleteProcessorOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteProcessorOperation) Name() string
- func (op *DeleteProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteSeriesOperation
- func (op *DeleteSeriesOperation) Done() bool
- func (op *DeleteSeriesOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteSeriesOperation) Name() string
- func (op *DeleteSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteStreamOperation
- func (op *DeleteStreamOperation) Done() bool
- func (op *DeleteStreamOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeleteStreamOperation) Name() string
- func (op *DeleteStreamOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteStreamOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeployApplicationOperation
- func (op *DeployApplicationOperation) Done() bool
- func (op *DeployApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *DeployApplicationOperation) Name() string
- func (op *DeployApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.DeployApplicationResponse, error)
- func (op *DeployApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.DeployApplicationResponse, error)
- type DeployIndexOperation
- func (op *DeployIndexOperation) Done() bool
- func (op *DeployIndexOperation) Metadata() (*visionaipb.DeployIndexMetadata, error)
- func (op *DeployIndexOperation) Name() string
- func (op *DeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.DeployIndexResponse, error)
- func (op *DeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.DeployIndexResponse, error)
- type DraftIterator
- type EventIterator
- type GetStreamThumbnailOperation
- func (op *GetStreamThumbnailOperation) Done() bool
- func (op *GetStreamThumbnailOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *GetStreamThumbnailOperation) Name() string
- func (op *GetStreamThumbnailOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.GetStreamThumbnailResponse, error)
- func (op *GetStreamThumbnailOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.GetStreamThumbnailResponse, error)
- type HealthCheckCallOptions
- type HealthCheckClient
- func (c *HealthCheckClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *HealthCheckClient) Close() error
- func (c *HealthCheckClient) Connection() *grpc.ClientConndeprecated
- func (c *HealthCheckClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *HealthCheckClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *HealthCheckClient) HealthCheck(ctx context.Context, req *visionaipb.HealthCheckRequest, ...) (*visionaipb.HealthCheckResponse, error)
- func (c *HealthCheckClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- type ImportAssetsOperation
- func (op *ImportAssetsOperation) Done() bool
- func (op *ImportAssetsOperation) Metadata() (*visionaipb.ImportAssetsMetadata, error)
- func (op *ImportAssetsOperation) Name() string
- func (op *ImportAssetsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.ImportAssetsResponse, error)
- func (op *ImportAssetsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.ImportAssetsResponse, error)
- type IndexAssetOperation
- func (op *IndexAssetOperation) Done() bool
- func (op *IndexAssetOperation) Metadata() (*visionaipb.IndexAssetMetadata, error)
- func (op *IndexAssetOperation) Name() string
- func (op *IndexAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexAssetResponse, error)
- func (op *IndexAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexAssetResponse, error)
- type IndexEndpointIterator
- type IndexIterator
- type IndexedAssetIterator
- type InstanceIterator
- type LiveVideoAnalyticsCallOptions
- type LiveVideoAnalyticsClient
- func (c *LiveVideoAnalyticsClient) BatchRunProcess(ctx context.Context, req *visionaipb.BatchRunProcessRequest, ...) (*BatchRunProcessOperation, error)
- func (c *LiveVideoAnalyticsClient) BatchRunProcessOperation(name string) *BatchRunProcessOperation
- func (c *LiveVideoAnalyticsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *LiveVideoAnalyticsClient) Close() error
- func (c *LiveVideoAnalyticsClient) Connection() *grpc.ClientConndeprecated
- func (c *LiveVideoAnalyticsClient) CreateAnalysis(ctx context.Context, req *visionaipb.CreateAnalysisRequest, ...) (*CreateAnalysisOperation, error)
- func (c *LiveVideoAnalyticsClient) CreateAnalysisOperation(name string) *CreateAnalysisOperation
- func (c *LiveVideoAnalyticsClient) CreateOperator(ctx context.Context, req *visionaipb.CreateOperatorRequest, ...) (*CreateOperatorOperation, error)
- func (c *LiveVideoAnalyticsClient) CreateOperatorOperation(name string) *CreateOperatorOperation
- func (c *LiveVideoAnalyticsClient) CreateProcess(ctx context.Context, req *visionaipb.CreateProcessRequest, ...) (*CreateProcessOperation, error)
- func (c *LiveVideoAnalyticsClient) CreateProcessOperation(name string) *CreateProcessOperation
- func (c *LiveVideoAnalyticsClient) DeleteAnalysis(ctx context.Context, req *visionaipb.DeleteAnalysisRequest, ...) (*DeleteAnalysisOperation, error)
- func (c *LiveVideoAnalyticsClient) DeleteAnalysisOperation(name string) *DeleteAnalysisOperation
- func (c *LiveVideoAnalyticsClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *LiveVideoAnalyticsClient) DeleteOperator(ctx context.Context, req *visionaipb.DeleteOperatorRequest, ...) (*DeleteOperatorOperation, error)
- func (c *LiveVideoAnalyticsClient) DeleteOperatorOperation(name string) *DeleteOperatorOperation
- func (c *LiveVideoAnalyticsClient) DeleteProcess(ctx context.Context, req *visionaipb.DeleteProcessRequest, ...) (*DeleteProcessOperation, error)
- func (c *LiveVideoAnalyticsClient) DeleteProcessOperation(name string) *DeleteProcessOperation
- func (c *LiveVideoAnalyticsClient) GetAnalysis(ctx context.Context, req *visionaipb.GetAnalysisRequest, ...) (*visionaipb.Analysis, error)
- func (c *LiveVideoAnalyticsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *LiveVideoAnalyticsClient) GetOperator(ctx context.Context, req *visionaipb.GetOperatorRequest, ...) (*visionaipb.Operator, error)
- func (c *LiveVideoAnalyticsClient) GetProcess(ctx context.Context, req *visionaipb.GetProcessRequest, opts ...gax.CallOption) (*visionaipb.Process, error)
- func (c *LiveVideoAnalyticsClient) ListAnalyses(ctx context.Context, req *visionaipb.ListAnalysesRequest, ...) *AnalysisIterator
- func (c *LiveVideoAnalyticsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *LiveVideoAnalyticsClient) ListOperators(ctx context.Context, req *visionaipb.ListOperatorsRequest, ...) *OperatorIterator
- func (c *LiveVideoAnalyticsClient) ListProcesses(ctx context.Context, req *visionaipb.ListProcessesRequest, ...) *ProcessIterator
- func (c *LiveVideoAnalyticsClient) ListPublicOperators(ctx context.Context, req *visionaipb.ListPublicOperatorsRequest, ...) *OperatorIterator
- func (c *LiveVideoAnalyticsClient) ResolveOperatorInfo(ctx context.Context, req *visionaipb.ResolveOperatorInfoRequest, ...) (*visionaipb.ResolveOperatorInfoResponse, error)
- func (c *LiveVideoAnalyticsClient) UpdateAnalysis(ctx context.Context, req *visionaipb.UpdateAnalysisRequest, ...) (*UpdateAnalysisOperation, error)
- func (c *LiveVideoAnalyticsClient) UpdateAnalysisOperation(name string) *UpdateAnalysisOperation
- func (c *LiveVideoAnalyticsClient) UpdateOperator(ctx context.Context, req *visionaipb.UpdateOperatorRequest, ...) (*UpdateOperatorOperation, error)
- func (c *LiveVideoAnalyticsClient) UpdateOperatorOperation(name string) *UpdateOperatorOperation
- func (c *LiveVideoAnalyticsClient) UpdateProcess(ctx context.Context, req *visionaipb.UpdateProcessRequest, ...) (*UpdateProcessOperation, error)
- func (c *LiveVideoAnalyticsClient) UpdateProcessOperation(name string) *UpdateProcessOperation
- type MaterializeChannelOperation
- func (op *MaterializeChannelOperation) Done() bool
- func (op *MaterializeChannelOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *MaterializeChannelOperation) Name() string
- func (op *MaterializeChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Channel, error)
- func (op *MaterializeChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Channel, error)
- type OperationIterator
- type OperatorIterator
- type ProcessIterator
- type ProcessorIterator
- type RemoveApplicationStreamInputOperation
- func (op *RemoveApplicationStreamInputOperation) Done() bool
- func (op *RemoveApplicationStreamInputOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *RemoveApplicationStreamInputOperation) Name() string
- func (op *RemoveApplicationStreamInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.RemoveApplicationStreamInputResponse, error)
- func (op *RemoveApplicationStreamInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.RemoveApplicationStreamInputResponse, error)
- type RemoveIndexAssetOperation
- func (op *RemoveIndexAssetOperation) Done() bool
- func (op *RemoveIndexAssetOperation) Metadata() (*visionaipb.RemoveIndexAssetMetadata, error)
- func (op *RemoveIndexAssetOperation) Name() string
- func (op *RemoveIndexAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.RemoveIndexAssetResponse, error)
- func (op *RemoveIndexAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.RemoveIndexAssetResponse, error)
- type SearchConfigIterator
- type SearchHypernymIterator
- type SearchResultItemIterator
- type SeriesIterator
- type StreamIterator
- type StreamingCallOptions
- type StreamingClient
- func (c *StreamingClient) AcquireLease(ctx context.Context, req *visionaipb.AcquireLeaseRequest, ...) (*visionaipb.Lease, error)
- func (c *StreamingClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *StreamingClient) Close() error
- func (c *StreamingClient) Connection() *grpc.ClientConndeprecated
- func (c *StreamingClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *StreamingClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *StreamingClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *StreamingClient) ReceiveEvents(ctx context.Context, opts ...gax.CallOption) (visionaipb.StreamingService_ReceiveEventsClient, error)
- func (c *StreamingClient) ReceivePackets(ctx context.Context, opts ...gax.CallOption) (visionaipb.StreamingService_ReceivePacketsClient, error)
- func (c *StreamingClient) ReleaseLease(ctx context.Context, req *visionaipb.ReleaseLeaseRequest, ...) (*visionaipb.ReleaseLeaseResponse, error)
- func (c *StreamingClient) RenewLease(ctx context.Context, req *visionaipb.RenewLeaseRequest, opts ...gax.CallOption) (*visionaipb.Lease, error)
- func (c *StreamingClient) SendPackets(ctx context.Context, opts ...gax.CallOption) (visionaipb.StreamingService_SendPacketsClient, error)
- type StreamsCallOptions
- type StreamsClient
- func (c *StreamsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *StreamsClient) Close() error
- func (c *StreamsClient) Connection() *grpc.ClientConndeprecated
- func (c *StreamsClient) CreateCluster(ctx context.Context, req *visionaipb.CreateClusterRequest, ...) (*CreateClusterOperation, error)
- func (c *StreamsClient) CreateClusterOperation(name string) *CreateClusterOperation
- func (c *StreamsClient) CreateEvent(ctx context.Context, req *visionaipb.CreateEventRequest, ...) (*CreateEventOperation, error)
- func (c *StreamsClient) CreateEventOperation(name string) *CreateEventOperation
- func (c *StreamsClient) CreateSeries(ctx context.Context, req *visionaipb.CreateSeriesRequest, ...) (*CreateSeriesOperation, error)
- func (c *StreamsClient) CreateSeriesOperation(name string) *CreateSeriesOperation
- func (c *StreamsClient) CreateStream(ctx context.Context, req *visionaipb.CreateStreamRequest, ...) (*CreateStreamOperation, error)
- func (c *StreamsClient) CreateStreamOperation(name string) *CreateStreamOperation
- func (c *StreamsClient) DeleteCluster(ctx context.Context, req *visionaipb.DeleteClusterRequest, ...) (*DeleteClusterOperation, error)
- func (c *StreamsClient) DeleteClusterOperation(name string) *DeleteClusterOperation
- func (c *StreamsClient) DeleteEvent(ctx context.Context, req *visionaipb.DeleteEventRequest, ...) (*DeleteEventOperation, error)
- func (c *StreamsClient) DeleteEventOperation(name string) *DeleteEventOperation
- func (c *StreamsClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *StreamsClient) DeleteSeries(ctx context.Context, req *visionaipb.DeleteSeriesRequest, ...) (*DeleteSeriesOperation, error)
- func (c *StreamsClient) DeleteSeriesOperation(name string) *DeleteSeriesOperation
- func (c *StreamsClient) DeleteStream(ctx context.Context, req *visionaipb.DeleteStreamRequest, ...) (*DeleteStreamOperation, error)
- func (c *StreamsClient) DeleteStreamOperation(name string) *DeleteStreamOperation
- func (c *StreamsClient) GenerateStreamHlsToken(ctx context.Context, req *visionaipb.GenerateStreamHlsTokenRequest, ...) (*visionaipb.GenerateStreamHlsTokenResponse, error)
- func (c *StreamsClient) GetCluster(ctx context.Context, req *visionaipb.GetClusterRequest, opts ...gax.CallOption) (*visionaipb.Cluster, error)
- func (c *StreamsClient) GetEvent(ctx context.Context, req *visionaipb.GetEventRequest, opts ...gax.CallOption) (*visionaipb.Event, error)
- func (c *StreamsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *StreamsClient) GetSeries(ctx context.Context, req *visionaipb.GetSeriesRequest, opts ...gax.CallOption) (*visionaipb.Series, error)
- func (c *StreamsClient) GetStream(ctx context.Context, req *visionaipb.GetStreamRequest, opts ...gax.CallOption) (*visionaipb.Stream, error)
- func (c *StreamsClient) GetStreamThumbnail(ctx context.Context, req *visionaipb.GetStreamThumbnailRequest, ...) (*GetStreamThumbnailOperation, error)
- func (c *StreamsClient) GetStreamThumbnailOperation(name string) *GetStreamThumbnailOperation
- func (c *StreamsClient) ListClusters(ctx context.Context, req *visionaipb.ListClustersRequest, ...) *ClusterIterator
- func (c *StreamsClient) ListEvents(ctx context.Context, req *visionaipb.ListEventsRequest, opts ...gax.CallOption) *EventIterator
- func (c *StreamsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *StreamsClient) ListSeries(ctx context.Context, req *visionaipb.ListSeriesRequest, opts ...gax.CallOption) *SeriesIterator
- func (c *StreamsClient) ListStreams(ctx context.Context, req *visionaipb.ListStreamsRequest, ...) *StreamIterator
- func (c *StreamsClient) MaterializeChannel(ctx context.Context, req *visionaipb.MaterializeChannelRequest, ...) (*MaterializeChannelOperation, error)
- func (c *StreamsClient) MaterializeChannelOperation(name string) *MaterializeChannelOperation
- func (c *StreamsClient) UpdateCluster(ctx context.Context, req *visionaipb.UpdateClusterRequest, ...) (*UpdateClusterOperation, error)
- func (c *StreamsClient) UpdateClusterOperation(name string) *UpdateClusterOperation
- func (c *StreamsClient) UpdateEvent(ctx context.Context, req *visionaipb.UpdateEventRequest, ...) (*UpdateEventOperation, error)
- func (c *StreamsClient) UpdateEventOperation(name string) *UpdateEventOperation
- func (c *StreamsClient) UpdateSeries(ctx context.Context, req *visionaipb.UpdateSeriesRequest, ...) (*UpdateSeriesOperation, error)
- func (c *StreamsClient) UpdateSeriesOperation(name string) *UpdateSeriesOperation
- func (c *StreamsClient) UpdateStream(ctx context.Context, req *visionaipb.UpdateStreamRequest, ...) (*UpdateStreamOperation, error)
- func (c *StreamsClient) UpdateStreamOperation(name string) *UpdateStreamOperation
- type UndeployApplicationOperation
- func (op *UndeployApplicationOperation) Done() bool
- func (op *UndeployApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UndeployApplicationOperation) Name() string
- func (op *UndeployApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UndeployApplicationResponse, error)
- func (op *UndeployApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UndeployApplicationResponse, error)
- type UndeployIndexOperation
- func (op *UndeployIndexOperation) Done() bool
- func (op *UndeployIndexOperation) Metadata() (*visionaipb.UndeployIndexMetadata, error)
- func (op *UndeployIndexOperation) Name() string
- func (op *UndeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UndeployIndexResponse, error)
- func (op *UndeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UndeployIndexResponse, error)
- type UpdateAnalysisOperation
- func (op *UpdateAnalysisOperation) Done() bool
- func (op *UpdateAnalysisOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateAnalysisOperation) Name() string
- func (op *UpdateAnalysisOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, error)
- func (op *UpdateAnalysisOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, error)
- type UpdateApplicationInstancesOperation
- func (op *UpdateApplicationInstancesOperation) Done() bool
- func (op *UpdateApplicationInstancesOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateApplicationInstancesOperation) Name() string
- func (op *UpdateApplicationInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UpdateApplicationInstancesResponse, error)
- func (op *UpdateApplicationInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UpdateApplicationInstancesResponse, error)
- type UpdateApplicationOperation
- func (op *UpdateApplicationOperation) Done() bool
- func (op *UpdateApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateApplicationOperation) Name() string
- func (op *UpdateApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error)
- func (op *UpdateApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error)
- type UpdateApplicationStreamInputOperation
- func (op *UpdateApplicationStreamInputOperation) Done() bool
- func (op *UpdateApplicationStreamInputOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateApplicationStreamInputOperation) Name() string
- func (op *UpdateApplicationStreamInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UpdateApplicationStreamInputResponse, error)
- func (op *UpdateApplicationStreamInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UpdateApplicationStreamInputResponse, error)
- type UpdateClusterOperation
- func (op *UpdateClusterOperation) Done() bool
- func (op *UpdateClusterOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateClusterOperation) Name() string
- func (op *UpdateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error)
- func (op *UpdateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error)
- type UpdateDraftOperation
- func (op *UpdateDraftOperation) Done() bool
- func (op *UpdateDraftOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateDraftOperation) Name() string
- func (op *UpdateDraftOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error)
- func (op *UpdateDraftOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error)
- type UpdateEventOperation
- func (op *UpdateEventOperation) Done() bool
- func (op *UpdateEventOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateEventOperation) Name() string
- func (op *UpdateEventOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error)
- func (op *UpdateEventOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error)
- type UpdateIndexEndpointOperation
- func (op *UpdateIndexEndpointOperation) Done() bool
- func (op *UpdateIndexEndpointOperation) Metadata() (*visionaipb.UpdateIndexEndpointMetadata, error)
- func (op *UpdateIndexEndpointOperation) Name() string
- func (op *UpdateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error)
- func (op *UpdateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error)
- type UpdateIndexOperation
- func (op *UpdateIndexOperation) Done() bool
- func (op *UpdateIndexOperation) Metadata() (*visionaipb.UpdateIndexMetadata, error)
- func (op *UpdateIndexOperation) Name() string
- func (op *UpdateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error)
- func (op *UpdateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error)
- type UpdateOperatorOperation
- func (op *UpdateOperatorOperation) Done() bool
- func (op *UpdateOperatorOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateOperatorOperation) Name() string
- func (op *UpdateOperatorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error)
- func (op *UpdateOperatorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error)
- type UpdateProcessOperation
- func (op *UpdateProcessOperation) Done() bool
- func (op *UpdateProcessOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateProcessOperation) Name() string
- func (op *UpdateProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error)
- func (op *UpdateProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error)
- type UpdateProcessorOperation
- func (op *UpdateProcessorOperation) Done() bool
- func (op *UpdateProcessorOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateProcessorOperation) Name() string
- func (op *UpdateProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error)
- func (op *UpdateProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error)
- type UpdateSeriesOperation
- func (op *UpdateSeriesOperation) Done() bool
- func (op *UpdateSeriesOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateSeriesOperation) Name() string
- func (op *UpdateSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error)
- func (op *UpdateSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error)
- type UpdateStreamOperation
- func (op *UpdateStreamOperation) Done() bool
- func (op *UpdateStreamOperation) Metadata() (*visionaipb.OperationMetadata, error)
- func (op *UpdateStreamOperation) Name() string
- func (op *UpdateStreamOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error)
- func (op *UpdateStreamOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error)
- type UploadAssetOperation
- func (op *UploadAssetOperation) Done() bool
- func (op *UploadAssetOperation) Metadata() (*visionaipb.UploadAssetMetadata, error)
- func (op *UploadAssetOperation) Name() string
- func (op *UploadAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UploadAssetResponse, error)
- func (op *UploadAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UploadAssetResponse, error)
- type WarehouseCallOptions
- type WarehouseClient
- func (c *WarehouseClient) AddCollectionItem(ctx context.Context, req *visionaipb.AddCollectionItemRequest, ...) (*visionaipb.AddCollectionItemResponse, error)
- func (c *WarehouseClient) AnalyzeAsset(ctx context.Context, req *visionaipb.AnalyzeAssetRequest, ...) (*AnalyzeAssetOperation, error)
- func (c *WarehouseClient) AnalyzeAssetOperation(name string) *AnalyzeAssetOperation
- func (c *WarehouseClient) AnalyzeCorpus(ctx context.Context, req *visionaipb.AnalyzeCorpusRequest, ...) (*AnalyzeCorpusOperation, error)
- func (c *WarehouseClient) AnalyzeCorpusOperation(name string) *AnalyzeCorpusOperation
- func (c *WarehouseClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *WarehouseClient) ClipAsset(ctx context.Context, req *visionaipb.ClipAssetRequest, opts ...gax.CallOption) (*visionaipb.ClipAssetResponse, error)
- func (c *WarehouseClient) Close() error
- func (c *WarehouseClient) Connection() *grpc.ClientConndeprecated
- func (c *WarehouseClient) CreateAnnotation(ctx context.Context, req *visionaipb.CreateAnnotationRequest, ...) (*visionaipb.Annotation, error)
- func (c *WarehouseClient) CreateAsset(ctx context.Context, req *visionaipb.CreateAssetRequest, ...) (*visionaipb.Asset, error)
- func (c *WarehouseClient) CreateCollection(ctx context.Context, req *visionaipb.CreateCollectionRequest, ...) (*CreateCollectionOperation, error)
- func (c *WarehouseClient) CreateCollectionOperation(name string) *CreateCollectionOperation
- func (c *WarehouseClient) CreateCorpus(ctx context.Context, req *visionaipb.CreateCorpusRequest, ...) (*CreateCorpusOperation, error)
- func (c *WarehouseClient) CreateCorpusOperation(name string) *CreateCorpusOperation
- func (c *WarehouseClient) CreateDataSchema(ctx context.Context, req *visionaipb.CreateDataSchemaRequest, ...) (*visionaipb.DataSchema, error)
- func (c *WarehouseClient) CreateIndex(ctx context.Context, req *visionaipb.CreateIndexRequest, ...) (*CreateIndexOperation, error)
- func (c *WarehouseClient) CreateIndexEndpoint(ctx context.Context, req *visionaipb.CreateIndexEndpointRequest, ...) (*CreateIndexEndpointOperation, error)
- func (c *WarehouseClient) CreateIndexEndpointOperation(name string) *CreateIndexEndpointOperation
- func (c *WarehouseClient) CreateIndexOperation(name string) *CreateIndexOperation
- func (c *WarehouseClient) CreateSearchConfig(ctx context.Context, req *visionaipb.CreateSearchConfigRequest, ...) (*visionaipb.SearchConfig, error)
- func (c *WarehouseClient) CreateSearchHypernym(ctx context.Context, req *visionaipb.CreateSearchHypernymRequest, ...) (*visionaipb.SearchHypernym, error)
- func (c *WarehouseClient) DeleteAnnotation(ctx context.Context, req *visionaipb.DeleteAnnotationRequest, ...) error
- func (c *WarehouseClient) DeleteAsset(ctx context.Context, req *visionaipb.DeleteAssetRequest, ...) (*DeleteAssetOperation, error)
- func (c *WarehouseClient) DeleteAssetOperation(name string) *DeleteAssetOperation
- func (c *WarehouseClient) DeleteCollection(ctx context.Context, req *visionaipb.DeleteCollectionRequest, ...) (*DeleteCollectionOperation, error)
- func (c *WarehouseClient) DeleteCollectionOperation(name string) *DeleteCollectionOperation
- func (c *WarehouseClient) DeleteCorpus(ctx context.Context, req *visionaipb.DeleteCorpusRequest, ...) error
- func (c *WarehouseClient) DeleteDataSchema(ctx context.Context, req *visionaipb.DeleteDataSchemaRequest, ...) error
- func (c *WarehouseClient) DeleteIndex(ctx context.Context, req *visionaipb.DeleteIndexRequest, ...) (*DeleteIndexOperation, error)
- func (c *WarehouseClient) DeleteIndexEndpoint(ctx context.Context, req *visionaipb.DeleteIndexEndpointRequest, ...) (*DeleteIndexEndpointOperation, error)
- func (c *WarehouseClient) DeleteIndexEndpointOperation(name string) *DeleteIndexEndpointOperation
- func (c *WarehouseClient) DeleteIndexOperation(name string) *DeleteIndexOperation
- func (c *WarehouseClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *WarehouseClient) DeleteSearchConfig(ctx context.Context, req *visionaipb.DeleteSearchConfigRequest, ...) error
- func (c *WarehouseClient) DeleteSearchHypernym(ctx context.Context, req *visionaipb.DeleteSearchHypernymRequest, ...) error
- func (c *WarehouseClient) DeployIndex(ctx context.Context, req *visionaipb.DeployIndexRequest, ...) (*DeployIndexOperation, error)
- func (c *WarehouseClient) DeployIndexOperation(name string) *DeployIndexOperation
- func (c *WarehouseClient) GenerateHlsUri(ctx context.Context, req *visionaipb.GenerateHlsUriRequest, ...) (*visionaipb.GenerateHlsUriResponse, error)
- func (c *WarehouseClient) GenerateRetrievalUrl(ctx context.Context, req *visionaipb.GenerateRetrievalUrlRequest, ...) (*visionaipb.GenerateRetrievalUrlResponse, error)
- func (c *WarehouseClient) GetAnnotation(ctx context.Context, req *visionaipb.GetAnnotationRequest, ...) (*visionaipb.Annotation, error)
- func (c *WarehouseClient) GetAsset(ctx context.Context, req *visionaipb.GetAssetRequest, opts ...gax.CallOption) (*visionaipb.Asset, error)
- func (c *WarehouseClient) GetCollection(ctx context.Context, req *visionaipb.GetCollectionRequest, ...) (*visionaipb.Collection, error)
- func (c *WarehouseClient) GetCorpus(ctx context.Context, req *visionaipb.GetCorpusRequest, opts ...gax.CallOption) (*visionaipb.Corpus, error)
- func (c *WarehouseClient) GetDataSchema(ctx context.Context, req *visionaipb.GetDataSchemaRequest, ...) (*visionaipb.DataSchema, error)
- func (c *WarehouseClient) GetIndex(ctx context.Context, req *visionaipb.GetIndexRequest, opts ...gax.CallOption) (*visionaipb.Index, error)
- func (c *WarehouseClient) GetIndexEndpoint(ctx context.Context, req *visionaipb.GetIndexEndpointRequest, ...) (*visionaipb.IndexEndpoint, error)
- func (c *WarehouseClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *WarehouseClient) GetSearchConfig(ctx context.Context, req *visionaipb.GetSearchConfigRequest, ...) (*visionaipb.SearchConfig, error)
- func (c *WarehouseClient) GetSearchHypernym(ctx context.Context, req *visionaipb.GetSearchHypernymRequest, ...) (*visionaipb.SearchHypernym, error)
- func (c *WarehouseClient) ImportAssets(ctx context.Context, req *visionaipb.ImportAssetsRequest, ...) (*ImportAssetsOperation, error)
- func (c *WarehouseClient) ImportAssetsOperation(name string) *ImportAssetsOperation
- func (c *WarehouseClient) IndexAsset(ctx context.Context, req *visionaipb.IndexAssetRequest, opts ...gax.CallOption) (*IndexAssetOperation, error)
- func (c *WarehouseClient) IndexAssetOperation(name string) *IndexAssetOperation
- func (c *WarehouseClient) IngestAsset(ctx context.Context, opts ...gax.CallOption) (visionaipb.Warehouse_IngestAssetClient, error)
- func (c *WarehouseClient) ListAnnotations(ctx context.Context, req *visionaipb.ListAnnotationsRequest, ...) *AnnotationIterator
- func (c *WarehouseClient) ListAssets(ctx context.Context, req *visionaipb.ListAssetsRequest, opts ...gax.CallOption) *AssetIterator
- func (c *WarehouseClient) ListCollections(ctx context.Context, req *visionaipb.ListCollectionsRequest, ...) *CollectionIterator
- func (c *WarehouseClient) ListCorpora(ctx context.Context, req *visionaipb.ListCorporaRequest, ...) *CorpusIterator
- func (c *WarehouseClient) ListDataSchemas(ctx context.Context, req *visionaipb.ListDataSchemasRequest, ...) *DataSchemaIterator
- func (c *WarehouseClient) ListIndexEndpoints(ctx context.Context, req *visionaipb.ListIndexEndpointsRequest, ...) *IndexEndpointIterator
- func (c *WarehouseClient) ListIndexes(ctx context.Context, req *visionaipb.ListIndexesRequest, ...) *IndexIterator
- func (c *WarehouseClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *WarehouseClient) ListSearchConfigs(ctx context.Context, req *visionaipb.ListSearchConfigsRequest, ...) *SearchConfigIterator
- func (c *WarehouseClient) ListSearchHypernyms(ctx context.Context, req *visionaipb.ListSearchHypernymsRequest, ...) *SearchHypernymIterator
- func (c *WarehouseClient) RemoveCollectionItem(ctx context.Context, req *visionaipb.RemoveCollectionItemRequest, ...) (*visionaipb.RemoveCollectionItemResponse, error)
- func (c *WarehouseClient) RemoveIndexAsset(ctx context.Context, req *visionaipb.RemoveIndexAssetRequest, ...) (*RemoveIndexAssetOperation, error)
- func (c *WarehouseClient) RemoveIndexAssetOperation(name string) *RemoveIndexAssetOperation
- func (c *WarehouseClient) SearchAssets(ctx context.Context, req *visionaipb.SearchAssetsRequest, ...) *SearchResultItemIterator
- func (c *WarehouseClient) SearchIndexEndpoint(ctx context.Context, req *visionaipb.SearchIndexEndpointRequest, ...) *SearchResultItemIterator
- func (c *WarehouseClient) UndeployIndex(ctx context.Context, req *visionaipb.UndeployIndexRequest, ...) (*UndeployIndexOperation, error)
- func (c *WarehouseClient) UndeployIndexOperation(name string) *UndeployIndexOperation
- func (c *WarehouseClient) UpdateAnnotation(ctx context.Context, req *visionaipb.UpdateAnnotationRequest, ...) (*visionaipb.Annotation, error)
- func (c *WarehouseClient) UpdateAsset(ctx context.Context, req *visionaipb.UpdateAssetRequest, ...) (*visionaipb.Asset, error)
- func (c *WarehouseClient) UpdateCollection(ctx context.Context, req *visionaipb.UpdateCollectionRequest, ...) (*visionaipb.Collection, error)
- func (c *WarehouseClient) UpdateCorpus(ctx context.Context, req *visionaipb.UpdateCorpusRequest, ...) (*visionaipb.Corpus, error)
- func (c *WarehouseClient) UpdateDataSchema(ctx context.Context, req *visionaipb.UpdateDataSchemaRequest, ...) (*visionaipb.DataSchema, error)
- func (c *WarehouseClient) UpdateIndex(ctx context.Context, req *visionaipb.UpdateIndexRequest, ...) (*UpdateIndexOperation, error)
- func (c *WarehouseClient) UpdateIndexEndpoint(ctx context.Context, req *visionaipb.UpdateIndexEndpointRequest, ...) (*UpdateIndexEndpointOperation, error)
- func (c *WarehouseClient) UpdateIndexEndpointOperation(name string) *UpdateIndexEndpointOperation
- func (c *WarehouseClient) UpdateIndexOperation(name string) *UpdateIndexOperation
- func (c *WarehouseClient) UpdateSearchConfig(ctx context.Context, req *visionaipb.UpdateSearchConfigRequest, ...) (*visionaipb.SearchConfig, error)
- func (c *WarehouseClient) UpdateSearchHypernym(ctx context.Context, req *visionaipb.UpdateSearchHypernymRequest, ...) (*visionaipb.SearchHypernym, error)
- func (c *WarehouseClient) UploadAsset(ctx context.Context, req *visionaipb.UploadAssetRequest, ...) (*UploadAssetOperation, error)
- func (c *WarehouseClient) UploadAssetOperation(name string) *UploadAssetOperation
- func (c *WarehouseClient) ViewCollectionItems(ctx context.Context, req *visionaipb.ViewCollectionItemsRequest, ...) *CollectionItemIterator
- func (c *WarehouseClient) ViewIndexedAssets(ctx context.Context, req *visionaipb.ViewIndexedAssetsRequest, ...) *IndexedAssetIterator
Examples ¶
- AppPlatformClient.AddApplicationStreamInput
- AppPlatformClient.CancelOperation
- AppPlatformClient.CreateApplication
- AppPlatformClient.CreateApplicationInstances
- AppPlatformClient.CreateDraft
- AppPlatformClient.CreateProcessor
- AppPlatformClient.DeleteApplication
- AppPlatformClient.DeleteApplicationInstances
- AppPlatformClient.DeleteDraft
- AppPlatformClient.DeleteOperation
- AppPlatformClient.DeleteProcessor
- AppPlatformClient.DeployApplication
- AppPlatformClient.GetApplication
- AppPlatformClient.GetDraft
- AppPlatformClient.GetInstance
- AppPlatformClient.GetOperation
- AppPlatformClient.GetProcessor
- AppPlatformClient.ListApplications
- AppPlatformClient.ListApplications (All)
- AppPlatformClient.ListDrafts
- AppPlatformClient.ListDrafts (All)
- AppPlatformClient.ListInstances
- AppPlatformClient.ListInstances (All)
- AppPlatformClient.ListOperations
- AppPlatformClient.ListOperations (All)
- AppPlatformClient.ListPrebuiltProcessors
- AppPlatformClient.ListProcessors
- AppPlatformClient.ListProcessors (All)
- AppPlatformClient.RemoveApplicationStreamInput
- AppPlatformClient.UndeployApplication
- AppPlatformClient.UpdateApplication
- AppPlatformClient.UpdateApplicationInstances
- AppPlatformClient.UpdateApplicationStreamInput
- AppPlatformClient.UpdateDraft
- AppPlatformClient.UpdateProcessor
- HealthCheckClient.CancelOperation
- HealthCheckClient.DeleteOperation
- HealthCheckClient.GetOperation
- HealthCheckClient.HealthCheck
- HealthCheckClient.ListOperations
- HealthCheckClient.ListOperations (All)
- LiveVideoAnalyticsClient.BatchRunProcess
- LiveVideoAnalyticsClient.CancelOperation
- LiveVideoAnalyticsClient.CreateAnalysis
- LiveVideoAnalyticsClient.CreateOperator
- LiveVideoAnalyticsClient.CreateProcess
- LiveVideoAnalyticsClient.DeleteAnalysis
- LiveVideoAnalyticsClient.DeleteOperation
- LiveVideoAnalyticsClient.DeleteOperator
- LiveVideoAnalyticsClient.DeleteProcess
- LiveVideoAnalyticsClient.GetAnalysis
- LiveVideoAnalyticsClient.GetOperation
- LiveVideoAnalyticsClient.GetOperator
- LiveVideoAnalyticsClient.GetProcess
- LiveVideoAnalyticsClient.ListAnalyses
- LiveVideoAnalyticsClient.ListAnalyses (All)
- LiveVideoAnalyticsClient.ListOperations
- LiveVideoAnalyticsClient.ListOperations (All)
- LiveVideoAnalyticsClient.ListOperators
- LiveVideoAnalyticsClient.ListOperators (All)
- LiveVideoAnalyticsClient.ListProcesses
- LiveVideoAnalyticsClient.ListProcesses (All)
- LiveVideoAnalyticsClient.ListPublicOperators
- LiveVideoAnalyticsClient.ListPublicOperators (All)
- LiveVideoAnalyticsClient.ResolveOperatorInfo
- LiveVideoAnalyticsClient.UpdateAnalysis
- LiveVideoAnalyticsClient.UpdateOperator
- LiveVideoAnalyticsClient.UpdateProcess
- NewAppPlatformClient
- NewAppPlatformRESTClient
- NewHealthCheckClient
- NewHealthCheckRESTClient
- NewLiveVideoAnalyticsClient
- NewLiveVideoAnalyticsRESTClient
- NewStreamingClient
- NewStreamingRESTClient
- NewStreamsClient
- NewStreamsRESTClient
- NewWarehouseClient
- NewWarehouseRESTClient
- StreamingClient.AcquireLease
- StreamingClient.CancelOperation
- StreamingClient.DeleteOperation
- StreamingClient.GetOperation
- StreamingClient.ListOperations
- StreamingClient.ListOperations (All)
- StreamingClient.ReceiveEvents
- StreamingClient.ReceivePackets
- StreamingClient.ReleaseLease
- StreamingClient.RenewLease
- StreamingClient.SendPackets
- StreamsClient.CancelOperation
- StreamsClient.CreateCluster
- StreamsClient.CreateEvent
- StreamsClient.CreateSeries
- StreamsClient.CreateStream
- StreamsClient.DeleteCluster
- StreamsClient.DeleteEvent
- StreamsClient.DeleteOperation
- StreamsClient.DeleteSeries
- StreamsClient.DeleteStream
- StreamsClient.GenerateStreamHlsToken
- StreamsClient.GetCluster
- StreamsClient.GetEvent
- StreamsClient.GetOperation
- StreamsClient.GetSeries
- StreamsClient.GetStream
- StreamsClient.GetStreamThumbnail
- StreamsClient.ListClusters
- StreamsClient.ListClusters (All)
- StreamsClient.ListEvents
- StreamsClient.ListEvents (All)
- StreamsClient.ListOperations
- StreamsClient.ListOperations (All)
- StreamsClient.ListSeries
- StreamsClient.ListSeries (All)
- StreamsClient.ListStreams
- StreamsClient.ListStreams (All)
- StreamsClient.MaterializeChannel
- StreamsClient.UpdateCluster
- StreamsClient.UpdateEvent
- StreamsClient.UpdateSeries
- StreamsClient.UpdateStream
- WarehouseClient.AddCollectionItem
- WarehouseClient.AnalyzeAsset
- WarehouseClient.AnalyzeCorpus
- WarehouseClient.CancelOperation
- WarehouseClient.ClipAsset
- WarehouseClient.CreateAnnotation
- WarehouseClient.CreateAsset
- WarehouseClient.CreateCollection
- WarehouseClient.CreateCorpus
- WarehouseClient.CreateDataSchema
- WarehouseClient.CreateIndex
- WarehouseClient.CreateIndexEndpoint
- WarehouseClient.CreateSearchConfig
- WarehouseClient.CreateSearchHypernym
- WarehouseClient.DeleteAnnotation
- WarehouseClient.DeleteAsset
- WarehouseClient.DeleteCollection
- WarehouseClient.DeleteCorpus
- WarehouseClient.DeleteDataSchema
- WarehouseClient.DeleteIndex
- WarehouseClient.DeleteIndexEndpoint
- WarehouseClient.DeleteOperation
- WarehouseClient.DeleteSearchConfig
- WarehouseClient.DeleteSearchHypernym
- WarehouseClient.DeployIndex
- WarehouseClient.GenerateHlsUri
- WarehouseClient.GenerateRetrievalUrl
- WarehouseClient.GetAnnotation
- WarehouseClient.GetAsset
- WarehouseClient.GetCollection
- WarehouseClient.GetCorpus
- WarehouseClient.GetDataSchema
- WarehouseClient.GetIndex
- WarehouseClient.GetIndexEndpoint
- WarehouseClient.GetOperation
- WarehouseClient.GetSearchConfig
- WarehouseClient.GetSearchHypernym
- WarehouseClient.ImportAssets
- WarehouseClient.IndexAsset
- WarehouseClient.IngestAsset
- WarehouseClient.ListAnnotations
- WarehouseClient.ListAnnotations (All)
- WarehouseClient.ListAssets
- WarehouseClient.ListAssets (All)
- WarehouseClient.ListCollections
- WarehouseClient.ListCollections (All)
- WarehouseClient.ListCorpora
- WarehouseClient.ListCorpora (All)
- WarehouseClient.ListDataSchemas
- WarehouseClient.ListDataSchemas (All)
- WarehouseClient.ListIndexEndpoints
- WarehouseClient.ListIndexEndpoints (All)
- WarehouseClient.ListIndexes
- WarehouseClient.ListIndexes (All)
- WarehouseClient.ListOperations
- WarehouseClient.ListOperations (All)
- WarehouseClient.ListSearchConfigs
- WarehouseClient.ListSearchConfigs (All)
- WarehouseClient.ListSearchHypernyms
- WarehouseClient.ListSearchHypernyms (All)
- WarehouseClient.RemoveCollectionItem
- WarehouseClient.RemoveIndexAsset
- WarehouseClient.SearchAssets
- WarehouseClient.SearchAssets (All)
- WarehouseClient.SearchIndexEndpoint
- WarehouseClient.SearchIndexEndpoint (All)
- WarehouseClient.UndeployIndex
- WarehouseClient.UpdateAnnotation
- WarehouseClient.UpdateAsset
- WarehouseClient.UpdateCollection
- WarehouseClient.UpdateCorpus
- WarehouseClient.UpdateDataSchema
- WarehouseClient.UpdateIndex
- WarehouseClient.UpdateIndexEndpoint
- WarehouseClient.UpdateSearchConfig
- WarehouseClient.UpdateSearchHypernym
- WarehouseClient.UploadAsset
- WarehouseClient.ViewCollectionItems
- WarehouseClient.ViewCollectionItems (All)
- WarehouseClient.ViewIndexedAssets
- WarehouseClient.ViewIndexedAssets (All)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type AddApplicationStreamInputOperation ¶
type AddApplicationStreamInputOperation struct {
// contains filtered or unexported fields
}
AddApplicationStreamInputOperation manages a long-running operation from AddApplicationStreamInput.
func (*AddApplicationStreamInputOperation) Done ¶
func (op *AddApplicationStreamInputOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*AddApplicationStreamInputOperation) Metadata ¶
func (op *AddApplicationStreamInputOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*AddApplicationStreamInputOperation) Name ¶
func (op *AddApplicationStreamInputOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*AddApplicationStreamInputOperation) Poll ¶
func (op *AddApplicationStreamInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AddApplicationStreamInputResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*AddApplicationStreamInputOperation) Wait ¶
func (op *AddApplicationStreamInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AddApplicationStreamInputResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type AnalysisIterator ¶
type AnalysisIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Analysis, nextPageToken string, err error) // contains filtered or unexported fields }
AnalysisIterator manages a stream of *visionaipb.Analysis.
func (*AnalysisIterator) All ¶ added in v0.3.0
func (it *AnalysisIterator) All() iter.Seq2[*visionaipb.Analysis, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*AnalysisIterator) Next ¶
func (it *AnalysisIterator) Next() (*visionaipb.Analysis, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*AnalysisIterator) PageInfo ¶
func (it *AnalysisIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type AnalyzeAssetOperation ¶
type AnalyzeAssetOperation struct {
// contains filtered or unexported fields
}
AnalyzeAssetOperation manages a long-running operation from AnalyzeAsset.
func (*AnalyzeAssetOperation) Done ¶
func (op *AnalyzeAssetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*AnalyzeAssetOperation) Metadata ¶
func (op *AnalyzeAssetOperation) Metadata() (*visionaipb.AnalyzeAssetMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*AnalyzeAssetOperation) Name ¶
func (op *AnalyzeAssetOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*AnalyzeAssetOperation) Poll ¶
func (op *AnalyzeAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeAssetResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*AnalyzeAssetOperation) Wait ¶
func (op *AnalyzeAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeAssetResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type AnalyzeCorpusOperation ¶
type AnalyzeCorpusOperation struct {
// contains filtered or unexported fields
}
AnalyzeCorpusOperation manages a long-running operation from AnalyzeCorpus.
func (*AnalyzeCorpusOperation) Done ¶
func (op *AnalyzeCorpusOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*AnalyzeCorpusOperation) Metadata ¶
func (op *AnalyzeCorpusOperation) Metadata() (*visionaipb.AnalyzeCorpusMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*AnalyzeCorpusOperation) Name ¶
func (op *AnalyzeCorpusOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*AnalyzeCorpusOperation) Poll ¶
func (op *AnalyzeCorpusOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeCorpusResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*AnalyzeCorpusOperation) Wait ¶
func (op *AnalyzeCorpusOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeCorpusResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type AnnotationIterator ¶
type AnnotationIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Annotation, nextPageToken string, err error) // contains filtered or unexported fields }
AnnotationIterator manages a stream of *visionaipb.Annotation.
func (*AnnotationIterator) All ¶ added in v0.3.0
func (it *AnnotationIterator) All() iter.Seq2[*visionaipb.Annotation, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*AnnotationIterator) Next ¶
func (it *AnnotationIterator) Next() (*visionaipb.Annotation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*AnnotationIterator) PageInfo ¶
func (it *AnnotationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type AppPlatformCallOptions ¶
type AppPlatformCallOptions struct { ListApplications []gax.CallOption GetApplication []gax.CallOption CreateApplication []gax.CallOption UpdateApplication []gax.CallOption DeleteApplication []gax.CallOption DeployApplication []gax.CallOption UndeployApplication []gax.CallOption AddApplicationStreamInput []gax.CallOption RemoveApplicationStreamInput []gax.CallOption UpdateApplicationStreamInput []gax.CallOption ListInstances []gax.CallOption GetInstance []gax.CallOption CreateApplicationInstances []gax.CallOption DeleteApplicationInstances []gax.CallOption UpdateApplicationInstances []gax.CallOption ListDrafts []gax.CallOption GetDraft []gax.CallOption CreateDraft []gax.CallOption UpdateDraft []gax.CallOption DeleteDraft []gax.CallOption ListProcessors []gax.CallOption ListPrebuiltProcessors []gax.CallOption GetProcessor []gax.CallOption CreateProcessor []gax.CallOption UpdateProcessor []gax.CallOption DeleteProcessor []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
AppPlatformCallOptions contains the retry settings for each method of AppPlatformClient.
type AppPlatformClient ¶
type AppPlatformClient struct { // The call options for this service. CallOptions *AppPlatformCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
AppPlatformClient is a client for interacting with Vision AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service describing handlers for resources
func NewAppPlatformClient ¶
func NewAppPlatformClient(ctx context.Context, opts ...option.ClientOption) (*AppPlatformClient, error)
NewAppPlatformClient creates a new app platform client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service describing handlers for resources
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewAppPlatformRESTClient ¶
func NewAppPlatformRESTClient(ctx context.Context, opts ...option.ClientOption) (*AppPlatformClient, error)
NewAppPlatformRESTClient creates a new app platform rest client.
Service describing handlers for resources
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*AppPlatformClient) AddApplicationStreamInput ¶
func (c *AppPlatformClient) AddApplicationStreamInput(ctx context.Context, req *visionaipb.AddApplicationStreamInputRequest, opts ...gax.CallOption) (*AddApplicationStreamInputOperation, error)
AddApplicationStreamInput adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.AddApplicationStreamInputRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AddApplicationStreamInputRequest. } op, err := c.AddApplicationStreamInput(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) AddApplicationStreamInputOperation ¶
func (c *AppPlatformClient) AddApplicationStreamInputOperation(name string) *AddApplicationStreamInputOperation
AddApplicationStreamInputOperation returns a new AddApplicationStreamInputOperation from a given name. The name must be that of a previously created AddApplicationStreamInputOperation, possibly from a different process.
func (*AppPlatformClient) CancelOperation ¶
func (c *AppPlatformClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*AppPlatformClient) Close ¶
func (c *AppPlatformClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*AppPlatformClient) Connection
deprecated
func (c *AppPlatformClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*AppPlatformClient) CreateApplication ¶
func (c *AppPlatformClient) CreateApplication(ctx context.Context, req *visionaipb.CreateApplicationRequest, opts ...gax.CallOption) (*CreateApplicationOperation, error)
CreateApplication creates a new Application in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateApplicationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateApplicationRequest. } op, err := c.CreateApplication(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) CreateApplicationInstances ¶
func (c *AppPlatformClient) CreateApplicationInstances(ctx context.Context, req *visionaipb.CreateApplicationInstancesRequest, opts ...gax.CallOption) (*CreateApplicationInstancesOperation, error)
CreateApplicationInstances adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateApplicationInstancesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateApplicationInstancesRequest. } op, err := c.CreateApplicationInstances(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) CreateApplicationInstancesOperation ¶
func (c *AppPlatformClient) CreateApplicationInstancesOperation(name string) *CreateApplicationInstancesOperation
CreateApplicationInstancesOperation returns a new CreateApplicationInstancesOperation from a given name. The name must be that of a previously created CreateApplicationInstancesOperation, possibly from a different process.
func (*AppPlatformClient) CreateApplicationOperation ¶
func (c *AppPlatformClient) CreateApplicationOperation(name string) *CreateApplicationOperation
CreateApplicationOperation returns a new CreateApplicationOperation from a given name. The name must be that of a previously created CreateApplicationOperation, possibly from a different process.
func (*AppPlatformClient) CreateDraft ¶
func (c *AppPlatformClient) CreateDraft(ctx context.Context, req *visionaipb.CreateDraftRequest, opts ...gax.CallOption) (*CreateDraftOperation, error)
CreateDraft creates a new Draft in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateDraftRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateDraftRequest. } op, err := c.CreateDraft(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) CreateDraftOperation ¶
func (c *AppPlatformClient) CreateDraftOperation(name string) *CreateDraftOperation
CreateDraftOperation returns a new CreateDraftOperation from a given name. The name must be that of a previously created CreateDraftOperation, possibly from a different process.
func (*AppPlatformClient) CreateProcessor ¶
func (c *AppPlatformClient) CreateProcessor(ctx context.Context, req *visionaipb.CreateProcessorRequest, opts ...gax.CallOption) (*CreateProcessorOperation, error)
CreateProcessor creates a new Processor in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateProcessorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateProcessorRequest. } op, err := c.CreateProcessor(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) CreateProcessorOperation ¶
func (c *AppPlatformClient) CreateProcessorOperation(name string) *CreateProcessorOperation
CreateProcessorOperation returns a new CreateProcessorOperation from a given name. The name must be that of a previously created CreateProcessorOperation, possibly from a different process.
func (*AppPlatformClient) DeleteApplication ¶
func (c *AppPlatformClient) DeleteApplication(ctx context.Context, req *visionaipb.DeleteApplicationRequest, opts ...gax.CallOption) (*DeleteApplicationOperation, error)
DeleteApplication deletes a single Application.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteApplicationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteApplicationRequest. } op, err := c.DeleteApplication(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*AppPlatformClient) DeleteApplicationInstances ¶
func (c *AppPlatformClient) DeleteApplicationInstances(ctx context.Context, req *visionaipb.DeleteApplicationInstancesRequest, opts ...gax.CallOption) (*DeleteApplicationInstancesOperation, error)
DeleteApplicationInstances remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteApplicationInstancesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteApplicationInstancesRequest. } op, err := c.DeleteApplicationInstances(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) DeleteApplicationInstancesOperation ¶
func (c *AppPlatformClient) DeleteApplicationInstancesOperation(name string) *DeleteApplicationInstancesOperation
DeleteApplicationInstancesOperation returns a new DeleteApplicationInstancesOperation from a given name. The name must be that of a previously created DeleteApplicationInstancesOperation, possibly from a different process.
func (*AppPlatformClient) DeleteApplicationOperation ¶
func (c *AppPlatformClient) DeleteApplicationOperation(name string) *DeleteApplicationOperation
DeleteApplicationOperation returns a new DeleteApplicationOperation from a given name. The name must be that of a previously created DeleteApplicationOperation, possibly from a different process.
func (*AppPlatformClient) DeleteDraft ¶
func (c *AppPlatformClient) DeleteDraft(ctx context.Context, req *visionaipb.DeleteDraftRequest, opts ...gax.CallOption) (*DeleteDraftOperation, error)
DeleteDraft deletes a single Draft.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteDraftRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteDraftRequest. } op, err := c.DeleteDraft(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*AppPlatformClient) DeleteDraftOperation ¶
func (c *AppPlatformClient) DeleteDraftOperation(name string) *DeleteDraftOperation
DeleteDraftOperation returns a new DeleteDraftOperation from a given name. The name must be that of a previously created DeleteDraftOperation, possibly from a different process.
func (*AppPlatformClient) DeleteOperation ¶
func (c *AppPlatformClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*AppPlatformClient) DeleteProcessor ¶
func (c *AppPlatformClient) DeleteProcessor(ctx context.Context, req *visionaipb.DeleteProcessorRequest, opts ...gax.CallOption) (*DeleteProcessorOperation, error)
DeleteProcessor deletes a single Processor.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteProcessorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteProcessorRequest. } op, err := c.DeleteProcessor(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*AppPlatformClient) DeleteProcessorOperation ¶
func (c *AppPlatformClient) DeleteProcessorOperation(name string) *DeleteProcessorOperation
DeleteProcessorOperation returns a new DeleteProcessorOperation from a given name. The name must be that of a previously created DeleteProcessorOperation, possibly from a different process.
func (*AppPlatformClient) DeployApplication ¶
func (c *AppPlatformClient) DeployApplication(ctx context.Context, req *visionaipb.DeployApplicationRequest, opts ...gax.CallOption) (*DeployApplicationOperation, error)
DeployApplication deploys a single Application.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeployApplicationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeployApplicationRequest. } op, err := c.DeployApplication(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) DeployApplicationOperation ¶
func (c *AppPlatformClient) DeployApplicationOperation(name string) *DeployApplicationOperation
DeployApplicationOperation returns a new DeployApplicationOperation from a given name. The name must be that of a previously created DeployApplicationOperation, possibly from a different process.
func (*AppPlatformClient) GetApplication ¶
func (c *AppPlatformClient) GetApplication(ctx context.Context, req *visionaipb.GetApplicationRequest, opts ...gax.CallOption) (*visionaipb.Application, error)
GetApplication gets details of a single Application.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetApplicationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetApplicationRequest. } resp, err := c.GetApplication(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) GetDraft ¶
func (c *AppPlatformClient) GetDraft(ctx context.Context, req *visionaipb.GetDraftRequest, opts ...gax.CallOption) (*visionaipb.Draft, error)
GetDraft gets details of a single Draft.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetDraftRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetDraftRequest. } resp, err := c.GetDraft(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) GetInstance ¶
func (c *AppPlatformClient) GetInstance(ctx context.Context, req *visionaipb.GetInstanceRequest, opts ...gax.CallOption) (*visionaipb.Instance, error)
GetInstance gets details of a single Instance.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetInstanceRequest. } resp, err := c.GetInstance(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) GetOperation ¶
func (c *AppPlatformClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) GetProcessor ¶
func (c *AppPlatformClient) GetProcessor(ctx context.Context, req *visionaipb.GetProcessorRequest, opts ...gax.CallOption) (*visionaipb.Processor, error)
GetProcessor gets details of a single Processor.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetProcessorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetProcessorRequest. } resp, err := c.GetProcessor(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) ListApplications ¶
func (c *AppPlatformClient) ListApplications(ctx context.Context, req *visionaipb.ListApplicationsRequest, opts ...gax.CallOption) *ApplicationIterator
ListApplications lists Applications in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListApplicationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListApplicationsRequest. } it := c.ListApplications(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListApplicationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListApplicationsRequest. } for resp, err := range c.ListApplications(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*AppPlatformClient) ListDrafts ¶
func (c *AppPlatformClient) ListDrafts(ctx context.Context, req *visionaipb.ListDraftsRequest, opts ...gax.CallOption) *DraftIterator
ListDrafts lists Drafts in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListDraftsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListDraftsRequest. } it := c.ListDrafts(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListDraftsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListDraftsRequest. } for resp, err := range c.ListDrafts(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*AppPlatformClient) ListInstances ¶
func (c *AppPlatformClient) ListInstances(ctx context.Context, req *visionaipb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator
ListInstances lists Instances in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListInstancesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListInstancesRequest. } it := c.ListInstances(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListInstancesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListInstancesRequest. } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*AppPlatformClient) ListOperations ¶
func (c *AppPlatformClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*AppPlatformClient) ListPrebuiltProcessors ¶
func (c *AppPlatformClient) ListPrebuiltProcessors(ctx context.Context, req *visionaipb.ListPrebuiltProcessorsRequest, opts ...gax.CallOption) (*visionaipb.ListPrebuiltProcessorsResponse, error)
ListPrebuiltProcessors listPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListPrebuiltProcessorsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListPrebuiltProcessorsRequest. } resp, err := c.ListPrebuiltProcessors(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) ListProcessors ¶
func (c *AppPlatformClient) ListProcessors(ctx context.Context, req *visionaipb.ListProcessorsRequest, opts ...gax.CallOption) *ProcessorIterator
ListProcessors lists Processors in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListProcessorsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListProcessorsRequest. } it := c.ListProcessors(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListProcessorsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListProcessorsRequest. } for resp, err := range c.ListProcessors(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*AppPlatformClient) RemoveApplicationStreamInput ¶
func (c *AppPlatformClient) RemoveApplicationStreamInput(ctx context.Context, req *visionaipb.RemoveApplicationStreamInputRequest, opts ...gax.CallOption) (*RemoveApplicationStreamInputOperation, error)
RemoveApplicationStreamInput remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.RemoveApplicationStreamInputRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#RemoveApplicationStreamInputRequest. } op, err := c.RemoveApplicationStreamInput(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) RemoveApplicationStreamInputOperation ¶
func (c *AppPlatformClient) RemoveApplicationStreamInputOperation(name string) *RemoveApplicationStreamInputOperation
RemoveApplicationStreamInputOperation returns a new RemoveApplicationStreamInputOperation from a given name. The name must be that of a previously created RemoveApplicationStreamInputOperation, possibly from a different process.
func (*AppPlatformClient) UndeployApplication ¶
func (c *AppPlatformClient) UndeployApplication(ctx context.Context, req *visionaipb.UndeployApplicationRequest, opts ...gax.CallOption) (*UndeployApplicationOperation, error)
UndeployApplication undeploys a single Application.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UndeployApplicationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UndeployApplicationRequest. } op, err := c.UndeployApplication(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) UndeployApplicationOperation ¶
func (c *AppPlatformClient) UndeployApplicationOperation(name string) *UndeployApplicationOperation
UndeployApplicationOperation returns a new UndeployApplicationOperation from a given name. The name must be that of a previously created UndeployApplicationOperation, possibly from a different process.
func (*AppPlatformClient) UpdateApplication ¶
func (c *AppPlatformClient) UpdateApplication(ctx context.Context, req *visionaipb.UpdateApplicationRequest, opts ...gax.CallOption) (*UpdateApplicationOperation, error)
UpdateApplication updates the parameters of a single Application.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateApplicationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateApplicationRequest. } op, err := c.UpdateApplication(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) UpdateApplicationInstances ¶
func (c *AppPlatformClient) UpdateApplicationInstances(ctx context.Context, req *visionaipb.UpdateApplicationInstancesRequest, opts ...gax.CallOption) (*UpdateApplicationInstancesOperation, error)
UpdateApplicationInstances adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateApplicationInstancesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateApplicationInstancesRequest. } op, err := c.UpdateApplicationInstances(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) UpdateApplicationInstancesOperation ¶
func (c *AppPlatformClient) UpdateApplicationInstancesOperation(name string) *UpdateApplicationInstancesOperation
UpdateApplicationInstancesOperation returns a new UpdateApplicationInstancesOperation from a given name. The name must be that of a previously created UpdateApplicationInstancesOperation, possibly from a different process.
func (*AppPlatformClient) UpdateApplicationOperation ¶
func (c *AppPlatformClient) UpdateApplicationOperation(name string) *UpdateApplicationOperation
UpdateApplicationOperation returns a new UpdateApplicationOperation from a given name. The name must be that of a previously created UpdateApplicationOperation, possibly from a different process.
func (*AppPlatformClient) UpdateApplicationStreamInput ¶
func (c *AppPlatformClient) UpdateApplicationStreamInput(ctx context.Context, req *visionaipb.UpdateApplicationStreamInputRequest, opts ...gax.CallOption) (*UpdateApplicationStreamInputOperation, error)
UpdateApplicationStreamInput update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing to true.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateApplicationStreamInputRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateApplicationStreamInputRequest. } op, err := c.UpdateApplicationStreamInput(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) UpdateApplicationStreamInputOperation ¶
func (c *AppPlatformClient) UpdateApplicationStreamInputOperation(name string) *UpdateApplicationStreamInputOperation
UpdateApplicationStreamInputOperation returns a new UpdateApplicationStreamInputOperation from a given name. The name must be that of a previously created UpdateApplicationStreamInputOperation, possibly from a different process.
func (*AppPlatformClient) UpdateDraft ¶
func (c *AppPlatformClient) UpdateDraft(ctx context.Context, req *visionaipb.UpdateDraftRequest, opts ...gax.CallOption) (*UpdateDraftOperation, error)
UpdateDraft updates the parameters of a single Draft.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateDraftRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateDraftRequest. } op, err := c.UpdateDraft(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) UpdateDraftOperation ¶
func (c *AppPlatformClient) UpdateDraftOperation(name string) *UpdateDraftOperation
UpdateDraftOperation returns a new UpdateDraftOperation from a given name. The name must be that of a previously created UpdateDraftOperation, possibly from a different process.
func (*AppPlatformClient) UpdateProcessor ¶
func (c *AppPlatformClient) UpdateProcessor(ctx context.Context, req *visionaipb.UpdateProcessorRequest, opts ...gax.CallOption) (*UpdateProcessorOperation, error)
UpdateProcessor updates the parameters of a single Processor.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewAppPlatformClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateProcessorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateProcessorRequest. } op, err := c.UpdateProcessor(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AppPlatformClient) UpdateProcessorOperation ¶
func (c *AppPlatformClient) UpdateProcessorOperation(name string) *UpdateProcessorOperation
UpdateProcessorOperation returns a new UpdateProcessorOperation from a given name. The name must be that of a previously created UpdateProcessorOperation, possibly from a different process.
type ApplicationIterator ¶
type ApplicationIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Application, nextPageToken string, err error) // contains filtered or unexported fields }
ApplicationIterator manages a stream of *visionaipb.Application.
func (*ApplicationIterator) All ¶ added in v0.3.0
func (it *ApplicationIterator) All() iter.Seq2[*visionaipb.Application, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ApplicationIterator) Next ¶
func (it *ApplicationIterator) Next() (*visionaipb.Application, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ApplicationIterator) PageInfo ¶
func (it *ApplicationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type AssetIterator ¶
type AssetIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Asset, nextPageToken string, err error) // contains filtered or unexported fields }
AssetIterator manages a stream of *visionaipb.Asset.
func (*AssetIterator) All ¶ added in v0.3.0
func (it *AssetIterator) All() iter.Seq2[*visionaipb.Asset, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*AssetIterator) Next ¶
func (it *AssetIterator) Next() (*visionaipb.Asset, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*AssetIterator) PageInfo ¶
func (it *AssetIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type BatchRunProcessOperation ¶
type BatchRunProcessOperation struct {
// contains filtered or unexported fields
}
BatchRunProcessOperation manages a long-running operation from BatchRunProcess.
func (*BatchRunProcessOperation) Done ¶
func (op *BatchRunProcessOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*BatchRunProcessOperation) Metadata ¶
func (op *BatchRunProcessOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*BatchRunProcessOperation) Name ¶
func (op *BatchRunProcessOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*BatchRunProcessOperation) Poll ¶
func (op *BatchRunProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.BatchRunProcessResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*BatchRunProcessOperation) Wait ¶
func (op *BatchRunProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.BatchRunProcessResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type ClusterIterator ¶
type ClusterIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Cluster, nextPageToken string, err error) // contains filtered or unexported fields }
ClusterIterator manages a stream of *visionaipb.Cluster.
func (*ClusterIterator) All ¶ added in v0.3.0
func (it *ClusterIterator) All() iter.Seq2[*visionaipb.Cluster, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ClusterIterator) Next ¶
func (it *ClusterIterator) Next() (*visionaipb.Cluster, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ClusterIterator) PageInfo ¶
func (it *ClusterIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CollectionItemIterator ¶
type CollectionItemIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.CollectionItem, nextPageToken string, err error) // contains filtered or unexported fields }
CollectionItemIterator manages a stream of *visionaipb.CollectionItem.
func (*CollectionItemIterator) All ¶ added in v0.3.0
func (it *CollectionItemIterator) All() iter.Seq2[*visionaipb.CollectionItem, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CollectionItemIterator) Next ¶
func (it *CollectionItemIterator) Next() (*visionaipb.CollectionItem, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*CollectionItemIterator) PageInfo ¶
func (it *CollectionItemIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CollectionIterator ¶
type CollectionIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Collection, nextPageToken string, err error) // contains filtered or unexported fields }
CollectionIterator manages a stream of *visionaipb.Collection.
func (*CollectionIterator) All ¶ added in v0.3.0
func (it *CollectionIterator) All() iter.Seq2[*visionaipb.Collection, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CollectionIterator) Next ¶
func (it *CollectionIterator) Next() (*visionaipb.Collection, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*CollectionIterator) PageInfo ¶
func (it *CollectionIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CorpusIterator ¶
type CorpusIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Corpus, nextPageToken string, err error) // contains filtered or unexported fields }
CorpusIterator manages a stream of *visionaipb.Corpus.
func (*CorpusIterator) All ¶ added in v0.3.0
func (it *CorpusIterator) All() iter.Seq2[*visionaipb.Corpus, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CorpusIterator) Next ¶
func (it *CorpusIterator) Next() (*visionaipb.Corpus, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*CorpusIterator) PageInfo ¶
func (it *CorpusIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CreateAnalysisOperation ¶
type CreateAnalysisOperation struct {
// contains filtered or unexported fields
}
CreateAnalysisOperation manages a long-running operation from CreateAnalysis.
func (*CreateAnalysisOperation) Done ¶
func (op *CreateAnalysisOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateAnalysisOperation) Metadata ¶
func (op *CreateAnalysisOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateAnalysisOperation) Name ¶
func (op *CreateAnalysisOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateAnalysisOperation) Poll ¶
func (op *CreateAnalysisOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateAnalysisOperation) Wait ¶
func (op *CreateAnalysisOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateApplicationInstancesOperation ¶
type CreateApplicationInstancesOperation struct {
// contains filtered or unexported fields
}
CreateApplicationInstancesOperation manages a long-running operation from CreateApplicationInstances.
func (*CreateApplicationInstancesOperation) Done ¶
func (op *CreateApplicationInstancesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateApplicationInstancesOperation) Metadata ¶
func (op *CreateApplicationInstancesOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateApplicationInstancesOperation) Name ¶
func (op *CreateApplicationInstancesOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateApplicationInstancesOperation) Poll ¶
func (op *CreateApplicationInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.CreateApplicationInstancesResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateApplicationInstancesOperation) Wait ¶
func (op *CreateApplicationInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.CreateApplicationInstancesResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateApplicationOperation ¶
type CreateApplicationOperation struct {
// contains filtered or unexported fields
}
CreateApplicationOperation manages a long-running operation from CreateApplication.
func (*CreateApplicationOperation) Done ¶
func (op *CreateApplicationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateApplicationOperation) Metadata ¶
func (op *CreateApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateApplicationOperation) Name ¶
func (op *CreateApplicationOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateApplicationOperation) Poll ¶
func (op *CreateApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateApplicationOperation) Wait ¶
func (op *CreateApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateClusterOperation ¶
type CreateClusterOperation struct {
// contains filtered or unexported fields
}
CreateClusterOperation manages a long-running operation from CreateCluster.
func (*CreateClusterOperation) Done ¶
func (op *CreateClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateClusterOperation) Metadata ¶
func (op *CreateClusterOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateClusterOperation) Name ¶
func (op *CreateClusterOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateClusterOperation) Poll ¶
func (op *CreateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateClusterOperation) Wait ¶
func (op *CreateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateCollectionOperation ¶
type CreateCollectionOperation struct {
// contains filtered or unexported fields
}
CreateCollectionOperation manages a long-running operation from CreateCollection.
func (*CreateCollectionOperation) Done ¶
func (op *CreateCollectionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateCollectionOperation) Metadata ¶
func (op *CreateCollectionOperation) Metadata() (*visionaipb.CreateCollectionMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateCollectionOperation) Name ¶
func (op *CreateCollectionOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateCollectionOperation) Poll ¶
func (op *CreateCollectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Collection, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateCollectionOperation) Wait ¶
func (op *CreateCollectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Collection, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateCorpusOperation ¶
type CreateCorpusOperation struct {
// contains filtered or unexported fields
}
CreateCorpusOperation manages a long-running operation from CreateCorpus.
func (*CreateCorpusOperation) Done ¶
func (op *CreateCorpusOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateCorpusOperation) Metadata ¶
func (op *CreateCorpusOperation) Metadata() (*visionaipb.CreateCorpusMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateCorpusOperation) Name ¶
func (op *CreateCorpusOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateCorpusOperation) Poll ¶
func (op *CreateCorpusOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Corpus, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateCorpusOperation) Wait ¶
func (op *CreateCorpusOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Corpus, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateDraftOperation ¶
type CreateDraftOperation struct {
// contains filtered or unexported fields
}
CreateDraftOperation manages a long-running operation from CreateDraft.
func (*CreateDraftOperation) Done ¶
func (op *CreateDraftOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateDraftOperation) Metadata ¶
func (op *CreateDraftOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateDraftOperation) Name ¶
func (op *CreateDraftOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateDraftOperation) Poll ¶
func (op *CreateDraftOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateDraftOperation) Wait ¶
func (op *CreateDraftOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateEventOperation ¶
type CreateEventOperation struct {
// contains filtered or unexported fields
}
CreateEventOperation manages a long-running operation from CreateEvent.
func (*CreateEventOperation) Done ¶
func (op *CreateEventOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateEventOperation) Metadata ¶
func (op *CreateEventOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateEventOperation) Name ¶
func (op *CreateEventOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateEventOperation) Poll ¶
func (op *CreateEventOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateEventOperation) Wait ¶
func (op *CreateEventOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateIndexEndpointOperation ¶
type CreateIndexEndpointOperation struct {
// contains filtered or unexported fields
}
CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint.
func (*CreateIndexEndpointOperation) Done ¶
func (op *CreateIndexEndpointOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateIndexEndpointOperation) Metadata ¶
func (op *CreateIndexEndpointOperation) Metadata() (*visionaipb.CreateIndexEndpointMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateIndexEndpointOperation) Name ¶
func (op *CreateIndexEndpointOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateIndexEndpointOperation) Poll ¶
func (op *CreateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateIndexEndpointOperation) Wait ¶
func (op *CreateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateIndexOperation ¶
type CreateIndexOperation struct {
// contains filtered or unexported fields
}
CreateIndexOperation manages a long-running operation from CreateIndex.
func (*CreateIndexOperation) Done ¶
func (op *CreateIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateIndexOperation) Metadata ¶
func (op *CreateIndexOperation) Metadata() (*visionaipb.CreateIndexMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateIndexOperation) Name ¶
func (op *CreateIndexOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateIndexOperation) Poll ¶
func (op *CreateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateIndexOperation) Wait ¶
func (op *CreateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateOperatorOperation ¶
type CreateOperatorOperation struct {
// contains filtered or unexported fields
}
CreateOperatorOperation manages a long-running operation from CreateOperator.
func (*CreateOperatorOperation) Done ¶
func (op *CreateOperatorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateOperatorOperation) Metadata ¶
func (op *CreateOperatorOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateOperatorOperation) Name ¶
func (op *CreateOperatorOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateOperatorOperation) Poll ¶
func (op *CreateOperatorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateOperatorOperation) Wait ¶
func (op *CreateOperatorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateProcessOperation ¶
type CreateProcessOperation struct {
// contains filtered or unexported fields
}
CreateProcessOperation manages a long-running operation from CreateProcess.
func (*CreateProcessOperation) Done ¶
func (op *CreateProcessOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateProcessOperation) Metadata ¶
func (op *CreateProcessOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateProcessOperation) Name ¶
func (op *CreateProcessOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateProcessOperation) Poll ¶
func (op *CreateProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateProcessOperation) Wait ¶
func (op *CreateProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateProcessorOperation ¶
type CreateProcessorOperation struct {
// contains filtered or unexported fields
}
CreateProcessorOperation manages a long-running operation from CreateProcessor.
func (*CreateProcessorOperation) Done ¶
func (op *CreateProcessorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateProcessorOperation) Metadata ¶
func (op *CreateProcessorOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateProcessorOperation) Name ¶
func (op *CreateProcessorOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateProcessorOperation) Poll ¶
func (op *CreateProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateProcessorOperation) Wait ¶
func (op *CreateProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateSeriesOperation ¶
type CreateSeriesOperation struct {
// contains filtered or unexported fields
}
CreateSeriesOperation manages a long-running operation from CreateSeries.
func (*CreateSeriesOperation) Done ¶
func (op *CreateSeriesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateSeriesOperation) Metadata ¶
func (op *CreateSeriesOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateSeriesOperation) Name ¶
func (op *CreateSeriesOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateSeriesOperation) Poll ¶
func (op *CreateSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateSeriesOperation) Wait ¶
func (op *CreateSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateStreamOperation ¶
type CreateStreamOperation struct {
// contains filtered or unexported fields
}
CreateStreamOperation manages a long-running operation from CreateStream.
func (*CreateStreamOperation) Done ¶
func (op *CreateStreamOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateStreamOperation) Metadata ¶
func (op *CreateStreamOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateStreamOperation) Name ¶
func (op *CreateStreamOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateStreamOperation) Poll ¶
func (op *CreateStreamOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateStreamOperation) Wait ¶
func (op *CreateStreamOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DataSchemaIterator ¶
type DataSchemaIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.DataSchema, nextPageToken string, err error) // contains filtered or unexported fields }
DataSchemaIterator manages a stream of *visionaipb.DataSchema.
func (*DataSchemaIterator) All ¶ added in v0.3.0
func (it *DataSchemaIterator) All() iter.Seq2[*visionaipb.DataSchema, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DataSchemaIterator) Next ¶
func (it *DataSchemaIterator) Next() (*visionaipb.DataSchema, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*DataSchemaIterator) PageInfo ¶
func (it *DataSchemaIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DeleteAnalysisOperation ¶
type DeleteAnalysisOperation struct {
// contains filtered or unexported fields
}
DeleteAnalysisOperation manages a long-running operation from DeleteAnalysis.
func (*DeleteAnalysisOperation) Done ¶
func (op *DeleteAnalysisOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteAnalysisOperation) Metadata ¶
func (op *DeleteAnalysisOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteAnalysisOperation) Name ¶
func (op *DeleteAnalysisOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteAnalysisOperation) Poll ¶
func (op *DeleteAnalysisOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteAnalysisOperation) Wait ¶
func (op *DeleteAnalysisOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteApplicationInstancesOperation ¶
type DeleteApplicationInstancesOperation struct {
// contains filtered or unexported fields
}
DeleteApplicationInstancesOperation manages a long-running operation from DeleteApplicationInstances.
func (*DeleteApplicationInstancesOperation) Done ¶
func (op *DeleteApplicationInstancesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteApplicationInstancesOperation) Metadata ¶
func (op *DeleteApplicationInstancesOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteApplicationInstancesOperation) Name ¶
func (op *DeleteApplicationInstancesOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteApplicationInstancesOperation) Poll ¶
func (op *DeleteApplicationInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Instance, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteApplicationInstancesOperation) Wait ¶
func (op *DeleteApplicationInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Instance, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteApplicationOperation ¶
type DeleteApplicationOperation struct {
// contains filtered or unexported fields
}
DeleteApplicationOperation manages a long-running operation from DeleteApplication.
func (*DeleteApplicationOperation) Done ¶
func (op *DeleteApplicationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteApplicationOperation) Metadata ¶
func (op *DeleteApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteApplicationOperation) Name ¶
func (op *DeleteApplicationOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteApplicationOperation) Poll ¶
func (op *DeleteApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteApplicationOperation) Wait ¶
func (op *DeleteApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteAssetOperation ¶
type DeleteAssetOperation struct {
// contains filtered or unexported fields
}
DeleteAssetOperation manages a long-running operation from DeleteAsset.
func (*DeleteAssetOperation) Done ¶
func (op *DeleteAssetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteAssetOperation) Metadata ¶
func (op *DeleteAssetOperation) Metadata() (*visionaipb.DeleteAssetMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteAssetOperation) Name ¶
func (op *DeleteAssetOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteAssetOperation) Poll ¶
func (op *DeleteAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteAssetOperation) Wait ¶
func (op *DeleteAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteClusterOperation ¶
type DeleteClusterOperation struct {
// contains filtered or unexported fields
}
DeleteClusterOperation manages a long-running operation from DeleteCluster.
func (*DeleteClusterOperation) Done ¶
func (op *DeleteClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteClusterOperation) Metadata ¶
func (op *DeleteClusterOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteClusterOperation) Name ¶
func (op *DeleteClusterOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteClusterOperation) Poll ¶
func (op *DeleteClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteClusterOperation) Wait ¶
func (op *DeleteClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteCollectionOperation ¶
type DeleteCollectionOperation struct {
// contains filtered or unexported fields
}
DeleteCollectionOperation manages a long-running operation from DeleteCollection.
func (*DeleteCollectionOperation) Done ¶
func (op *DeleteCollectionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteCollectionOperation) Metadata ¶
func (op *DeleteCollectionOperation) Metadata() (*visionaipb.DeleteCollectionMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteCollectionOperation) Name ¶
func (op *DeleteCollectionOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteCollectionOperation) Poll ¶
func (op *DeleteCollectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteCollectionOperation) Wait ¶
func (op *DeleteCollectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteDraftOperation ¶
type DeleteDraftOperation struct {
// contains filtered or unexported fields
}
DeleteDraftOperation manages a long-running operation from DeleteDraft.
func (*DeleteDraftOperation) Done ¶
func (op *DeleteDraftOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteDraftOperation) Metadata ¶
func (op *DeleteDraftOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteDraftOperation) Name ¶
func (op *DeleteDraftOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteDraftOperation) Poll ¶
func (op *DeleteDraftOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDraftOperation) Wait ¶
func (op *DeleteDraftOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteEventOperation ¶
type DeleteEventOperation struct {
// contains filtered or unexported fields
}
DeleteEventOperation manages a long-running operation from DeleteEvent.
func (*DeleteEventOperation) Done ¶
func (op *DeleteEventOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteEventOperation) Metadata ¶
func (op *DeleteEventOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteEventOperation) Name ¶
func (op *DeleteEventOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteEventOperation) Poll ¶
func (op *DeleteEventOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteEventOperation) Wait ¶
func (op *DeleteEventOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteIndexEndpointOperation ¶
type DeleteIndexEndpointOperation struct {
// contains filtered or unexported fields
}
DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint.
func (*DeleteIndexEndpointOperation) Done ¶
func (op *DeleteIndexEndpointOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteIndexEndpointOperation) Metadata ¶
func (op *DeleteIndexEndpointOperation) Metadata() (*visionaipb.DeleteIndexEndpointMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteIndexEndpointOperation) Name ¶
func (op *DeleteIndexEndpointOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteIndexEndpointOperation) Poll ¶
func (op *DeleteIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteIndexEndpointOperation) Wait ¶
func (op *DeleteIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteIndexOperation ¶
type DeleteIndexOperation struct {
// contains filtered or unexported fields
}
DeleteIndexOperation manages a long-running operation from DeleteIndex.
func (*DeleteIndexOperation) Done ¶
func (op *DeleteIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteIndexOperation) Metadata ¶
func (op *DeleteIndexOperation) Metadata() (*visionaipb.DeleteIndexMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteIndexOperation) Name ¶
func (op *DeleteIndexOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteIndexOperation) Poll ¶
func (op *DeleteIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteIndexOperation) Wait ¶
func (op *DeleteIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteOperatorOperation ¶
type DeleteOperatorOperation struct {
// contains filtered or unexported fields
}
DeleteOperatorOperation manages a long-running operation from DeleteOperator.
func (*DeleteOperatorOperation) Done ¶
func (op *DeleteOperatorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteOperatorOperation) Metadata ¶
func (op *DeleteOperatorOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteOperatorOperation) Name ¶
func (op *DeleteOperatorOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteOperatorOperation) Poll ¶
func (op *DeleteOperatorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteOperatorOperation) Wait ¶
func (op *DeleteOperatorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteProcessOperation ¶
type DeleteProcessOperation struct {
// contains filtered or unexported fields
}
DeleteProcessOperation manages a long-running operation from DeleteProcess.
func (*DeleteProcessOperation) Done ¶
func (op *DeleteProcessOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteProcessOperation) Metadata ¶
func (op *DeleteProcessOperation) Metadata() (*visionaipb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteProcessOperation) Name ¶
func (op *DeleteProcessOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteProcessOperation) Poll ¶
func (op *DeleteProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteProcessOperation) Wait ¶
func (op *DeleteProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteProcessorOperation ¶
type DeleteProcessorOperation struct {
// contains filtered or unexported fields
}
DeleteProcessorOperation manages a long-running operation from DeleteProcessor.
func (*DeleteProcessorOperation) Done ¶
func (op *DeleteProcessorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteProcessorOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteProcessorOperation) Poll ¶
func (op *DeleteProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteProcessorOperation) Wait ¶
func (op *DeleteProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteSeriesOperation ¶
type DeleteSeriesOperation struct {
// contains filtered or unexported fields
}
DeleteSeriesOperation manages a long-running operation from DeleteSeries.
func (*DeleteSeriesOperation) Done ¶
func (op *DeleteSeriesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteSeriesOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteSeriesOperation) Poll ¶
func (op *DeleteSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteSeriesOperation) Wait ¶
func (op *DeleteSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteStreamOperation ¶
type DeleteStreamOperation struct {
// contains filtered or unexported fields
}
DeleteStreamOperation manages a long-running operation from DeleteStream.
func (*DeleteStreamOperation) Done ¶
func (op *DeleteStreamOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteStreamOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteStreamOperation) Poll ¶
func (op *DeleteStreamOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteStreamOperation) Wait ¶
func (op *DeleteStreamOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeployApplicationOperation ¶
type DeployApplicationOperation struct {
// contains filtered or unexported fields
}
DeployApplicationOperation manages a long-running operation from DeployApplication.
func (*DeployApplicationOperation) Done ¶
func (op *DeployApplicationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeployApplicationOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeployApplicationOperation) Poll ¶
func (op *DeployApplicationOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeployApplicationOperation) Wait ¶
func (op *DeployApplicationOperation) Wait(ctx context.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.
type DeployIndexOperation ¶
type DeployIndexOperation struct {
// contains filtered or unexported fields
}
DeployIndexOperation manages a long-running operation from DeployIndex.
func (*DeployIndexOperation) Done ¶
func (op *DeployIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeployIndexOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeployIndexOperation) Poll ¶
func (op *DeployIndexOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeployIndexOperation) Wait ¶
func (op *DeployIndexOperation) Wait(ctx context.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.
type DraftIterator ¶
type DraftIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Draft, nextPageToken string, err error) // contains filtered or unexported fields }
DraftIterator manages a stream of *visionaipb.Draft.
func (*DraftIterator) All ¶ added in v0.3.0
func (it *DraftIterator) All() iter.Seq2[*visionaipb.Draft, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*DraftIterator) PageInfo ¶
func (it *DraftIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type EventIterator ¶
type EventIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Event, nextPageToken string, err error) // contains filtered or unexported fields }
EventIterator manages a stream of *visionaipb.Event.
func (*EventIterator) All ¶ added in v0.3.0
func (it *EventIterator) All() iter.Seq2[*visionaipb.Event, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*EventIterator) PageInfo ¶
func (it *EventIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type GetStreamThumbnailOperation ¶
type GetStreamThumbnailOperation struct {
// contains filtered or unexported fields
}
GetStreamThumbnailOperation manages a long-running operation from GetStreamThumbnail.
func (*GetStreamThumbnailOperation) Done ¶
func (op *GetStreamThumbnailOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*GetStreamThumbnailOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*GetStreamThumbnailOperation) Poll ¶
func (op *GetStreamThumbnailOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*GetStreamThumbnailOperation) Wait ¶
func (op *GetStreamThumbnailOperation) Wait(ctx context.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.
type HealthCheckCallOptions ¶
type HealthCheckCallOptions struct { HealthCheck []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
HealthCheckCallOptions contains the retry settings for each method of HealthCheckClient.
type HealthCheckClient ¶
type HealthCheckClient struct { // The call options for this service. CallOptions *HealthCheckCallOptions // contains filtered or unexported fields }
HealthCheckClient is a client for interacting with Vision AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
HealthCheckService provides an interface for Vertex AI Vision Cluster Health Check.
func NewHealthCheckClient ¶
func NewHealthCheckClient(ctx context.Context, opts ...option.ClientOption) (*HealthCheckClient, error)
NewHealthCheckClient creates a new health check service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
HealthCheckService provides an interface for Vertex AI Vision Cluster Health Check.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewHealthCheckClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewHealthCheckRESTClient ¶
func NewHealthCheckRESTClient(ctx context.Context, opts ...option.ClientOption) (*HealthCheckClient, error)
NewHealthCheckRESTClient creates a new health check service rest client.
HealthCheckService provides an interface for Vertex AI Vision Cluster Health Check.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewHealthCheckRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*HealthCheckClient) CancelOperation ¶
func (c *HealthCheckClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewHealthCheckClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*HealthCheckClient) Close ¶
func (c *HealthCheckClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*HealthCheckClient) Connection
deprecated
func (c *HealthCheckClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*HealthCheckClient) DeleteOperation ¶
func (c *HealthCheckClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewHealthCheckClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*HealthCheckClient) GetOperation ¶
func (c *HealthCheckClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewHealthCheckClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*HealthCheckClient) HealthCheck ¶
func (c *HealthCheckClient) HealthCheck(ctx context.Context, req *visionaipb.HealthCheckRequest, opts ...gax.CallOption) (*visionaipb.HealthCheckResponse, error)
HealthCheck healthCheck method checks the health status of the cluster.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewHealthCheckClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.HealthCheckRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#HealthCheckRequest. } resp, err := c.HealthCheck(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*HealthCheckClient) ListOperations ¶
func (c *HealthCheckClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewHealthCheckClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewHealthCheckClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
type ImportAssetsOperation ¶
type ImportAssetsOperation struct {
// contains filtered or unexported fields
}
ImportAssetsOperation manages a long-running operation from ImportAssets.
func (*ImportAssetsOperation) Done ¶
func (op *ImportAssetsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ImportAssetsOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*ImportAssetsOperation) Poll ¶
func (op *ImportAssetsOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ImportAssetsOperation) Wait ¶
func (op *ImportAssetsOperation) Wait(ctx context.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.
type IndexAssetOperation ¶
type IndexAssetOperation struct {
// contains filtered or unexported fields
}
IndexAssetOperation manages a long-running operation from IndexAsset.
func (*IndexAssetOperation) Done ¶
func (op *IndexAssetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*IndexAssetOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*IndexAssetOperation) Poll ¶
func (op *IndexAssetOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*IndexAssetOperation) Wait ¶
func (op *IndexAssetOperation) Wait(ctx context.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.
type IndexEndpointIterator ¶
type IndexEndpointIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.IndexEndpoint, nextPageToken string, err error) // contains filtered or unexported fields }
IndexEndpointIterator manages a stream of *visionaipb.IndexEndpoint.
func (*IndexEndpointIterator) All ¶ added in v0.3.0
func (it *IndexEndpointIterator) All() iter.Seq2[*visionaipb.IndexEndpoint, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*IndexEndpointIterator) PageInfo ¶
func (it *IndexEndpointIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type IndexIterator ¶
type IndexIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Index, nextPageToken string, err error) // contains filtered or unexported fields }
IndexIterator manages a stream of *visionaipb.Index.
func (*IndexIterator) All ¶ added in v0.3.0
func (it *IndexIterator) All() iter.Seq2[*visionaipb.Index, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*IndexIterator) PageInfo ¶
func (it *IndexIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type IndexedAssetIterator ¶
type IndexedAssetIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.IndexedAsset, nextPageToken string, err error) // contains filtered or unexported fields }
IndexedAssetIterator manages a stream of *visionaipb.IndexedAsset.
func (*IndexedAssetIterator) All ¶ added in v0.3.0
func (it *IndexedAssetIterator) All() iter.Seq2[*visionaipb.IndexedAsset, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*IndexedAssetIterator) PageInfo ¶
func (it *IndexedAssetIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type InstanceIterator ¶
type InstanceIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Instance, nextPageToken string, err error) // contains filtered or unexported fields }
InstanceIterator manages a stream of *visionaipb.Instance.
func (*InstanceIterator) All ¶ added in v0.3.0
func (it *InstanceIterator) All() iter.Seq2[*visionaipb.Instance, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*InstanceIterator) PageInfo ¶
func (it *InstanceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type LiveVideoAnalyticsCallOptions ¶
type LiveVideoAnalyticsCallOptions struct { ListPublicOperators []gax.CallOption ResolveOperatorInfo []gax.CallOption ListOperators []gax.CallOption GetOperator []gax.CallOption CreateOperator []gax.CallOption UpdateOperator []gax.CallOption DeleteOperator []gax.CallOption ListAnalyses []gax.CallOption GetAnalysis []gax.CallOption CreateAnalysis []gax.CallOption UpdateAnalysis []gax.CallOption DeleteAnalysis []gax.CallOption ListProcesses []gax.CallOption GetProcess []gax.CallOption CreateProcess []gax.CallOption UpdateProcess []gax.CallOption DeleteProcess []gax.CallOption BatchRunProcess []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
LiveVideoAnalyticsCallOptions contains the retry settings for each method of LiveVideoAnalyticsClient.
type LiveVideoAnalyticsClient ¶
type LiveVideoAnalyticsClient struct { // The call options for this service. CallOptions *LiveVideoAnalyticsCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
LiveVideoAnalyticsClient is a client for interacting with Vision AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service describing handlers for resources. The service enables clients to run Live Video Analytics (LVA) on the streaming inputs.
func NewLiveVideoAnalyticsClient ¶
func NewLiveVideoAnalyticsClient(ctx context.Context, opts ...option.ClientOption) (*LiveVideoAnalyticsClient, error)
NewLiveVideoAnalyticsClient creates a new live video analytics client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service describing handlers for resources. The service enables clients to run Live Video Analytics (LVA) on the streaming inputs.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewLiveVideoAnalyticsRESTClient ¶
func NewLiveVideoAnalyticsRESTClient(ctx context.Context, opts ...option.ClientOption) (*LiveVideoAnalyticsClient, error)
NewLiveVideoAnalyticsRESTClient creates a new live video analytics rest client.
Service describing handlers for resources. The service enables clients to run Live Video Analytics (LVA) on the streaming inputs.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*LiveVideoAnalyticsClient) BatchRunProcess ¶
func (c *LiveVideoAnalyticsClient) BatchRunProcess(ctx context.Context, req *visionaipb.BatchRunProcessRequest, opts ...gax.CallOption) (*BatchRunProcessOperation, error)
BatchRunProcess run all of the processes to “completion”. Max time for each process is the LRO time limit.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.BatchRunProcessRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#BatchRunProcessRequest. } op, err := c.BatchRunProcess(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) BatchRunProcessOperation ¶
func (c *LiveVideoAnalyticsClient) BatchRunProcessOperation(name string) *BatchRunProcessOperation
BatchRunProcessOperation returns a new BatchRunProcessOperation from a given name. The name must be that of a previously created BatchRunProcessOperation, possibly from a different process.
func (*LiveVideoAnalyticsClient) CancelOperation ¶
func (c *LiveVideoAnalyticsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*LiveVideoAnalyticsClient) Close ¶
func (c *LiveVideoAnalyticsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*LiveVideoAnalyticsClient) Connection
deprecated
func (c *LiveVideoAnalyticsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*LiveVideoAnalyticsClient) CreateAnalysis ¶
func (c *LiveVideoAnalyticsClient) CreateAnalysis(ctx context.Context, req *visionaipb.CreateAnalysisRequest, opts ...gax.CallOption) (*CreateAnalysisOperation, error)
CreateAnalysis creates a new Analysis in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateAnalysisRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateAnalysisRequest. } op, err := c.CreateAnalysis(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) CreateAnalysisOperation ¶
func (c *LiveVideoAnalyticsClient) CreateAnalysisOperation(name string) *CreateAnalysisOperation
CreateAnalysisOperation returns a new CreateAnalysisOperation from a given name. The name must be that of a previously created CreateAnalysisOperation, possibly from a different process.
func (*LiveVideoAnalyticsClient) CreateOperator ¶
func (c *LiveVideoAnalyticsClient) CreateOperator(ctx context.Context, req *visionaipb.CreateOperatorRequest, opts ...gax.CallOption) (*CreateOperatorOperation, error)
CreateOperator creates a new Operator in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateOperatorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateOperatorRequest. } op, err := c.CreateOperator(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) CreateOperatorOperation ¶
func (c *LiveVideoAnalyticsClient) CreateOperatorOperation(name string) *CreateOperatorOperation
CreateOperatorOperation returns a new CreateOperatorOperation from a given name. The name must be that of a previously created CreateOperatorOperation, possibly from a different process.
func (*LiveVideoAnalyticsClient) CreateProcess ¶
func (c *LiveVideoAnalyticsClient) CreateProcess(ctx context.Context, req *visionaipb.CreateProcessRequest, opts ...gax.CallOption) (*CreateProcessOperation, error)
CreateProcess creates a new Process in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateProcessRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateProcessRequest. } op, err := c.CreateProcess(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) CreateProcessOperation ¶
func (c *LiveVideoAnalyticsClient) CreateProcessOperation(name string) *CreateProcessOperation
CreateProcessOperation returns a new CreateProcessOperation from a given name. The name must be that of a previously created CreateProcessOperation, possibly from a different process.
func (*LiveVideoAnalyticsClient) DeleteAnalysis ¶
func (c *LiveVideoAnalyticsClient) DeleteAnalysis(ctx context.Context, req *visionaipb.DeleteAnalysisRequest, opts ...gax.CallOption) (*DeleteAnalysisOperation, error)
DeleteAnalysis deletes a single Analysis.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteAnalysisRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteAnalysisRequest. } op, err := c.DeleteAnalysis(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*LiveVideoAnalyticsClient) DeleteAnalysisOperation ¶
func (c *LiveVideoAnalyticsClient) DeleteAnalysisOperation(name string) *DeleteAnalysisOperation
DeleteAnalysisOperation returns a new DeleteAnalysisOperation from a given name. The name must be that of a previously created DeleteAnalysisOperation, possibly from a different process.
func (*LiveVideoAnalyticsClient) DeleteOperation ¶
func (c *LiveVideoAnalyticsClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*LiveVideoAnalyticsClient) DeleteOperator ¶
func (c *LiveVideoAnalyticsClient) DeleteOperator(ctx context.Context, req *visionaipb.DeleteOperatorRequest, opts ...gax.CallOption) (*DeleteOperatorOperation, error)
DeleteOperator deletes a single Operator.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteOperatorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteOperatorRequest. } op, err := c.DeleteOperator(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*LiveVideoAnalyticsClient) DeleteOperatorOperation ¶
func (c *LiveVideoAnalyticsClient) DeleteOperatorOperation(name string) *DeleteOperatorOperation
DeleteOperatorOperation returns a new DeleteOperatorOperation from a given name. The name must be that of a previously created DeleteOperatorOperation, possibly from a different process.
func (*LiveVideoAnalyticsClient) DeleteProcess ¶
func (c *LiveVideoAnalyticsClient) DeleteProcess(ctx context.Context, req *visionaipb.DeleteProcessRequest, opts ...gax.CallOption) (*DeleteProcessOperation, error)
DeleteProcess deletes a single Process.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteProcessRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteProcessRequest. } op, err := c.DeleteProcess(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*LiveVideoAnalyticsClient) DeleteProcessOperation ¶
func (c *LiveVideoAnalyticsClient) DeleteProcessOperation(name string) *DeleteProcessOperation
DeleteProcessOperation returns a new DeleteProcessOperation from a given name. The name must be that of a previously created DeleteProcessOperation, possibly from a different process.
func (*LiveVideoAnalyticsClient) GetAnalysis ¶
func (c *LiveVideoAnalyticsClient) GetAnalysis(ctx context.Context, req *visionaipb.GetAnalysisRequest, opts ...gax.CallOption) (*visionaipb.Analysis, error)
GetAnalysis gets details of a single Analysis.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetAnalysisRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetAnalysisRequest. } resp, err := c.GetAnalysis(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) GetOperation ¶
func (c *LiveVideoAnalyticsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) GetOperator ¶
func (c *LiveVideoAnalyticsClient) GetOperator(ctx context.Context, req *visionaipb.GetOperatorRequest, opts ...gax.CallOption) (*visionaipb.Operator, error)
GetOperator gets details of a single Operator.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetOperatorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetOperatorRequest. } resp, err := c.GetOperator(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) GetProcess ¶
func (c *LiveVideoAnalyticsClient) GetProcess(ctx context.Context, req *visionaipb.GetProcessRequest, opts ...gax.CallOption) (*visionaipb.Process, error)
GetProcess gets details of a single Process.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetProcessRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetProcessRequest. } resp, err := c.GetProcess(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) ListAnalyses ¶
func (c *LiveVideoAnalyticsClient) ListAnalyses(ctx context.Context, req *visionaipb.ListAnalysesRequest, opts ...gax.CallOption) *AnalysisIterator
ListAnalyses lists Analyses in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListAnalysesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAnalysesRequest. } it := c.ListAnalyses(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListAnalysesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAnalysesRequest. } for resp, err := range c.ListAnalyses(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*LiveVideoAnalyticsClient) ListOperations ¶
func (c *LiveVideoAnalyticsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*LiveVideoAnalyticsClient) ListOperators ¶
func (c *LiveVideoAnalyticsClient) ListOperators(ctx context.Context, req *visionaipb.ListOperatorsRequest, opts ...gax.CallOption) *OperatorIterator
ListOperators lists Operators in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListOperatorsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListOperatorsRequest. } it := c.ListOperators(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListOperatorsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListOperatorsRequest. } for resp, err := range c.ListOperators(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*LiveVideoAnalyticsClient) ListProcesses ¶
func (c *LiveVideoAnalyticsClient) ListProcesses(ctx context.Context, req *visionaipb.ListProcessesRequest, opts ...gax.CallOption) *ProcessIterator
ListProcesses lists Processes in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListProcessesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListProcessesRequest. } it := c.ListProcesses(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListProcessesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListProcessesRequest. } for resp, err := range c.ListProcesses(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*LiveVideoAnalyticsClient) ListPublicOperators ¶
func (c *LiveVideoAnalyticsClient) ListPublicOperators(ctx context.Context, req *visionaipb.ListPublicOperatorsRequest, opts ...gax.CallOption) *OperatorIterator
ListPublicOperators listPublicOperators returns all the operators in public registry.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListPublicOperatorsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListPublicOperatorsRequest. } it := c.ListPublicOperators(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListPublicOperatorsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListPublicOperatorsRequest. } for resp, err := range c.ListPublicOperators(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*LiveVideoAnalyticsClient) ResolveOperatorInfo ¶
func (c *LiveVideoAnalyticsClient) ResolveOperatorInfo(ctx context.Context, req *visionaipb.ResolveOperatorInfoRequest, opts ...gax.CallOption) (*visionaipb.ResolveOperatorInfoResponse, error)
ResolveOperatorInfo resolveOperatorInfo returns the operator information based on the request.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ResolveOperatorInfoRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ResolveOperatorInfoRequest. } resp, err := c.ResolveOperatorInfo(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) UpdateAnalysis ¶
func (c *LiveVideoAnalyticsClient) UpdateAnalysis(ctx context.Context, req *visionaipb.UpdateAnalysisRequest, opts ...gax.CallOption) (*UpdateAnalysisOperation, error)
UpdateAnalysis updates the parameters of a single Analysis.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateAnalysisRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateAnalysisRequest. } op, err := c.UpdateAnalysis(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) UpdateAnalysisOperation ¶
func (c *LiveVideoAnalyticsClient) UpdateAnalysisOperation(name string) *UpdateAnalysisOperation
UpdateAnalysisOperation returns a new UpdateAnalysisOperation from a given name. The name must be that of a previously created UpdateAnalysisOperation, possibly from a different process.
func (*LiveVideoAnalyticsClient) UpdateOperator ¶
func (c *LiveVideoAnalyticsClient) UpdateOperator(ctx context.Context, req *visionaipb.UpdateOperatorRequest, opts ...gax.CallOption) (*UpdateOperatorOperation, error)
UpdateOperator updates the parameters of a single Operator.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateOperatorRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateOperatorRequest. } op, err := c.UpdateOperator(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) UpdateOperatorOperation ¶
func (c *LiveVideoAnalyticsClient) UpdateOperatorOperation(name string) *UpdateOperatorOperation
UpdateOperatorOperation returns a new UpdateOperatorOperation from a given name. The name must be that of a previously created UpdateOperatorOperation, possibly from a different process.
func (*LiveVideoAnalyticsClient) UpdateProcess ¶
func (c *LiveVideoAnalyticsClient) UpdateProcess(ctx context.Context, req *visionaipb.UpdateProcessRequest, opts ...gax.CallOption) (*UpdateProcessOperation, error)
UpdateProcess updates the parameters of a single Process.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewLiveVideoAnalyticsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateProcessRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateProcessRequest. } op, err := c.UpdateProcess(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LiveVideoAnalyticsClient) UpdateProcessOperation ¶
func (c *LiveVideoAnalyticsClient) UpdateProcessOperation(name string) *UpdateProcessOperation
UpdateProcessOperation returns a new UpdateProcessOperation from a given name. The name must be that of a previously created UpdateProcessOperation, possibly from a different process.
type MaterializeChannelOperation ¶
type MaterializeChannelOperation struct {
// contains filtered or unexported fields
}
MaterializeChannelOperation manages a long-running operation from MaterializeChannel.
func (*MaterializeChannelOperation) Done ¶
func (op *MaterializeChannelOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*MaterializeChannelOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*MaterializeChannelOperation) Poll ¶
func (op *MaterializeChannelOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*MaterializeChannelOperation) Wait ¶
func (op *MaterializeChannelOperation) Wait(ctx context.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.
type OperationIterator ¶
type OperationIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) // contains filtered or unexported fields }
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All ¶ added in v0.3.0
func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*OperationIterator) Next ¶
func (it *OperationIterator) Next() (*longrunningpb.Operation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo ¶
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type OperatorIterator ¶
type OperatorIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Operator, nextPageToken string, err error) // contains filtered or unexported fields }
OperatorIterator manages a stream of *visionaipb.Operator.
func (*OperatorIterator) All ¶ added in v0.3.0
func (it *OperatorIterator) All() iter.Seq2[*visionaipb.Operator, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*OperatorIterator) PageInfo ¶
func (it *OperatorIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ProcessIterator ¶
type ProcessIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Process, nextPageToken string, err error) // contains filtered or unexported fields }
ProcessIterator manages a stream of *visionaipb.Process.
func (*ProcessIterator) All ¶ added in v0.3.0
func (it *ProcessIterator) All() iter.Seq2[*visionaipb.Process, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*ProcessIterator) PageInfo ¶
func (it *ProcessIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ProcessorIterator ¶
type ProcessorIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Processor, nextPageToken string, err error) // contains filtered or unexported fields }
ProcessorIterator manages a stream of *visionaipb.Processor.
func (*ProcessorIterator) All ¶ added in v0.3.0
func (it *ProcessorIterator) All() iter.Seq2[*visionaipb.Processor, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*ProcessorIterator) PageInfo ¶
func (it *ProcessorIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type RemoveApplicationStreamInputOperation ¶
type RemoveApplicationStreamInputOperation struct {
// contains filtered or unexported fields
}
RemoveApplicationStreamInputOperation manages a long-running operation from RemoveApplicationStreamInput.
func (*RemoveApplicationStreamInputOperation) Done ¶
func (op *RemoveApplicationStreamInputOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*RemoveApplicationStreamInputOperation) Poll ¶
func (op *RemoveApplicationStreamInputOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*RemoveApplicationStreamInputOperation) Wait ¶
func (op *RemoveApplicationStreamInputOperation) Wait(ctx context.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.
type RemoveIndexAssetOperation ¶
type RemoveIndexAssetOperation struct {
// contains filtered or unexported fields
}
RemoveIndexAssetOperation manages a long-running operation from RemoveIndexAsset.
func (*RemoveIndexAssetOperation) Done ¶
func (op *RemoveIndexAssetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*RemoveIndexAssetOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*RemoveIndexAssetOperation) Poll ¶
func (op *RemoveIndexAssetOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*RemoveIndexAssetOperation) Wait ¶
func (op *RemoveIndexAssetOperation) Wait(ctx context.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.
type SearchConfigIterator ¶
type SearchConfigIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.SearchConfig, nextPageToken string, err error) // contains filtered or unexported fields }
SearchConfigIterator manages a stream of *visionaipb.SearchConfig.
func (*SearchConfigIterator) All ¶ added in v0.3.0
func (it *SearchConfigIterator) All() iter.Seq2[*visionaipb.SearchConfig, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*SearchConfigIterator) PageInfo ¶
func (it *SearchConfigIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type SearchHypernymIterator ¶
type SearchHypernymIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.SearchHypernym, nextPageToken string, err error) // contains filtered or unexported fields }
SearchHypernymIterator manages a stream of *visionaipb.SearchHypernym.
func (*SearchHypernymIterator) All ¶ added in v0.3.0
func (it *SearchHypernymIterator) All() iter.Seq2[*visionaipb.SearchHypernym, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*SearchHypernymIterator) PageInfo ¶
func (it *SearchHypernymIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type SearchResultItemIterator ¶
type SearchResultItemIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.SearchResultItem, nextPageToken string, err error) // contains filtered or unexported fields }
SearchResultItemIterator manages a stream of *visionaipb.SearchResultItem.
func (*SearchResultItemIterator) All ¶ added in v0.3.0
func (it *SearchResultItemIterator) All() iter.Seq2[*visionaipb.SearchResultItem, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*SearchResultItemIterator) PageInfo ¶
func (it *SearchResultItemIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type SeriesIterator ¶
type SeriesIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Series, nextPageToken string, err error) // contains filtered or unexported fields }
SeriesIterator manages a stream of *visionaipb.Series.
func (*SeriesIterator) All ¶ added in v0.3.0
func (it *SeriesIterator) All() iter.Seq2[*visionaipb.Series, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*SeriesIterator) PageInfo ¶
func (it *SeriesIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type StreamIterator ¶
type StreamIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Stream, nextPageToken string, err error) // contains filtered or unexported fields }
StreamIterator manages a stream of *visionaipb.Stream.
func (*StreamIterator) All ¶ added in v0.3.0
func (it *StreamIterator) All() iter.Seq2[*visionaipb.Stream, error]
All returns an iterator. If an error is returned by the iterator, the iterator 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 more results. Once Next returns Done, all subsequent calls will return Done.
func (*StreamIterator) PageInfo ¶
func (it *StreamIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type StreamingCallOptions ¶
type StreamingCallOptions struct { SendPackets []gax.CallOption ReceivePackets []gax.CallOption ReceiveEvents []gax.CallOption AcquireLease []gax.CallOption RenewLease []gax.CallOption ReleaseLease []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
StreamingCallOptions contains the retry settings for each method of StreamingClient.
type StreamingClient ¶
type StreamingClient struct { // The call options for this service. CallOptions *StreamingCallOptions // contains filtered or unexported fields }
StreamingClient is a client for interacting with Vision AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Streaming service for receiving and sending packets.
func NewStreamingClient ¶
func NewStreamingClient(ctx context.Context, opts ...option.ClientOption) (*StreamingClient, error)
NewStreamingClient creates a new streaming service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Streaming service for receiving and sending packets.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewStreamingRESTClient ¶
func NewStreamingRESTClient(ctx context.Context, opts ...option.ClientOption) (*StreamingClient, error)
NewStreamingRESTClient creates a new streaming service rest client.
Streaming service for receiving and sending packets.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*StreamingClient) AcquireLease ¶
func (c *StreamingClient) AcquireLease(ctx context.Context, req *visionaipb.AcquireLeaseRequest, opts ...gax.CallOption) (*visionaipb.Lease, error)
AcquireLease acquireLease acquires a lease.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.AcquireLeaseRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AcquireLeaseRequest. } resp, err := c.AcquireLease(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamingClient) CancelOperation ¶
func (c *StreamingClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*StreamingClient) Close ¶
func (c *StreamingClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*StreamingClient) Connection
deprecated
func (c *StreamingClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*StreamingClient) DeleteOperation ¶
func (c *StreamingClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*StreamingClient) GetOperation ¶
func (c *StreamingClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamingClient) ListOperations ¶
func (c *StreamingClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*StreamingClient) ReceiveEvents ¶
func (c *StreamingClient) ReceiveEvents(ctx context.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 ¶
package main import ( "context" "io" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() stream, err := c.ReceiveEvents(ctx) if err != nil { // TODO: Handle error. } go func() { reqs := []*visionaipb.ReceiveEventsRequest{ // TODO: Create requests. } for _, req := range reqs { if err := stream.Send(req); err != nil { // TODO: Handle error. } } stream.CloseSend() }() for { resp, err := stream.Recv() if err == io.EOF { break } if err != nil { // TODO: handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*StreamingClient) ReceivePackets ¶
func (c *StreamingClient) ReceivePackets(ctx context.Context, opts ...gax.CallOption) (visionaipb.StreamingService_ReceivePacketsClient, error)
ReceivePackets receive packets from the series.
This method is not supported for the REST transport.
Example ¶
package main import ( "context" "io" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() stream, err := c.ReceivePackets(ctx) if err != nil { // TODO: Handle error. } go func() { reqs := []*visionaipb.ReceivePacketsRequest{ // TODO: Create requests. } for _, req := range reqs { if err := stream.Send(req); err != nil { // TODO: Handle error. } } stream.CloseSend() }() for { resp, err := stream.Recv() if err == io.EOF { break } if err != nil { // TODO: handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*StreamingClient) ReleaseLease ¶
func (c *StreamingClient) ReleaseLease(ctx context.Context, req *visionaipb.ReleaseLeaseRequest, opts ...gax.CallOption) (*visionaipb.ReleaseLeaseResponse, error)
ReleaseLease rleaseLease releases a lease.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ReleaseLeaseRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ReleaseLeaseRequest. } resp, err := c.ReleaseLease(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamingClient) RenewLease ¶
func (c *StreamingClient) RenewLease(ctx context.Context, req *visionaipb.RenewLeaseRequest, opts ...gax.CallOption) (*visionaipb.Lease, error)
RenewLease renewLease renews a lease.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.RenewLeaseRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#RenewLeaseRequest. } resp, err := c.RenewLease(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamingClient) SendPackets ¶
func (c *StreamingClient) SendPackets(ctx context.Context, opts ...gax.CallOption) (visionaipb.StreamingService_SendPacketsClient, error)
SendPackets send packets to the series.
This method is not supported for the REST transport.
Example ¶
package main import ( "context" "io" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamingClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() stream, err := c.SendPackets(ctx) if err != nil { // TODO: Handle error. } go func() { reqs := []*visionaipb.SendPacketsRequest{ // TODO: Create requests. } for _, req := range reqs { if err := stream.Send(req); err != nil { // TODO: Handle error. } } stream.CloseSend() }() for { resp, err := stream.Recv() if err == io.EOF { break } if err != nil { // TODO: handle error. } // TODO: Use resp. _ = resp } }
Output:
type StreamsCallOptions ¶
type StreamsCallOptions struct { ListClusters []gax.CallOption GetCluster []gax.CallOption CreateCluster []gax.CallOption UpdateCluster []gax.CallOption DeleteCluster []gax.CallOption ListStreams []gax.CallOption GetStream []gax.CallOption CreateStream []gax.CallOption UpdateStream []gax.CallOption DeleteStream []gax.CallOption GetStreamThumbnail []gax.CallOption GenerateStreamHlsToken []gax.CallOption ListEvents []gax.CallOption GetEvent []gax.CallOption CreateEvent []gax.CallOption UpdateEvent []gax.CallOption DeleteEvent []gax.CallOption ListSeries []gax.CallOption GetSeries []gax.CallOption CreateSeries []gax.CallOption UpdateSeries []gax.CallOption DeleteSeries []gax.CallOption MaterializeChannel []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
StreamsCallOptions contains the retry settings for each method of StreamsClient.
type StreamsClient ¶
type StreamsClient struct { // The call options for this service. CallOptions *StreamsCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
StreamsClient is a client for interacting with Vision AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service describing handlers for resources. Vision API and Vision AI API are two independent APIs developed by the same team. Vision API is for people to annotate their image while Vision AI is an e2e solution for customer to build their own computer vision application.
func NewStreamsClient ¶
func NewStreamsClient(ctx context.Context, opts ...option.ClientOption) (*StreamsClient, error)
NewStreamsClient creates a new streams service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service describing handlers for resources. Vision API and Vision AI API are two independent APIs developed by the same team. Vision API is for people to annotate their image while Vision AI is an e2e solution for customer to build their own computer vision application.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewStreamsRESTClient ¶
func NewStreamsRESTClient(ctx context.Context, opts ...option.ClientOption) (*StreamsClient, error)
NewStreamsRESTClient creates a new streams service rest client.
Service describing handlers for resources. Vision API and Vision AI API are two independent APIs developed by the same team. Vision API is for people to annotate their image while Vision AI is an e2e solution for customer to build their own computer vision application.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*StreamsClient) CancelOperation ¶
func (c *StreamsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*StreamsClient) Close ¶
func (c *StreamsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*StreamsClient) Connection
deprecated
func (c *StreamsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*StreamsClient) CreateCluster ¶
func (c *StreamsClient) CreateCluster(ctx context.Context, req *visionaipb.CreateClusterRequest, opts ...gax.CallOption) (*CreateClusterOperation, error)
CreateCluster creates a new Cluster in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateClusterRequest. } op, err := c.CreateCluster(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) CreateClusterOperation ¶
func (c *StreamsClient) CreateClusterOperation(name string) *CreateClusterOperation
CreateClusterOperation returns a new CreateClusterOperation from a given name. The name must be that of a previously created CreateClusterOperation, possibly from a different process.
func (*StreamsClient) CreateEvent ¶
func (c *StreamsClient) CreateEvent(ctx context.Context, req *visionaipb.CreateEventRequest, opts ...gax.CallOption) (*CreateEventOperation, error)
CreateEvent creates a new Event in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateEventRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateEventRequest. } op, err := c.CreateEvent(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) CreateEventOperation ¶
func (c *StreamsClient) CreateEventOperation(name string) *CreateEventOperation
CreateEventOperation returns a new CreateEventOperation from a given name. The name must be that of a previously created CreateEventOperation, possibly from a different process.
func (*StreamsClient) CreateSeries ¶
func (c *StreamsClient) CreateSeries(ctx context.Context, req *visionaipb.CreateSeriesRequest, opts ...gax.CallOption) (*CreateSeriesOperation, error)
CreateSeries creates a new Series in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateSeriesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateSeriesRequest. } op, err := c.CreateSeries(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) CreateSeriesOperation ¶
func (c *StreamsClient) CreateSeriesOperation(name string) *CreateSeriesOperation
CreateSeriesOperation returns a new CreateSeriesOperation from a given name. The name must be that of a previously created CreateSeriesOperation, possibly from a different process.
func (*StreamsClient) CreateStream ¶
func (c *StreamsClient) CreateStream(ctx context.Context, req *visionaipb.CreateStreamRequest, opts ...gax.CallOption) (*CreateStreamOperation, error)
CreateStream creates a new Stream in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateStreamRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateStreamRequest. } op, err := c.CreateStream(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) CreateStreamOperation ¶
func (c *StreamsClient) CreateStreamOperation(name string) *CreateStreamOperation
CreateStreamOperation returns a new CreateStreamOperation from a given name. The name must be that of a previously created CreateStreamOperation, possibly from a different process.
func (*StreamsClient) DeleteCluster ¶
func (c *StreamsClient) DeleteCluster(ctx context.Context, req *visionaipb.DeleteClusterRequest, opts ...gax.CallOption) (*DeleteClusterOperation, error)
DeleteCluster deletes a single Cluster.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteClusterRequest. } op, err := c.DeleteCluster(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*StreamsClient) DeleteClusterOperation ¶
func (c *StreamsClient) DeleteClusterOperation(name string) *DeleteClusterOperation
DeleteClusterOperation returns a new DeleteClusterOperation from a given name. The name must be that of a previously created DeleteClusterOperation, possibly from a different process.
func (*StreamsClient) DeleteEvent ¶
func (c *StreamsClient) DeleteEvent(ctx context.Context, req *visionaipb.DeleteEventRequest, opts ...gax.CallOption) (*DeleteEventOperation, error)
DeleteEvent deletes a single Event.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteEventRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteEventRequest. } op, err := c.DeleteEvent(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*StreamsClient) DeleteEventOperation ¶
func (c *StreamsClient) DeleteEventOperation(name string) *DeleteEventOperation
DeleteEventOperation returns a new DeleteEventOperation from a given name. The name must be that of a previously created DeleteEventOperation, possibly from a different process.
func (*StreamsClient) DeleteOperation ¶
func (c *StreamsClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*StreamsClient) DeleteSeries ¶
func (c *StreamsClient) DeleteSeries(ctx context.Context, req *visionaipb.DeleteSeriesRequest, opts ...gax.CallOption) (*DeleteSeriesOperation, error)
DeleteSeries deletes a single Series.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteSeriesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteSeriesRequest. } op, err := c.DeleteSeries(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*StreamsClient) DeleteSeriesOperation ¶
func (c *StreamsClient) DeleteSeriesOperation(name string) *DeleteSeriesOperation
DeleteSeriesOperation returns a new DeleteSeriesOperation from a given name. The name must be that of a previously created DeleteSeriesOperation, possibly from a different process.
func (*StreamsClient) DeleteStream ¶
func (c *StreamsClient) DeleteStream(ctx context.Context, req *visionaipb.DeleteStreamRequest, opts ...gax.CallOption) (*DeleteStreamOperation, error)
DeleteStream deletes a single Stream.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteStreamRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteStreamRequest. } op, err := c.DeleteStream(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*StreamsClient) DeleteStreamOperation ¶
func (c *StreamsClient) DeleteStreamOperation(name string) *DeleteStreamOperation
DeleteStreamOperation returns a new DeleteStreamOperation from a given name. The name must be that of a previously created DeleteStreamOperation, possibly from a different process.
func (*StreamsClient) GenerateStreamHlsToken ¶
func (c *StreamsClient) GenerateStreamHlsToken(ctx context.Context, req *visionaipb.GenerateStreamHlsTokenRequest, opts ...gax.CallOption) (*visionaipb.GenerateStreamHlsTokenResponse, error)
GenerateStreamHlsToken generate the JWT auth token required to get the stream HLS contents.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GenerateStreamHlsTokenRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GenerateStreamHlsTokenRequest. } resp, err := c.GenerateStreamHlsToken(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) GetCluster ¶
func (c *StreamsClient) GetCluster(ctx context.Context, req *visionaipb.GetClusterRequest, opts ...gax.CallOption) (*visionaipb.Cluster, error)
GetCluster gets details of a single Cluster.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetClusterRequest. } resp, err := c.GetCluster(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) GetEvent ¶
func (c *StreamsClient) GetEvent(ctx context.Context, req *visionaipb.GetEventRequest, opts ...gax.CallOption) (*visionaipb.Event, error)
GetEvent gets details of a single Event.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetEventRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetEventRequest. } resp, err := c.GetEvent(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) GetOperation ¶
func (c *StreamsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) GetSeries ¶
func (c *StreamsClient) GetSeries(ctx context.Context, req *visionaipb.GetSeriesRequest, opts ...gax.CallOption) (*visionaipb.Series, error)
GetSeries gets details of a single Series.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetSeriesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetSeriesRequest. } resp, err := c.GetSeries(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) GetStream ¶
func (c *StreamsClient) GetStream(ctx context.Context, req *visionaipb.GetStreamRequest, opts ...gax.CallOption) (*visionaipb.Stream, error)
GetStream gets details of a single Stream.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetStreamRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetStreamRequest. } resp, err := c.GetStream(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) GetStreamThumbnail ¶
func (c *StreamsClient) GetStreamThumbnail(ctx context.Context, req *visionaipb.GetStreamThumbnailRequest, opts ...gax.CallOption) (*GetStreamThumbnailOperation, error)
GetStreamThumbnail gets the thumbnail (image snapshot) of a single Stream.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetStreamThumbnailRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetStreamThumbnailRequest. } op, err := c.GetStreamThumbnail(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) GetStreamThumbnailOperation ¶
func (c *StreamsClient) GetStreamThumbnailOperation(name string) *GetStreamThumbnailOperation
GetStreamThumbnailOperation returns a new GetStreamThumbnailOperation from a given name. The name must be that of a previously created GetStreamThumbnailOperation, possibly from a different process.
func (*StreamsClient) ListClusters ¶
func (c *StreamsClient) ListClusters(ctx context.Context, req *visionaipb.ListClustersRequest, opts ...gax.CallOption) *ClusterIterator
ListClusters lists Clusters in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListClustersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListClustersRequest. } it := c.ListClusters(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListClustersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListClustersRequest. } for resp, err := range c.ListClusters(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*StreamsClient) ListEvents ¶
func (c *StreamsClient) ListEvents(ctx context.Context, req *visionaipb.ListEventsRequest, opts ...gax.CallOption) *EventIterator
ListEvents lists Events in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListEventsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListEventsRequest. } it := c.ListEvents(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListEventsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListEventsRequest. } for resp, err := range c.ListEvents(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*StreamsClient) ListOperations ¶
func (c *StreamsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*StreamsClient) ListSeries ¶
func (c *StreamsClient) ListSeries(ctx context.Context, req *visionaipb.ListSeriesRequest, opts ...gax.CallOption) *SeriesIterator
ListSeries lists Series in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListSeriesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSeriesRequest. } it := c.ListSeries(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListSeriesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSeriesRequest. } for resp, err := range c.ListSeries(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*StreamsClient) ListStreams ¶
func (c *StreamsClient) ListStreams(ctx context.Context, req *visionaipb.ListStreamsRequest, opts ...gax.CallOption) *StreamIterator
ListStreams lists Streams in a given project and location.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListStreamsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListStreamsRequest. } it := c.ListStreams(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListStreamsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListStreamsRequest. } for resp, err := range c.ListStreams(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*StreamsClient) MaterializeChannel ¶
func (c *StreamsClient) MaterializeChannel(ctx context.Context, req *visionaipb.MaterializeChannelRequest, opts ...gax.CallOption) (*MaterializeChannelOperation, error)
MaterializeChannel materialize a channel.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.MaterializeChannelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#MaterializeChannelRequest. } op, err := c.MaterializeChannel(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) MaterializeChannelOperation ¶
func (c *StreamsClient) MaterializeChannelOperation(name string) *MaterializeChannelOperation
MaterializeChannelOperation returns a new MaterializeChannelOperation from a given name. The name must be that of a previously created MaterializeChannelOperation, possibly from a different process.
func (*StreamsClient) UpdateCluster ¶
func (c *StreamsClient) UpdateCluster(ctx context.Context, req *visionaipb.UpdateClusterRequest, opts ...gax.CallOption) (*UpdateClusterOperation, error)
UpdateCluster updates the parameters of a single Cluster.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateClusterRequest. } op, err := c.UpdateCluster(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) UpdateClusterOperation ¶
func (c *StreamsClient) UpdateClusterOperation(name string) *UpdateClusterOperation
UpdateClusterOperation returns a new UpdateClusterOperation from a given name. The name must be that of a previously created UpdateClusterOperation, possibly from a different process.
func (*StreamsClient) UpdateEvent ¶
func (c *StreamsClient) UpdateEvent(ctx context.Context, req *visionaipb.UpdateEventRequest, opts ...gax.CallOption) (*UpdateEventOperation, error)
UpdateEvent updates the parameters of a single Event.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateEventRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateEventRequest. } op, err := c.UpdateEvent(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) UpdateEventOperation ¶
func (c *StreamsClient) UpdateEventOperation(name string) *UpdateEventOperation
UpdateEventOperation returns a new UpdateEventOperation from a given name. The name must be that of a previously created UpdateEventOperation, possibly from a different process.
func (*StreamsClient) UpdateSeries ¶
func (c *StreamsClient) UpdateSeries(ctx context.Context, req *visionaipb.UpdateSeriesRequest, opts ...gax.CallOption) (*UpdateSeriesOperation, error)
UpdateSeries updates the parameters of a single Event.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateSeriesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateSeriesRequest. } op, err := c.UpdateSeries(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) UpdateSeriesOperation ¶
func (c *StreamsClient) UpdateSeriesOperation(name string) *UpdateSeriesOperation
UpdateSeriesOperation returns a new UpdateSeriesOperation from a given name. The name must be that of a previously created UpdateSeriesOperation, possibly from a different process.
func (*StreamsClient) UpdateStream ¶
func (c *StreamsClient) UpdateStream(ctx context.Context, req *visionaipb.UpdateStreamRequest, opts ...gax.CallOption) (*UpdateStreamOperation, error)
UpdateStream updates the parameters of a single Stream.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewStreamsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateStreamRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateStreamRequest. } op, err := c.UpdateStream(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*StreamsClient) UpdateStreamOperation ¶
func (c *StreamsClient) UpdateStreamOperation(name string) *UpdateStreamOperation
UpdateStreamOperation returns a new UpdateStreamOperation from a given name. The name must be that of a previously created UpdateStreamOperation, possibly from a different process.
type UndeployApplicationOperation ¶
type UndeployApplicationOperation struct {
// contains filtered or unexported fields
}
UndeployApplicationOperation manages a long-running operation from UndeployApplication.
func (*UndeployApplicationOperation) Done ¶
func (op *UndeployApplicationOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UndeployApplicationOperation) Poll ¶
func (op *UndeployApplicationOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UndeployApplicationOperation) Wait ¶
func (op *UndeployApplicationOperation) Wait(ctx context.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.
type UndeployIndexOperation ¶
type UndeployIndexOperation struct {
// contains filtered or unexported fields
}
UndeployIndexOperation manages a long-running operation from UndeployIndex.
func (*UndeployIndexOperation) Done ¶
func (op *UndeployIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UndeployIndexOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UndeployIndexOperation) Poll ¶
func (op *UndeployIndexOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UndeployIndexOperation) Wait ¶
func (op *UndeployIndexOperation) Wait(ctx context.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.
type UpdateAnalysisOperation ¶
type UpdateAnalysisOperation struct {
// contains filtered or unexported fields
}
UpdateAnalysisOperation manages a long-running operation from UpdateAnalysis.
func (*UpdateAnalysisOperation) Done ¶
func (op *UpdateAnalysisOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateAnalysisOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateAnalysisOperation) Poll ¶
func (op *UpdateAnalysisOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateAnalysisOperation) Wait ¶
func (op *UpdateAnalysisOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateApplicationInstancesOperation ¶
type UpdateApplicationInstancesOperation struct {
// contains filtered or unexported fields
}
UpdateApplicationInstancesOperation manages a long-running operation from UpdateApplicationInstances.
func (*UpdateApplicationInstancesOperation) Done ¶
func (op *UpdateApplicationInstancesOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateApplicationInstancesOperation) Poll ¶
func (op *UpdateApplicationInstancesOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateApplicationInstancesOperation) Wait ¶
func (op *UpdateApplicationInstancesOperation) Wait(ctx context.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.
type UpdateApplicationOperation ¶
type UpdateApplicationOperation struct {
// contains filtered or unexported fields
}
UpdateApplicationOperation manages a long-running operation from UpdateApplication.
func (*UpdateApplicationOperation) Done ¶
func (op *UpdateApplicationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateApplicationOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateApplicationOperation) Poll ¶
func (op *UpdateApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateApplicationOperation) Wait ¶
func (op *UpdateApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateApplicationStreamInputOperation ¶
type UpdateApplicationStreamInputOperation struct {
// contains filtered or unexported fields
}
UpdateApplicationStreamInputOperation manages a long-running operation from UpdateApplicationStreamInput.
func (*UpdateApplicationStreamInputOperation) Done ¶
func (op *UpdateApplicationStreamInputOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateApplicationStreamInputOperation) Poll ¶
func (op *UpdateApplicationStreamInputOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateApplicationStreamInputOperation) Wait ¶
func (op *UpdateApplicationStreamInputOperation) Wait(ctx context.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.
type UpdateClusterOperation ¶
type UpdateClusterOperation struct {
// contains filtered or unexported fields
}
UpdateClusterOperation manages a long-running operation from UpdateCluster.
func (*UpdateClusterOperation) Done ¶
func (op *UpdateClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateClusterOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateClusterOperation) Poll ¶
func (op *UpdateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateClusterOperation) Wait ¶
func (op *UpdateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateDraftOperation ¶
type UpdateDraftOperation struct {
// contains filtered or unexported fields
}
UpdateDraftOperation manages a long-running operation from UpdateDraft.
func (*UpdateDraftOperation) Done ¶
func (op *UpdateDraftOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateDraftOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateDraftOperation) Poll ¶
func (op *UpdateDraftOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateDraftOperation) Wait ¶
func (op *UpdateDraftOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateEventOperation ¶
type UpdateEventOperation struct {
// contains filtered or unexported fields
}
UpdateEventOperation manages a long-running operation from UpdateEvent.
func (*UpdateEventOperation) Done ¶
func (op *UpdateEventOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateEventOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateEventOperation) Poll ¶
func (op *UpdateEventOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateEventOperation) Wait ¶
func (op *UpdateEventOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateIndexEndpointOperation ¶
type UpdateIndexEndpointOperation struct {
// contains filtered or unexported fields
}
UpdateIndexEndpointOperation manages a long-running operation from UpdateIndexEndpoint.
func (*UpdateIndexEndpointOperation) Done ¶
func (op *UpdateIndexEndpointOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateIndexEndpointOperation) Poll ¶
func (op *UpdateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateIndexEndpointOperation) Wait ¶
func (op *UpdateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateIndexOperation ¶
type UpdateIndexOperation struct {
// contains filtered or unexported fields
}
UpdateIndexOperation manages a long-running operation from UpdateIndex.
func (*UpdateIndexOperation) Done ¶
func (op *UpdateIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateIndexOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateIndexOperation) Poll ¶
func (op *UpdateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateIndexOperation) Wait ¶
func (op *UpdateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateOperatorOperation ¶
type UpdateOperatorOperation struct {
// contains filtered or unexported fields
}
UpdateOperatorOperation manages a long-running operation from UpdateOperator.
func (*UpdateOperatorOperation) Done ¶
func (op *UpdateOperatorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateOperatorOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateOperatorOperation) Poll ¶
func (op *UpdateOperatorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateOperatorOperation) Wait ¶
func (op *UpdateOperatorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateProcessOperation ¶
type UpdateProcessOperation struct {
// contains filtered or unexported fields
}
UpdateProcessOperation manages a long-running operation from UpdateProcess.
func (*UpdateProcessOperation) Done ¶
func (op *UpdateProcessOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateProcessOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateProcessOperation) Poll ¶
func (op *UpdateProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateProcessOperation) Wait ¶
func (op *UpdateProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateProcessorOperation ¶
type UpdateProcessorOperation struct {
// contains filtered or unexported fields
}
UpdateProcessorOperation manages a long-running operation from UpdateProcessor.
func (*UpdateProcessorOperation) Done ¶
func (op *UpdateProcessorOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateProcessorOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateProcessorOperation) Poll ¶
func (op *UpdateProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateProcessorOperation) Wait ¶
func (op *UpdateProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateSeriesOperation ¶
type UpdateSeriesOperation struct {
// contains filtered or unexported fields
}
UpdateSeriesOperation manages a long-running operation from UpdateSeries.
func (*UpdateSeriesOperation) Done ¶
func (op *UpdateSeriesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateSeriesOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateSeriesOperation) Poll ¶
func (op *UpdateSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateSeriesOperation) Wait ¶
func (op *UpdateSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateStreamOperation ¶
type UpdateStreamOperation struct {
// contains filtered or unexported fields
}
UpdateStreamOperation manages a long-running operation from UpdateStream.
func (*UpdateStreamOperation) Done ¶
func (op *UpdateStreamOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateStreamOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateStreamOperation) Poll ¶
func (op *UpdateStreamOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateStreamOperation) Wait ¶
func (op *UpdateStreamOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UploadAssetOperation ¶
type UploadAssetOperation struct {
// contains filtered or unexported fields
}
UploadAssetOperation manages a long-running operation from UploadAsset.
func (*UploadAssetOperation) Done ¶
func (op *UploadAssetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UploadAssetOperation) Metadata ¶
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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UploadAssetOperation) Poll ¶
func (op *UploadAssetOperation) Poll(ctx context.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 and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UploadAssetOperation) Wait ¶
func (op *UploadAssetOperation) Wait(ctx context.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.
type WarehouseCallOptions ¶
type WarehouseCallOptions struct { CreateAsset []gax.CallOption UpdateAsset []gax.CallOption GetAsset []gax.CallOption ListAssets []gax.CallOption DeleteAsset []gax.CallOption UploadAsset []gax.CallOption GenerateRetrievalUrl []gax.CallOption AnalyzeAsset []gax.CallOption IndexAsset []gax.CallOption RemoveIndexAsset []gax.CallOption ViewIndexedAssets []gax.CallOption CreateIndex []gax.CallOption UpdateIndex []gax.CallOption GetIndex []gax.CallOption ListIndexes []gax.CallOption DeleteIndex []gax.CallOption CreateCorpus []gax.CallOption GetCorpus []gax.CallOption UpdateCorpus []gax.CallOption ListCorpora []gax.CallOption DeleteCorpus []gax.CallOption AnalyzeCorpus []gax.CallOption CreateDataSchema []gax.CallOption UpdateDataSchema []gax.CallOption GetDataSchema []gax.CallOption DeleteDataSchema []gax.CallOption ListDataSchemas []gax.CallOption CreateAnnotation []gax.CallOption GetAnnotation []gax.CallOption ListAnnotations []gax.CallOption UpdateAnnotation []gax.CallOption DeleteAnnotation []gax.CallOption IngestAsset []gax.CallOption ClipAsset []gax.CallOption GenerateHlsUri []gax.CallOption ImportAssets []gax.CallOption CreateSearchConfig []gax.CallOption UpdateSearchConfig []gax.CallOption GetSearchConfig []gax.CallOption DeleteSearchConfig []gax.CallOption ListSearchConfigs []gax.CallOption CreateSearchHypernym []gax.CallOption UpdateSearchHypernym []gax.CallOption GetSearchHypernym []gax.CallOption DeleteSearchHypernym []gax.CallOption ListSearchHypernyms []gax.CallOption SearchAssets []gax.CallOption SearchIndexEndpoint []gax.CallOption CreateIndexEndpoint []gax.CallOption GetIndexEndpoint []gax.CallOption ListIndexEndpoints []gax.CallOption UpdateIndexEndpoint []gax.CallOption DeleteIndexEndpoint []gax.CallOption DeployIndex []gax.CallOption UndeployIndex []gax.CallOption CreateCollection []gax.CallOption DeleteCollection []gax.CallOption GetCollection []gax.CallOption UpdateCollection []gax.CallOption ListCollections []gax.CallOption AddCollectionItem []gax.CallOption RemoveCollectionItem []gax.CallOption ViewCollectionItems []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
WarehouseCallOptions contains the retry settings for each method of WarehouseClient.
type WarehouseClient ¶
type WarehouseClient struct { // The call options for this service. CallOptions *WarehouseCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
WarehouseClient is a client for interacting with Vision AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service that manages media content + metadata for streaming.
func NewWarehouseClient ¶
func NewWarehouseClient(ctx context.Context, opts ...option.ClientOption) (*WarehouseClient, error)
NewWarehouseClient creates a new warehouse client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service that manages media content + metadata for streaming.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewWarehouseRESTClient ¶
func NewWarehouseRESTClient(ctx context.Context, opts ...option.ClientOption) (*WarehouseClient, error)
NewWarehouseRESTClient creates a new warehouse rest client.
Service that manages media content + metadata for streaming.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*WarehouseClient) AddCollectionItem ¶
func (c *WarehouseClient) AddCollectionItem(ctx context.Context, req *visionaipb.AddCollectionItemRequest, opts ...gax.CallOption) (*visionaipb.AddCollectionItemResponse, error)
AddCollectionItem adds an item into a Collection.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.AddCollectionItemRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AddCollectionItemRequest. } resp, err := c.AddCollectionItem(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) AnalyzeAsset ¶
func (c *WarehouseClient) AnalyzeAsset(ctx context.Context, req *visionaipb.AnalyzeAssetRequest, opts ...gax.CallOption) (*AnalyzeAssetOperation, error)
AnalyzeAsset analyze asset to power search capability.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.AnalyzeAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AnalyzeAssetRequest. } op, err := c.AnalyzeAsset(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) AnalyzeAssetOperation ¶
func (c *WarehouseClient) AnalyzeAssetOperation(name string) *AnalyzeAssetOperation
AnalyzeAssetOperation returns a new AnalyzeAssetOperation from a given name. The name must be that of a previously created AnalyzeAssetOperation, possibly from a different process.
func (*WarehouseClient) AnalyzeCorpus ¶
func (c *WarehouseClient) AnalyzeCorpus(ctx context.Context, req *visionaipb.AnalyzeCorpusRequest, opts ...gax.CallOption) (*AnalyzeCorpusOperation, error)
AnalyzeCorpus analyzes a corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.AnalyzeCorpusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#AnalyzeCorpusRequest. } op, err := c.AnalyzeCorpus(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) AnalyzeCorpusOperation ¶
func (c *WarehouseClient) AnalyzeCorpusOperation(name string) *AnalyzeCorpusOperation
AnalyzeCorpusOperation returns a new AnalyzeCorpusOperation from a given name. The name must be that of a previously created AnalyzeCorpusOperation, possibly from a different process.
func (*WarehouseClient) CancelOperation ¶
func (c *WarehouseClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) ClipAsset ¶
func (c *WarehouseClient) ClipAsset(ctx context.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, and generates a clip of the first content available after start_time and before end_time, which may overflow beyond these bounds. Returned clips are truncated if the total size of the clips are larger than 100MB.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ClipAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ClipAssetRequest. } resp, err := c.ClipAsset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) Close ¶
func (c *WarehouseClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*WarehouseClient) Connection
deprecated
func (c *WarehouseClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*WarehouseClient) CreateAnnotation ¶
func (c *WarehouseClient) CreateAnnotation(ctx context.Context, req *visionaipb.CreateAnnotationRequest, opts ...gax.CallOption) (*visionaipb.Annotation, error)
CreateAnnotation creates annotation inside asset.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateAnnotationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateAnnotationRequest. } resp, err := c.CreateAnnotation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) CreateAsset ¶
func (c *WarehouseClient) CreateAsset(ctx context.Context, req *visionaipb.CreateAssetRequest, opts ...gax.CallOption) (*visionaipb.Asset, error)
CreateAsset creates an asset inside corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateAssetRequest. } resp, err := c.CreateAsset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) CreateCollection ¶
func (c *WarehouseClient) CreateCollection(ctx context.Context, req *visionaipb.CreateCollectionRequest, opts ...gax.CallOption) (*CreateCollectionOperation, error)
CreateCollection creates a collection.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateCollectionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateCollectionRequest. } op, err := c.CreateCollection(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) CreateCollectionOperation ¶
func (c *WarehouseClient) CreateCollectionOperation(name string) *CreateCollectionOperation
CreateCollectionOperation returns a new CreateCollectionOperation from a given name. The name must be that of a previously created CreateCollectionOperation, possibly from a different process.
func (*WarehouseClient) CreateCorpus ¶
func (c *WarehouseClient) CreateCorpus(ctx context.Context, req *visionaipb.CreateCorpusRequest, opts ...gax.CallOption) (*CreateCorpusOperation, error)
CreateCorpus creates a corpus inside a project.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateCorpusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateCorpusRequest. } op, err := c.CreateCorpus(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) CreateCorpusOperation ¶
func (c *WarehouseClient) CreateCorpusOperation(name string) *CreateCorpusOperation
CreateCorpusOperation returns a new CreateCorpusOperation from a given name. The name must be that of a previously created CreateCorpusOperation, possibly from a different process.
func (*WarehouseClient) CreateDataSchema ¶
func (c *WarehouseClient) CreateDataSchema(ctx context.Context, req *visionaipb.CreateDataSchemaRequest, opts ...gax.CallOption) (*visionaipb.DataSchema, error)
CreateDataSchema creates data schema inside corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateDataSchemaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateDataSchemaRequest. } resp, err := c.CreateDataSchema(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) CreateIndex ¶
func (c *WarehouseClient) CreateIndex(ctx context.Context, req *visionaipb.CreateIndexRequest, opts ...gax.CallOption) (*CreateIndexOperation, error)
CreateIndex creates an Index under the corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateIndexRequest. } op, err := c.CreateIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) CreateIndexEndpoint ¶
func (c *WarehouseClient) CreateIndexEndpoint(ctx context.Context, req *visionaipb.CreateIndexEndpointRequest, opts ...gax.CallOption) (*CreateIndexEndpointOperation, error)
CreateIndexEndpoint creates an IndexEndpoint.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateIndexEndpointRequest. } op, err := c.CreateIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) CreateIndexEndpointOperation ¶
func (c *WarehouseClient) CreateIndexEndpointOperation(name string) *CreateIndexEndpointOperation
CreateIndexEndpointOperation returns a new CreateIndexEndpointOperation from a given name. The name must be that of a previously created CreateIndexEndpointOperation, possibly from a different process.
func (*WarehouseClient) CreateIndexOperation ¶
func (c *WarehouseClient) CreateIndexOperation(name string) *CreateIndexOperation
CreateIndexOperation returns a new CreateIndexOperation from a given name. The name must be that of a previously created CreateIndexOperation, possibly from a different process.
func (*WarehouseClient) CreateSearchConfig ¶
func (c *WarehouseClient) CreateSearchConfig(ctx context.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 existing SearchConfig.
Request must contain at least one non-empty search_criteria_property or facet_property.
mapped_fields must not be empty, and must map to existing UGA keys.
All mapped_fields must be of the same type.
All mapped_fields must share the same granularity.
All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateSearchConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateSearchConfigRequest. } resp, err := c.CreateSearchConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) CreateSearchHypernym ¶
func (c *WarehouseClient) CreateSearchHypernym(ctx context.Context, req *visionaipb.CreateSearchHypernymRequest, opts ...gax.CallOption) (*visionaipb.SearchHypernym, error)
CreateSearchHypernym creates a SearchHypernym inside a corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.CreateSearchHypernymRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#CreateSearchHypernymRequest. } resp, err := c.CreateSearchHypernym(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) DeleteAnnotation ¶
func (c *WarehouseClient) DeleteAnnotation(ctx context.Context, req *visionaipb.DeleteAnnotationRequest, opts ...gax.CallOption) error
DeleteAnnotation deletes annotation inside asset.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteAnnotationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteAnnotationRequest. } err = c.DeleteAnnotation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) DeleteAsset ¶
func (c *WarehouseClient) DeleteAsset(ctx context.Context, req *visionaipb.DeleteAssetRequest, opts ...gax.CallOption) (*DeleteAssetOperation, error)
DeleteAsset deletes asset inside corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteAssetRequest. } op, err := c.DeleteAsset(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) DeleteAssetOperation ¶
func (c *WarehouseClient) DeleteAssetOperation(name string) *DeleteAssetOperation
DeleteAssetOperation returns a new DeleteAssetOperation from a given name. The name must be that of a previously created DeleteAssetOperation, possibly from a different process.
func (*WarehouseClient) DeleteCollection ¶
func (c *WarehouseClient) DeleteCollection(ctx context.Context, req *visionaipb.DeleteCollectionRequest, opts ...gax.CallOption) (*DeleteCollectionOperation, error)
DeleteCollection deletes a collection.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteCollectionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteCollectionRequest. } op, err := c.DeleteCollection(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) DeleteCollectionOperation ¶
func (c *WarehouseClient) DeleteCollectionOperation(name string) *DeleteCollectionOperation
DeleteCollectionOperation returns a new DeleteCollectionOperation from a given name. The name must be that of a previously created DeleteCollectionOperation, possibly from a different process.
func (*WarehouseClient) DeleteCorpus ¶
func (c *WarehouseClient) DeleteCorpus(ctx context.Context, req *visionaipb.DeleteCorpusRequest, opts ...gax.CallOption) error
DeleteCorpus deletes a corpus only if its empty. Returns empty response.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteCorpusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteCorpusRequest. } err = c.DeleteCorpus(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) DeleteDataSchema ¶
func (c *WarehouseClient) DeleteDataSchema(ctx context.Context, req *visionaipb.DeleteDataSchemaRequest, opts ...gax.CallOption) error
DeleteDataSchema deletes data schema inside corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteDataSchemaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteDataSchemaRequest. } err = c.DeleteDataSchema(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) DeleteIndex ¶
func (c *WarehouseClient) DeleteIndex(ctx context.Context, req *visionaipb.DeleteIndexRequest, opts ...gax.CallOption) (*DeleteIndexOperation, error)
DeleteIndex delete a single Index. In order to delete an index, the caller must make sure that it is not deployed to any index endpoint.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteIndexRequest. } op, err := c.DeleteIndex(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) DeleteIndexEndpoint ¶
func (c *WarehouseClient) DeleteIndexEndpoint(ctx context.Context, req *visionaipb.DeleteIndexEndpointRequest, opts ...gax.CallOption) (*DeleteIndexEndpointOperation, error)
DeleteIndexEndpoint deletes an IndexEndpoint.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteIndexEndpointRequest. } op, err := c.DeleteIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) DeleteIndexEndpointOperation ¶
func (c *WarehouseClient) DeleteIndexEndpointOperation(name string) *DeleteIndexEndpointOperation
DeleteIndexEndpointOperation returns a new DeleteIndexEndpointOperation from a given name. The name must be that of a previously created DeleteIndexEndpointOperation, possibly from a different process.
func (*WarehouseClient) DeleteIndexOperation ¶
func (c *WarehouseClient) DeleteIndexOperation(name string) *DeleteIndexOperation
DeleteIndexOperation returns a new DeleteIndexOperation from a given name. The name must be that of a previously created DeleteIndexOperation, possibly from a different process.
func (*WarehouseClient) DeleteOperation ¶
func (c *WarehouseClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) DeleteSearchConfig ¶
func (c *WarehouseClient) DeleteSearchConfig(ctx context.Context, req *visionaipb.DeleteSearchConfigRequest, opts ...gax.CallOption) error
DeleteSearchConfig deletes a search configuration inside a corpus.
For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteSearchConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteSearchConfigRequest. } err = c.DeleteSearchConfig(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) DeleteSearchHypernym ¶
func (c *WarehouseClient) DeleteSearchHypernym(ctx context.Context, req *visionaipb.DeleteSearchHypernymRequest, opts ...gax.CallOption) error
DeleteSearchHypernym deletes a SearchHypernym inside a corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeleteSearchHypernymRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeleteSearchHypernymRequest. } err = c.DeleteSearchHypernym(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*WarehouseClient) DeployIndex ¶
func (c *WarehouseClient) DeployIndex(ctx context.Context, req *visionaipb.DeployIndexRequest, opts ...gax.CallOption) (*DeployIndexOperation, error)
DeployIndex deploys an Index to IndexEndpoint.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.DeployIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#DeployIndexRequest. } op, err := c.DeployIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) DeployIndexOperation ¶
func (c *WarehouseClient) DeployIndexOperation(name string) *DeployIndexOperation
DeployIndexOperation returns a new DeployIndexOperation from a given name. The name must be that of a previously created DeployIndexOperation, possibly from a different process.
func (*WarehouseClient) GenerateHlsUri ¶
func (c *WarehouseClient) GenerateHlsUri(ctx context.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 time ranges, and generates a URI for an HLS manifest that covers all the requested time ranges.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GenerateHlsUriRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GenerateHlsUriRequest. } resp, err := c.GenerateHlsUri(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GenerateRetrievalUrl ¶
func (c *WarehouseClient) GenerateRetrievalUrl(ctx context.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 allow retrieval of cloud storage files in a different project.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GenerateRetrievalUrlRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GenerateRetrievalUrlRequest. } resp, err := c.GenerateRetrievalUrl(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GetAnnotation ¶
func (c *WarehouseClient) GetAnnotation(ctx context.Context, req *visionaipb.GetAnnotationRequest, opts ...gax.CallOption) (*visionaipb.Annotation, error)
GetAnnotation reads annotation inside asset.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetAnnotationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetAnnotationRequest. } resp, err := c.GetAnnotation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GetAsset ¶
func (c *WarehouseClient) GetAsset(ctx context.Context, req *visionaipb.GetAssetRequest, opts ...gax.CallOption) (*visionaipb.Asset, error)
GetAsset reads an asset inside corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetAssetRequest. } resp, err := c.GetAsset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GetCollection ¶
func (c *WarehouseClient) GetCollection(ctx context.Context, req *visionaipb.GetCollectionRequest, opts ...gax.CallOption) (*visionaipb.Collection, error)
GetCollection gets a collection.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetCollectionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetCollectionRequest. } resp, err := c.GetCollection(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GetCorpus ¶
func (c *WarehouseClient) GetCorpus(ctx context.Context, req *visionaipb.GetCorpusRequest, opts ...gax.CallOption) (*visionaipb.Corpus, error)
GetCorpus gets corpus details inside a project.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetCorpusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetCorpusRequest. } resp, err := c.GetCorpus(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GetDataSchema ¶
func (c *WarehouseClient) GetDataSchema(ctx context.Context, req *visionaipb.GetDataSchemaRequest, opts ...gax.CallOption) (*visionaipb.DataSchema, error)
GetDataSchema gets data schema inside corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetDataSchemaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetDataSchemaRequest. } resp, err := c.GetDataSchema(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GetIndex ¶
func (c *WarehouseClient) GetIndex(ctx context.Context, req *visionaipb.GetIndexRequest, opts ...gax.CallOption) (*visionaipb.Index, error)
GetIndex gets the details of a single Index under a Corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetIndexRequest. } resp, err := c.GetIndex(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GetIndexEndpoint ¶
func (c *WarehouseClient) GetIndexEndpoint(ctx context.Context, req *visionaipb.GetIndexEndpointRequest, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error)
GetIndexEndpoint gets an IndexEndpoint.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetIndexEndpointRequest. } resp, err := c.GetIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GetOperation ¶
func (c *WarehouseClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GetSearchConfig ¶
func (c *WarehouseClient) GetSearchConfig(ctx context.Context, req *visionaipb.GetSearchConfigRequest, opts ...gax.CallOption) (*visionaipb.SearchConfig, error)
GetSearchConfig gets a search configuration inside a corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetSearchConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetSearchConfigRequest. } resp, err := c.GetSearchConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) GetSearchHypernym ¶
func (c *WarehouseClient) GetSearchHypernym(ctx context.Context, req *visionaipb.GetSearchHypernymRequest, opts ...gax.CallOption) (*visionaipb.SearchHypernym, error)
GetSearchHypernym gets a SearchHypernym inside a corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.GetSearchHypernymRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#GetSearchHypernymRequest. } resp, err := c.GetSearchHypernym(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) ImportAssets ¶
func (c *WarehouseClient) ImportAssets(ctx context.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 a cloud storage uri) and its annotations.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ImportAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ImportAssetsRequest. } op, err := c.ImportAssets(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) ImportAssetsOperation ¶
func (c *WarehouseClient) ImportAssetsOperation(name string) *ImportAssetsOperation
ImportAssetsOperation returns a new ImportAssetsOperation from a given name. The name must be that of a previously created ImportAssetsOperation, possibly from a different process.
func (*WarehouseClient) IndexAsset ¶
func (c *WarehouseClient) IndexAsset(ctx context.Context, req *visionaipb.IndexAssetRequest, opts ...gax.CallOption) (*IndexAssetOperation, error)
IndexAsset index one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.IndexAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#IndexAssetRequest. } op, err := c.IndexAsset(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) IndexAssetOperation ¶
func (c *WarehouseClient) IndexAssetOperation(name string) *IndexAssetOperation
IndexAssetOperation returns a new IndexAssetOperation from a given name. The name must be that of a previously created IndexAssetOperation, possibly from a different process.
func (*WarehouseClient) IngestAsset ¶
func (c *WarehouseClient) IngestAsset(ctx context.Context, opts ...gax.CallOption) (visionaipb.Warehouse_IngestAssetClient, error)
IngestAsset ingests data for the asset. It is not allowed to ingest a data chunk which is already expired according to TTL. This method is only available via the gRPC API (not HTTP since bi-directional streaming is not supported via HTTP).
This method is not supported for the REST transport.
Example ¶
package main import ( "context" "io" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() stream, err := c.IngestAsset(ctx) if err != nil { // TODO: Handle error. } go func() { reqs := []*visionaipb.IngestAssetRequest{ // TODO: Create requests. } for _, req := range reqs { if err := stream.Send(req); err != nil { // TODO: Handle error. } } stream.CloseSend() }() for { resp, err := stream.Recv() if err == io.EOF { break } if err != nil { // TODO: handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ListAnnotations ¶
func (c *WarehouseClient) ListAnnotations(ctx context.Context, req *visionaipb.ListAnnotationsRequest, opts ...gax.CallOption) *AnnotationIterator
ListAnnotations lists a list of annotations inside asset.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListAnnotationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAnnotationsRequest. } it := c.ListAnnotations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListAnnotationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAnnotationsRequest. } for resp, err := range c.ListAnnotations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ListAssets ¶
func (c *WarehouseClient) ListAssets(ctx context.Context, req *visionaipb.ListAssetsRequest, opts ...gax.CallOption) *AssetIterator
ListAssets lists an list of assets inside corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAssetsRequest. } it := c.ListAssets(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListAssetsRequest. } for resp, err := range c.ListAssets(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ListCollections ¶
func (c *WarehouseClient) ListCollections(ctx context.Context, req *visionaipb.ListCollectionsRequest, opts ...gax.CallOption) *CollectionIterator
ListCollections lists collections inside a corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListCollectionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListCollectionsRequest. } it := c.ListCollections(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListCollectionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListCollectionsRequest. } for resp, err := range c.ListCollections(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ListCorpora ¶
func (c *WarehouseClient) ListCorpora(ctx context.Context, req *visionaipb.ListCorporaRequest, opts ...gax.CallOption) *CorpusIterator
ListCorpora lists all corpora in a project.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListCorporaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListCorporaRequest. } it := c.ListCorpora(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListCorporaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListCorporaRequest. } for resp, err := range c.ListCorpora(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ListDataSchemas ¶
func (c *WarehouseClient) ListDataSchemas(ctx context.Context, req *visionaipb.ListDataSchemasRequest, opts ...gax.CallOption) *DataSchemaIterator
ListDataSchemas lists a list of data schemas inside corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListDataSchemasRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListDataSchemasRequest. } it := c.ListDataSchemas(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListDataSchemasRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListDataSchemasRequest. } for resp, err := range c.ListDataSchemas(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ListIndexEndpoints ¶
func (c *WarehouseClient) ListIndexEndpoints(ctx context.Context, req *visionaipb.ListIndexEndpointsRequest, opts ...gax.CallOption) *IndexEndpointIterator
ListIndexEndpoints lists all IndexEndpoints in a project.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListIndexEndpointsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListIndexEndpointsRequest. } it := c.ListIndexEndpoints(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListIndexEndpointsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListIndexEndpointsRequest. } for resp, err := range c.ListIndexEndpoints(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ListIndexes ¶
func (c *WarehouseClient) ListIndexes(ctx context.Context, req *visionaipb.ListIndexesRequest, opts ...gax.CallOption) *IndexIterator
ListIndexes list all Indexes in a given Corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListIndexesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListIndexesRequest. } it := c.ListIndexes(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListIndexesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListIndexesRequest. } for resp, err := range c.ListIndexes(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ListOperations ¶
func (c *WarehouseClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionai "cloud.google.com/go/visionai/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ListSearchConfigs ¶
func (c *WarehouseClient) ListSearchConfigs(ctx context.Context, req *visionaipb.ListSearchConfigsRequest, opts ...gax.CallOption) *SearchConfigIterator
ListSearchConfigs lists all search configurations inside a corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListSearchConfigsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSearchConfigsRequest. } it := c.ListSearchConfigs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListSearchConfigsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSearchConfigsRequest. } for resp, err := range c.ListSearchConfigs(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ListSearchHypernyms ¶
func (c *WarehouseClient) ListSearchHypernyms(ctx context.Context, req *visionaipb.ListSearchHypernymsRequest, opts ...gax.CallOption) *SearchHypernymIterator
ListSearchHypernyms lists SearchHypernyms inside a corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListSearchHypernymsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSearchHypernymsRequest. } it := c.ListSearchHypernyms(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ListSearchHypernymsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ListSearchHypernymsRequest. } for resp, err := range c.ListSearchHypernyms(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) RemoveCollectionItem ¶
func (c *WarehouseClient) RemoveCollectionItem(ctx context.Context, req *visionaipb.RemoveCollectionItemRequest, opts ...gax.CallOption) (*visionaipb.RemoveCollectionItemResponse, error)
RemoveCollectionItem removes an item from a collection.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.RemoveCollectionItemRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#RemoveCollectionItemRequest. } resp, err := c.RemoveCollectionItem(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) RemoveIndexAsset ¶
func (c *WarehouseClient) RemoveIndexAsset(ctx context.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 ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.RemoveIndexAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#RemoveIndexAssetRequest. } op, err := c.RemoveIndexAsset(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) RemoveIndexAssetOperation ¶
func (c *WarehouseClient) RemoveIndexAssetOperation(name string) *RemoveIndexAssetOperation
RemoveIndexAssetOperation returns a new RemoveIndexAssetOperation from a given name. The name must be that of a previously created RemoveIndexAssetOperation, possibly from a different process.
func (*WarehouseClient) SearchAssets ¶
func (c *WarehouseClient) SearchAssets(ctx context.Context, req *visionaipb.SearchAssetsRequest, opts ...gax.CallOption) *SearchResultItemIterator
SearchAssets search media asset.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.SearchAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#SearchAssetsRequest. } it := c.SearchAssets(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.SearchAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#SearchAssetsRequest. } for resp, err := range c.SearchAssets(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) SearchIndexEndpoint ¶
func (c *WarehouseClient) SearchIndexEndpoint(ctx context.Context, req *visionaipb.SearchIndexEndpointRequest, opts ...gax.CallOption) *SearchResultItemIterator
SearchIndexEndpoint search a deployed index endpoint (IMAGE corpus type only).
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.SearchIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#SearchIndexEndpointRequest. } it := c.SearchIndexEndpoint(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.SearchIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#SearchIndexEndpointRequest. } for resp, err := range c.SearchIndexEndpoint(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) UndeployIndex ¶
func (c *WarehouseClient) UndeployIndex(ctx context.Context, req *visionaipb.UndeployIndexRequest, opts ...gax.CallOption) (*UndeployIndexOperation, error)
UndeployIndex undeploys an Index from IndexEndpoint.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UndeployIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UndeployIndexRequest. } op, err := c.UndeployIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UndeployIndexOperation ¶
func (c *WarehouseClient) UndeployIndexOperation(name string) *UndeployIndexOperation
UndeployIndexOperation returns a new UndeployIndexOperation from a given name. The name must be that of a previously created UndeployIndexOperation, possibly from a different process.
func (*WarehouseClient) UpdateAnnotation ¶
func (c *WarehouseClient) UpdateAnnotation(ctx context.Context, req *visionaipb.UpdateAnnotationRequest, opts ...gax.CallOption) (*visionaipb.Annotation, error)
UpdateAnnotation updates annotation inside asset.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateAnnotationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateAnnotationRequest. } resp, err := c.UpdateAnnotation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UpdateAsset ¶
func (c *WarehouseClient) UpdateAsset(ctx context.Context, req *visionaipb.UpdateAssetRequest, opts ...gax.CallOption) (*visionaipb.Asset, error)
UpdateAsset updates an asset inside corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateAssetRequest. } resp, err := c.UpdateAsset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UpdateCollection ¶
func (c *WarehouseClient) UpdateCollection(ctx context.Context, req *visionaipb.UpdateCollectionRequest, opts ...gax.CallOption) (*visionaipb.Collection, error)
UpdateCollection updates a collection.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateCollectionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateCollectionRequest. } resp, err := c.UpdateCollection(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UpdateCorpus ¶
func (c *WarehouseClient) UpdateCorpus(ctx context.Context, req *visionaipb.UpdateCorpusRequest, opts ...gax.CallOption) (*visionaipb.Corpus, error)
UpdateCorpus updates a corpus in a project.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateCorpusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateCorpusRequest. } resp, err := c.UpdateCorpus(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UpdateDataSchema ¶
func (c *WarehouseClient) UpdateDataSchema(ctx context.Context, req *visionaipb.UpdateDataSchemaRequest, opts ...gax.CallOption) (*visionaipb.DataSchema, error)
UpdateDataSchema updates data schema inside corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateDataSchemaRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateDataSchemaRequest. } resp, err := c.UpdateDataSchema(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UpdateIndex ¶
func (c *WarehouseClient) UpdateIndex(ctx context.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 rebuild with different update_mask values.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateIndexRequest. } op, err := c.UpdateIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UpdateIndexEndpoint ¶
func (c *WarehouseClient) UpdateIndexEndpoint(ctx context.Context, req *visionaipb.UpdateIndexEndpointRequest, opts ...gax.CallOption) (*UpdateIndexEndpointOperation, error)
UpdateIndexEndpoint updates an IndexEndpoint.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateIndexEndpointRequest. } op, err := c.UpdateIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UpdateIndexEndpointOperation ¶
func (c *WarehouseClient) UpdateIndexEndpointOperation(name string) *UpdateIndexEndpointOperation
UpdateIndexEndpointOperation returns a new UpdateIndexEndpointOperation from a given name. The name must be that of a previously created UpdateIndexEndpointOperation, possibly from a different process.
func (*WarehouseClient) UpdateIndexOperation ¶
func (c *WarehouseClient) UpdateIndexOperation(name string) *UpdateIndexOperation
UpdateIndexOperation returns a new UpdateIndexOperation from a given name. The name must be that of a previously created UpdateIndexOperation, possibly from a different process.
func (*WarehouseClient) UpdateSearchConfig ¶
func (c *WarehouseClient) UpdateSearchConfig(ctx context.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 or facet_property.
mapped_fields must not be empty, and must map to existing UGA keys.
All mapped_fields must be of the same type.
All mapped_fields must share the same granularity.
All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateSearchConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateSearchConfigRequest. } resp, err := c.UpdateSearchConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UpdateSearchHypernym ¶
func (c *WarehouseClient) UpdateSearchHypernym(ctx context.Context, req *visionaipb.UpdateSearchHypernymRequest, opts ...gax.CallOption) (*visionaipb.SearchHypernym, error)
UpdateSearchHypernym updates a SearchHypernym inside a corpus.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UpdateSearchHypernymRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UpdateSearchHypernymRequest. } resp, err := c.UpdateSearchHypernym(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UploadAsset ¶
func (c *WarehouseClient) UploadAsset(ctx context.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 access to the cloud storage file. Once it is uploaded, it can be retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files from the same project of the warehouse. To allow retrieval cloud storage files that are in a separate project, it requires to find the vision ai service account (Go to IAM, check checkbox to show “Include Google-provided role grants”, search for “Cloud Vision AI Service Agent”) and grant the read access of the cloud storage files to that service account.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.UploadAssetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#UploadAssetRequest. } op, err := c.UploadAsset(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*WarehouseClient) UploadAssetOperation ¶
func (c *WarehouseClient) UploadAssetOperation(name string) *UploadAssetOperation
UploadAssetOperation returns a new UploadAssetOperation from a given name. The name must be that of a previously created UploadAssetOperation, possibly from a different process.
func (*WarehouseClient) ViewCollectionItems ¶
func (c *WarehouseClient) ViewCollectionItems(ctx context.Context, req *visionaipb.ViewCollectionItemsRequest, opts ...gax.CallOption) *CollectionItemIterator
ViewCollectionItems view items inside a collection.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ViewCollectionItemsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ViewCollectionItemsRequest. } it := c.ViewCollectionItems(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ViewCollectionItemsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ViewCollectionItemsRequest. } for resp, err := range c.ViewCollectionItems(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*WarehouseClient) ViewIndexedAssets ¶
func (c *WarehouseClient) ViewIndexedAssets(ctx context.Context, req *visionaipb.ViewIndexedAssetsRequest, opts ...gax.CallOption) *IndexedAssetIterator
ViewIndexedAssets lists assets inside an index.
Example ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ViewIndexedAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ViewIndexedAssetsRequest. } it := c.ViewIndexedAssets(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // 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) } }
Output:
Example (All) ¶
package main import ( "context" visionai "cloud.google.com/go/visionai/apiv1" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := visionai.NewWarehouseClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &visionaipb.ViewIndexedAssetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/visionai/apiv1/visionaipb#ViewIndexedAssetsRequest. } for resp, err := range c.ViewIndexedAssets(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output: