metastore

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package metastore is an auto-generated package for the Dataproc Metastore API.

The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.

General documentation

For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:

Example usage

To get started with this package, create a client.

ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := metastore.NewDataprocMetastoreClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client.

ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := metastore.NewDataprocMetastoreClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

req := &metastorepb.AlterMetadataResourceLocationRequest{
	// TODO: Fill request struct fields.
	// See https://pkg.go.dev/cloud.google.com/go/metastore/apiv1/metastorepb#AlterMetadataResourceLocationRequest.
}
op, err := c.AlterMetadataResourceLocation(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 NewDataprocMetastoreClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

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

Types

type AlterMetadataResourceLocationOperation added in v1.12.0

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

AlterMetadataResourceLocationOperation manages a long-running operation from AlterMetadataResourceLocation.

func (*AlterMetadataResourceLocationOperation) Done added in v1.12.0

Done reports whether the long-running operation has completed.

func (*AlterMetadataResourceLocationOperation) Metadata added in v1.12.0

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

func (*AlterMetadataResourceLocationOperation) Name added in v1.12.0

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 (*AlterMetadataResourceLocationOperation) Poll added in v1.12.0

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 (*AlterMetadataResourceLocationOperation) Wait added in v1.12.0

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

See documentation of Poll for error-handling information.

type BackupIterator added in v0.2.0

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

BackupIterator manages a stream of *metastorepb.Backup.

func (*BackupIterator) All added in v1.14.1

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*BackupIterator) Next added in v0.2.0

