networkservices

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package networkservices is an auto-generated package for the Network Services API.

General documentation

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

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 := networkservices.NewDepClient(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 := networkservices.NewDepClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

req := &networkservicespb.CreateLbRouteExtensionRequest{
	// TODO: Fill request struct fields.
	// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateLbRouteExtensionRequest.
}
op, err := c.CreateLbRouteExtension(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 NewDepClient 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 CallOptions

type CallOptions struct {
	ListEndpointPolicies []gax.CallOption
	GetEndpointPolicy    []gax.CallOption
	CreateEndpointPolicy []gax.CallOption
	UpdateEndpointPolicy []gax.CallOption
	DeleteEndpointPolicy []gax.CallOption
	ListGateways         []gax.CallOption
	GetGateway           []gax.CallOption
	CreateGateway        []gax.CallOption
	UpdateGateway        []gax.CallOption
	DeleteGateway        []gax.CallOption
	ListGrpcRoutes       []gax.CallOption
	GetGrpcRoute         []gax.CallOption
	CreateGrpcRoute      []gax.CallOption
	UpdateGrpcRoute      []gax.CallOption
	DeleteGrpcRoute      []gax.CallOption
	ListHttpRoutes       []gax.CallOption
	GetHttpRoute         []gax.CallOption
	CreateHttpRoute      []gax.CallOption
	UpdateHttpRoute      []gax.CallOption
	DeleteHttpRoute      []gax.CallOption
	ListTcpRoutes        []gax.CallOption
	GetTcpRoute          []gax.CallOption
	CreateTcpRoute       []gax.CallOption
	UpdateTcpRoute       []gax.CallOption
	DeleteTcpRoute       []gax.CallOption
	ListTlsRoutes        []gax.CallOption
	GetTlsRoute          []gax.CallOption
	CreateTlsRoute       []gax.CallOption
	UpdateTlsRoute       []gax.CallOption
	DeleteTlsRoute       []gax.CallOption
	ListServiceBindings  []gax.CallOption
	GetServiceBinding    []gax.CallOption
	CreateServiceBinding []gax.CallOption
	DeleteServiceBinding []gax.CallOption
	ListMeshes           []gax.CallOption
	GetMesh              []gax.CallOption
	CreateMesh           []gax.CallOption
	UpdateMesh           []gax.CallOption
	DeleteMesh           []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
}

CallOptions contains the retry settings for each method of Client.

type Client

type Client struct {

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

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

Client is a client for interacting with Network Services API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service describing handlers for resources.

func NewClient

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

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

Service describing handlers for resources.

Example
package main

import (
	"context"

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func NewRESTClient

func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewRESTClient creates a new network services rest client.

Service describing handlers for resources.

Example
package main

import (
	"context"

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*Client) CancelOperation

func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewClient(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 (*Client) Close

func (c *Client) Close() error

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

func (*Client) Connection deprecated

func (c *Client) 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 (*Client) CreateEndpointPolicy

CreateEndpointPolicy creates a new EndpointPolicy in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.CreateEndpointPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateEndpointPolicyRequest.
	}
	op, err := c.CreateEndpointPolicy(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 (*Client) CreateEndpointPolicyOperation

func (c *Client) CreateEndpointPolicyOperation(name string) *CreateEndpointPolicyOperation

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

func (*Client) CreateGateway

CreateGateway creates a new Gateway in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.CreateGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateGatewayRequest.
	}
	op, err := c.CreateGateway(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 (*Client) CreateGatewayOperation

func (c *Client) CreateGatewayOperation(name string) *CreateGatewayOperation

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

func (*Client) CreateGrpcRoute

CreateGrpcRoute creates a new GrpcRoute in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.CreateGrpcRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateGrpcRouteRequest.
	}
	op, err := c.CreateGrpcRoute(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 (*Client) CreateGrpcRouteOperation

func (c *Client) CreateGrpcRouteOperation(name string) *CreateGrpcRouteOperation

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

func (*Client) CreateHttpRoute

CreateHttpRoute creates a new HttpRoute in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.CreateHttpRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateHttpRouteRequest.
	}
	op, err := c.CreateHttpRoute(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 (*Client) CreateHttpRouteOperation

func (c *Client) CreateHttpRouteOperation(name string) *CreateHttpRouteOperation

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

func (*Client) CreateMesh

CreateMesh creates a new Mesh in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.CreateMeshRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateMeshRequest.
	}
	op, err := c.CreateMesh(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 (*Client) CreateMeshOperation

func (c *Client) CreateMeshOperation(name string) *CreateMeshOperation

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

func (*Client) CreateServiceBinding

CreateServiceBinding creates a new ServiceBinding in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.CreateServiceBindingRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateServiceBindingRequest.
	}
	op, err := c.CreateServiceBinding(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 (*Client) CreateServiceBindingOperation

func (c *Client) CreateServiceBindingOperation(name string) *CreateServiceBindingOperation

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

func (*Client) CreateTcpRoute

CreateTcpRoute creates a new TcpRoute in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.CreateTcpRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateTcpRouteRequest.
	}
	op, err := c.CreateTcpRoute(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 (*Client) CreateTcpRouteOperation

func (c *Client) CreateTcpRouteOperation(name string) *CreateTcpRouteOperation

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

func (*Client) CreateTlsRoute

CreateTlsRoute creates a new TlsRoute in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.CreateTlsRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateTlsRouteRequest.
	}
	op, err := c.CreateTlsRoute(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 (*Client) CreateTlsRouteOperation

func (c *Client) CreateTlsRouteOperation(name string) *CreateTlsRouteOperation

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

func (*Client) DeleteEndpointPolicy

DeleteEndpointPolicy deletes a single EndpointPolicy.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

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

func (*Client) DeleteEndpointPolicyOperation

func (c *Client) DeleteEndpointPolicyOperation(name string) *DeleteEndpointPolicyOperation

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

func (*Client) DeleteGateway

DeleteGateway deletes a single Gateway.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

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

func (*Client) DeleteGatewayOperation

func (c *Client) DeleteGatewayOperation(name string) *DeleteGatewayOperation

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

func (*Client) DeleteGrpcRoute

DeleteGrpcRoute deletes a single GrpcRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

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

func (*Client) DeleteGrpcRouteOperation

func (c *Client) DeleteGrpcRouteOperation(name string) *DeleteGrpcRouteOperation

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

func (*Client) DeleteHttpRoute

DeleteHttpRoute deletes a single HttpRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

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

func (*Client) DeleteHttpRouteOperation

func (c *Client) DeleteHttpRouteOperation(name string) *DeleteHttpRouteOperation

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

func (*Client) DeleteMesh

DeleteMesh deletes a single Mesh.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

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

func (*Client) DeleteMeshOperation

func (c *Client) DeleteMeshOperation(name string) *DeleteMeshOperation

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

func (*Client) DeleteOperation

func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewClient(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 (*Client) DeleteServiceBinding

DeleteServiceBinding deletes a single ServiceBinding.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

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

func (*Client) DeleteServiceBindingOperation

func (c *Client) DeleteServiceBindingOperation(name string) *DeleteServiceBindingOperation

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

func (*Client) DeleteTcpRoute

DeleteTcpRoute deletes a single TcpRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

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

func (*Client) DeleteTcpRouteOperation

func (c *Client) DeleteTcpRouteOperation(name string) *DeleteTcpRouteOperation

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

func (*Client) DeleteTlsRoute

DeleteTlsRoute deletes a single TlsRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

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

func (*Client) DeleteTlsRouteOperation

func (c *Client) DeleteTlsRouteOperation(name string) *DeleteTlsRouteOperation

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

func (*Client) GetEndpointPolicy

GetEndpointPolicy gets details of a single EndpointPolicy.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

func (*Client) GetGateway

GetGateway gets details of a single Gateway.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

func (*Client) GetGrpcRoute

GetGrpcRoute gets details of a single GrpcRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

func (*Client) GetHttpRoute

GetHttpRoute gets details of a single HttpRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

func (*Client) GetIamPolicy

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

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewClient(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 (*Client) GetLocation

func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)

GetLocation gets information about a location.

Example
package main

import (
	"context"

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewClient(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 (*Client) GetMesh

GetMesh gets details of a single Mesh.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

func (*Client) GetOperation

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewClient(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 (*Client) GetServiceBinding

GetServiceBinding gets details of a single ServiceBinding.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

func (*Client) GetTcpRoute

GetTcpRoute gets details of a single TcpRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

func (*Client) GetTlsRoute

GetTlsRoute gets details of a single TlsRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

func (*Client) ListEndpointPolicies

ListEndpointPolicies lists EndpointPolicies in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
	"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 := networkservices.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networkservicespb.ListEndpointPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListEndpointPoliciesRequest.
	}
	it := c.ListEndpointPolicies(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.(*networkservicespb.ListEndpointPoliciesResponse)
	}
}
Output:

func (*Client) ListGateways

ListGateways lists Gateways in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
	"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 := networkservices.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networkservicespb.ListGatewaysRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListGatewaysRequest.
	}
	it := c.ListGateways(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.(*networkservicespb.ListGatewaysResponse)
	}
}
Output:

func (*Client) ListGrpcRoutes

ListGrpcRoutes lists GrpcRoutes in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
	"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 := networkservices.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networkservicespb.ListGrpcRoutesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListGrpcRoutesRequest.
	}
	it := c.ListGrpcRoutes(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.(*networkservicespb.ListGrpcRoutesResponse)
	}
}
Output:

func (*Client) ListHttpRoutes

ListHttpRoutes lists HttpRoute in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
	"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 := networkservices.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networkservicespb.ListHttpRoutesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListHttpRoutesRequest.
	}
	it := c.ListHttpRoutes(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.(*networkservicespb.ListHttpRoutesResponse)
	}
}
Output:

func (*Client) ListLocations

func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator

ListLocations lists information about the supported locations for this service.

Example
package main

import (
	"context"

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewClient(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:

func (*Client) ListMeshes

ListMeshes lists Meshes in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
	"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 := networkservices.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networkservicespb.ListMeshesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListMeshesRequest.
	}
	it := c.ListMeshes(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.(*networkservicespb.ListMeshesResponse)
	}
}
Output:

func (*Client) ListOperations

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewClient(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:

func (*Client) ListServiceBindings

ListServiceBindings lists ServiceBinding in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
	"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 := networkservices.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networkservicespb.ListServiceBindingsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListServiceBindingsRequest.
	}
	it := c.ListServiceBindings(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.(*networkservicespb.ListServiceBindingsResponse)
	}
}
Output:

func (*Client) ListTcpRoutes

ListTcpRoutes lists TcpRoute in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
	"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 := networkservices.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networkservicespb.ListTcpRoutesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListTcpRoutesRequest.
	}
	it := c.ListTcpRoutes(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.(*networkservicespb.ListTcpRoutesResponse)
	}
}
Output:

func (*Client) ListTlsRoutes

ListTlsRoutes lists TlsRoute in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
	"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 := networkservices.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networkservicespb.ListTlsRoutesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListTlsRoutesRequest.
	}
	it := c.ListTlsRoutes(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.(*networkservicespb.ListTlsRoutesResponse)
	}
}
Output:

func (*Client) SetIamPolicy

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

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

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewClient(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 (*Client) TestIamPermissions

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

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewClient(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 (*Client) UpdateEndpointPolicy

UpdateEndpointPolicy updates the parameters of a single EndpointPolicy.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.UpdateEndpointPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateEndpointPolicyRequest.
	}
	op, err := c.UpdateEndpointPolicy(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 (*Client) UpdateEndpointPolicyOperation

func (c *Client) UpdateEndpointPolicyOperation(name string) *UpdateEndpointPolicyOperation

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

func (*Client) UpdateGateway

UpdateGateway updates the parameters of a single Gateway.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.UpdateGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateGatewayRequest.
	}
	op, err := c.UpdateGateway(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 (*Client) UpdateGatewayOperation

func (c *Client) UpdateGatewayOperation(name string) *UpdateGatewayOperation

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

func (*Client) UpdateGrpcRoute

UpdateGrpcRoute updates the parameters of a single GrpcRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.UpdateGrpcRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateGrpcRouteRequest.
	}
	op, err := c.UpdateGrpcRoute(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 (*Client) UpdateGrpcRouteOperation

func (c *Client) UpdateGrpcRouteOperation(name string) *UpdateGrpcRouteOperation

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

func (*Client) UpdateHttpRoute

UpdateHttpRoute updates the parameters of a single HttpRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.UpdateHttpRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateHttpRouteRequest.
	}
	op, err := c.UpdateHttpRoute(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 (*Client) UpdateHttpRouteOperation

func (c *Client) UpdateHttpRouteOperation(name string) *UpdateHttpRouteOperation

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

func (*Client) UpdateMesh

UpdateMesh updates the parameters of a single Mesh.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.UpdateMeshRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateMeshRequest.
	}
	op, err := c.UpdateMesh(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 (*Client) UpdateMeshOperation

func (c *Client) UpdateMeshOperation(name string) *UpdateMeshOperation

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

func (*Client) UpdateTcpRoute

UpdateTcpRoute updates the parameters of a single TcpRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.UpdateTcpRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateTcpRouteRequest.
	}
	op, err := c.UpdateTcpRoute(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 (*Client) UpdateTcpRouteOperation

func (c *Client) UpdateTcpRouteOperation(name string) *UpdateTcpRouteOperation

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

func (*Client) UpdateTlsRoute

UpdateTlsRoute updates the parameters of a single TlsRoute.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.UpdateTlsRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateTlsRouteRequest.
	}
	op, err := c.UpdateTlsRoute(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 (*Client) UpdateTlsRouteOperation

func (c *Client) UpdateTlsRouteOperation(name string) *UpdateTlsRouteOperation

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

type CreateEndpointPolicyOperation

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

CreateEndpointPolicyOperation manages a long-running operation from CreateEndpointPolicy.

func (*CreateEndpointPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateEndpointPolicyOperation) 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 (*CreateEndpointPolicyOperation) 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 (*CreateEndpointPolicyOperation) 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 (*CreateEndpointPolicyOperation) 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 CreateGatewayOperation

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

CreateGatewayOperation manages a long-running operation from CreateGateway.

func (*CreateGatewayOperation) Done

func (op *CreateGatewayOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *CreateGatewayOperation) 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 (*CreateGatewayOperation) 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 (*CreateGatewayOperation) 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 CreateGrpcRouteOperation

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

CreateGrpcRouteOperation manages a long-running operation from CreateGrpcRoute.

func (*CreateGrpcRouteOperation) Done

func (op *CreateGrpcRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *CreateGrpcRouteOperation) 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 (*CreateGrpcRouteOperation) 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 (*CreateGrpcRouteOperation) 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 CreateHttpRouteOperation

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

CreateHttpRouteOperation manages a long-running operation from CreateHttpRoute.

func (*CreateHttpRouteOperation) Done

func (op *CreateHttpRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *CreateHttpRouteOperation) 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 (*CreateHttpRouteOperation) 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 (*CreateHttpRouteOperation) 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 CreateLbRouteExtensionOperation

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

CreateLbRouteExtensionOperation manages a long-running operation from CreateLbRouteExtension.

func (*CreateLbRouteExtensionOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateLbRouteExtensionOperation) 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 (*CreateLbRouteExtensionOperation) 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 (*CreateLbRouteExtensionOperation) 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 (*CreateLbRouteExtensionOperation) 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 CreateLbTrafficExtensionOperation

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

CreateLbTrafficExtensionOperation manages a long-running operation from CreateLbTrafficExtension.

func (*CreateLbTrafficExtensionOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateLbTrafficExtensionOperation) 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 (*CreateLbTrafficExtensionOperation) 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 (*CreateLbTrafficExtensionOperation) 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 (*CreateLbTrafficExtensionOperation) 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 CreateMeshOperation

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

CreateMeshOperation manages a long-running operation from CreateMesh.

func (*CreateMeshOperation) Done

func (op *CreateMeshOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *CreateMeshOperation) 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 (*CreateMeshOperation) 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 (*CreateMeshOperation) 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 CreateServiceBindingOperation

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

CreateServiceBindingOperation manages a long-running operation from CreateServiceBinding.

func (*CreateServiceBindingOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateServiceBindingOperation) 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 (*CreateServiceBindingOperation) 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 (*CreateServiceBindingOperation) 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 (*CreateServiceBindingOperation) 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 CreateTcpRouteOperation

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

CreateTcpRouteOperation manages a long-running operation from CreateTcpRoute.

func (*CreateTcpRouteOperation) Done

func (op *CreateTcpRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *CreateTcpRouteOperation) 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 (*CreateTcpRouteOperation) 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 (*CreateTcpRouteOperation) 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 CreateTlsRouteOperation

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

CreateTlsRouteOperation manages a long-running operation from CreateTlsRoute.

func (*CreateTlsRouteOperation) Done

func (op *CreateTlsRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *CreateTlsRouteOperation) 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 (*CreateTlsRouteOperation) 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 (*CreateTlsRouteOperation) 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 DeleteEndpointPolicyOperation

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

DeleteEndpointPolicyOperation manages a long-running operation from DeleteEndpointPolicy.

func (*DeleteEndpointPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteEndpointPolicyOperation) 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 (*DeleteEndpointPolicyOperation) 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 (*DeleteEndpointPolicyOperation) 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 (*DeleteEndpointPolicyOperation) 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 DeleteGatewayOperation

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

DeleteGatewayOperation manages a long-running operation from DeleteGateway.

func (*DeleteGatewayOperation) Done

func (op *DeleteGatewayOperation) Done() bool

Done reports whether the long-running operation has completed.

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

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

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

func (op *DeleteGatewayOperation) 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 DeleteGrpcRouteOperation

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

DeleteGrpcRouteOperation manages a long-running operation from DeleteGrpcRoute.

func (*DeleteGrpcRouteOperation) Done

func (op *DeleteGrpcRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *DeleteGrpcRouteOperation) 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 (*DeleteGrpcRouteOperation) 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 (*DeleteGrpcRouteOperation) 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 DeleteHttpRouteOperation

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

DeleteHttpRouteOperation manages a long-running operation from DeleteHttpRoute.

func (*DeleteHttpRouteOperation) Done

func (op *DeleteHttpRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *DeleteHttpRouteOperation) 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 (*DeleteHttpRouteOperation) 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 (*DeleteHttpRouteOperation) 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 DeleteLbRouteExtensionOperation

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

DeleteLbRouteExtensionOperation manages a long-running operation from DeleteLbRouteExtension.

func (*DeleteLbRouteExtensionOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteLbRouteExtensionOperation) 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 (*DeleteLbRouteExtensionOperation) 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 (*DeleteLbRouteExtensionOperation) 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 (*DeleteLbRouteExtensionOperation) 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 DeleteLbTrafficExtensionOperation

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

DeleteLbTrafficExtensionOperation manages a long-running operation from DeleteLbTrafficExtension.

func (*DeleteLbTrafficExtensionOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteLbTrafficExtensionOperation) 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 (*DeleteLbTrafficExtensionOperation) 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 (*DeleteLbTrafficExtensionOperation) 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 (*DeleteLbTrafficExtensionOperation) 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 DeleteMeshOperation

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

DeleteMeshOperation manages a long-running operation from DeleteMesh.

func (*DeleteMeshOperation) Done

func (op *DeleteMeshOperation) Done() bool

Done reports whether the long-running operation has completed.

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

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

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

func (op *DeleteMeshOperation) 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 DeleteServiceBindingOperation

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

DeleteServiceBindingOperation manages a long-running operation from DeleteServiceBinding.

func (*DeleteServiceBindingOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteServiceBindingOperation) 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 (*DeleteServiceBindingOperation) 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 (*DeleteServiceBindingOperation) 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 (*DeleteServiceBindingOperation) 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 DeleteTcpRouteOperation

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

DeleteTcpRouteOperation manages a long-running operation from DeleteTcpRoute.

func (*DeleteTcpRouteOperation) Done

func (op *DeleteTcpRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

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

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

func (op *DeleteTcpRouteOperation) 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 DeleteTlsRouteOperation

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

DeleteTlsRouteOperation manages a long-running operation from DeleteTlsRoute.

func (*DeleteTlsRouteOperation) Done

func (op *DeleteTlsRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

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

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

func (op *DeleteTlsRouteOperation) 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 DepCallOptions

type DepCallOptions struct {
	ListLbTrafficExtensions  []gax.CallOption
	GetLbTrafficExtension    []gax.CallOption
	CreateLbTrafficExtension []gax.CallOption
	UpdateLbTrafficExtension []gax.CallOption
	DeleteLbTrafficExtension []gax.CallOption
	ListLbRouteExtensions    []gax.CallOption
	GetLbRouteExtension      []gax.CallOption
	CreateLbRouteExtension   []gax.CallOption
	UpdateLbRouteExtension   []gax.CallOption
	DeleteLbRouteExtension   []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
}

DepCallOptions contains the retry settings for each method of DepClient.

type DepClient

type DepClient struct {

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

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

DepClient is a client for interacting with Network Services API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service describing handlers for resources.

func NewDepClient

func NewDepClient(ctx context.Context, opts ...option.ClientOption) (*DepClient, error)

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

Service describing handlers for resources.

Example
package main

import (
	"context"

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func NewDepRESTClient

func NewDepRESTClient(ctx context.Context, opts ...option.ClientOption) (*DepClient, error)

NewDepRESTClient creates a new dep service rest client.

Service describing handlers for resources.

Example
package main

import (
	"context"

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

func (*DepClient) CancelOperation

func (c *DepClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepClient(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 (*DepClient) Close

func (c *DepClient) Close() error

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

func (*DepClient) Connection deprecated

func (c *DepClient) 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 (*DepClient) CreateLbRouteExtension

CreateLbRouteExtension creates a new LbRouteExtension resource in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.CreateLbRouteExtensionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateLbRouteExtensionRequest.
	}
	op, err := c.CreateLbRouteExtension(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 (*DepClient) CreateLbRouteExtensionOperation

func (c *DepClient) CreateLbRouteExtensionOperation(name string) *CreateLbRouteExtensionOperation

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

func (*DepClient) CreateLbTrafficExtension

CreateLbTrafficExtension creates a new LbTrafficExtension resource in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.CreateLbTrafficExtensionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateLbTrafficExtensionRequest.
	}
	op, err := c.CreateLbTrafficExtension(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 (*DepClient) CreateLbTrafficExtensionOperation

func (c *DepClient) CreateLbTrafficExtensionOperation(name string) *CreateLbTrafficExtensionOperation

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

func (*DepClient) DeleteLbRouteExtension

DeleteLbRouteExtension deletes the specified LbRouteExtension resource.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

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

func (*DepClient) DeleteLbRouteExtensionOperation

func (c *DepClient) DeleteLbRouteExtensionOperation(name string) *DeleteLbRouteExtensionOperation

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

func (*DepClient) DeleteLbTrafficExtension

DeleteLbTrafficExtension deletes the specified LbTrafficExtension resource.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

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

func (*DepClient) DeleteLbTrafficExtensionOperation

func (c *DepClient) DeleteLbTrafficExtensionOperation(name string) *DeleteLbTrafficExtensionOperation

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

func (*DepClient) DeleteOperation

func (c *DepClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepClient(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 (*DepClient) GetIamPolicy

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

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepClient(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 (*DepClient) GetLbRouteExtension

GetLbRouteExtension gets details of the specified LbRouteExtension resource.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

func (*DepClient) GetLbTrafficExtension

GetLbTrafficExtension gets details of the specified LbTrafficExtension resource.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

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

func (*DepClient) GetLocation

GetLocation gets information about a location.

Example
package main

import (
	"context"

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepClient(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 (*DepClient) GetOperation

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepClient(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 (*DepClient) ListLbRouteExtensions

ListLbRouteExtensions lists LbRouteExtension resources in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
	"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 := networkservices.NewDepClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networkservicespb.ListLbRouteExtensionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListLbRouteExtensionsRequest.
	}
	it := c.ListLbRouteExtensions(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.(*networkservicespb.ListLbRouteExtensionsResponse)
	}
}
Output:

func (*DepClient) ListLbTrafficExtensions

ListLbTrafficExtensions lists LbTrafficExtension resources in a given project and location.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
	"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 := networkservices.NewDepClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networkservicespb.ListLbTrafficExtensionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListLbTrafficExtensionsRequest.
	}
	it := c.ListLbTrafficExtensions(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.(*networkservicespb.ListLbTrafficExtensionsResponse)
	}
}
Output:

func (*DepClient) ListLocations

ListLocations lists information about the supported locations for this service.

Example
package main

import (
	"context"

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepClient(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:

func (*DepClient) ListOperations

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepClient(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:

func (*DepClient) SetIamPolicy

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

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

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepClient(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 (*DepClient) TestIamPermissions

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

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

Example
package main

import (
	"context"

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

	networkservices "cloud.google.com/go/networkservices/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 := networkservices.NewDepClient(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 (*DepClient) UpdateLbRouteExtension

UpdateLbRouteExtension updates the parameters of the specified LbRouteExtension resource.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.UpdateLbRouteExtensionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateLbRouteExtensionRequest.
	}
	op, err := c.UpdateLbRouteExtension(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 (*DepClient) UpdateLbRouteExtensionOperation

func (c *DepClient) UpdateLbRouteExtensionOperation(name string) *UpdateLbRouteExtensionOperation

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

func (*DepClient) UpdateLbTrafficExtension

UpdateLbTrafficExtension updates the parameters of the specified LbTrafficExtension resource.

Example
package main

import (
	"context"

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

	networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)

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

	req := &networkservicespb.UpdateLbTrafficExtensionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateLbTrafficExtensionRequest.
	}
	op, err := c.UpdateLbTrafficExtension(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 (*DepClient) UpdateLbTrafficExtensionOperation

func (c *DepClient) UpdateLbTrafficExtensionOperation(name string) *UpdateLbTrafficExtensionOperation

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

type EndpointPolicyIterator

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

EndpointPolicyIterator manages a stream of *networkservicespb.EndpointPolicy.

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

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

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

type GatewayIterator

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

GatewayIterator manages a stream of *networkservicespb.Gateway.

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

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

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

type GrpcRouteIterator

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

GrpcRouteIterator manages a stream of *networkservicespb.GrpcRoute.

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

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

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

type HttpRouteIterator

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

HttpRouteIterator manages a stream of *networkservicespb.HttpRoute.

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

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

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

type LbRouteExtensionIterator

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

LbRouteExtensionIterator manages a stream of *networkservicespb.LbRouteExtension.

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

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

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

type LbTrafficExtensionIterator

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

LbTrafficExtensionIterator manages a stream of *networkservicespb.LbTrafficExtension.

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

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

type LocationIterator

type LocationIterator struct {

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

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

LocationIterator manages a stream of *locationpb.Location.

func (*LocationIterator) Next

func (it *LocationIterator) Next() (*locationpb.Location, error)

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

func (*LocationIterator) PageInfo

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

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

type MeshIterator

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

MeshIterator manages a stream of *networkservicespb.Mesh.

func (*MeshIterator) Next

func (it *MeshIterator) Next() (*networkservicespb.Mesh, 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 (*MeshIterator) PageInfo

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

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

type OperationIterator

type OperationIterator struct {

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

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

OperationIterator manages a stream of *longrunningpb.Operation.

func (*OperationIterator) Next

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

func (*OperationIterator) PageInfo

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

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

type ServiceBindingIterator

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

ServiceBindingIterator manages a stream of *networkservicespb.ServiceBinding.

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

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

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

type TcpRouteIterator

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

TcpRouteIterator manages a stream of *networkservicespb.TcpRoute.

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

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

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

type TlsRouteIterator

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

TlsRouteIterator manages a stream of *networkservicespb.TlsRoute.

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

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

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

type UpdateEndpointPolicyOperation

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

UpdateEndpointPolicyOperation manages a long-running operation from UpdateEndpointPolicy.

func (*UpdateEndpointPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateEndpointPolicyOperation) 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 (*UpdateEndpointPolicyOperation) 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 (*UpdateEndpointPolicyOperation) 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 (*UpdateEndpointPolicyOperation) 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 UpdateGatewayOperation

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

UpdateGatewayOperation manages a long-running operation from UpdateGateway.

func (*UpdateGatewayOperation) Done

func (op *UpdateGatewayOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *UpdateGatewayOperation) 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 (*UpdateGatewayOperation) 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 (*UpdateGatewayOperation) 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 UpdateGrpcRouteOperation

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

UpdateGrpcRouteOperation manages a long-running operation from UpdateGrpcRoute.

func (*UpdateGrpcRouteOperation) Done

func (op *UpdateGrpcRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *UpdateGrpcRouteOperation) 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 (*UpdateGrpcRouteOperation) 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 (*UpdateGrpcRouteOperation) 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 UpdateHttpRouteOperation

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

UpdateHttpRouteOperation manages a long-running operation from UpdateHttpRoute.

func (*UpdateHttpRouteOperation) Done

func (op *UpdateHttpRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *UpdateHttpRouteOperation) 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 (*UpdateHttpRouteOperation) 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 (*UpdateHttpRouteOperation) 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 UpdateLbRouteExtensionOperation

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

UpdateLbRouteExtensionOperation manages a long-running operation from UpdateLbRouteExtension.

func (*UpdateLbRouteExtensionOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateLbRouteExtensionOperation) 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 (*UpdateLbRouteExtensionOperation) 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 (*UpdateLbRouteExtensionOperation) 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 (*UpdateLbRouteExtensionOperation) 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 UpdateLbTrafficExtensionOperation

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

UpdateLbTrafficExtensionOperation manages a long-running operation from UpdateLbTrafficExtension.

func (*UpdateLbTrafficExtensionOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateLbTrafficExtensionOperation) 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 (*UpdateLbTrafficExtensionOperation) 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 (*UpdateLbTrafficExtensionOperation) 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 (*UpdateLbTrafficExtensionOperation) 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 UpdateMeshOperation

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

UpdateMeshOperation manages a long-running operation from UpdateMesh.

func (*UpdateMeshOperation) Done

func (op *UpdateMeshOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *UpdateMeshOperation) 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 (*UpdateMeshOperation) 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 (*UpdateMeshOperation) 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 UpdateTcpRouteOperation

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

UpdateTcpRouteOperation manages a long-running operation from UpdateTcpRoute.

func (*UpdateTcpRouteOperation) Done

func (op *UpdateTcpRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

func (op *UpdateTcpRouteOperation) 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 (*UpdateTcpRouteOperation) 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 (*UpdateTcpRouteOperation) 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 UpdateTlsRouteOperation

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

UpdateTlsRouteOperation manages a long-running operation from UpdateTlsRoute.

func (*UpdateTlsRouteOperation) Done

func (op *UpdateTlsRouteOperation) Done() bool

Done reports whether the long-running operation has completed.

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

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