Vertex AI API v1 - Package cloud.google.com/go/aiplatform/apiv1 (v1.18.0)

Package aiplatform is an auto-generated package for the Vertex AI API.

Train high-quality custom machine learning models with minimal machine learning expertise and effort.

Example usage

To get started with this package, create a client.

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

req := &aiplatformpb.CreateDatasetRequest{
    // TODO: Fill request struct fields.
    // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateDatasetRequest.
}
op, err := c.CreateDataset(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 NewDatasetClient 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.

For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

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

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 []*aiplatformpb.Annotation, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AnnotationIterator manages a stream of *aiplatformpb.Annotation.

func (*AnnotationIterator) Next

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

func (*AnnotationIterator) PageInfo

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

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

ArtifactIterator

type ArtifactIterator 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 []*aiplatformpb.Artifact, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ArtifactIterator manages a stream of *aiplatformpb.Artifact.

func (*ArtifactIterator) Next

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

func (*ArtifactIterator) PageInfo

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

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

BatchCreateFeaturesOperation

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

BatchCreateFeaturesOperation manages a long-running operation from BatchCreateFeatures.

func (*BatchCreateFeaturesOperation) Done

Done reports whether the long-running operation has completed.

func (*BatchCreateFeaturesOperation) Metadata

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

func (*BatchCreateFeaturesOperation) Name

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

func (*BatchCreateFeaturesOperation) Poll

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

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

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

func (*BatchCreateFeaturesOperation) Wait

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

See documentation of Poll for error-handling information.

BatchMigrateResourcesOperation

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

BatchMigrateResourcesOperation manages a long-running operation from BatchMigrateResources.

func (*BatchMigrateResourcesOperation) Done

Done reports whether the long-running operation has completed.

func (*BatchMigrateResourcesOperation) Metadata

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

func (*BatchMigrateResourcesOperation) Name

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

func (*BatchMigrateResourcesOperation) Poll

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

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

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

func (*BatchMigrateResourcesOperation) Wait

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

See documentation of Poll for error-handling information.

BatchPredictionJobIterator

type BatchPredictionJobIterator 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 []*aiplatformpb.BatchPredictionJob, nextPageToken string, err error)
	// contains filtered or unexported fields
}

BatchPredictionJobIterator manages a stream of *aiplatformpb.BatchPredictionJob.

func (*BatchPredictionJobIterator) Next

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

func (*BatchPredictionJobIterator) PageInfo

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

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

BatchReadFeatureValuesOperation

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

BatchReadFeatureValuesOperation manages a long-running operation from BatchReadFeatureValues.

func (*BatchReadFeatureValuesOperation) Done

Done reports whether the long-running operation has completed.

func (*BatchReadFeatureValuesOperation) Metadata

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

func (*BatchReadFeatureValuesOperation) Name

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

func (*BatchReadFeatureValuesOperation) Poll

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

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

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

func (*BatchReadFeatureValuesOperation) Wait

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

See documentation of Poll for error-handling information.

CheckTrialEarlyStoppingStateOperation

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

CheckTrialEarlyStoppingStateOperation manages a long-running operation from CheckTrialEarlyStoppingState.

func (*CheckTrialEarlyStoppingStateOperation) Done

Done reports whether the long-running operation has completed.

func (*CheckTrialEarlyStoppingStateOperation) Metadata

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

func (*CheckTrialEarlyStoppingStateOperation) Name

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

func (*CheckTrialEarlyStoppingStateOperation) Poll

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

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

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

func (*CheckTrialEarlyStoppingStateOperation) Wait

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

See documentation of Poll for error-handling information.

ContextIterator

type ContextIterator 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 []*aiplatformpb.Context, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ContextIterator manages a stream of *aiplatformpb.Context.

func (*ContextIterator) Next

func (it *ContextIterator) Next() (*aiplatformpb.Context, 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 (*ContextIterator) PageInfo

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

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

CreateDatasetOperation

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

CreateDatasetOperation manages a long-running operation from CreateDataset.

func (*CreateDatasetOperation) Done

func (op *CreateDatasetOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateDatasetOperation) Metadata

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

func (*CreateDatasetOperation) Name

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

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

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

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

func (*CreateDatasetOperation) Wait

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

See documentation of Poll for error-handling information.

CreateEndpointOperation

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

CreateEndpointOperation manages a long-running operation from CreateEndpoint.

func (*CreateEndpointOperation) Done

func (op *CreateEndpointOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateEndpointOperation) Metadata

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

func (*CreateEndpointOperation) Name

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

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

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

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

func (*CreateEndpointOperation) Wait

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

See documentation of Poll for error-handling information.

CreateEntityTypeOperation

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

CreateEntityTypeOperation manages a long-running operation from CreateEntityType.

func (*CreateEntityTypeOperation) Done

func (op *CreateEntityTypeOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateEntityTypeOperation) Metadata

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

func (*CreateEntityTypeOperation) Name

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

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

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

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

func (*CreateEntityTypeOperation) Wait

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

See documentation of Poll for error-handling information.

CreateFeatureOperation

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

CreateFeatureOperation manages a long-running operation from CreateFeature.

func (*CreateFeatureOperation) Done

func (op *CreateFeatureOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateFeatureOperation) Metadata

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

func (*CreateFeatureOperation) Name

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

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

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

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

func (*CreateFeatureOperation) Wait

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

See documentation of Poll for error-handling information.

CreateFeaturestoreOperation

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

CreateFeaturestoreOperation manages a long-running operation from CreateFeaturestore.

func (*CreateFeaturestoreOperation) Done

func (op *CreateFeaturestoreOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateFeaturestoreOperation) Metadata

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

func (*CreateFeaturestoreOperation) Name

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

func (*CreateFeaturestoreOperation) Poll

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

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

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

func (*CreateFeaturestoreOperation) Wait

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

See documentation of Poll for error-handling information.

CreateIndexEndpointOperation

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

CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint.

func (*CreateIndexEndpointOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateIndexEndpointOperation) Metadata

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

func (*CreateIndexEndpointOperation) Name

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

func (*CreateIndexEndpointOperation) Poll

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

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

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

func (*CreateIndexEndpointOperation) Wait

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

See documentation of Poll for error-handling information.

CreateIndexOperation

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

CreateIndexOperation manages a long-running operation from CreateIndex.

func (*CreateIndexOperation) Done

func (op *CreateIndexOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateIndexOperation) Metadata

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

func (*CreateIndexOperation) Name

func (op *CreateIndexOperation) Name() string

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

func (*CreateIndexOperation) Poll

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

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

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

func (*CreateIndexOperation) Wait

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

See documentation of Poll for error-handling information.

CreateMetadataStoreOperation

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

CreateMetadataStoreOperation manages a long-running operation from CreateMetadataStore.

func (*CreateMetadataStoreOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateMetadataStoreOperation) Metadata

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

func (*CreateMetadataStoreOperation) Name

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

func (*CreateMetadataStoreOperation) Poll

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

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

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

func (*CreateMetadataStoreOperation) Wait

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

See documentation of Poll for error-handling information.

CreateSpecialistPoolOperation

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

CreateSpecialistPoolOperation manages a long-running operation from CreateSpecialistPool.

func (*CreateSpecialistPoolOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateSpecialistPoolOperation) Metadata

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

func (*CreateSpecialistPoolOperation) Name

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

func (*CreateSpecialistPoolOperation) Poll

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

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

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

func (*CreateSpecialistPoolOperation) Wait

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

See documentation of Poll for error-handling information.

CreateTensorboardOperation

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

CreateTensorboardOperation manages a long-running operation from CreateTensorboard.

func (*CreateTensorboardOperation) Done

func (op *CreateTensorboardOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateTensorboardOperation) Metadata

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

func (*CreateTensorboardOperation) Name

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

func (*CreateTensorboardOperation) Poll

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

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

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

func (*CreateTensorboardOperation) Wait

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

See documentation of Poll for error-handling information.

CustomJobIterator

type CustomJobIterator 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 []*aiplatformpb.CustomJob, nextPageToken string, err error)
	// contains filtered or unexported fields
}

CustomJobIterator manages a stream of *aiplatformpb.CustomJob.

func (*CustomJobIterator) Next

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

func (*CustomJobIterator) PageInfo

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

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

DataItemIterator

type DataItemIterator 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 []*aiplatformpb.DataItem, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DataItemIterator manages a stream of *aiplatformpb.DataItem.

func (*DataItemIterator) Next

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

func (*DataItemIterator) PageInfo

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

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

DataLabelingJobIterator

type DataLabelingJobIterator 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 []*aiplatformpb.DataLabelingJob, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DataLabelingJobIterator manages a stream of *aiplatformpb.DataLabelingJob.

func (*DataLabelingJobIterator) Next

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

func (*DataLabelingJobIterator) PageInfo

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

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

DatasetCallOptions

type DatasetCallOptions struct {
	CreateDataset      []gax.CallOption
	GetDataset         []gax.CallOption
	UpdateDataset      []gax.CallOption
	ListDatasets       []gax.CallOption
	DeleteDataset      []gax.CallOption
	ImportData         []gax.CallOption
	ExportData         []gax.CallOption
	ListDataItems      []gax.CallOption
	ListSavedQueries   []gax.CallOption
	GetAnnotationSpec  []gax.CallOption
	ListAnnotations    []gax.CallOption
	GetLocation        []gax.CallOption
	ListLocations      []gax.CallOption
	GetIamPolicy       []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
	CancelOperation    []gax.CallOption
	DeleteOperation    []gax.CallOption
	GetOperation       []gax.CallOption
	ListOperations     []gax.CallOption
	WaitOperation      []gax.CallOption
}

DatasetCallOptions contains the retry settings for each method of DatasetClient.

DatasetClient

type DatasetClient struct {

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

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

DatasetClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The service that handles the CRUD of Vertex AI Dataset and its child resources.

func NewDatasetClient

func NewDatasetClient(ctx context.Context, opts ...option.ClientOption) (*DatasetClient, error)

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

The service that handles the CRUD of Vertex AI Dataset and its child resources.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*DatasetClient) CancelOperation

func (c *DatasetClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*DatasetClient) Close

func (c *DatasetClient) Close() error

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

func (*DatasetClient) Connection

func (c *DatasetClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*DatasetClient) CreateDataset

CreateDataset creates a Dataset.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateDatasetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateDatasetRequest.
	}
	op, err := c.CreateDataset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*DatasetClient) CreateDatasetOperation

func (c *DatasetClient) CreateDatasetOperation(name string) *CreateDatasetOperation

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

func (*DatasetClient) DeleteDataset

DeleteDataset deletes a Dataset.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteDatasetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteDatasetRequest.
	}
	op, err := c.DeleteDataset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*DatasetClient) DeleteDatasetOperation

func (c *DatasetClient) DeleteDatasetOperation(name string) *DeleteDatasetOperation

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

func (*DatasetClient) DeleteOperation

func (c *DatasetClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*DatasetClient) ExportData

ExportData exports data from a Dataset.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ExportDataRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ExportDataRequest.
	}
	op, err := c.ExportData(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*DatasetClient) ExportDataOperation

func (c *DatasetClient) ExportDataOperation(name string) *ExportDataOperation

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

func (*DatasetClient) GetAnnotationSpec

GetAnnotationSpec gets an AnnotationSpec.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetAnnotationSpecRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetAnnotationSpecRequest.
	}
	resp, err := c.GetAnnotationSpec(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DatasetClient) GetDataset

GetDataset gets a Dataset.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetDatasetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetDatasetRequest.
	}
	resp, err := c.GetDataset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DatasetClient) GetIamPolicy

func (c *DatasetClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DatasetClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DatasetClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DatasetClient) ImportData

ImportData imports data into a Dataset.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ImportDataRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ImportDataRequest.
	}
	op, err := c.ImportData(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*DatasetClient) ImportDataOperation

func (c *DatasetClient) ImportDataOperation(name string) *ImportDataOperation

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

func (*DatasetClient) ListAnnotations

ListAnnotations lists Annotations belongs to a dataitem

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListAnnotationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#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
	}
}

func (*DatasetClient) ListDataItems

ListDataItems lists DataItems in a Dataset.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListDataItemsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListDataItemsRequest.
	}
	it := c.ListDataItems(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*DatasetClient) ListDatasets

ListDatasets lists Datasets in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListDatasetsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListDatasetsRequest.
	}
	it := c.ListDatasets(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*DatasetClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*DatasetClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*DatasetClient) ListSavedQueries

ListSavedQueries lists SavedQueries in a Dataset.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListSavedQueriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListSavedQueriesRequest.
	}
	it := c.ListSavedQueries(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*DatasetClient) SetIamPolicy

func (c *DatasetClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DatasetClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DatasetClient) UpdateDataset

UpdateDataset updates a Dataset.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateDatasetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateDatasetRequest.
	}
	resp, err := c.UpdateDataset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DatasetClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewDatasetClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

DatasetIterator

type DatasetIterator 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 []*aiplatformpb.Dataset, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DatasetIterator manages a stream of *aiplatformpb.Dataset.

func (*DatasetIterator) Next

func (it *DatasetIterator) Next() (*aiplatformpb.Dataset, 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 (*DatasetIterator) PageInfo

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

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

DeleteArtifactOperation

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

DeleteArtifactOperation manages a long-running operation from DeleteArtifact.

func (*DeleteArtifactOperation) Done

func (op *DeleteArtifactOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteArtifactOperation) Metadata

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

func (*DeleteArtifactOperation) Name

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

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

func (op *DeleteArtifactOperation) 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.

DeleteBatchPredictionJobOperation

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

DeleteBatchPredictionJobOperation manages a long-running operation from DeleteBatchPredictionJob.

func (*DeleteBatchPredictionJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteBatchPredictionJobOperation) Metadata

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

func (*DeleteBatchPredictionJobOperation) Name

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

func (*DeleteBatchPredictionJobOperation) Poll

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

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

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

func (*DeleteBatchPredictionJobOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteContextOperation

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

DeleteContextOperation manages a long-running operation from DeleteContext.

func (*DeleteContextOperation) Done

func (op *DeleteContextOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteContextOperation) Metadata

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

func (*DeleteContextOperation) Name

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

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

func (op *DeleteContextOperation) 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.

DeleteCustomJobOperation

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

DeleteCustomJobOperation manages a long-running operation from DeleteCustomJob.

func (*DeleteCustomJobOperation) Done

func (op *DeleteCustomJobOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteCustomJobOperation) Metadata

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

func (*DeleteCustomJobOperation) Name

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

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

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

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

func (*DeleteCustomJobOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteDataLabelingJobOperation

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

DeleteDataLabelingJobOperation manages a long-running operation from DeleteDataLabelingJob.

func (*DeleteDataLabelingJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteDataLabelingJobOperation) Metadata

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

func (*DeleteDataLabelingJobOperation) Name

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

func (*DeleteDataLabelingJobOperation) Poll

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

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

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

func (*DeleteDataLabelingJobOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteDatasetOperation

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

DeleteDatasetOperation manages a long-running operation from DeleteDataset.

func (*DeleteDatasetOperation) Done

func (op *DeleteDatasetOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteDatasetOperation) Metadata

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

func (*DeleteDatasetOperation) Name

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

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

func (op *DeleteDatasetOperation) 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.

DeleteEndpointOperation

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

DeleteEndpointOperation manages a long-running operation from DeleteEndpoint.

func (*DeleteEndpointOperation) Done

func (op *DeleteEndpointOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteEndpointOperation) Metadata

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

func (*DeleteEndpointOperation) Name

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

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

func (op *DeleteEndpointOperation) 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.

DeleteEntityTypeOperation

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

DeleteEntityTypeOperation manages a long-running operation from DeleteEntityType.

func (*DeleteEntityTypeOperation) Done

func (op *DeleteEntityTypeOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteEntityTypeOperation) Metadata

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

func (*DeleteEntityTypeOperation) Name

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

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

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

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

func (*DeleteEntityTypeOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteExecutionOperation

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

DeleteExecutionOperation manages a long-running operation from DeleteExecution.

func (*DeleteExecutionOperation) Done

func (op *DeleteExecutionOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteExecutionOperation) Metadata

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

func (*DeleteExecutionOperation) Name

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

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

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

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

func (*DeleteExecutionOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteFeatureOperation

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

DeleteFeatureOperation manages a long-running operation from DeleteFeature.

func (*DeleteFeatureOperation) Done

func (op *DeleteFeatureOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteFeatureOperation) Metadata

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

func (*DeleteFeatureOperation) Name

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

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

func (op *DeleteFeatureOperation) 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.

DeleteFeaturestoreOperation

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

DeleteFeaturestoreOperation manages a long-running operation from DeleteFeaturestore.

func (*DeleteFeaturestoreOperation) Done

func (op *DeleteFeaturestoreOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteFeaturestoreOperation) Metadata

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

func (*DeleteFeaturestoreOperation) Name

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

func (*DeleteFeaturestoreOperation) Poll

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

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

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

func (*DeleteFeaturestoreOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteHyperparameterTuningJobOperation

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

DeleteHyperparameterTuningJobOperation manages a long-running operation from DeleteHyperparameterTuningJob.

func (*DeleteHyperparameterTuningJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteHyperparameterTuningJobOperation) Metadata

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

func (*DeleteHyperparameterTuningJobOperation) Name

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

func (*DeleteHyperparameterTuningJobOperation) Poll

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

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

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

func (*DeleteHyperparameterTuningJobOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteIndexEndpointOperation

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

DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint.

func (*DeleteIndexEndpointOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteIndexEndpointOperation) Metadata

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

func (*DeleteIndexEndpointOperation) Name

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

func (*DeleteIndexEndpointOperation) Poll

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

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

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

func (*DeleteIndexEndpointOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteIndexOperation

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

DeleteIndexOperation manages a long-running operation from DeleteIndex.

func (*DeleteIndexOperation) Done

func (op *DeleteIndexOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteIndexOperation) Metadata

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

func (*DeleteIndexOperation) Name

func (op *DeleteIndexOperation) Name() string

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

func (*DeleteIndexOperation) Poll

func (op *DeleteIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) error

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

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

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

func (*DeleteIndexOperation) Wait

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

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

See documentation of Poll for error-handling information.

DeleteMetadataStoreOperation

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

DeleteMetadataStoreOperation manages a long-running operation from DeleteMetadataStore.

func (*DeleteMetadataStoreOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteMetadataStoreOperation) Metadata

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

func (*DeleteMetadataStoreOperation) Name

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

func (*DeleteMetadataStoreOperation) Poll

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

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

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

func (*DeleteMetadataStoreOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteModelDeploymentMonitoringJobOperation

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

DeleteModelDeploymentMonitoringJobOperation manages a long-running operation from DeleteModelDeploymentMonitoringJob.

func (*DeleteModelDeploymentMonitoringJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteModelDeploymentMonitoringJobOperation) Metadata

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

func (*DeleteModelDeploymentMonitoringJobOperation) Name

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

func (*DeleteModelDeploymentMonitoringJobOperation) Poll

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

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

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

func (*DeleteModelDeploymentMonitoringJobOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteModelOperation

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

DeleteModelOperation manages a long-running operation from DeleteModel.

func (*DeleteModelOperation) Done

func (op *DeleteModelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteModelOperation) Metadata

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

func (*DeleteModelOperation) Name

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

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

func (op *DeleteModelOperation) 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.

DeleteModelVersionOperation

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

DeleteModelVersionOperation manages a long-running operation from DeleteModelVersion.

func (*DeleteModelVersionOperation) Done

func (op *DeleteModelVersionOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteModelVersionOperation) Metadata

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

func (*DeleteModelVersionOperation) Name

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

func (*DeleteModelVersionOperation) Poll

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

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

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

func (*DeleteModelVersionOperation) Wait

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

See documentation of Poll for error-handling information.

DeletePipelineJobOperation

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

DeletePipelineJobOperation manages a long-running operation from DeletePipelineJob.

func (*DeletePipelineJobOperation) Done

func (op *DeletePipelineJobOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeletePipelineJobOperation) Metadata

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

func (*DeletePipelineJobOperation) Name

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

func (*DeletePipelineJobOperation) Poll

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

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

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

func (*DeletePipelineJobOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteSpecialistPoolOperation

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

DeleteSpecialistPoolOperation manages a long-running operation from DeleteSpecialistPool.

func (*DeleteSpecialistPoolOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteSpecialistPoolOperation) Metadata

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

func (*DeleteSpecialistPoolOperation) Name

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

func (*DeleteSpecialistPoolOperation) Poll

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

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

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

func (*DeleteSpecialistPoolOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteTensorboardExperimentOperation

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

DeleteTensorboardExperimentOperation manages a long-running operation from DeleteTensorboardExperiment.

func (*DeleteTensorboardExperimentOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteTensorboardExperimentOperation) Metadata

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

func (*DeleteTensorboardExperimentOperation) Name

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

func (*DeleteTensorboardExperimentOperation) Poll

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

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

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

func (*DeleteTensorboardExperimentOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteTensorboardOperation

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

DeleteTensorboardOperation manages a long-running operation from DeleteTensorboard.

func (*DeleteTensorboardOperation) Done

func (op *DeleteTensorboardOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteTensorboardOperation) Metadata

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

func (*DeleteTensorboardOperation) Name

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

func (*DeleteTensorboardOperation) Poll

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

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

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

func (*DeleteTensorboardOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteTensorboardRunOperation

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

DeleteTensorboardRunOperation manages a long-running operation from DeleteTensorboardRun.

func (*DeleteTensorboardRunOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteTensorboardRunOperation) Metadata

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

func (*DeleteTensorboardRunOperation) Name

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

func (*DeleteTensorboardRunOperation) Poll

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

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

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

func (*DeleteTensorboardRunOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteTensorboardTimeSeriesOperation

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

DeleteTensorboardTimeSeriesOperation manages a long-running operation from DeleteTensorboardTimeSeries.

func (*DeleteTensorboardTimeSeriesOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteTensorboardTimeSeriesOperation) Metadata

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

func (*DeleteTensorboardTimeSeriesOperation) Name

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

func (*DeleteTensorboardTimeSeriesOperation) Poll

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

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

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

func (*DeleteTensorboardTimeSeriesOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteTrainingPipelineOperation

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

DeleteTrainingPipelineOperation manages a long-running operation from DeleteTrainingPipeline.

func (*DeleteTrainingPipelineOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteTrainingPipelineOperation) Metadata

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

func (*DeleteTrainingPipelineOperation) Name

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

func (*DeleteTrainingPipelineOperation) Poll

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

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

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

func (*DeleteTrainingPipelineOperation) Wait

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

See documentation of Poll for error-handling information.

DeployIndexOperation

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

DeployIndexOperation manages a long-running operation from DeployIndex.

func (*DeployIndexOperation) Done

func (op *DeployIndexOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeployIndexOperation) Metadata

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

func (*DeployIndexOperation) Name

func (op *DeployIndexOperation) Name() string

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

func (*DeployIndexOperation) Poll

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

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

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

func (*DeployIndexOperation) Wait

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

See documentation of Poll for error-handling information.

DeployModelOperation

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

DeployModelOperation manages a long-running operation from DeployModel.

func (*DeployModelOperation) Done

func (op *DeployModelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeployModelOperation) Metadata

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

func (*DeployModelOperation) Name

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

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

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

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

func (*DeployModelOperation) Wait

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

See documentation of Poll for error-handling information.

EndpointCallOptions

type EndpointCallOptions struct {
	CreateEndpoint     []gax.CallOption
	GetEndpoint        []gax.CallOption
	ListEndpoints      []gax.CallOption
	UpdateEndpoint     []gax.CallOption
	DeleteEndpoint     []gax.CallOption
	DeployModel        []gax.CallOption
	UndeployModel      []gax.CallOption
	GetLocation        []gax.CallOption
	ListLocations      []gax.CallOption
	GetIamPolicy       []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
	CancelOperation    []gax.CallOption
	DeleteOperation    []gax.CallOption
	GetOperation       []gax.CallOption
	ListOperations     []gax.CallOption
	WaitOperation      []gax.CallOption
}

EndpointCallOptions contains the retry settings for each method of EndpointClient.

EndpointClient

type EndpointClient struct {

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

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

EndpointClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service for managing Vertex AI’s Endpoints.

func NewEndpointClient

func NewEndpointClient(ctx context.Context, opts ...option.ClientOption) (*EndpointClient, error)

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

A service for managing Vertex AI’s Endpoints.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*EndpointClient) CancelOperation

func (c *EndpointClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*EndpointClient) Close

func (c *EndpointClient) Close() error

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

func (*EndpointClient) Connection

func (c *EndpointClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*EndpointClient) CreateEndpoint

CreateEndpoint creates an Endpoint.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateEndpointRequest.
	}
	op, err := c.CreateEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*EndpointClient) CreateEndpointOperation

func (c *EndpointClient) CreateEndpointOperation(name string) *CreateEndpointOperation

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

func (*EndpointClient) DeleteEndpoint

DeleteEndpoint deletes an Endpoint.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteEndpointRequest.
	}
	op, err := c.DeleteEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*EndpointClient) DeleteEndpointOperation

func (c *EndpointClient) DeleteEndpointOperation(name string) *DeleteEndpointOperation

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

func (*EndpointClient) DeleteOperation

func (c *EndpointClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*EndpointClient) DeployModel

DeployModel deploys a Model into this Endpoint, creating a DeployedModel within it.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeployModelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeployModelRequest.
	}
	op, err := c.DeployModel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*EndpointClient) DeployModelOperation

func (c *EndpointClient) DeployModelOperation(name string) *DeployModelOperation

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

func (*EndpointClient) GetEndpoint

GetEndpoint gets an Endpoint.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetEndpointRequest.
	}
	resp, err := c.GetEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EndpointClient) GetIamPolicy

func (c *EndpointClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EndpointClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EndpointClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EndpointClient) ListEndpoints

ListEndpoints lists Endpoints in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListEndpointsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListEndpointsRequest.
	}
	it := c.ListEndpoints(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*EndpointClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*EndpointClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*EndpointClient) SetIamPolicy

func (c *EndpointClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EndpointClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EndpointClient) UndeployModel

UndeployModel undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it’s using.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UndeployModelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UndeployModelRequest.
	}
	op, err := c.UndeployModel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*EndpointClient) UndeployModelOperation

func (c *EndpointClient) UndeployModelOperation(name string) *UndeployModelOperation

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

func (*EndpointClient) UpdateEndpoint

UpdateEndpoint updates an Endpoint.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateEndpointRequest.
	}
	resp, err := c.UpdateEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*EndpointClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

EndpointIterator

type EndpointIterator 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 []*aiplatformpb.Endpoint, nextPageToken string, err error)
	// contains filtered or unexported fields
}

EndpointIterator manages a stream of *aiplatformpb.Endpoint.

func (*EndpointIterator) Next

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

func (*EndpointIterator) PageInfo

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

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

EntityTypeIterator

type EntityTypeIterator 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 []*aiplatformpb.EntityType, nextPageToken string, err error)
	// contains filtered or unexported fields
}

EntityTypeIterator manages a stream of *aiplatformpb.EntityType.

func (*EntityTypeIterator) Next

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

func (*EntityTypeIterator) PageInfo

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

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

ExecutionIterator

type ExecutionIterator 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 []*aiplatformpb.Execution, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ExecutionIterator manages a stream of *aiplatformpb.Execution.

func (*ExecutionIterator) Next

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

func (*ExecutionIterator) PageInfo

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

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

ExportDataOperation

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

ExportDataOperation manages a long-running operation from ExportData.

func (*ExportDataOperation) Done

func (op *ExportDataOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ExportDataOperation) Metadata

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

func (*ExportDataOperation) Name

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

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

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

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

func (*ExportDataOperation) Wait

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

See documentation of Poll for error-handling information.

ExportFeatureValuesOperation

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

ExportFeatureValuesOperation manages a long-running operation from ExportFeatureValues.

func (*ExportFeatureValuesOperation) Done

Done reports whether the long-running operation has completed.

func (*ExportFeatureValuesOperation) Metadata

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

func (*ExportFeatureValuesOperation) Name

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

func (*ExportFeatureValuesOperation) Poll

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

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

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

func (*ExportFeatureValuesOperation) Wait

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

See documentation of Poll for error-handling information.

ExportModelOperation

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

ExportModelOperation manages a long-running operation from ExportModel.

func (*ExportModelOperation) Done

func (op *ExportModelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ExportModelOperation) Metadata

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

func (*ExportModelOperation) Name

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

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

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

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

func (*ExportModelOperation) Wait

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

See documentation of Poll for error-handling information.

FeatureIterator

type FeatureIterator 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 []*aiplatformpb.Feature, nextPageToken string, err error)
	// contains filtered or unexported fields
}

FeatureIterator manages a stream of *aiplatformpb.Feature.

func (*FeatureIterator) Next

func (it *FeatureIterator) Next() (*aiplatformpb.Feature, 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 (*FeatureIterator) PageInfo

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

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

FeaturestoreCallOptions

type FeaturestoreCallOptions struct {
	CreateFeaturestore     []gax.CallOption
	GetFeaturestore        []gax.CallOption
	ListFeaturestores      []gax.CallOption
	UpdateFeaturestore     []gax.CallOption
	DeleteFeaturestore     []gax.CallOption
	CreateEntityType       []gax.CallOption
	GetEntityType          []gax.CallOption
	ListEntityTypes        []gax.CallOption
	UpdateEntityType       []gax.CallOption
	DeleteEntityType       []gax.CallOption
	CreateFeature          []gax.CallOption
	BatchCreateFeatures    []gax.CallOption
	GetFeature             []gax.CallOption
	ListFeatures           []gax.CallOption
	UpdateFeature          []gax.CallOption
	DeleteFeature          []gax.CallOption
	ImportFeatureValues    []gax.CallOption
	BatchReadFeatureValues []gax.CallOption
	ExportFeatureValues    []gax.CallOption
	SearchFeatures         []gax.CallOption
	GetLocation            []gax.CallOption
	ListLocations          []gax.CallOption
	GetIamPolicy           []gax.CallOption
	SetIamPolicy           []gax.CallOption
	TestIamPermissions     []gax.CallOption
	CancelOperation        []gax.CallOption
	DeleteOperation        []gax.CallOption
	GetOperation           []gax.CallOption
	ListOperations         []gax.CallOption
	WaitOperation          []gax.CallOption
}

FeaturestoreCallOptions contains the retry settings for each method of FeaturestoreClient.

FeaturestoreClient

type FeaturestoreClient struct {

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

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

FeaturestoreClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The service that handles CRUD and List for resources for Featurestore.

func NewFeaturestoreClient

func NewFeaturestoreClient(ctx context.Context, opts ...option.ClientOption) (*FeaturestoreClient, error)

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

The service that handles CRUD and List for resources for Featurestore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*FeaturestoreClient) BatchCreateFeatures

BatchCreateFeatures creates a batch of Features in a given EntityType.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.BatchCreateFeaturesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchCreateFeaturesRequest.
	}
	op, err := c.BatchCreateFeatures(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) BatchCreateFeaturesOperation

func (c *FeaturestoreClient) BatchCreateFeaturesOperation(name string) *BatchCreateFeaturesOperation

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

func (*FeaturestoreClient) BatchReadFeatureValues

BatchReadFeatureValues batch reads Feature values from a Featurestore.

This API enables batch reading Feature values, where each read instance in the batch may read Feature values of entities from one or more EntityTypes. Point-in-time correctness is guaranteed for Feature values of each read instance as of each instance’s read timestamp.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.BatchReadFeatureValuesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchReadFeatureValuesRequest.
	}
	op, err := c.BatchReadFeatureValues(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) BatchReadFeatureValuesOperation

func (c *FeaturestoreClient) BatchReadFeatureValuesOperation(name string) *BatchReadFeatureValuesOperation

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

func (*FeaturestoreClient) CancelOperation

CancelOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*FeaturestoreClient) Close

func (c *FeaturestoreClient) Close() error

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

func (*FeaturestoreClient) Connection

func (c *FeaturestoreClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*FeaturestoreClient) CreateEntityType

CreateEntityType creates a new EntityType in a given Featurestore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateEntityTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateEntityTypeRequest.
	}
	op, err := c.CreateEntityType(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) CreateEntityTypeOperation

func (c *FeaturestoreClient) CreateEntityTypeOperation(name string) *CreateEntityTypeOperation

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

func (*FeaturestoreClient) CreateFeature

CreateFeature creates a new Feature in a given EntityType.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateFeatureRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateFeatureRequest.
	}
	op, err := c.CreateFeature(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) CreateFeatureOperation

func (c *FeaturestoreClient) CreateFeatureOperation(name string) *CreateFeatureOperation

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

func (*FeaturestoreClient) CreateFeaturestore

CreateFeaturestore creates a new Featurestore in a given project and location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateFeaturestoreRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateFeaturestoreRequest.
	}
	op, err := c.CreateFeaturestore(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) CreateFeaturestoreOperation

func (c *FeaturestoreClient) CreateFeaturestoreOperation(name string) *CreateFeaturestoreOperation

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

func (*FeaturestoreClient) DeleteEntityType

DeleteEntityType deletes a single EntityType. The EntityType must not have any Features or force must be set to true for the request to succeed.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteEntityTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteEntityTypeRequest.
	}
	op, err := c.DeleteEntityType(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) DeleteEntityTypeOperation

func (c *FeaturestoreClient) DeleteEntityTypeOperation(name string) *DeleteEntityTypeOperation

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

func (*FeaturestoreClient) DeleteFeature

DeleteFeature deletes a single Feature.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteFeatureRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteFeatureRequest.
	}
	op, err := c.DeleteFeature(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) DeleteFeatureOperation

func (c *FeaturestoreClient) DeleteFeatureOperation(name string) *DeleteFeatureOperation

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

func (*FeaturestoreClient) DeleteFeaturestore

DeleteFeaturestore deletes a single Featurestore. The Featurestore must not contain any EntityTypes or force must be set to true for the request to succeed.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteFeaturestoreRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteFeaturestoreRequest.
	}
	op, err := c.DeleteFeaturestore(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) DeleteFeaturestoreOperation

func (c *FeaturestoreClient) DeleteFeaturestoreOperation(name string) *DeleteFeaturestoreOperation

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

func (*FeaturestoreClient) DeleteOperation

DeleteOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*FeaturestoreClient) ExportFeatureValues

ExportFeatureValues exports Feature values from all the entities of a target EntityType.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ExportFeatureValuesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ExportFeatureValuesRequest.
	}
	op, err := c.ExportFeatureValues(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) ExportFeatureValuesOperation

func (c *FeaturestoreClient) ExportFeatureValuesOperation(name string) *ExportFeatureValuesOperation

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

func (*FeaturestoreClient) GetEntityType

GetEntityType gets details of a single EntityType.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetEntityTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetEntityTypeRequest.
	}
	resp, err := c.GetEntityType(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreClient) GetFeature

GetFeature gets details of a single Feature.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetFeatureRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetFeatureRequest.
	}
	resp, err := c.GetFeature(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreClient) GetFeaturestore

GetFeaturestore gets details of a single Featurestore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetFeaturestoreRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetFeaturestoreRequest.
	}
	resp, err := c.GetFeaturestore(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreClient) GetIamPolicy

func (c *FeaturestoreClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreClient) ImportFeatureValues

ImportFeatureValues imports Feature values into the Featurestore from a source storage.

The progress of the import is tracked by the returned operation. The imported features are guaranteed to be visible to subsequent read operations after the operation is marked as successfully done.

If an import operation fails, the Feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same import request again and wait till the new operation returned is marked as successfully done.

There are also scenarios where the caller can cause inconsistency.

Source data for import contains multiple distinct Feature values for
the same entity ID and timestamp.

Source is modified during an import. This includes adding, updating, or
removing source data and/or metadata. Examples of updating metadata
include but are not limited to changing storage location, storage class,
or retention policy.

Online serving cluster is under-provisioned.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ImportFeatureValuesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ImportFeatureValuesRequest.
	}
	op, err := c.ImportFeatureValues(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) ImportFeatureValuesOperation

func (c *FeaturestoreClient) ImportFeatureValuesOperation(name string) *ImportFeatureValuesOperation

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

func (*FeaturestoreClient) ListEntityTypes

ListEntityTypes lists EntityTypes in a given Featurestore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListEntityTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListEntityTypesRequest.
	}
	it := c.ListEntityTypes(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*FeaturestoreClient) ListFeatures

ListFeatures lists Features in a given EntityType.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListFeaturesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListFeaturesRequest.
	}
	it := c.ListFeatures(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*FeaturestoreClient) ListFeaturestores

ListFeaturestores lists Featurestores in a given project and location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListFeaturestoresRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListFeaturestoresRequest.
	}
	it := c.ListFeaturestores(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*FeaturestoreClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*FeaturestoreClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*FeaturestoreClient) SearchFeatures

SearchFeatures searches Features matching a query in a given project.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.SearchFeaturesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#SearchFeaturesRequest.
	}
	it := c.SearchFeatures(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*FeaturestoreClient) SetIamPolicy

func (c *FeaturestoreClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreClient) UpdateEntityType

UpdateEntityType updates the parameters of a single EntityType.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateEntityTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateEntityTypeRequest.
	}
	resp, err := c.UpdateEntityType(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreClient) UpdateFeature

UpdateFeature updates the parameters of a single Feature.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateFeatureRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateFeatureRequest.
	}
	resp, err := c.UpdateFeature(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreClient) UpdateFeaturestore

UpdateFeaturestore updates the parameters of a single Featurestore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateFeaturestoreRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateFeaturestoreRequest.
	}
	op, err := c.UpdateFeaturestore(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*FeaturestoreClient) UpdateFeaturestoreOperation

func (c *FeaturestoreClient) UpdateFeaturestoreOperation(name string) *UpdateFeaturestoreOperation

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

func (*FeaturestoreClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

FeaturestoreIterator

type FeaturestoreIterator 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 []*aiplatformpb.Featurestore, nextPageToken string, err error)
	// contains filtered or unexported fields
}

FeaturestoreIterator manages a stream of *aiplatformpb.Featurestore.

func (*FeaturestoreIterator) Next

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

func (*FeaturestoreIterator) PageInfo

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

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

FeaturestoreOnlineServingCallOptions

type FeaturestoreOnlineServingCallOptions struct {
	ReadFeatureValues          []gax.CallOption
	StreamingReadFeatureValues []gax.CallOption
	GetLocation                []gax.CallOption
	ListLocations              []gax.CallOption
	GetIamPolicy               []gax.CallOption
	SetIamPolicy               []gax.CallOption
	TestIamPermissions         []gax.CallOption
	CancelOperation            []gax.CallOption
	DeleteOperation            []gax.CallOption
	GetOperation               []gax.CallOption
	ListOperations             []gax.CallOption
	WaitOperation              []gax.CallOption
}

FeaturestoreOnlineServingCallOptions contains the retry settings for each method of FeaturestoreOnlineServingClient.

FeaturestoreOnlineServingClient

type FeaturestoreOnlineServingClient struct {

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

FeaturestoreOnlineServingClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service for serving online feature values.

func NewFeaturestoreOnlineServingClient

func NewFeaturestoreOnlineServingClient(ctx context.Context, opts ...option.ClientOption) (*FeaturestoreOnlineServingClient, error)

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

A service for serving online feature values.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*FeaturestoreOnlineServingClient) CancelOperation

CancelOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*FeaturestoreOnlineServingClient) Close

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

func (*FeaturestoreOnlineServingClient) Connection

func (c *FeaturestoreOnlineServingClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*FeaturestoreOnlineServingClient) DeleteOperation

DeleteOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*FeaturestoreOnlineServingClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreOnlineServingClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreOnlineServingClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreOnlineServingClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*FeaturestoreOnlineServingClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*FeaturestoreOnlineServingClient) ReadFeatureValues

ReadFeatureValues reads Feature values of a specific entity of an EntityType. For reading feature values of multiple entities of an EntityType, please use StreamingReadFeatureValues.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ReadFeatureValuesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ReadFeatureValuesRequest.
	}
	resp, err := c.ReadFeatureValues(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreOnlineServingClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreOnlineServingClient) StreamingReadFeatureValues

StreamingReadFeatureValues reads Feature values for multiple entities. Depending on their size, data for different entities may be broken up across multiple responses.

func (*FeaturestoreOnlineServingClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FeaturestoreOnlineServingClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

HyperparameterTuningJobIterator

type HyperparameterTuningJobIterator 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 []*aiplatformpb.HyperparameterTuningJob, nextPageToken string, err error)
	// contains filtered or unexported fields
}

HyperparameterTuningJobIterator manages a stream of *aiplatformpb.HyperparameterTuningJob.

func (*HyperparameterTuningJobIterator) Next

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

func (*HyperparameterTuningJobIterator) PageInfo

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

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

ImportDataOperation

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

ImportDataOperation manages a long-running operation from ImportData.

func (*ImportDataOperation) Done

func (op *ImportDataOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ImportDataOperation) Metadata

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

func (*ImportDataOperation) Name

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

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

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

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

func (*ImportDataOperation) Wait

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

See documentation of Poll for error-handling information.

ImportFeatureValuesOperation

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

ImportFeatureValuesOperation manages a long-running operation from ImportFeatureValues.

func (*ImportFeatureValuesOperation) Done

Done reports whether the long-running operation has completed.

func (*ImportFeatureValuesOperation) Metadata

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

func (*ImportFeatureValuesOperation) Name

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

func (*ImportFeatureValuesOperation) Poll

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

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

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

func (*ImportFeatureValuesOperation) Wait

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

See documentation of Poll for error-handling information.

IndexCallOptions

type IndexCallOptions struct {
	CreateIndex        []gax.CallOption
	GetIndex           []gax.CallOption
	ListIndexes        []gax.CallOption
	UpdateIndex        []gax.CallOption
	DeleteIndex        []gax.CallOption
	UpsertDatapoints   []gax.CallOption
	RemoveDatapoints   []gax.CallOption
	GetLocation        []gax.CallOption
	ListLocations      []gax.CallOption
	GetIamPolicy       []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
	CancelOperation    []gax.CallOption
	DeleteOperation    []gax.CallOption
	GetOperation       []gax.CallOption
	ListOperations     []gax.CallOption
	WaitOperation      []gax.CallOption
}

IndexCallOptions contains the retry settings for each method of IndexClient.

IndexClient

type IndexClient struct {

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

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

IndexClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service for creating and managing Vertex AI’s Index resources.

func NewIndexClient

func NewIndexClient(ctx context.Context, opts ...option.ClientOption) (*IndexClient, error)

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

A service for creating and managing Vertex AI’s Index resources.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*IndexClient) CancelOperation

func (c *IndexClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*IndexClient) Close

func (c *IndexClient) Close() error

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

func (*IndexClient) Connection

func (c *IndexClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*IndexClient) CreateIndex

CreateIndex creates an Index.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#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
}

func (*IndexClient) CreateIndexOperation

func (c *IndexClient) 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 (*IndexClient) DeleteIndex

DeleteIndex deletes an Index. An Index can only be deleted when all its DeployedIndexes had been undeployed.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteIndexRequest.
	}
	op, err := c.DeleteIndex(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*IndexClient) DeleteIndexOperation

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

func (c *IndexClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*IndexClient) GetIamPolicy

func (c *IndexClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexClient) GetIndex

GetIndex gets an Index.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetIndexRequest.
	}
	resp, err := c.GetIndex(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexClient) ListIndexes

ListIndexes lists Indexes in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListIndexesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#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
	}
}

func (*IndexClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*IndexClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*IndexClient) RemoveDatapoints

RemoveDatapoints remove Datapoints from an Index.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.RemoveDatapointsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#RemoveDatapointsRequest.
	}
	resp, err := c.RemoveDatapoints(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexClient) SetIamPolicy

func (c *IndexClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexClient) UpdateIndex

UpdateIndex updates an Index.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#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
}

func (*IndexClient) UpdateIndexOperation

func (c *IndexClient) 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 (*IndexClient) UpsertDatapoints

UpsertDatapoints add/update Datapoints into an Index.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpsertDatapointsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpsertDatapointsRequest.
	}
	resp, err := c.UpsertDatapoints(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

IndexEndpointCallOptions

type IndexEndpointCallOptions struct {
	CreateIndexEndpoint []gax.CallOption
	GetIndexEndpoint    []gax.CallOption
	ListIndexEndpoints  []gax.CallOption
	UpdateIndexEndpoint []gax.CallOption
	DeleteIndexEndpoint []gax.CallOption
	DeployIndex         []gax.CallOption
	UndeployIndex       []gax.CallOption
	MutateDeployedIndex []gax.CallOption
	GetLocation         []gax.CallOption
	ListLocations       []gax.CallOption
	GetIamPolicy        []gax.CallOption
	SetIamPolicy        []gax.CallOption
	TestIamPermissions  []gax.CallOption
	CancelOperation     []gax.CallOption
	DeleteOperation     []gax.CallOption
	GetOperation        []gax.CallOption
	ListOperations      []gax.CallOption
	WaitOperation       []gax.CallOption
}

IndexEndpointCallOptions contains the retry settings for each method of IndexEndpointClient.

IndexEndpointClient

type IndexEndpointClient struct {

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

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

IndexEndpointClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service for managing Vertex AI’s IndexEndpoints.

func NewIndexEndpointClient

func NewIndexEndpointClient(ctx context.Context, opts ...option.ClientOption) (*IndexEndpointClient, error)

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

A service for managing Vertex AI’s IndexEndpoints.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*IndexEndpointClient) CancelOperation

CancelOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*IndexEndpointClient) Close