func (it *BackupIterator) Next() (*metastorepb.Backup, 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 (*BackupIterator) PageInfo added in v0.2.0

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

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

type CreateBackupOperation added in v0.2.0

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

CreateBackupOperation manages a long-running operation from CreateBackup.

func (*CreateBackupOperation) Done added in v0.2.0

func (op *CreateBackupOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateBackupOperation) Metadata added in v0.2.0

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

func (*CreateBackupOperation) Name added in v0.2.0

func (op *CreateBackupOperation) 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 (*CreateBackupOperation) Poll added in v0.2.0

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 (*CreateBackupOperation) Wait added in v0.2.0

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

See documentation of Poll for error-handling information.

type CreateFederationOperation added in v1.9.0

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

CreateFederationOperation manages a long-running operation from CreateFederation.

func (*CreateFederationOperation) Done added in v1.9.0

func (op *CreateFederationOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateFederationOperation) Metadata added in v1.9.0

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

func (*CreateFederationOperation) Name added in v1.9.0

func (op *CreateFederationOperation) 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 (*CreateFederationOperation) Poll added in v1.9.0

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 (*CreateFederationOperation) Wait added in v1.9.0

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

See documentation of Poll for error-handling information.

type CreateMetadataImportOperation

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

CreateMetadataImportOperation manages a long-running operation from CreateMetadataImport.

func (*CreateMetadataImportOperation) Done

Done reports whether the long-running operation has completed.

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

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

See documentation of Poll for error-handling information.

type CreateServiceOperation

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

CreateServiceOperation manages a long-running operation from CreateService.

func (*CreateServiceOperation) Done

func (op *CreateServiceOperation) Done() bool

Done reports whether the long-running operation has completed.

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

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

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

See documentation of Poll for error-handling information.

type DataprocMetastoreCallOptions

type DataprocMetastoreCallOptions struct {
	ListServices                  []gax.CallOption
	GetService                    []gax.CallOption
	CreateService                 []gax.CallOption
	UpdateService                 []gax.CallOption
	DeleteService                 []gax.CallOption
	ListMetadataImports           []gax.CallOption
	GetMetadataImport             []gax.CallOption
	CreateMetadataImport          []gax.CallOption
	UpdateMetadataImport          []gax.CallOption
	ExportMetadata                []gax.CallOption
	RestoreService                []gax.CallOption
	ListBackups                   []gax.CallOption
	GetBackup                     []gax.CallOption
	CreateBackup                  []gax.CallOption
	DeleteBackup                  []gax.CallOption
	QueryMetadata                 []gax.CallOption
	MoveTableToDatabase           []gax.CallOption
	AlterMetadataResourceLocation []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
}

DataprocMetastoreCallOptions contains the retry settings for each method of DataprocMetastoreClient.

type DataprocMetastoreClient

type DataprocMetastoreClient struct {

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

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

DataprocMetastoreClient is a client for interacting with Dataproc Metastore API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Configures and manages metastore services. Metastore services are fully managed, highly available, autoscaled, autohealing, OSS-native deployments of technical metadata management software. Each metastore service exposes a network endpoint through which metadata queries are served. Metadata queries can originate from a variety of sources, including Apache Hive, Apache Presto, and Apache Spark.

The Dataproc Metastore API defines the following resource model:

The service works with a collection of Google Cloud projects, named:
/projects/*

Each project has a collection of available locations, named: /locations/*
(a location must refer to a Google Cloud region)

Each location has a collection of services, named: /services/*

Dataproc Metastore services are resources with names of the form:

/projects/{project_number}/locations/{location_id}/services/{service_id}.

func NewDataprocMetastoreClient

func NewDataprocMetastoreClient(ctx context.Context, opts ...option.ClientOption) (*DataprocMetastoreClient, error)

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

Configures and manages metastore services. Metastore services are fully managed, highly available, autoscaled, autohealing, OSS-native deployments of technical metadata management software. Each metastore service exposes a network endpoint through which metadata queries are served. Metadata queries can originate from a variety of sources, including Apache Hive, Apache Presto, and Apache Spark.

The Dataproc Metastore API defines the following resource model:

The service works with a collection of Google Cloud projects, named:
/projects/*

Each project has a collection of available locations, named: /locations/*
(a location must refer to a Google Cloud region)

Each location has a collection of services, named: /services/*

Dataproc Metastore services are resources with names of the form:

/projects/{project_number}/locations/{location_id}/services/{service_id}.

Example
package main

import (
	"context"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func NewDataprocMetastoreRESTClient added in v1.10.0

func NewDataprocMetastoreRESTClient(ctx context.Context, opts ...option.ClientOption) (*DataprocMetastoreClient, error)

NewDataprocMetastoreRESTClient creates a new dataproc metastore rest client.

Configures and manages metastore services. Metastore services are fully managed, highly available, autoscaled, autohealing, OSS-native deployments of technical metadata management software. Each metastore service exposes a network endpoint through which metadata queries are served. Metadata queries can originate from a variety of sources, including Apache Hive, Apache Presto, and Apache Spark.

The Dataproc Metastore API defines the following resource model:

The service works with a collection of Google Cloud projects, named:
/projects/*

Each project has a collection of available locations, named: /locations/*
(a location must refer to a Google Cloud region)

Each location has a collection of services, named: /services/*

Dataproc Metastore services are resources with names of the form:

/projects/{project_number}/locations/{location_id}/services/{service_id}.

Example
package main

import (
	"context"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreClient) AlterMetadataResourceLocation added in v1.12.0

AlterMetadataResourceLocation alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource and does not transfer any existing data to the new location.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) AlterMetadataResourceLocationOperation added in v1.12.0

func (c *DataprocMetastoreClient) AlterMetadataResourceLocationOperation(name string) *AlterMetadataResourceLocationOperation

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

func (*DataprocMetastoreClient) CancelOperation added in v1.10.1

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

Example
package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreClient) Close

func (c *DataprocMetastoreClient) Close() error

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

func (*DataprocMetastoreClient) Connection deprecated

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

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*DataprocMetastoreClient) CreateBackup added in v0.2.0

CreateBackup creates a new backup in a given project and location.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) CreateBackupOperation added in v0.2.0

func (c *DataprocMetastoreClient) CreateBackupOperation(name string) *CreateBackupOperation

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

func (*DataprocMetastoreClient) CreateMetadataImport

CreateMetadataImport creates a new MetadataImport in a given project and location.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) CreateMetadataImportOperation

func (c *DataprocMetastoreClient) CreateMetadataImportOperation(name string) *CreateMetadataImportOperation

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

func (*DataprocMetastoreClient) CreateService

CreateService creates a metastore service in a project and location.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) CreateServiceOperation

func (c *DataprocMetastoreClient) CreateServiceOperation(name string) *CreateServiceOperation

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

func (*DataprocMetastoreClient) DeleteBackup added in v0.2.0

DeleteBackup deletes a single backup.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) DeleteBackupOperation added in v0.2.0

func (c *DataprocMetastoreClient) DeleteBackupOperation(name string) *DeleteBackupOperation

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

func (*DataprocMetastoreClient) DeleteOperation added in v1.9.0

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

Example
package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreClient) DeleteService

DeleteService deletes a single service.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) DeleteServiceOperation

func (c *DataprocMetastoreClient) DeleteServiceOperation(name string) *DeleteServiceOperation

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

func (*DataprocMetastoreClient) ExportMetadata

ExportMetadata exports metadata from a service.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) ExportMetadataOperation

func (c *DataprocMetastoreClient) ExportMetadataOperation(name string) *ExportMetadataOperation

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

func (*DataprocMetastoreClient) GetBackup added in v0.2.0

GetBackup gets details of a single backup.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreClient) GetIamPolicy added in v1.9.0

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"

	iampb "cloud.google.com/go/iam/apiv1/iampb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreClient) GetLocation added in v1.9.0

GetLocation gets information about a location.

Example
package main

import (
	"context"

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

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(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
}
Output:

func (*DataprocMetastoreClient) GetMetadataImport

GetMetadataImport gets details of a single import.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreClient) GetOperation added in v1.9.0

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

Example
package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreClient) GetService

GetService gets the details of a single service.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreClient) ListBackups added in v0.2.0

ListBackups lists backups in a service.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*metastorepb.ListBackupsResponse)
	}
}
Output:

Example (All)
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &metastorepb.ListBackupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/metastore/apiv1/metastorepb#ListBackupsRequest.
	}
	for resp, err := range c.ListBackups(ctx, req).All() {
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*DataprocMetastoreClient) ListLocations added in v1.9.0

ListLocations lists information about the supported locations for this service.

Example
package main

import (
	"context"

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

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*locationpb.ListLocationsResponse)
	}
}
Output:

Example (All)
package main

import (
	"context"

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

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(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.
	}
	for resp, err := range c.ListLocations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*DataprocMetastoreClient) ListMetadataImports

ListMetadataImports lists imports in a service.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*metastorepb.ListMetadataImportsResponse)
	}
}
Output:

Example (All)
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &metastorepb.ListMetadataImportsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/metastore/apiv1/metastorepb#ListMetadataImportsRequest.
	}
	for resp, err := range c.ListMetadataImports(ctx, req).All() {
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*DataprocMetastoreClient) ListOperations added in v1.9.0

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

Example
package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	it := c.ListOperations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*longrunningpb.ListOperationsResponse)
	}
}
Output:

Example (All)
package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	metastore "cloud.google.com/go/metastore/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	for resp, err := range c.ListOperations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*DataprocMetastoreClient) ListServices

ListServices lists services in a project and location.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*metastorepb.ListServicesResponse)
	}
}
Output:

Example (All)
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &metastorepb.ListServicesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/metastore/apiv1/metastorepb#ListServicesRequest.
	}
	for resp, err := range c.ListServices(ctx, req).All() {
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*DataprocMetastoreClient) MoveTableToDatabase added in v1.12.0

MoveTableToDatabase move a table to another database.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) MoveTableToDatabaseOperation added in v1.12.0

func (c *DataprocMetastoreClient) MoveTableToDatabaseOperation(name string) *MoveTableToDatabaseOperation

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

func (*DataprocMetastoreClient) QueryMetadata added in v1.12.0

QueryMetadata query DPMS metadata.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) QueryMetadataOperation added in v1.12.0

func (c *DataprocMetastoreClient) QueryMetadataOperation(name string) *QueryMetadataOperation

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

func (*DataprocMetastoreClient) RestoreService added in v0.2.0

RestoreService restores a service from a backup.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) RestoreServiceOperation added in v0.2.0

func (c *DataprocMetastoreClient) RestoreServiceOperation(name string) *RestoreServiceOperation

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

func (*DataprocMetastoreClient) SetIamPolicy added in v1.9.0

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"

	iampb "cloud.google.com/go/iam/apiv1/iampb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreClient) TestIamPermissions added in v1.9.0

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"

	iampb "cloud.google.com/go/iam/apiv1/iampb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreClient) UpdateMetadataImport

UpdateMetadataImport updates a single import. Only the description field of MetadataImport is supported to be updated.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) UpdateMetadataImportOperation

func (c *DataprocMetastoreClient) UpdateMetadataImportOperation(name string) *UpdateMetadataImportOperation

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

func (*DataprocMetastoreClient) UpdateService

UpdateService updates the parameters of a single service.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreClient) UpdateServiceOperation

func (c *DataprocMetastoreClient) UpdateServiceOperation(name string) *UpdateServiceOperation

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

type DataprocMetastoreFederationCallOptions added in v1.9.0

type DataprocMetastoreFederationCallOptions struct {
	ListFederations    []gax.CallOption
	GetFederation      []gax.CallOption
	CreateFederation   []gax.CallOption
	UpdateFederation   []gax.CallOption
	DeleteFederation   []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
}

DataprocMetastoreFederationCallOptions contains the retry settings for each method of DataprocMetastoreFederationClient.

type DataprocMetastoreFederationClient added in v1.9.0

type DataprocMetastoreFederationClient struct {

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

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

DataprocMetastoreFederationClient is a client for interacting with Dataproc Metastore API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Configures and manages metastore federation services. Dataproc Metastore Federation Service allows federating a collection of backend metastores like BigQuery, Dataplex Lakes, and other Dataproc Metastores. The Federation Service exposes a gRPC URL through which metadata from the backend metastores are served at query time.

The Dataproc Metastore Federation API defines the following resource model:

The service works with a collection of Google Cloud projects.

Each project has a collection of available locations.

Each location has a collection of federations.

Dataproc Metastore Federations are resources with names of the
form:
projects/{project_number}/locations/{location_id}/federations/{federation_id}.

func NewDataprocMetastoreFederationClient added in v1.9.0

func NewDataprocMetastoreFederationClient(ctx context.Context, opts ...option.ClientOption) (*DataprocMetastoreFederationClient, error)

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

Configures and manages metastore federation services. Dataproc Metastore Federation Service allows federating a collection of backend metastores like BigQuery, Dataplex Lakes, and other Dataproc Metastores. The Federation Service exposes a gRPC URL through which metadata from the backend metastores are served at query time.

The Dataproc Metastore Federation API defines the following resource model:

The service works with a collection of Google Cloud projects.

Each project has a collection of available locations.

Each location has a collection of federations.

Dataproc Metastore Federations are resources with names of the
form:
projects/{project_number}/locations/{location_id}/federations/{federation_id}.
Example
package main

import (
	"context"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func NewDataprocMetastoreFederationRESTClient added in v1.10.0

func NewDataprocMetastoreFederationRESTClient(ctx context.Context, opts ...option.ClientOption) (*DataprocMetastoreFederationClient, error)

NewDataprocMetastoreFederationRESTClient creates a new dataproc metastore federation rest client.

Configures and manages metastore federation services. Dataproc Metastore Federation Service allows federating a collection of backend metastores like BigQuery, Dataplex Lakes, and other Dataproc Metastores. The Federation Service exposes a gRPC URL through which metadata from the backend metastores are served at query time.

The Dataproc Metastore Federation API defines the following resource model:

The service works with a collection of Google Cloud projects.

Each project has a collection of available locations.

Each location has a collection of federations.

Dataproc Metastore Federations are resources with names of the
form:
projects/{project_number}/locations/{location_id}/federations/{federation_id}.
Example
package main

import (
	"context"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreFederationClient) CancelOperation added in v1.10.1

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

Example
package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreFederationClient) Close added in v1.9.0

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

func (*DataprocMetastoreFederationClient) Connection deprecated added in v1.9.0

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*DataprocMetastoreFederationClient) CreateFederation added in v1.9.0

CreateFederation creates a metastore federation in a project and location.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreFederationClient) CreateFederationOperation added in v1.9.0

func (c *DataprocMetastoreFederationClient) CreateFederationOperation(name string) *CreateFederationOperation

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

func (*DataprocMetastoreFederationClient) DeleteFederation added in v1.9.0

DeleteFederation deletes a single federation.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreFederationClient) DeleteFederationOperation added in v1.9.0

func (c *DataprocMetastoreFederationClient) DeleteFederationOperation(name string) *DeleteFederationOperation

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

func (*DataprocMetastoreFederationClient) DeleteOperation added in v1.9.0

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

Example
package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreFederationClient) GetFederation added in v1.9.0

GetFederation gets the details of a single federation.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreFederationClient) GetIamPolicy added in v1.9.0

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"

	iampb "cloud.google.com/go/iam/apiv1/iampb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreFederationClient) GetLocation added in v1.9.0

GetLocation gets information about a location.

Example
package main

import (
	"context"

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

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(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
}
Output:

func (*DataprocMetastoreFederationClient) GetOperation added in v1.9.0

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

Example
package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreFederationClient) ListFederations added in v1.9.0

ListFederations lists federations in a project and location.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*metastorepb.ListFederationsResponse)
	}
}
Output:

Example (All)
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &metastorepb.ListFederationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/metastore/apiv1/metastorepb#ListFederationsRequest.
	}
	for resp, err := range c.ListFederations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*DataprocMetastoreFederationClient) ListLocations added in v1.9.0

ListLocations lists information about the supported locations for this service.

Example
package main

import (
	"context"

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

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(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

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*locationpb.ListLocationsResponse)
	}
}
Output:

Example (All)
package main

import (
	"context"

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

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(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.
	}
	for resp, err := range c.ListLocations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*DataprocMetastoreFederationClient) ListOperations added in v1.9.0

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

Example
package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	it := c.ListOperations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*longrunningpb.ListOperationsResponse)
	}
}
Output:

Example (All)
package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	metastore "cloud.google.com/go/metastore/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	for resp, err := range c.ListOperations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*DataprocMetastoreFederationClient) SetIamPolicy added in v1.9.0

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"

	iampb "cloud.google.com/go/iam/apiv1/iampb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreFederationClient) TestIamPermissions added in v1.9.0

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"

	iampb "cloud.google.com/go/iam/apiv1/iampb"

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

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DataprocMetastoreFederationClient) UpdateFederation added in v1.9.0

UpdateFederation updates the fields of a federation.

Example
package main

import (
	"context"

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

	metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := metastore.NewDataprocMetastoreFederationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

func (*DataprocMetastoreFederationClient) UpdateFederationOperation added in v1.9.0

func (c *DataprocMetastoreFederationClient) UpdateFederationOperation(name string) *UpdateFederationOperation

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

type DeleteBackupOperation added in v0.2.0

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

DeleteBackupOperation manages a long-running operation from DeleteBackup.

func (*DeleteBackupOperation) Done added in v0.2.0

func (op *DeleteBackupOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteBackupOperation) Metadata added in v0.2.0

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

func (*DeleteBackupOperation) Name added in v0.2.0

func (op *DeleteBackupOperation) 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 (*DeleteBackupOperation) Poll added in v0.2.0

func (op *DeleteBackupOperation) 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 (*DeleteBackupOperation) Wait added in v0.2.0

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

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

See documentation of Poll for error-handling information.

type DeleteFederationOperation added in v1.9.0

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

DeleteFederationOperation manages a long-running operation from DeleteFederation.

func (*DeleteFederationOperation) Done added in v1.9.0

func (op *DeleteFederationOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteFederationOperation) Metadata added in v1.9.0

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

func (*DeleteFederationOperation) Name added in v1.9.0

func (op *DeleteFederationOperation) 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 (*DeleteFederationOperation) Poll added in v1.9.0

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 (*DeleteFederationOperation) Wait added in v1.9.0

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

See documentation of Poll for error-handling information.

type DeleteServiceOperation

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

DeleteServiceOperation manages a long-running operation from DeleteService.

func (*DeleteServiceOperation) Done

func (op *DeleteServiceOperation) Done() bool

Done reports whether the long-running operation has completed.

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

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

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

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

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

See documentation of Poll for error-handling information.

type ExportMetadataOperation

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

ExportMetadataOperation manages a long-running operation from ExportMetadata.

func (*ExportMetadataOperation) Done

func (op *ExportMetadataOperation) Done() bool

Done reports whether the long-running operation has completed.

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

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

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

See documentation of Poll for error-handling information.

type FederationIterator added in v1.9.0

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

FederationIterator manages a stream of *metastorepb.Federation.

func (*FederationIterator) All added in v1.14.1

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*FederationIterator) Next added in v1.9.0

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 (*FederationIterator) PageInfo added in v1.9.0

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

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

type LocationIterator added in v1.9.0

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) All added in v1.14.1

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*LocationIterator) Next added in v1.9.0

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 added in v1.9.0

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

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

type MetadataImportIterator

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

MetadataImportIterator manages a stream of *metastorepb.MetadataImport.

func (*MetadataImportIterator) All added in v1.14.1

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*MetadataImportIterator) 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 (*MetadataImportIterator) PageInfo

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

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

type MoveTableToDatabaseOperation added in v1.12.0

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

MoveTableToDatabaseOperation manages a long-running operation from MoveTableToDatabase.

func (*MoveTableToDatabaseOperation) Done added in v1.12.0

Done reports whether the long-running operation has completed.

func (*MoveTableToDatabaseOperation) Metadata added in v1.12.0

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

func (*MoveTableToDatabaseOperation) Name added in v1.12.0

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 (*MoveTableToDatabaseOperation) Poll added in v1.12.0

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 (*MoveTableToDatabaseOperation) Wait added in v1.12.0

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

See documentation of Poll for error-handling information.

type OperationIterator added in v1.9.0

type OperationIterator struct {

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

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

OperationIterator manages a stream of *longrunningpb.Operation.

func (*OperationIterator) All added in v1.14.1

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*OperationIterator) Next added in v1.9.0

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 added in v1.9.0

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

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

type QueryMetadataOperation added in v1.12.0

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

QueryMetadataOperation manages a long-running operation from QueryMetadata.

func (*QueryMetadataOperation) Done added in v1.12.0

func (op *QueryMetadataOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*QueryMetadataOperation) Metadata added in v1.12.0

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

func (*QueryMetadataOperation) Name added in v1.12.0

func (op *QueryMetadataOperation) 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 (*QueryMetadataOperation) Poll added in v1.12.0

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 (*QueryMetadataOperation) Wait added in v1.12.0

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

See documentation of Poll for error-handling information.

type RestoreServiceOperation added in v0.2.0

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

RestoreServiceOperation manages a long-running operation from RestoreService.

func (*RestoreServiceOperation) Done added in v0.2.0

func (op *RestoreServiceOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*RestoreServiceOperation) Metadata added in v0.2.0

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

func (*RestoreServiceOperation) Name added in v0.2.0

func (op *RestoreServiceOperation) 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 (*RestoreServiceOperation) Poll added in v0.2.0

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 (*RestoreServiceOperation) Wait added in v0.2.0

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

See documentation of Poll for error-handling information.

type ServiceIterator

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

ServiceIterator manages a stream of *metastorepb.Service.

func (*ServiceIterator) All added in v1.14.1

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ServiceIterator) Next

func (it *ServiceIterator) Next() (*metastorepb.Service, 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 (*ServiceIterator) PageInfo

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

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

type UpdateFederationOperation added in v1.9.0

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

UpdateFederationOperation manages a long-running operation from UpdateFederation.

func (*UpdateFederationOperation) Done added in v1.9.0

func (op *UpdateFederationOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateFederationOperation) Metadata added in v1.9.0

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

func (*UpdateFederationOperation) Name added in v1.9.0

func (op *UpdateFederationOperation) 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 (*UpdateFederationOperation) Poll added in v1.9.0

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 (*UpdateFederationOperation) Wait added in v1.9.0

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

See documentation of Poll for error-handling information.

type UpdateMetadataImportOperation

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

UpdateMetadataImportOperation manages a long-running operation from UpdateMetadataImport.

func (*UpdateMetadataImportOperation) Done

Done reports whether the long-running operation has completed.

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

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

See documentation of Poll for error-handling information.

type UpdateServiceOperation

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

UpdateServiceOperation manages a long-running operation from UpdateService.

func (*UpdateServiceOperation) Done

func (op *UpdateServiceOperation) Done() bool

Done reports whether the long-running operation has completed.

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL