func (c *OperationsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {
	ctx = insertMetadata(ctx, c.xGoogMetadata)
	opts = append(c.CallOptions.GetOperation[0:len(c.CallOptions.GetOperation):len(c.CallOptions.GetOperation)], opts...)
	var resp *longrunningpb.Operation
	err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
		var err error
		resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...)
		return err
	}, opts...)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
GetOperation gets the latest state of a long-running operation.  Clients can use this
method to poll the operation result at intervals as recommended by the API
service.
package longrunning
import (
	"math"
	"time"
	"cloud.google.com/go/internal/version"
	gax "github.com/googleapis/gax-go"
	"golang.org/x/net/context"
	"google.golang.org/api/iterator"
	"google.golang.org/api/option"
	"google.golang.org/api/transport"
	longrunningpb "google.golang.org/genproto/googleapis/longrunning"
	"google.golang.org/grpc"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/metadata"
)
type OperationsCallOptions struct {
	GetOperation    []gax.CallOption
	ListOperations  []gax.CallOption
	CancelOperation []gax.CallOption
	DeleteOperation []gax.CallOption
}
func defaultOperationsClientOptions() []option.ClientOption {
	return []option.ClientOption{
		option.WithEndpoint("longrunning.googleapis.com:443"),
		option.WithScopes(DefaultAuthScopes()...),
	}
}
func defaultOperationsCallOptions() *OperationsCallOptions {
	retry := map[[2]string][]gax.CallOption{
		{"default", "idempotent"}: {
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.DeadlineExceeded,
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        60000 * time.Millisecond,
					Multiplier: 1.3,
				})
			}),
		},
	}
	return &OperationsCallOptions{
		GetOperation:    retry[[2]string{"default", "idempotent"}],
		ListOperations:  retry[[2]string{"default", "idempotent"}],
		CancelOperation: retry[[2]string{"default", "idempotent"}],
		DeleteOperation: retry[[2]string{"default", "idempotent"}],
	}
}
type OperationsClient struct {
	conn *grpc.ClientConn
	operationsClient longrunningpb.OperationsClient
	CallOptions *OperationsCallOptions
	xGoogMetadata metadata.MD
}
func NewOperationsClient(ctx context.Context, opts ...option.ClientOption) (*OperationsClient, error) {
	conn, err := transport.DialGRPC(ctx, append(defaultOperationsClientOptions(), opts...)...)
	if err != nil {
		return nil, err
	}
	c := &OperationsClient{
		conn:        conn,
		CallOptions: defaultOperationsCallOptions(),
		operationsClient: longrunningpb.NewOperationsClient(conn),
	}
	c.SetGoogleClientInfo()
	return c, nil
}
func (c *OperationsClient) Connection() *grpc.ClientConn {
	return c.conn
}
func (c *OperationsClient) Close() error {
	return c.conn.Close()
}
func (c *OperationsClient) SetGoogleClientInfo(keyval ...string) {
	kv := append([]string{"gl-go", version.Go()}, keyval...)
	kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
	c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
}