func (c *IndexEndpointClient) Close() error

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

func (*IndexEndpointClient) Connection

func (c *IndexEndpointClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*IndexEndpointClient) CreateIndexEndpoint

CreateIndexEndpoint creates an IndexEndpoint.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateIndexEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#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
}

func (*IndexEndpointClient) CreateIndexEndpointOperation

func (c *IndexEndpointClient) 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 (*IndexEndpointClient) DeleteIndexEndpoint

DeleteIndexEndpoint deletes an IndexEndpoint.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteIndexEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteIndexEndpointRequest.
	}
	op, err := c.DeleteIndexEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*IndexEndpointClient) DeleteIndexEndpointOperation

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

DeleteOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*IndexEndpointClient) DeployIndex

DeployIndex deploys an Index into this IndexEndpoint, creating a DeployedIndex within it. Only non-empty Indexes can be deployed.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeployIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#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
}

func (*IndexEndpointClient) DeployIndexOperation

func (c *IndexEndpointClient) 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 (*IndexEndpointClient) GetIamPolicy

func (c *IndexEndpointClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexEndpointClient) GetIndexEndpoint

GetIndexEndpoint gets an IndexEndpoint.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetIndexEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetIndexEndpointRequest.
	}
	resp, err := c.GetIndexEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexEndpointClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexEndpointClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexEndpointClient) ListIndexEndpoints

ListIndexEndpoints lists IndexEndpoints in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListIndexEndpointsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#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
	}
}

func (*IndexEndpointClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*IndexEndpointClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*IndexEndpointClient) MutateDeployedIndex

MutateDeployedIndex update an existing DeployedIndex under an IndexEndpoint.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.MutateDeployedIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#MutateDeployedIndexRequest.
	}
	op, err := c.MutateDeployedIndex(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*IndexEndpointClient) MutateDeployedIndexOperation

func (c *IndexEndpointClient) MutateDeployedIndexOperation(name string) *MutateDeployedIndexOperation

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

func (*IndexEndpointClient) SetIamPolicy

func (c *IndexEndpointClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexEndpointClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexEndpointClient) UndeployIndex

UndeployIndex undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it, and freeing all resources it’s using.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UndeployIndexRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#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
}

func (*IndexEndpointClient) UndeployIndexOperation

func (c *IndexEndpointClient) 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 (*IndexEndpointClient) UpdateIndexEndpoint

UpdateIndexEndpoint updates an IndexEndpoint.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateIndexEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateIndexEndpointRequest.
	}
	resp, err := c.UpdateIndexEndpoint(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IndexEndpointClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewIndexEndpointClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 []*aiplatformpb.IndexEndpoint, nextPageToken string, err error)
	// contains filtered or unexported fields
}

IndexEndpointIterator manages a stream of *aiplatformpb.IndexEndpoint.

func (*IndexEndpointIterator) Next

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

func (*IndexEndpointIterator) PageInfo

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

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

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 []*aiplatformpb.Index, nextPageToken string, err error)
	// contains filtered or unexported fields
}

IndexIterator manages a stream of *aiplatformpb.Index.

func (*IndexIterator) Next

func (it *IndexIterator) Next() (*aiplatformpb.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.

JobCallOptions

type JobCallOptions struct {
	CreateCustomJob                               []gax.CallOption
	GetCustomJob                                  []gax.CallOption
	ListCustomJobs                                []gax.CallOption
	DeleteCustomJob                               []gax.CallOption
	CancelCustomJob                               []gax.CallOption
	CreateDataLabelingJob                         []gax.CallOption
	GetDataLabelingJob                            []gax.CallOption
	ListDataLabelingJobs                          []gax.CallOption
	DeleteDataLabelingJob                         []gax.CallOption
	CancelDataLabelingJob                         []gax.CallOption
	CreateHyperparameterTuningJob                 []gax.CallOption
	GetHyperparameterTuningJob                    []gax.CallOption
	ListHyperparameterTuningJobs                  []gax.CallOption
	DeleteHyperparameterTuningJob                 []gax.CallOption
	CancelHyperparameterTuningJob                 []gax.CallOption
	CreateBatchPredictionJob                      []gax.CallOption
	GetBatchPredictionJob                         []gax.CallOption
	ListBatchPredictionJobs                       []gax.CallOption
	DeleteBatchPredictionJob                      []gax.CallOption
	CancelBatchPredictionJob                      []gax.CallOption
	CreateModelDeploymentMonitoringJob            []gax.CallOption
	SearchModelDeploymentMonitoringStatsAnomalies []gax.CallOption
	GetModelDeploymentMonitoringJob               []gax.CallOption
	ListModelDeploymentMonitoringJobs             []gax.CallOption
	UpdateModelDeploymentMonitoringJob            []gax.CallOption
	DeleteModelDeploymentMonitoringJob            []gax.CallOption
	PauseModelDeploymentMonitoringJob             []gax.CallOption
	ResumeModelDeploymentMonitoringJob            []gax.CallOption
	GetLocation                                   []gax.CallOption
	ListLocations                                 []gax.CallOption
	GetIamPolicy                                  []gax.CallOption
	SetIamPolicy                                  []gax.CallOption
	TestIamPermissions                            []gax.CallOption
	CancelOperation                               []gax.CallOption
	DeleteOperation                               []gax.CallOption
	GetOperation                                  []gax.CallOption
	ListOperations                                []gax.CallOption
	WaitOperation                                 []gax.CallOption
}

JobCallOptions contains the retry settings for each method of JobClient.

JobClient

type JobClient struct {

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

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

JobClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service for creating and managing Vertex AI’s jobs.

func NewJobClient

func NewJobClient(ctx context.Context, opts ...option.ClientOption) (*JobClient, error)

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

A service for creating and managing Vertex AI’s jobs.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*JobClient) CancelBatchPredictionJob

func (c *JobClient) CancelBatchPredictionJob(ctx context.Context, req *aiplatformpb.CancelBatchPredictionJobRequest, opts ...gax.CallOption) error

CancelBatchPredictionJob cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetBatchPredictionJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its BatchPredictionJob.state is set to CANCELLED. Any files already outputted by the job are not deleted.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CancelBatchPredictionJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelBatchPredictionJobRequest.
	}
	err = c.CancelBatchPredictionJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*JobClient) CancelCustomJob

func (c *JobClient) CancelCustomJob(ctx context.Context, req *aiplatformpb.CancelCustomJobRequest, opts ...gax.CallOption) error

CancelCustomJob cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetCustomJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a CustomJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and CustomJob.state is set to CANCELLED.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CancelCustomJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelCustomJobRequest.
	}
	err = c.CancelCustomJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*JobClient) CancelDataLabelingJob

func (c *JobClient) CancelDataLabelingJob(ctx context.Context, req *aiplatformpb.CancelDataLabelingJobRequest, opts ...gax.CallOption) error

CancelDataLabelingJob cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CancelDataLabelingJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelDataLabelingJobRequest.
	}
	err = c.CancelDataLabelingJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*JobClient) CancelHyperparameterTuningJob

func (c *JobClient) CancelHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.CancelHyperparameterTuningJobRequest, opts ...gax.CallOption) error

CancelHyperparameterTuningJob cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetHyperparameterTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a HyperparameterTuningJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and HyperparameterTuningJob.state is set to CANCELLED.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CancelHyperparameterTuningJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelHyperparameterTuningJobRequest.
	}
	err = c.CancelHyperparameterTuningJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*JobClient) CancelOperation

func (c *JobClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*JobClient) Close

func (c *JobClient) Close() error

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

func (*JobClient) Connection

func (c *JobClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*JobClient) CreateBatchPredictionJob

CreateBatchPredictionJob creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateBatchPredictionJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateBatchPredictionJobRequest.
	}
	resp, err := c.CreateBatchPredictionJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) CreateCustomJob

CreateCustomJob creates a CustomJob. A created CustomJob right away will be attempted to be run.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateCustomJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateCustomJobRequest.
	}
	resp, err := c.CreateCustomJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) CreateDataLabelingJob

CreateDataLabelingJob creates a DataLabelingJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateDataLabelingJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateDataLabelingJobRequest.
	}
	resp, err := c.CreateDataLabelingJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) CreateHyperparameterTuningJob

CreateHyperparameterTuningJob creates a HyperparameterTuningJob

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateHyperparameterTuningJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateHyperparameterTuningJobRequest.
	}
	resp, err := c.CreateHyperparameterTuningJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) CreateModelDeploymentMonitoringJob

CreateModelDeploymentMonitoringJob creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateModelDeploymentMonitoringJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateModelDeploymentMonitoringJobRequest.
	}
	resp, err := c.CreateModelDeploymentMonitoringJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) DeleteBatchPredictionJob

DeleteBatchPredictionJob deletes a BatchPredictionJob. Can only be called on jobs that already finished.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteBatchPredictionJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteBatchPredictionJobRequest.
	}
	op, err := c.DeleteBatchPredictionJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*JobClient) DeleteBatchPredictionJobOperation

func (c *JobClient) DeleteBatchPredictionJobOperation(name string) *DeleteBatchPredictionJobOperation

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

func (*JobClient) DeleteCustomJob

DeleteCustomJob deletes a CustomJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteCustomJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteCustomJobRequest.
	}
	op, err := c.DeleteCustomJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*JobClient) DeleteCustomJobOperation

func (c *JobClient) DeleteCustomJobOperation(name string) *DeleteCustomJobOperation

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

func (*JobClient) DeleteDataLabelingJob

DeleteDataLabelingJob deletes a DataLabelingJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteDataLabelingJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteDataLabelingJobRequest.
	}
	op, err := c.DeleteDataLabelingJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*JobClient) DeleteDataLabelingJobOperation

func (c *JobClient) DeleteDataLabelingJobOperation(name string) *DeleteDataLabelingJobOperation

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

func (*JobClient) DeleteHyperparameterTuningJob

DeleteHyperparameterTuningJob deletes a HyperparameterTuningJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteHyperparameterTuningJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteHyperparameterTuningJobRequest.
	}
	op, err := c.DeleteHyperparameterTuningJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*JobClient) DeleteHyperparameterTuningJobOperation

func (c *JobClient) DeleteHyperparameterTuningJobOperation(name string) *DeleteHyperparameterTuningJobOperation

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

func (*JobClient) DeleteModelDeploymentMonitoringJob

DeleteModelDeploymentMonitoringJob deletes a ModelDeploymentMonitoringJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteModelDeploymentMonitoringJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteModelDeploymentMonitoringJobRequest.
	}
	op, err := c.DeleteModelDeploymentMonitoringJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*JobClient) DeleteModelDeploymentMonitoringJobOperation

func (c *JobClient) DeleteModelDeploymentMonitoringJobOperation(name string) *DeleteModelDeploymentMonitoringJobOperation

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

func (*JobClient) DeleteOperation

func (c *JobClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*JobClient) GetBatchPredictionJob

GetBatchPredictionJob gets a BatchPredictionJob

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetBatchPredictionJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetBatchPredictionJobRequest.
	}
	resp, err := c.GetBatchPredictionJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) GetCustomJob

GetCustomJob gets a CustomJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetCustomJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetCustomJobRequest.
	}
	resp, err := c.GetCustomJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) GetDataLabelingJob

GetDataLabelingJob gets a DataLabelingJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetDataLabelingJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetDataLabelingJobRequest.
	}
	resp, err := c.GetDataLabelingJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) GetHyperparameterTuningJob

GetHyperparameterTuningJob gets a HyperparameterTuningJob

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetHyperparameterTuningJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetHyperparameterTuningJobRequest.
	}
	resp, err := c.GetHyperparameterTuningJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) GetIamPolicy

func (c *JobClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) GetModelDeploymentMonitoringJob

GetModelDeploymentMonitoringJob gets a ModelDeploymentMonitoringJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetModelDeploymentMonitoringJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetModelDeploymentMonitoringJobRequest.
	}
	resp, err := c.GetModelDeploymentMonitoringJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) ListBatchPredictionJobs

ListBatchPredictionJobs lists BatchPredictionJobs in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListBatchPredictionJobsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListBatchPredictionJobsRequest.
	}
	it := c.ListBatchPredictionJobs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*JobClient) ListCustomJobs

ListCustomJobs lists CustomJobs in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListCustomJobsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListCustomJobsRequest.
	}
	it := c.ListCustomJobs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*JobClient) ListDataLabelingJobs

ListDataLabelingJobs lists DataLabelingJobs in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListDataLabelingJobsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListDataLabelingJobsRequest.
	}
	it := c.ListDataLabelingJobs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*JobClient) ListHyperparameterTuningJobs

ListHyperparameterTuningJobs lists HyperparameterTuningJobs in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListHyperparameterTuningJobsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListHyperparameterTuningJobsRequest.
	}
	it := c.ListHyperparameterTuningJobs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*JobClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*JobClient) ListModelDeploymentMonitoringJobs

ListModelDeploymentMonitoringJobs lists ModelDeploymentMonitoringJobs in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListModelDeploymentMonitoringJobsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListModelDeploymentMonitoringJobsRequest.
	}
	it := c.ListModelDeploymentMonitoringJobs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*JobClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*JobClient) PauseModelDeploymentMonitoringJob

func (c *JobClient) PauseModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.PauseModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) error

PauseModelDeploymentMonitoringJob pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark ModelDeploymentMonitoringJob.state to ‘PAUSED’.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.PauseModelDeploymentMonitoringJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#PauseModelDeploymentMonitoringJobRequest.
	}
	err = c.PauseModelDeploymentMonitoringJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*JobClient) ResumeModelDeploymentMonitoringJob

func (c *JobClient) ResumeModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.ResumeModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) error

ResumeModelDeploymentMonitoringJob resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can’t be resumed.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ResumeModelDeploymentMonitoringJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ResumeModelDeploymentMonitoringJobRequest.
	}
	err = c.ResumeModelDeploymentMonitoringJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*JobClient) SearchModelDeploymentMonitoringStatsAnomalies

SearchModelDeploymentMonitoringStatsAnomalies searches Model Monitoring Statistics generated within a given time window.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.SearchModelDeploymentMonitoringStatsAnomaliesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#SearchModelDeploymentMonitoringStatsAnomaliesRequest.
	}
	it := c.SearchModelDeploymentMonitoringStatsAnomalies(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*JobClient) SetIamPolicy

func (c *JobClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) UpdateModelDeploymentMonitoringJob

UpdateModelDeploymentMonitoringJob updates a ModelDeploymentMonitoringJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateModelDeploymentMonitoringJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateModelDeploymentMonitoringJobRequest.
	}
	op, err := c.UpdateModelDeploymentMonitoringJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*JobClient) UpdateModelDeploymentMonitoringJobOperation

func (c *JobClient) UpdateModelDeploymentMonitoringJobOperation(name string) *UpdateModelDeploymentMonitoringJobOperation

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

func (*JobClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

LocationIterator

type LocationIterator struct {

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

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

LocationIterator manages a stream of *locationpb.Location.

func (*LocationIterator) Next

func (it *LocationIterator) Next() (*locationpb.Location, error)

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

func (*LocationIterator) PageInfo

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

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

MetadataCallOptions

type MetadataCallOptions struct {
	CreateMetadataStore              []gax.CallOption
	GetMetadataStore                 []gax.CallOption
	ListMetadataStores               []gax.CallOption
	DeleteMetadataStore              []gax.CallOption
	CreateArtifact                   []gax.CallOption
	GetArtifact                      []gax.CallOption
	ListArtifacts                    []gax.CallOption
	UpdateArtifact                   []gax.CallOption
	DeleteArtifact                   []gax.CallOption
	PurgeArtifacts                   []gax.CallOption
	CreateContext                    []gax.CallOption
	GetContext                       []gax.CallOption
	ListContexts                     []gax.CallOption
	UpdateContext                    []gax.CallOption
	DeleteContext                    []gax.CallOption
	PurgeContexts                    []gax.CallOption
	AddContextArtifactsAndExecutions []gax.CallOption
	AddContextChildren               []gax.CallOption
	QueryContextLineageSubgraph      []gax.CallOption
	CreateExecution                  []gax.CallOption
	GetExecution                     []gax.CallOption
	ListExecutions                   []gax.CallOption
	UpdateExecution                  []gax.CallOption
	DeleteExecution                  []gax.CallOption
	PurgeExecutions                  []gax.CallOption
	AddExecutionEvents               []gax.CallOption
	QueryExecutionInputsAndOutputs   []gax.CallOption
	CreateMetadataSchema             []gax.CallOption
	GetMetadataSchema                []gax.CallOption
	ListMetadataSchemas              []gax.CallOption
	QueryArtifactLineageSubgraph     []gax.CallOption
	GetLocation                      []gax.CallOption
	ListLocations                    []gax.CallOption
	GetIamPolicy                     []gax.CallOption
	SetIamPolicy                     []gax.CallOption
	TestIamPermissions               []gax.CallOption
	CancelOperation                  []gax.CallOption
	DeleteOperation                  []gax.CallOption
	GetOperation                     []gax.CallOption
	ListOperations                   []gax.CallOption
	WaitOperation                    []gax.CallOption
}

MetadataCallOptions contains the retry settings for each method of MetadataClient.

MetadataClient

type MetadataClient struct {

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

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

MetadataClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for reading and writing metadata entries.

func NewMetadataClient

func NewMetadataClient(ctx context.Context, opts ...option.ClientOption) (*MetadataClient, error)

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

Service for reading and writing metadata entries.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*MetadataClient) AddContextArtifactsAndExecutions

AddContextArtifactsAndExecutions adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have already been added to a Context, they are simply skipped.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.AddContextArtifactsAndExecutionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#AddContextArtifactsAndExecutionsRequest.
	}
	resp, err := c.AddContextArtifactsAndExecutions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) AddContextChildren

AddContextChildren adds a set of Contexts as children to a parent Context. If any of the child Contexts have already been added to the parent Context, they are simply skipped. If this call would create a cycle or cause any Context to have more than 10 parents, the request will fail with an INVALID_ARGUMENT error.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.AddContextChildrenRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#AddContextChildrenRequest.
	}
	resp, err := c.AddContextChildren(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) AddExecutionEvents

AddExecutionEvents adds Events to the specified Execution. An Event indicates whether an Artifact was used as an input or output for an Execution. If an Event already exists between the Execution and the Artifact, the Event is skipped.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.AddExecutionEventsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#AddExecutionEventsRequest.
	}
	resp, err := c.AddExecutionEvents(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) CancelOperation

func (c *MetadataClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*MetadataClient) Close

func (c *MetadataClient) Close() error

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

func (*MetadataClient) Connection

func (c *MetadataClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*MetadataClient) CreateArtifact

CreateArtifact creates an Artifact associated with a MetadataStore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateArtifactRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateArtifactRequest.
	}
	resp, err := c.CreateArtifact(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) CreateContext

CreateContext creates a Context associated with a MetadataStore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateContextRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateContextRequest.
	}
	resp, err := c.CreateContext(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) CreateExecution

CreateExecution creates an Execution associated with a MetadataStore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateExecutionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateExecutionRequest.
	}
	resp, err := c.CreateExecution(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) CreateMetadataSchema

CreateMetadataSchema creates a MetadataSchema.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateMetadataSchemaRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateMetadataSchemaRequest.
	}
	resp, err := c.CreateMetadataSchema(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) CreateMetadataStore

CreateMetadataStore initializes a MetadataStore, including allocation of resources.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateMetadataStoreRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateMetadataStoreRequest.
	}
	op, err := c.CreateMetadataStore(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*MetadataClient) CreateMetadataStoreOperation

func (c *MetadataClient) CreateMetadataStoreOperation(name string) *CreateMetadataStoreOperation

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

func (*MetadataClient) DeleteArtifact

DeleteArtifact deletes an Artifact.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteArtifactRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteArtifactRequest.
	}
	op, err := c.DeleteArtifact(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*MetadataClient) DeleteArtifactOperation

func (c *MetadataClient) DeleteArtifactOperation(name string) *DeleteArtifactOperation

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

func (*MetadataClient) DeleteContext

DeleteContext deletes a stored Context.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteContextRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteContextRequest.
	}
	op, err := c.DeleteContext(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*MetadataClient) DeleteContextOperation

func (c *MetadataClient) DeleteContextOperation(name string) *DeleteContextOperation

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

func (*MetadataClient) DeleteExecution

DeleteExecution deletes an Execution.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteExecutionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteExecutionRequest.
	}
	op, err := c.DeleteExecution(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*MetadataClient) DeleteExecutionOperation

func (c *MetadataClient) DeleteExecutionOperation(name string) *DeleteExecutionOperation

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

func (*MetadataClient) DeleteMetadataStore

DeleteMetadataStore deletes a single MetadataStore and all its child resources (Artifacts, Executions, and Contexts).

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteMetadataStoreRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteMetadataStoreRequest.
	}
	op, err := c.DeleteMetadataStore(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*MetadataClient) DeleteMetadataStoreOperation

func (c *MetadataClient) DeleteMetadataStoreOperation(name string) *DeleteMetadataStoreOperation

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

func (*MetadataClient) DeleteOperation

func (c *MetadataClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*MetadataClient) GetArtifact

GetArtifact retrieves a specific Artifact.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetArtifactRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetArtifactRequest.
	}
	resp, err := c.GetArtifact(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) GetContext

GetContext retrieves a specific Context.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetContextRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetContextRequest.
	}
	resp, err := c.GetContext(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) GetExecution

GetExecution retrieves a specific Execution.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetExecutionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetExecutionRequest.
	}
	resp, err := c.GetExecution(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) GetIamPolicy

func (c *MetadataClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) GetMetadataSchema

GetMetadataSchema retrieves a specific MetadataSchema.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetMetadataSchemaRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetMetadataSchemaRequest.
	}
	resp, err := c.GetMetadataSchema(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) GetMetadataStore

GetMetadataStore retrieves a specific MetadataStore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetMetadataStoreRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetMetadataStoreRequest.
	}
	resp, err := c.GetMetadataStore(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) ListArtifacts

ListArtifacts lists Artifacts in the MetadataStore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListArtifactsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListArtifactsRequest.
	}
	it := c.ListArtifacts(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*MetadataClient) ListContexts

ListContexts lists Contexts on the MetadataStore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListContextsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListContextsRequest.
	}
	it := c.ListContexts(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*MetadataClient) ListExecutions

ListExecutions lists Executions in the MetadataStore.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListExecutionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListExecutionsRequest.
	}
	it := c.ListExecutions(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*MetadataClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*MetadataClient) ListMetadataSchemas

ListMetadataSchemas lists MetadataSchemas.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListMetadataSchemasRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListMetadataSchemasRequest.
	}
	it := c.ListMetadataSchemas(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*MetadataClient) ListMetadataStores

ListMetadataStores lists MetadataStores for a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListMetadataStoresRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListMetadataStoresRequest.
	}
	it := c.ListMetadataStores(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*MetadataClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*MetadataClient) PurgeArtifacts

PurgeArtifacts purges Artifacts.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.PurgeArtifactsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#PurgeArtifactsRequest.
	}
	op, err := c.PurgeArtifacts(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*MetadataClient) PurgeArtifactsOperation

func (c *MetadataClient) PurgeArtifactsOperation(name string) *PurgeArtifactsOperation

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

func (*MetadataClient) PurgeContexts

PurgeContexts purges Contexts.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.PurgeContextsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#PurgeContextsRequest.
	}
	op, err := c.PurgeContexts(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*MetadataClient) PurgeContextsOperation

func (c *MetadataClient) PurgeContextsOperation(name string) *PurgeContextsOperation

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

func (*MetadataClient) PurgeExecutions

PurgeExecutions purges Executions.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.PurgeExecutionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#PurgeExecutionsRequest.
	}
	op, err := c.PurgeExecutions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*MetadataClient) PurgeExecutionsOperation

func (c *MetadataClient) PurgeExecutionsOperation(name string) *PurgeExecutionsOperation

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

func (*MetadataClient) QueryArtifactLineageSubgraph

QueryArtifactLineageSubgraph retrieves lineage of an Artifact represented through Artifacts and Executions connected by Event edges and returned as a LineageSubgraph.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.QueryArtifactLineageSubgraphRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#QueryArtifactLineageSubgraphRequest.
	}
	resp, err := c.QueryArtifactLineageSubgraph(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) QueryContextLineageSubgraph

QueryContextLineageSubgraph retrieves Artifacts and Executions within the specified Context, connected by Event edges and returned as a LineageSubgraph.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.QueryContextLineageSubgraphRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#QueryContextLineageSubgraphRequest.
	}
	resp, err := c.QueryContextLineageSubgraph(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) QueryExecutionInputsAndOutputs

QueryExecutionInputsAndOutputs obtains the set of input and output Artifacts for this Execution, in the form of LineageSubgraph that also contains the Execution and connecting Events.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.QueryExecutionInputsAndOutputsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#QueryExecutionInputsAndOutputsRequest.
	}
	resp, err := c.QueryExecutionInputsAndOutputs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) SetIamPolicy

func (c *MetadataClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) UpdateArtifact

UpdateArtifact updates a stored Artifact.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateArtifactRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateArtifactRequest.
	}
	resp, err := c.UpdateArtifact(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) UpdateContext

UpdateContext updates a stored Context.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateContextRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateContextRequest.
	}
	resp, err := c.UpdateContext(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) UpdateExecution

UpdateExecution updates a stored Execution.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateExecutionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateExecutionRequest.
	}
	resp, err := c.UpdateExecution(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MetadataClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMetadataClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

MetadataSchemaIterator

type MetadataSchemaIterator 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 []*aiplatformpb.MetadataSchema, nextPageToken string, err error)
	// contains filtered or unexported fields
}

MetadataSchemaIterator manages a stream of *aiplatformpb.MetadataSchema.

func (*MetadataSchemaIterator) Next

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

func (*MetadataSchemaIterator) PageInfo

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

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

MetadataStoreIterator

type MetadataStoreIterator 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 []*aiplatformpb.MetadataStore, nextPageToken string, err error)
	// contains filtered or unexported fields
}

MetadataStoreIterator manages a stream of *aiplatformpb.MetadataStore.

func (*MetadataStoreIterator) Next

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

func (*MetadataStoreIterator) PageInfo

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

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

MigratableResourceIterator

type MigratableResourceIterator 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 []*aiplatformpb.MigratableResource, nextPageToken string, err error)
	// contains filtered or unexported fields
}

MigratableResourceIterator manages a stream of *aiplatformpb.MigratableResource.

func (*MigratableResourceIterator) Next

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

func (*MigratableResourceIterator) PageInfo

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

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

MigrationCallOptions

type MigrationCallOptions struct {
	SearchMigratableResources []gax.CallOption
	BatchMigrateResources     []gax.CallOption
	GetLocation               []gax.CallOption
	ListLocations             []gax.CallOption
	GetIamPolicy              []gax.CallOption
	SetIamPolicy              []gax.CallOption
	TestIamPermissions        []gax.CallOption
	CancelOperation           []gax.CallOption
	DeleteOperation           []gax.CallOption
	GetOperation              []gax.CallOption
	ListOperations            []gax.CallOption
	WaitOperation             []gax.CallOption
}

MigrationCallOptions contains the retry settings for each method of MigrationClient.

MigrationClient

type MigrationClient struct {

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

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

MigrationClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service that migrates resources from automl.googleapis.com (at http://automl.googleapis.com), datalabeling.googleapis.com (at http://datalabeling.googleapis.com) and ml.googleapis.com (at http://ml.googleapis.com) to Vertex AI.

func NewMigrationClient

func NewMigrationClient(ctx context.Context, opts ...option.ClientOption) (*MigrationClient, error)

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

A service that migrates resources from automl.googleapis.com (at http://automl.googleapis.com), datalabeling.googleapis.com (at http://datalabeling.googleapis.com) and ml.googleapis.com (at http://ml.googleapis.com) to Vertex AI.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*MigrationClient) BatchMigrateResources

BatchMigrateResources batch migrates resources from ml.googleapis.com (at http://ml.googleapis.com), automl.googleapis.com (at http://automl.googleapis.com), and datalabeling.googleapis.com (at http://datalabeling.googleapis.com) to Vertex AI.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.BatchMigrateResourcesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchMigrateResourcesRequest.
	}
	op, err := c.BatchMigrateResources(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*MigrationClient) BatchMigrateResourcesOperation

func (c *MigrationClient) BatchMigrateResourcesOperation(name string) *BatchMigrateResourcesOperation

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

func (*MigrationClient) CancelOperation

func (c *MigrationClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*MigrationClient) Close

func (c *MigrationClient) Close() error

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

func (*MigrationClient) Connection

func (c *MigrationClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*MigrationClient) DeleteOperation

func (c *MigrationClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*MigrationClient) GetIamPolicy

func (c *MigrationClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MigrationClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MigrationClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MigrationClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*MigrationClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*MigrationClient) SearchMigratableResources

SearchMigratableResources searches all of the resources in automl.googleapis.com (at http://automl.googleapis.com), datalabeling.googleapis.com (at http://datalabeling.googleapis.com) and ml.googleapis.com (at http://ml.googleapis.com) that can be migrated to Vertex AI’s given location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.SearchMigratableResourcesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#SearchMigratableResourcesRequest.
	}
	it := c.SearchMigratableResources(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*MigrationClient) SetIamPolicy

func (c *MigrationClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MigrationClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MigrationClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewMigrationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

ModelCallOptions

type ModelCallOptions struct {
	UploadModel                      []gax.CallOption
	GetModel                         []gax.CallOption
	ListModels                       []gax.CallOption
	ListModelVersions                []gax.CallOption
	UpdateModel                      []gax.CallOption
	DeleteModel                      []gax.CallOption
	DeleteModelVersion               []gax.CallOption
	MergeVersionAliases              []gax.CallOption
	ExportModel                      []gax.CallOption
	ImportModelEvaluation            []gax.CallOption
	BatchImportModelEvaluationSlices []gax.CallOption
	GetModelEvaluation               []gax.CallOption
	ListModelEvaluations             []gax.CallOption
	GetModelEvaluationSlice          []gax.CallOption
	ListModelEvaluationSlices        []gax.CallOption
	GetLocation                      []gax.CallOption
	ListLocations                    []gax.CallOption
	GetIamPolicy                     []gax.CallOption
	SetIamPolicy                     []gax.CallOption
	TestIamPermissions               []gax.CallOption
	CancelOperation                  []gax.CallOption
	DeleteOperation                  []gax.CallOption
	GetOperation                     []gax.CallOption
	ListOperations                   []gax.CallOption
	WaitOperation                    []gax.CallOption
}

ModelCallOptions contains the retry settings for each method of ModelClient.

ModelClient

type ModelClient struct {

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

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

ModelClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service for managing Vertex AI’s machine learning Models.

func NewModelClient

func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelClient, error)

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

A service for managing Vertex AI’s machine learning Models.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ModelClient) BatchImportModelEvaluationSlices

BatchImportModelEvaluationSlices imports a list of externally generated ModelEvaluationSlice.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.BatchImportModelEvaluationSlicesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchImportModelEvaluationSlicesRequest.
	}
	resp, err := c.BatchImportModelEvaluationSlices(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) CancelOperation

func (c *ModelClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*ModelClient) Close

func (c *ModelClient) Close() error

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

func (*ModelClient) Connection

func (c *ModelClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ModelClient) DeleteModel

DeleteModel deletes a Model.

A model cannot be deleted if any Endpoint resource has a DeployedModel based on the model in its deployed_models field.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteModelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteModelRequest.
	}
	op, err := c.DeleteModel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*ModelClient) DeleteModelOperation

func (c *ModelClient) DeleteModelOperation(name string) *DeleteModelOperation

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

func (*ModelClient) DeleteModelVersion

DeleteModelVersion deletes a Model version.

Model version can only be deleted if there are no DeployedModels created from it. Deleting the only version in the Model is not allowed. Use DeleteModel for deleting the Model instead.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteModelVersionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteModelVersionRequest.
	}
	op, err := c.DeleteModelVersion(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*ModelClient) DeleteModelVersionOperation

func (c *ModelClient) DeleteModelVersionOperation(name string) *DeleteModelVersionOperation

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

func (*ModelClient) DeleteOperation

func (c *ModelClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*ModelClient) ExportModel

ExportModel exports a trained, exportable Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ExportModelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ExportModelRequest.
	}
	op, err := c.ExportModel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*ModelClient) ExportModelOperation

func (c *ModelClient) ExportModelOperation(name string) *ExportModelOperation

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

func (*ModelClient) GetIamPolicy

func (c *ModelClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) GetModel

GetModel gets a Model.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetModelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetModelRequest.
	}
	resp, err := c.GetModel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) GetModelEvaluation

GetModelEvaluation gets a ModelEvaluation.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetModelEvaluationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetModelEvaluationRequest.
	}
	resp, err := c.GetModelEvaluation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) GetModelEvaluationSlice

GetModelEvaluationSlice gets a ModelEvaluationSlice.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetModelEvaluationSliceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetModelEvaluationSliceRequest.
	}
	resp, err := c.GetModelEvaluationSlice(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) ImportModelEvaluation

ImportModelEvaluation imports an externally generated ModelEvaluation.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ImportModelEvaluationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ImportModelEvaluationRequest.
	}
	resp, err := c.ImportModelEvaluation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ModelClient) ListModelEvaluationSlices

ListModelEvaluationSlices lists ModelEvaluationSlices in a ModelEvaluation.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListModelEvaluationSlicesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListModelEvaluationSlicesRequest.
	}
	it := c.ListModelEvaluationSlices(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ModelClient) ListModelEvaluations

ListModelEvaluations lists ModelEvaluations in a Model.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListModelEvaluationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListModelEvaluationsRequest.
	}
	it := c.ListModelEvaluations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ModelClient) ListModelVersions

func (c *ModelClient) ListModelVersions(ctx context.Context, req *aiplatformpb.ListModelVersionsRequest, opts ...gax.CallOption) *ModelIterator

ListModelVersions lists versions of the specified model.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListModelVersionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListModelVersionsRequest.
	}
	it := c.ListModelVersions(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ModelClient) ListModels

ListModels lists Models in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListModelsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListModelsRequest.
	}
	it := c.ListModels(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ModelClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*ModelClient) MergeVersionAliases

MergeVersionAliases merges a set of aliases for a Model version.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.MergeVersionAliasesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#MergeVersionAliasesRequest.
	}
	resp, err := c.MergeVersionAliases(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) SetIamPolicy

func (c *ModelClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) UpdateModel

UpdateModel updates a Model.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateModelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateModelRequest.
	}
	resp, err := c.UpdateModel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ModelClient) UploadModel

UploadModel uploads a Model artifact into Vertex AI.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UploadModelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UploadModelRequest.
	}
	op, err := c.UploadModel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*ModelClient) UploadModelOperation

func (c *ModelClient) UploadModelOperation(name string) *UploadModelOperation

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

func (*ModelClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewModelClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

ModelDeploymentMonitoringJobIterator

type ModelDeploymentMonitoringJobIterator 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 []*aiplatformpb.ModelDeploymentMonitoringJob, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ModelDeploymentMonitoringJobIterator manages a stream of *aiplatformpb.ModelDeploymentMonitoringJob.

func (*ModelDeploymentMonitoringJobIterator) Next

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

func (*ModelDeploymentMonitoringJobIterator) PageInfo

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

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

ModelEvaluationIterator

type ModelEvaluationIterator 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 []*aiplatformpb.ModelEvaluation, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ModelEvaluationIterator manages a stream of *aiplatformpb.ModelEvaluation.

func (*ModelEvaluationIterator) Next

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

func (*ModelEvaluationIterator) PageInfo

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

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

ModelEvaluationSliceIterator

type ModelEvaluationSliceIterator 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 []*aiplatformpb.ModelEvaluationSlice, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ModelEvaluationSliceIterator manages a stream of *aiplatformpb.ModelEvaluationSlice.

func (*ModelEvaluationSliceIterator) Next

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

func (*ModelEvaluationSliceIterator) PageInfo

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

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

ModelIterator

type ModelIterator 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 []*aiplatformpb.Model, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ModelIterator manages a stream of *aiplatformpb.Model.

func (*ModelIterator) Next

func (it *ModelIterator) Next() (*aiplatformpb.Model, 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 (*ModelIterator) PageInfo

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

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

ModelMonitoringStatsAnomaliesIterator

type ModelMonitoringStatsAnomaliesIterator 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 []*aiplatformpb.ModelMonitoringStatsAnomalies, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ModelMonitoringStatsAnomaliesIterator manages a stream of *aiplatformpb.ModelMonitoringStatsAnomalies.

func (*ModelMonitoringStatsAnomaliesIterator) Next

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

func (*ModelMonitoringStatsAnomaliesIterator) PageInfo

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

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

MutateDeployedIndexOperation

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

MutateDeployedIndexOperation manages a long-running operation from MutateDeployedIndex.

func (*MutateDeployedIndexOperation) Done

Done reports whether the long-running operation has completed.

func (*MutateDeployedIndexOperation) Metadata

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

func (*MutateDeployedIndexOperation) Name

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

func (*MutateDeployedIndexOperation) Poll

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

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

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

func (*MutateDeployedIndexOperation) Wait

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

See documentation of Poll for error-handling information.

OperationIterator

type OperationIterator struct {

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

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

OperationIterator manages a stream of *longrunningpb.Operation.

func (*OperationIterator) Next

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

func (*OperationIterator) PageInfo

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

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

PipelineCallOptions

type PipelineCallOptions struct {
	CreateTrainingPipeline []gax.CallOption
	GetTrainingPipeline    []gax.CallOption
	ListTrainingPipelines  []gax.CallOption
	DeleteTrainingPipeline []gax.CallOption
	CancelTrainingPipeline []gax.CallOption
	CreatePipelineJob      []gax.CallOption
	GetPipelineJob         []gax.CallOption
	ListPipelineJobs       []gax.CallOption
	DeletePipelineJob      []gax.CallOption
	CancelPipelineJob      []gax.CallOption
	GetLocation            []gax.CallOption
	ListLocations          []gax.CallOption
	GetIamPolicy           []gax.CallOption
	SetIamPolicy           []gax.CallOption
	TestIamPermissions     []gax.CallOption
	CancelOperation        []gax.CallOption
	DeleteOperation        []gax.CallOption
	GetOperation           []gax.CallOption
	ListOperations         []gax.CallOption
	WaitOperation          []gax.CallOption
}

PipelineCallOptions contains the retry settings for each method of PipelineClient.

PipelineClient

type PipelineClient struct {

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

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

PipelineClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service for creating and managing Vertex AI’s pipelines. This includes both TrainingPipeline resources (used for AutoML and custom training) and PipelineJob resources (used for Vertex AI Pipelines).

func NewPipelineClient

func NewPipelineClient(ctx context.Context, opts ...option.ClientOption) (*PipelineClient, error)

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

A service for creating and managing Vertex AI’s pipelines. This includes both TrainingPipeline resources (used for AutoML and custom training) and PipelineJob resources (used for Vertex AI Pipelines).

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*PipelineClient) CancelOperation

func (c *PipelineClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*PipelineClient) CancelPipelineJob

func (c *PipelineClient) CancelPipelineJob(ctx context.Context, req *aiplatformpb.CancelPipelineJobRequest, opts ...gax.CallOption) error

CancelPipelineJob cancels a PipelineJob. Starts asynchronous cancellation on the PipelineJob. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use PipelineService.GetPipelineJob or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the PipelineJob is not deleted; instead it becomes a pipeline with a PipelineJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and PipelineJob.state is set to CANCELLED.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CancelPipelineJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelPipelineJobRequest.
	}
	err = c.CancelPipelineJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*PipelineClient) CancelTrainingPipeline

func (c *PipelineClient) CancelTrainingPipeline(ctx context.Context, req *aiplatformpb.CancelTrainingPipelineRequest, opts ...gax.CallOption) error

CancelTrainingPipeline cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use PipelineService.GetTrainingPipeline or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead it becomes a pipeline with a TrainingPipeline.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and TrainingPipeline.state is set to CANCELLED.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CancelTrainingPipelineRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelTrainingPipelineRequest.
	}
	err = c.CancelTrainingPipeline(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*PipelineClient) Close

func (c *PipelineClient) Close() error

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

func (*PipelineClient) Connection

func (c *PipelineClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*PipelineClient) CreatePipelineJob

CreatePipelineJob creates a PipelineJob. A PipelineJob will run immediately when created.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreatePipelineJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreatePipelineJobRequest.
	}
	resp, err := c.CreatePipelineJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PipelineClient) CreateTrainingPipeline

CreateTrainingPipeline creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateTrainingPipelineRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTrainingPipelineRequest.
	}
	resp, err := c.CreateTrainingPipeline(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PipelineClient) DeleteOperation

func (c *PipelineClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*PipelineClient) DeletePipelineJob

DeletePipelineJob deletes a PipelineJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeletePipelineJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeletePipelineJobRequest.
	}
	op, err := c.DeletePipelineJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*PipelineClient) DeletePipelineJobOperation

func (c *PipelineClient) DeletePipelineJobOperation(name string) *DeletePipelineJobOperation

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

func (*PipelineClient) DeleteTrainingPipeline

DeleteTrainingPipeline deletes a TrainingPipeline.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteTrainingPipelineRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTrainingPipelineRequest.
	}
	op, err := c.DeleteTrainingPipeline(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*PipelineClient) DeleteTrainingPipelineOperation

func (c *PipelineClient) DeleteTrainingPipelineOperation(name string) *DeleteTrainingPipelineOperation

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

func (*PipelineClient) GetIamPolicy

func (c *PipelineClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PipelineClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PipelineClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PipelineClient) GetPipelineJob

GetPipelineJob gets a PipelineJob.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetPipelineJobRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetPipelineJobRequest.
	}
	resp, err := c.GetPipelineJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PipelineClient) GetTrainingPipeline

GetTrainingPipeline gets a TrainingPipeline.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetTrainingPipelineRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTrainingPipelineRequest.
	}
	resp, err := c.GetTrainingPipeline(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PipelineClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*PipelineClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*PipelineClient) ListPipelineJobs

ListPipelineJobs lists PipelineJobs in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListPipelineJobsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListPipelineJobsRequest.
	}
	it := c.ListPipelineJobs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*PipelineClient) ListTrainingPipelines

ListTrainingPipelines lists TrainingPipelines in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListTrainingPipelinesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTrainingPipelinesRequest.
	}
	it := c.ListTrainingPipelines(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*PipelineClient) SetIamPolicy

func (c *PipelineClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PipelineClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PipelineClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPipelineClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

PipelineJobIterator

type PipelineJobIterator 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 []*aiplatformpb.PipelineJob, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PipelineJobIterator manages a stream of *aiplatformpb.PipelineJob.

func (*PipelineJobIterator) Next

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

func (*PipelineJobIterator) PageInfo

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

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

PredictionCallOptions

type PredictionCallOptions struct {
	Predict            []gax.CallOption
	RawPredict         []gax.CallOption
	Explain            []gax.CallOption
	GetLocation        []gax.CallOption
	ListLocations      []gax.CallOption
	GetIamPolicy       []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
	CancelOperation    []gax.CallOption
	DeleteOperation    []gax.CallOption
	GetOperation       []gax.CallOption
	ListOperations     []gax.CallOption
	WaitOperation      []gax.CallOption
}

PredictionCallOptions contains the retry settings for each method of PredictionClient.

PredictionClient

type PredictionClient struct {

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

PredictionClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service for online predictions and explanations.

func NewPredictionClient

func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*PredictionClient, error)

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

A service for online predictions and explanations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*PredictionClient) CancelOperation

CancelOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*PredictionClient) Close

func (c *PredictionClient) Close() error

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

func (*PredictionClient) Connection

func (c *PredictionClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*PredictionClient) DeleteOperation

DeleteOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*PredictionClient) Explain

Explain perform an online explanation.

If deployed_model_id is specified, the corresponding DeployModel must have explanation_spec populated. If deployed_model_id is not specified, all DeployedModels must have explanation_spec populated. Only deployed AutoML tabular Models have explanation_spec.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ExplainRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ExplainRequest.
	}
	resp, err := c.Explain(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PredictionClient) GetIamPolicy

func (c *PredictionClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PredictionClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PredictionClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PredictionClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*PredictionClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*PredictionClient) Predict

Predict perform an online prediction.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.PredictRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#PredictRequest.
	}
	resp, err := c.Predict(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PredictionClient) RawPredict

RawPredict perform an online prediction with an arbitrary HTTP payload.

The response includes the following HTTP headers:

X-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this
prediction.

X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’s DeployedModel
that served this prediction.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.RawPredictRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#RawPredictRequest.
	}
	resp, err := c.RawPredict(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PredictionClient) SetIamPolicy

func (c *PredictionClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PredictionClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PredictionClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewPredictionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

PurgeArtifactsOperation

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

PurgeArtifactsOperation manages a long-running operation from PurgeArtifacts.

func (*PurgeArtifactsOperation) Done

func (op *PurgeArtifactsOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*PurgeArtifactsOperation) Metadata

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

func (*PurgeArtifactsOperation) Name

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

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

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

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

func (*PurgeArtifactsOperation) Wait

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

See documentation of Poll for error-handling information.

PurgeContextsOperation

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

PurgeContextsOperation manages a long-running operation from PurgeContexts.

func (*PurgeContextsOperation) Done

func (op *PurgeContextsOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*PurgeContextsOperation) Metadata

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

func (*PurgeContextsOperation) Name

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

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

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

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

func (*PurgeContextsOperation) Wait

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

See documentation of Poll for error-handling information.

PurgeExecutionsOperation

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

PurgeExecutionsOperation manages a long-running operation from PurgeExecutions.

func (*PurgeExecutionsOperation) Done

func (op *PurgeExecutionsOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*PurgeExecutionsOperation) Metadata

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

func (*PurgeExecutionsOperation) Name

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

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

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

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

func (*PurgeExecutionsOperation) Wait

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

See documentation of Poll for error-handling information.

SavedQueryIterator

type SavedQueryIterator 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 []*aiplatformpb.SavedQuery, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SavedQueryIterator manages a stream of *aiplatformpb.SavedQuery.

func (*SavedQueryIterator) Next

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

func (*SavedQueryIterator) PageInfo

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

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

SpecialistPoolCallOptions

type SpecialistPoolCallOptions struct {
	CreateSpecialistPool []gax.CallOption
	GetSpecialistPool    []gax.CallOption
	ListSpecialistPools  []gax.CallOption
	DeleteSpecialistPool []gax.CallOption
	UpdateSpecialistPool []gax.CallOption
	GetLocation          []gax.CallOption
	ListLocations        []gax.CallOption
	GetIamPolicy         []gax.CallOption
	SetIamPolicy         []gax.CallOption
	TestIamPermissions   []gax.CallOption
	CancelOperation      []gax.CallOption
	DeleteOperation      []gax.CallOption
	GetOperation         []gax.CallOption
	ListOperations       []gax.CallOption
	WaitOperation        []gax.CallOption
}

SpecialistPoolCallOptions contains the retry settings for each method of SpecialistPoolClient.

SpecialistPoolClient

type SpecialistPoolClient struct {

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

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

SpecialistPoolClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

A service for creating and managing Customer SpecialistPools. When customers start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own Specialists to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud console, then Managers will get email notifications to manage Specialists and tasks on CrowdCompute console.

func NewSpecialistPoolClient

func NewSpecialistPoolClient(ctx context.Context, opts ...option.ClientOption) (*SpecialistPoolClient, error)

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

A service for creating and managing Customer SpecialistPools. When customers start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own Specialists to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud console, then Managers will get email notifications to manage Specialists and tasks on CrowdCompute console.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*SpecialistPoolClient) CancelOperation

CancelOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*SpecialistPoolClient) Close

func (c *SpecialistPoolClient) Close() error

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

func (*SpecialistPoolClient) Connection

func (c *SpecialistPoolClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*SpecialistPoolClient) CreateSpecialistPool

CreateSpecialistPool creates a SpecialistPool.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateSpecialistPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateSpecialistPoolRequest.
	}
	op, err := c.CreateSpecialistPool(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*SpecialistPoolClient) CreateSpecialistPoolOperation

func (c *SpecialistPoolClient) CreateSpecialistPoolOperation(name string) *CreateSpecialistPoolOperation

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

func (*SpecialistPoolClient) DeleteOperation

DeleteOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*SpecialistPoolClient) DeleteSpecialistPool

DeleteSpecialistPool deletes a SpecialistPool as well as all Specialists in the pool.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteSpecialistPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteSpecialistPoolRequest.
	}
	op, err := c.DeleteSpecialistPool(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*SpecialistPoolClient) DeleteSpecialistPoolOperation

func (c *SpecialistPoolClient) DeleteSpecialistPoolOperation(name string) *DeleteSpecialistPoolOperation

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

func (*SpecialistPoolClient) GetIamPolicy

func (c *SpecialistPoolClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SpecialistPoolClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SpecialistPoolClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SpecialistPoolClient) GetSpecialistPool

GetSpecialistPool gets a SpecialistPool.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetSpecialistPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetSpecialistPoolRequest.
	}
	resp, err := c.GetSpecialistPool(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SpecialistPoolClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SpecialistPoolClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*SpecialistPoolClient) ListSpecialistPools

ListSpecialistPools lists SpecialistPools in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListSpecialistPoolsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListSpecialistPoolsRequest.
	}
	it := c.ListSpecialistPools(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SpecialistPoolClient) SetIamPolicy

func (c *SpecialistPoolClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SpecialistPoolClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SpecialistPoolClient) UpdateSpecialistPool

UpdateSpecialistPool updates a SpecialistPool.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateSpecialistPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateSpecialistPoolRequest.
	}
	op, err := c.UpdateSpecialistPool(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*SpecialistPoolClient) UpdateSpecialistPoolOperation

func (c *SpecialistPoolClient) UpdateSpecialistPoolOperation(name string) *UpdateSpecialistPoolOperation

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

func (*SpecialistPoolClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewSpecialistPoolClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

SpecialistPoolIterator

type SpecialistPoolIterator 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 []*aiplatformpb.SpecialistPool, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SpecialistPoolIterator manages a stream of *aiplatformpb.SpecialistPool.

func (*SpecialistPoolIterator) Next

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

func (*SpecialistPoolIterator) PageInfo

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

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

StudyIterator

type StudyIterator 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 []*aiplatformpb.Study, nextPageToken string, err error)
	// contains filtered or unexported fields
}

StudyIterator manages a stream of *aiplatformpb.Study.

func (*StudyIterator) Next

func (it *StudyIterator) Next() (*aiplatformpb.Study, 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 (*StudyIterator) PageInfo

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

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

SuggestTrialsOperation

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

SuggestTrialsOperation manages a long-running operation from SuggestTrials.

func (*SuggestTrialsOperation) Done

func (op *SuggestTrialsOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*SuggestTrialsOperation) Metadata

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

func (*SuggestTrialsOperation) Name

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

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

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

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

func (*SuggestTrialsOperation) Wait

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

See documentation of Poll for error-handling information.

TensorboardCallOptions

type TensorboardCallOptions struct {
	CreateTensorboard                  []gax.CallOption
	GetTensorboard                     []gax.CallOption
	UpdateTensorboard                  []gax.CallOption
	ListTensorboards                   []gax.CallOption
	DeleteTensorboard                  []gax.CallOption
	CreateTensorboardExperiment        []gax.CallOption
	GetTensorboardExperiment           []gax.CallOption
	UpdateTensorboardExperiment        []gax.CallOption
	ListTensorboardExperiments         []gax.CallOption
	DeleteTensorboardExperiment        []gax.CallOption
	CreateTensorboardRun               []gax.CallOption
	BatchCreateTensorboardRuns         []gax.CallOption
	GetTensorboardRun                  []gax.CallOption
	UpdateTensorboardRun               []gax.CallOption
	ListTensorboardRuns                []gax.CallOption
	DeleteTensorboardRun               []gax.CallOption
	BatchCreateTensorboardTimeSeries   []gax.CallOption
	CreateTensorboardTimeSeries        []gax.CallOption
	GetTensorboardTimeSeries           []gax.CallOption
	UpdateTensorboardTimeSeries        []gax.CallOption
	ListTensorboardTimeSeries          []gax.CallOption
	DeleteTensorboardTimeSeries        []gax.CallOption
	BatchReadTensorboardTimeSeriesData []gax.CallOption
	ReadTensorboardTimeSeriesData      []gax.CallOption
	ReadTensorboardBlobData            []gax.CallOption
	WriteTensorboardExperimentData     []gax.CallOption
	WriteTensorboardRunData            []gax.CallOption
	ExportTensorboardTimeSeriesData    []gax.CallOption
	GetLocation                        []gax.CallOption
	ListLocations                      []gax.CallOption
	GetIamPolicy                       []gax.CallOption
	SetIamPolicy                       []gax.CallOption
	TestIamPermissions                 []gax.CallOption
	CancelOperation                    []gax.CallOption
	DeleteOperation                    []gax.CallOption
	GetOperation                       []gax.CallOption
	ListOperations                     []gax.CallOption
	WaitOperation                      []gax.CallOption
}

TensorboardCallOptions contains the retry settings for each method of TensorboardClient.

TensorboardClient

type TensorboardClient struct {

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

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

TensorboardClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

TensorboardService

func NewTensorboardClient

func NewTensorboardClient(ctx context.Context, opts ...option.ClientOption) (*TensorboardClient, error)

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

TensorboardService

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*TensorboardClient) BatchCreateTensorboardRuns

BatchCreateTensorboardRuns batch create TensorboardRuns.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.BatchCreateTensorboardRunsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchCreateTensorboardRunsRequest.
	}
	resp, err := c.BatchCreateTensorboardRuns(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) BatchCreateTensorboardTimeSeries

BatchCreateTensorboardTimeSeries batch create TensorboardTimeSeries that belong to a TensorboardExperiment.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.BatchCreateTensorboardTimeSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchCreateTensorboardTimeSeriesRequest.
	}
	resp, err := c.BatchCreateTensorboardTimeSeries(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) BatchReadTensorboardTimeSeriesData

BatchReadTensorboardTimeSeriesData reads multiple TensorboardTimeSeries’ data. The data point number limit is 1000 for scalars, 100 for tensors and blob references. If the number of data points stored is less than the limit, all data will be returned. Otherwise, that limit number of data points will be randomly selected from this time series and returned.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.BatchReadTensorboardTimeSeriesDataRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchReadTensorboardTimeSeriesDataRequest.
	}
	resp, err := c.BatchReadTensorboardTimeSeriesData(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) CancelOperation

CancelOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*TensorboardClient) Close

func (c *TensorboardClient) Close() error

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

func (*TensorboardClient) Connection

func (c *TensorboardClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*TensorboardClient) CreateTensorboard

CreateTensorboard creates a Tensorboard.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateTensorboardRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardRequest.
	}
	op, err := c.CreateTensorboard(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*TensorboardClient) CreateTensorboardExperiment

CreateTensorboardExperiment creates a TensorboardExperiment.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateTensorboardExperimentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardExperimentRequest.
	}
	resp, err := c.CreateTensorboardExperiment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) CreateTensorboardOperation

func (c *TensorboardClient) CreateTensorboardOperation(name string) *CreateTensorboardOperation

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

func (*TensorboardClient) CreateTensorboardRun

CreateTensorboardRun creates a TensorboardRun.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateTensorboardRunRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardRunRequest.
	}
	resp, err := c.CreateTensorboardRun(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) CreateTensorboardTimeSeries

CreateTensorboardTimeSeries creates a TensorboardTimeSeries.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateTensorboardTimeSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardTimeSeriesRequest.
	}
	resp, err := c.CreateTensorboardTimeSeries(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) DeleteOperation

DeleteOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*TensorboardClient) DeleteTensorboard

DeleteTensorboard deletes a Tensorboard.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteTensorboardRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardRequest.
	}
	op, err := c.DeleteTensorboard(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*TensorboardClient) DeleteTensorboardExperiment

DeleteTensorboardExperiment deletes a TensorboardExperiment.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteTensorboardExperimentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardExperimentRequest.
	}
	op, err := c.DeleteTensorboardExperiment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*TensorboardClient) DeleteTensorboardExperimentOperation

func (c *TensorboardClient) DeleteTensorboardExperimentOperation(name string) *DeleteTensorboardExperimentOperation

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

func (*TensorboardClient) DeleteTensorboardOperation

func (c *TensorboardClient) DeleteTensorboardOperation(name string) *DeleteTensorboardOperation

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

func (*TensorboardClient) DeleteTensorboardRun

DeleteTensorboardRun deletes a TensorboardRun.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteTensorboardRunRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardRunRequest.
	}
	op, err := c.DeleteTensorboardRun(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*TensorboardClient) DeleteTensorboardRunOperation

func (c *TensorboardClient) DeleteTensorboardRunOperation(name string) *DeleteTensorboardRunOperation

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

func (*TensorboardClient) DeleteTensorboardTimeSeries

DeleteTensorboardTimeSeries deletes a TensorboardTimeSeries.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteTensorboardTimeSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardTimeSeriesRequest.
	}
	op, err := c.DeleteTensorboardTimeSeries(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*TensorboardClient) DeleteTensorboardTimeSeriesOperation

func (c *TensorboardClient) DeleteTensorboardTimeSeriesOperation(name string) *DeleteTensorboardTimeSeriesOperation

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

func (*TensorboardClient) ExportTensorboardTimeSeriesData

ExportTensorboardTimeSeriesData exports a TensorboardTimeSeries’ data. Data is returned in paginated responses.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ExportTensorboardTimeSeriesDataRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ExportTensorboardTimeSeriesDataRequest.
	}
	it := c.ExportTensorboardTimeSeriesData(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TensorboardClient) GetIamPolicy

func (c *TensorboardClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) GetTensorboard

GetTensorboard gets a Tensorboard.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetTensorboardRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardRequest.
	}
	resp, err := c.GetTensorboard(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) GetTensorboardExperiment

GetTensorboardExperiment gets a TensorboardExperiment.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetTensorboardExperimentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardExperimentRequest.
	}
	resp, err := c.GetTensorboardExperiment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) GetTensorboardRun

GetTensorboardRun gets a TensorboardRun.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetTensorboardRunRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardRunRequest.
	}
	resp, err := c.GetTensorboardRun(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) GetTensorboardTimeSeries

GetTensorboardTimeSeries gets a TensorboardTimeSeries.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetTensorboardTimeSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardTimeSeriesRequest.
	}
	resp, err := c.GetTensorboardTimeSeries(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TensorboardClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*TensorboardClient) ListTensorboardExperiments

ListTensorboardExperiments lists TensorboardExperiments in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListTensorboardExperimentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardExperimentsRequest.
	}
	it := c.ListTensorboardExperiments(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TensorboardClient) ListTensorboardRuns

ListTensorboardRuns lists TensorboardRuns in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListTensorboardRunsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardRunsRequest.
	}
	it := c.ListTensorboardRuns(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TensorboardClient) ListTensorboardTimeSeries

ListTensorboardTimeSeries lists TensorboardTimeSeries in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListTensorboardTimeSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardTimeSeriesRequest.
	}
	it := c.ListTensorboardTimeSeries(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TensorboardClient) ListTensorboards

ListTensorboards lists Tensorboards in a Location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListTensorboardsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardsRequest.
	}
	it := c.ListTensorboards(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TensorboardClient) ReadTensorboardBlobData

ReadTensorboardBlobData gets bytes of TensorboardBlobs. This is to allow reading blob data stored in consumer project’s Cloud Storage bucket without users having to obtain Cloud Storage access permission.

func (*TensorboardClient) ReadTensorboardTimeSeriesData

ReadTensorboardTimeSeriesData reads a TensorboardTimeSeries’ data. By default, if the number of data points stored is less than 1000, all data will be returned. Otherwise, 1000 data points will be randomly selected from this time series and returned. This value can be changed by changing max_data_points, which can’t be greater than 10k.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ReadTensorboardTimeSeriesDataRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ReadTensorboardTimeSeriesDataRequest.
	}
	resp, err := c.ReadTensorboardTimeSeriesData(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) SetIamPolicy

func (c *TensorboardClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) UpdateTensorboard

UpdateTensorboard updates a Tensorboard.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateTensorboardRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardRequest.
	}
	op, err := c.UpdateTensorboard(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*TensorboardClient) UpdateTensorboardExperiment

UpdateTensorboardExperiment updates a TensorboardExperiment.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateTensorboardExperimentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardExperimentRequest.
	}
	resp, err := c.UpdateTensorboardExperiment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) UpdateTensorboardOperation

func (c *TensorboardClient) UpdateTensorboardOperation(name string) *UpdateTensorboardOperation

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

func (*TensorboardClient) UpdateTensorboardRun

UpdateTensorboardRun updates a TensorboardRun.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateTensorboardRunRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardRunRequest.
	}
	resp, err := c.UpdateTensorboardRun(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) UpdateTensorboardTimeSeries

UpdateTensorboardTimeSeries updates a TensorboardTimeSeries.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.UpdateTensorboardTimeSeriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardTimeSeriesRequest.
	}
	resp, err := c.UpdateTensorboardTimeSeries(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) WriteTensorboardExperimentData

WriteTensorboardExperimentData write time series data points of multiple TensorboardTimeSeries in multiple TensorboardRun’s. If any data fail to be ingested, an error will be returned.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.WriteTensorboardExperimentDataRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#WriteTensorboardExperimentDataRequest.
	}
	resp, err := c.WriteTensorboardExperimentData(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TensorboardClient) WriteTensorboardRunData

WriteTensorboardRunData write time series data points into multiple TensorboardTimeSeries under a TensorboardRun. If any data fail to be ingested, an error will be returned.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewTensorboardClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.WriteTensorboardRunDataRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#WriteTensorboardRunDataRequest.
	}
	resp, err := c.WriteTensorboardRunData(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

TensorboardExperimentIterator

type TensorboardExperimentIterator 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 []*aiplatformpb.TensorboardExperiment, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TensorboardExperimentIterator manages a stream of *aiplatformpb.TensorboardExperiment.

func (*TensorboardExperimentIterator) Next

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

func (*TensorboardExperimentIterator) PageInfo

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

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

TensorboardIterator

type TensorboardIterator 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 []*aiplatformpb.Tensorboard, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TensorboardIterator manages a stream of *aiplatformpb.Tensorboard.

func (*TensorboardIterator) Next

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

func (*TensorboardIterator) PageInfo

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

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

TensorboardRunIterator

type TensorboardRunIterator 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 []*aiplatformpb.TensorboardRun, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TensorboardRunIterator manages a stream of *aiplatformpb.TensorboardRun.

func (*TensorboardRunIterator) Next

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

func (*TensorboardRunIterator) PageInfo

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

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

TensorboardTimeSeriesIterator

type TensorboardTimeSeriesIterator 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 []*aiplatformpb.TensorboardTimeSeries, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TensorboardTimeSeriesIterator manages a stream of *aiplatformpb.TensorboardTimeSeries.

func (*TensorboardTimeSeriesIterator) Next

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

func (*TensorboardTimeSeriesIterator) PageInfo

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

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

TimeSeriesDataPointIterator

type TimeSeriesDataPointIterator 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 []*aiplatformpb.TimeSeriesDataPoint, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TimeSeriesDataPointIterator manages a stream of *aiplatformpb.TimeSeriesDataPoint.

func (*TimeSeriesDataPointIterator) Next

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

func (*TimeSeriesDataPointIterator) PageInfo

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

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

TrainingPipelineIterator

type TrainingPipelineIterator 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 []*aiplatformpb.TrainingPipeline, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TrainingPipelineIterator manages a stream of *aiplatformpb.TrainingPipeline.

func (*TrainingPipelineIterator) Next

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

func (*TrainingPipelineIterator) PageInfo

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

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

TrialIterator

type TrialIterator 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 []*aiplatformpb.Trial, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TrialIterator manages a stream of *aiplatformpb.Trial.

func (*TrialIterator) Next

func (it *TrialIterator) Next() (*aiplatformpb.Trial, 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 (*TrialIterator) PageInfo

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

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

UndeployIndexOperation

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

UndeployIndexOperation manages a long-running operation from UndeployIndex.

func (*UndeployIndexOperation) Done

func (op *UndeployIndexOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UndeployIndexOperation) Metadata

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

func (*UndeployIndexOperation) Name

func (op *UndeployIndexOperation) Name() string

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

func (*UndeployIndexOperation) Poll

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

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

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

func (*UndeployIndexOperation) Wait

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

See documentation of Poll for error-handling information.

UndeployModelOperation

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

UndeployModelOperation manages a long-running operation from UndeployModel.

func (*UndeployModelOperation) Done

func (op *UndeployModelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UndeployModelOperation) Metadata

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

func (*UndeployModelOperation) Name

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

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

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

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

func (*UndeployModelOperation) Wait

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

See documentation of Poll for error-handling information.

UpdateFeaturestoreOperation

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

UpdateFeaturestoreOperation manages a long-running operation from UpdateFeaturestore.

func (*UpdateFeaturestoreOperation) Done

func (op *UpdateFeaturestoreOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateFeaturestoreOperation) Metadata

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

func (*UpdateFeaturestoreOperation) Name

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

func (*UpdateFeaturestoreOperation) Poll

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

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

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

func (*UpdateFeaturestoreOperation) Wait

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

See documentation of Poll for error-handling information.

UpdateIndexOperation

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

UpdateIndexOperation manages a long-running operation from UpdateIndex.

func (*UpdateIndexOperation) Done

func (op *UpdateIndexOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateIndexOperation) Metadata

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

func (*UpdateIndexOperation) Name

func (op *UpdateIndexOperation) Name() string

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

func (*UpdateIndexOperation) Poll

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

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

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

func (*UpdateIndexOperation) Wait

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

See documentation of Poll for error-handling information.

UpdateModelDeploymentMonitoringJobOperation

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

UpdateModelDeploymentMonitoringJobOperation manages a long-running operation from UpdateModelDeploymentMonitoringJob.

func (*UpdateModelDeploymentMonitoringJobOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateModelDeploymentMonitoringJobOperation) Metadata

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

func (*UpdateModelDeploymentMonitoringJobOperation) Name

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

func (*UpdateModelDeploymentMonitoringJobOperation) Poll

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

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

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

func (*UpdateModelDeploymentMonitoringJobOperation) Wait

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

See documentation of Poll for error-handling information.

UpdateSpecialistPoolOperation

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

UpdateSpecialistPoolOperation manages a long-running operation from UpdateSpecialistPool.

func (*UpdateSpecialistPoolOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateSpecialistPoolOperation) Metadata

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

func (*UpdateSpecialistPoolOperation) Name

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

func (*UpdateSpecialistPoolOperation) Poll

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

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

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

func (*UpdateSpecialistPoolOperation) Wait

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

See documentation of Poll for error-handling information.

UpdateTensorboardOperation

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

UpdateTensorboardOperation manages a long-running operation from UpdateTensorboard.

func (*UpdateTensorboardOperation) Done

func (op *UpdateTensorboardOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateTensorboardOperation) Metadata

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

func (*UpdateTensorboardOperation) Name

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

func (*UpdateTensorboardOperation) Poll

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

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

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

func (*UpdateTensorboardOperation) Wait

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

See documentation of Poll for error-handling information.

UploadModelOperation

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

UploadModelOperation manages a long-running operation from UploadModel.

func (*UploadModelOperation) Done

func (op *UploadModelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UploadModelOperation) Metadata

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

func (*UploadModelOperation) Name

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

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

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

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

func (*UploadModelOperation) Wait

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

See documentation of Poll for error-handling information.

VizierCallOptions

type VizierCallOptions struct {
	CreateStudy                  []gax.CallOption
	GetStudy                     []gax.CallOption
	ListStudies                  []gax.CallOption
	DeleteStudy                  []gax.CallOption
	LookupStudy                  []gax.CallOption
	SuggestTrials                []gax.CallOption
	CreateTrial                  []gax.CallOption
	GetTrial                     []gax.CallOption
	ListTrials                   []gax.CallOption
	AddTrialMeasurement          []gax.CallOption
	CompleteTrial                []gax.CallOption
	DeleteTrial                  []gax.CallOption
	CheckTrialEarlyStoppingState []gax.CallOption
	StopTrial                    []gax.CallOption
	ListOptimalTrials            []gax.CallOption
	GetLocation                  []gax.CallOption
	ListLocations                []gax.CallOption
	GetIamPolicy                 []gax.CallOption
	SetIamPolicy                 []gax.CallOption
	TestIamPermissions           []gax.CallOption
	CancelOperation              []gax.CallOption
	DeleteOperation              []gax.CallOption
	GetOperation                 []gax.CallOption
	ListOperations               []gax.CallOption
	WaitOperation                []gax.CallOption
}

VizierCallOptions contains the retry settings for each method of VizierClient.

VizierClient

type VizierClient struct {

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

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

VizierClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Vertex AI Vizier API.

Vertex AI Vizier is a service to solve blackbox optimization problems, such as tuning machine learning hyperparameters and searching over deep learning architectures.

func NewVizierClient

func NewVizierClient(ctx context.Context, opts ...option.ClientOption) (*VizierClient, error)

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

Vertex AI Vizier API.

Vertex AI Vizier is a service to solve blackbox optimization problems, such as tuning machine learning hyperparameters and searching over deep learning architectures.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*VizierClient) AddTrialMeasurement

AddTrialMeasurement adds a measurement of the objective metrics to a Trial. This measurement is assumed to have been taken before the Trial is complete.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.AddTrialMeasurementRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#AddTrialMeasurementRequest.
	}
	resp, err := c.AddTrialMeasurement(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) CancelOperation

func (c *VizierClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*VizierClient) CheckTrialEarlyStoppingState

CheckTrialEarlyStoppingState checks whether a Trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a CheckTrialEarlyStoppingStateResponse.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CheckTrialEarlyStoppingStateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CheckTrialEarlyStoppingStateRequest.
	}
	op, err := c.CheckTrialEarlyStoppingState(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*VizierClient) CheckTrialEarlyStoppingStateOperation

func (c *VizierClient) CheckTrialEarlyStoppingStateOperation(name string) *CheckTrialEarlyStoppingStateOperation

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

func (*VizierClient) Close

func (c *VizierClient) Close() error

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

func (*VizierClient) CompleteTrial

CompleteTrial marks a Trial as complete.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CompleteTrialRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CompleteTrialRequest.
	}
	resp, err := c.CompleteTrial(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) Connection

func (c *VizierClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*VizierClient) CreateStudy

CreateStudy creates a Study. A resource name will be generated after creation of the Study.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateStudyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateStudyRequest.
	}
	resp, err := c.CreateStudy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) CreateTrial

CreateTrial adds a user provided Trial to a Study.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.CreateTrialRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTrialRequest.
	}
	resp, err := c.CreateTrial(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) DeleteOperation

func (c *VizierClient) 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"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*VizierClient) DeleteStudy

func (c *VizierClient) DeleteStudy(ctx context.Context, req *aiplatformpb.DeleteStudyRequest, opts ...gax.CallOption) error

DeleteStudy deletes a Study.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteStudyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteStudyRequest.
	}
	err = c.DeleteStudy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*VizierClient) DeleteTrial

func (c *VizierClient) DeleteTrial(ctx context.Context, req *aiplatformpb.DeleteTrialRequest, opts ...gax.CallOption) error

DeleteTrial deletes a Trial.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.DeleteTrialRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTrialRequest.
	}
	err = c.DeleteTrial(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*VizierClient) GetIamPolicy

func (c *VizierClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.GetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) GetLocation

GetLocation gets information about a location.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) GetStudy

GetStudy gets a Study by name.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetStudyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetStudyRequest.
	}
	resp, err := c.GetStudy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) GetTrial

GetTrial gets a Trial.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.GetTrialRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTrialRequest.
	}
	resp, err := c.GetTrial(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*VizierClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#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
	}
}

func (*VizierClient) ListOptimalTrials

ListOptimalTrials lists the pareto-optimal Trials for multi-objective Study or the optimal Trials for single-objective Study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency (at https://en.wikipedia.org/wiki/Pareto_efficiency)

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListOptimalTrialsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListOptimalTrialsRequest.
	}
	resp, err := c.ListOptimalTrials(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) ListStudies

ListStudies lists all the studies in a region for an associated project.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListStudiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListStudiesRequest.
	}
	it := c.ListStudies(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*VizierClient) ListTrials

ListTrials lists the Trials associated with a Study.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"
	"google.golang.org/api/iterator"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.ListTrialsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTrialsRequest.
	}
	it := c.ListTrials(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*VizierClient) LookupStudy

LookupStudy looks a study up using the user-defined display_name field instead of the fully qualified resource name.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.LookupStudyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#LookupStudyRequest.
	}
	resp, err := c.LookupStudy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) SetIamPolicy

func (c *VizierClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.SetIamPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) StopTrial

StopTrial stops a Trial.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.StopTrialRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#StopTrialRequest.
	}
	resp, err := c.StopTrial(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) SuggestTrials

SuggestTrials adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier. Returns a long-running operation associated with the generation of Trial suggestions. When this long-running operation succeeds, it will contain a SuggestTrialsResponse.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &aiplatformpb.SuggestTrialsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#SuggestTrialsRequest.
	}
	op, err := c.SuggestTrials(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

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

func (*VizierClient) SuggestTrialsOperation

func (c *VizierClient) SuggestTrialsOperation(name string) *SuggestTrialsOperation

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

func (*VizierClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	iampb "google.golang.org/genproto/googleapis/iam/v1"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &iampb.TestIamPermissionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VizierClient) WaitOperation

WaitOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	aiplatform "cloud.google.com/go/aiplatform/apiv1"

	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
)

func main() {
	ctx := context.Background()
	c, err := aiplatform.NewVizierClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.WaitOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest.
	}
	resp, err := c.WaitOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}