// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go_gapic. DO NOT EDIT. package networkservices import ( "context" "time" "cloud.google.com/go/longrunning" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/iterator" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) // CreateAuthzExtensionOperation manages a long-running operation from CreateAuthzExtension. type CreateAuthzExtensionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateAuthzExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.AuthzExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.AuthzExtension if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateAuthzExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.AuthzExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.AuthzExtension if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateAuthzExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateAuthzExtensionOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateAuthzExtensionOperation) Name() string { return op.lro.Name() } // CreateEndpointPolicyOperation manages a long-running operation from CreateEndpointPolicy. type CreateEndpointPolicyOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateEndpointPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.EndpointPolicy if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateEndpointPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.EndpointPolicy if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateEndpointPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateEndpointPolicyOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateEndpointPolicyOperation) Name() string { return op.lro.Name() } // CreateGatewayOperation manages a long-running operation from CreateGateway. type CreateGatewayOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Gateway, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.Gateway if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Gateway, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.Gateway if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateGatewayOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateGatewayOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateGatewayOperation) Name() string { return op.lro.Name() } // CreateGrpcRouteOperation manages a long-running operation from CreateGrpcRoute. type CreateGrpcRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateGrpcRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.GrpcRoute if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateGrpcRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.GrpcRoute if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateGrpcRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateGrpcRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateGrpcRouteOperation) Name() string { return op.lro.Name() } // CreateHttpRouteOperation manages a long-running operation from CreateHttpRoute. type CreateHttpRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateHttpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.HttpRoute if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateHttpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.HttpRoute if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateHttpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateHttpRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateHttpRouteOperation) Name() string { return op.lro.Name() } // CreateLbRouteExtensionOperation manages a long-running operation from CreateLbRouteExtension. type CreateLbRouteExtensionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateLbRouteExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbRouteExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.LbRouteExtension if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateLbRouteExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbRouteExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.LbRouteExtension if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateLbRouteExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateLbRouteExtensionOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateLbRouteExtensionOperation) Name() string { return op.lro.Name() } // CreateLbTrafficExtensionOperation manages a long-running operation from CreateLbTrafficExtension. type CreateLbTrafficExtensionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateLbTrafficExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbTrafficExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.LbTrafficExtension if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateLbTrafficExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbTrafficExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.LbTrafficExtension if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateLbTrafficExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateLbTrafficExtensionOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateLbTrafficExtensionOperation) Name() string { return op.lro.Name() } // CreateMeshOperation manages a long-running operation from CreateMesh. type CreateMeshOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateMeshOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Mesh, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.Mesh if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateMeshOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Mesh, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.Mesh if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateMeshOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateMeshOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateMeshOperation) Name() string { return op.lro.Name() } // CreateServiceBindingOperation manages a long-running operation from CreateServiceBinding. type CreateServiceBindingOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateServiceBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.ServiceBinding if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateServiceBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.ServiceBinding if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateServiceBindingOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateServiceBindingOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateServiceBindingOperation) Name() string { return op.lro.Name() } // CreateServiceLbPolicyOperation manages a long-running operation from CreateServiceLbPolicy. type CreateServiceLbPolicyOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateServiceLbPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceLbPolicy, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.ServiceLbPolicy if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateServiceLbPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceLbPolicy, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.ServiceLbPolicy if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateServiceLbPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateServiceLbPolicyOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateServiceLbPolicyOperation) Name() string { return op.lro.Name() } // CreateTcpRouteOperation manages a long-running operation from CreateTcpRoute. type CreateTcpRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateTcpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.TcpRoute if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateTcpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.TcpRoute if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateTcpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateTcpRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateTcpRouteOperation) Name() string { return op.lro.Name() } // CreateTlsRouteOperation manages a long-running operation from CreateTlsRoute. type CreateTlsRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateTlsRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.TlsRoute if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateTlsRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.TlsRoute if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateTlsRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateTlsRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateTlsRouteOperation) Name() string { return op.lro.Name() } // CreateWasmPluginOperation manages a long-running operation from CreateWasmPlugin. type CreateWasmPluginOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateWasmPluginOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPlugin, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.WasmPlugin if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateWasmPluginOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPlugin, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.WasmPlugin if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateWasmPluginOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateWasmPluginOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateWasmPluginOperation) Name() string { return op.lro.Name() } // CreateWasmPluginVersionOperation manages a long-running operation from CreateWasmPluginVersion. type CreateWasmPluginVersionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateWasmPluginVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPluginVersion, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.WasmPluginVersion if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *CreateWasmPluginVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPluginVersion, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.WasmPluginVersion if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *CreateWasmPluginVersionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *CreateWasmPluginVersionOperation) Done() bool { return op.lro.Done() } // 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 (op *CreateWasmPluginVersionOperation) Name() string { return op.lro.Name() } // DeleteAuthzExtensionOperation manages a long-running operation from DeleteAuthzExtension. type DeleteAuthzExtensionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteAuthzExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteAuthzExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteAuthzExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteAuthzExtensionOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteAuthzExtensionOperation) Name() string { return op.lro.Name() } // DeleteEndpointPolicyOperation manages a long-running operation from DeleteEndpointPolicy. type DeleteEndpointPolicyOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteEndpointPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteEndpointPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteEndpointPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteEndpointPolicyOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteEndpointPolicyOperation) Name() string { return op.lro.Name() } // DeleteGatewayOperation manages a long-running operation from DeleteGateway. type DeleteGatewayOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteGatewayOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteGatewayOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteGatewayOperation) Name() string { return op.lro.Name() } // DeleteGrpcRouteOperation manages a long-running operation from DeleteGrpcRoute. type DeleteGrpcRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteGrpcRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteGrpcRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteGrpcRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteGrpcRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteGrpcRouteOperation) Name() string { return op.lro.Name() } // DeleteHttpRouteOperation manages a long-running operation from DeleteHttpRoute. type DeleteHttpRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteHttpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteHttpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteHttpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteHttpRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteHttpRouteOperation) Name() string { return op.lro.Name() } // DeleteLbRouteExtensionOperation manages a long-running operation from DeleteLbRouteExtension. type DeleteLbRouteExtensionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteLbRouteExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteLbRouteExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteLbRouteExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteLbRouteExtensionOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteLbRouteExtensionOperation) Name() string { return op.lro.Name() } // DeleteLbTrafficExtensionOperation manages a long-running operation from DeleteLbTrafficExtension. type DeleteLbTrafficExtensionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteLbTrafficExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteLbTrafficExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteLbTrafficExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteLbTrafficExtensionOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteLbTrafficExtensionOperation) Name() string { return op.lro.Name() } // DeleteMeshOperation manages a long-running operation from DeleteMesh. type DeleteMeshOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteMeshOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteMeshOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteMeshOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteMeshOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteMeshOperation) Name() string { return op.lro.Name() } // DeleteServiceBindingOperation manages a long-running operation from DeleteServiceBinding. type DeleteServiceBindingOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteServiceBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteServiceBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteServiceBindingOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteServiceBindingOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteServiceBindingOperation) Name() string { return op.lro.Name() } // DeleteServiceLbPolicyOperation manages a long-running operation from DeleteServiceLbPolicy. type DeleteServiceLbPolicyOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteServiceLbPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteServiceLbPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteServiceLbPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteServiceLbPolicyOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteServiceLbPolicyOperation) Name() string { return op.lro.Name() } // DeleteTcpRouteOperation manages a long-running operation from DeleteTcpRoute. type DeleteTcpRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteTcpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteTcpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteTcpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteTcpRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteTcpRouteOperation) Name() string { return op.lro.Name() } // DeleteTlsRouteOperation manages a long-running operation from DeleteTlsRoute. type DeleteTlsRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteTlsRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteTlsRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteTlsRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteTlsRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteTlsRouteOperation) Name() string { return op.lro.Name() } // DeleteWasmPluginOperation manages a long-running operation from DeleteWasmPlugin. type DeleteWasmPluginOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteWasmPluginOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteWasmPluginOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteWasmPluginOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteWasmPluginOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteWasmPluginOperation) Name() string { return op.lro.Name() } // DeleteWasmPluginVersionOperation manages a long-running operation from DeleteWasmPluginVersion. type DeleteWasmPluginVersionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteWasmPluginVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } // 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 (op *DeleteWasmPluginVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } // 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 (op *DeleteWasmPluginVersionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *DeleteWasmPluginVersionOperation) Done() bool { return op.lro.Done() } // 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 (op *DeleteWasmPluginVersionOperation) Name() string { return op.lro.Name() } // UpdateAuthzExtensionOperation manages a long-running operation from UpdateAuthzExtension. type UpdateAuthzExtensionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateAuthzExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.AuthzExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.AuthzExtension if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateAuthzExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.AuthzExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.AuthzExtension if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateAuthzExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateAuthzExtensionOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateAuthzExtensionOperation) Name() string { return op.lro.Name() } // UpdateEndpointPolicyOperation manages a long-running operation from UpdateEndpointPolicy. type UpdateEndpointPolicyOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateEndpointPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.EndpointPolicy if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateEndpointPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.EndpointPolicy if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateEndpointPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateEndpointPolicyOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateEndpointPolicyOperation) Name() string { return op.lro.Name() } // UpdateGatewayOperation manages a long-running operation from UpdateGateway. type UpdateGatewayOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Gateway, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.Gateway if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Gateway, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.Gateway if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateGatewayOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateGatewayOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateGatewayOperation) Name() string { return op.lro.Name() } // UpdateGrpcRouteOperation manages a long-running operation from UpdateGrpcRoute. type UpdateGrpcRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateGrpcRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.GrpcRoute if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateGrpcRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.GrpcRoute if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateGrpcRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateGrpcRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateGrpcRouteOperation) Name() string { return op.lro.Name() } // UpdateHttpRouteOperation manages a long-running operation from UpdateHttpRoute. type UpdateHttpRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateHttpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.HttpRoute if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateHttpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.HttpRoute if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateHttpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateHttpRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateHttpRouteOperation) Name() string { return op.lro.Name() } // UpdateLbRouteExtensionOperation manages a long-running operation from UpdateLbRouteExtension. type UpdateLbRouteExtensionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateLbRouteExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbRouteExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.LbRouteExtension if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateLbRouteExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbRouteExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.LbRouteExtension if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateLbRouteExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateLbRouteExtensionOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateLbRouteExtensionOperation) Name() string { return op.lro.Name() } // UpdateLbTrafficExtensionOperation manages a long-running operation from UpdateLbTrafficExtension. type UpdateLbTrafficExtensionOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateLbTrafficExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbTrafficExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.LbTrafficExtension if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateLbTrafficExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbTrafficExtension, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.LbTrafficExtension if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateLbTrafficExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateLbTrafficExtensionOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateLbTrafficExtensionOperation) Name() string { return op.lro.Name() } // UpdateMeshOperation manages a long-running operation from UpdateMesh. type UpdateMeshOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateMeshOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Mesh, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.Mesh if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateMeshOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Mesh, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.Mesh if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateMeshOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateMeshOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateMeshOperation) Name() string { return op.lro.Name() } // UpdateServiceBindingOperation manages a long-running operation from UpdateServiceBinding. type UpdateServiceBindingOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateServiceBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.ServiceBinding if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateServiceBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.ServiceBinding if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateServiceBindingOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateServiceBindingOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateServiceBindingOperation) Name() string { return op.lro.Name() } // UpdateServiceLbPolicyOperation manages a long-running operation from UpdateServiceLbPolicy. type UpdateServiceLbPolicyOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateServiceLbPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceLbPolicy, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.ServiceLbPolicy if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateServiceLbPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceLbPolicy, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.ServiceLbPolicy if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateServiceLbPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateServiceLbPolicyOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateServiceLbPolicyOperation) Name() string { return op.lro.Name() } // UpdateTcpRouteOperation manages a long-running operation from UpdateTcpRoute. type UpdateTcpRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateTcpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.TcpRoute if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateTcpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.TcpRoute if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateTcpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateTcpRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateTcpRouteOperation) Name() string { return op.lro.Name() } // UpdateTlsRouteOperation manages a long-running operation from UpdateTlsRoute. type UpdateTlsRouteOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateTlsRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.TlsRoute if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateTlsRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.TlsRoute if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateTlsRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateTlsRouteOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateTlsRouteOperation) Name() string { return op.lro.Name() } // UpdateWasmPluginOperation manages a long-running operation from UpdateWasmPlugin. type UpdateWasmPluginOperation struct { lro *longrunning.Operation pollPath string } // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateWasmPluginOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPlugin, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.WasmPlugin if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err } return &resp, nil } // 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 (op *UpdateWasmPluginOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPlugin, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp networkservicespb.WasmPlugin if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err } if !op.Done() { return nil, nil } return &resp, nil } // 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 (op *UpdateWasmPluginOperation) Metadata() (*networkservicespb.OperationMetadata, error) { var meta networkservicespb.OperationMetadata if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { return nil, nil } else if err != nil { return nil, err } return &meta, nil } // Done reports whether the long-running operation has completed. func (op *UpdateWasmPluginOperation) Done() bool { return op.lro.Done() } // 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 (op *UpdateWasmPluginOperation) Name() string { return op.lro.Name() } // AuthzExtensionIterator manages a stream of *networkservicespb.AuthzExtension. type AuthzExtensionIterator struct { items []*networkservicespb.AuthzExtension pageInfo *iterator.PageInfo nextFunc func() error // 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.AuthzExtension, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *AuthzExtensionIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *AuthzExtensionIterator) Next() (*networkservicespb.AuthzExtension, error) { var item *networkservicespb.AuthzExtension if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *AuthzExtensionIterator) bufLen() int { return len(it.items) } func (it *AuthzExtensionIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // EndpointPolicyIterator manages a stream of *networkservicespb.EndpointPolicy. type EndpointPolicyIterator struct { items []*networkservicespb.EndpointPolicy pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *EndpointPolicyIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *EndpointPolicyIterator) Next() (*networkservicespb.EndpointPolicy, error) { var item *networkservicespb.EndpointPolicy if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *EndpointPolicyIterator) bufLen() int { return len(it.items) } func (it *EndpointPolicyIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // GatewayIterator manages a stream of *networkservicespb.Gateway. type GatewayIterator struct { items []*networkservicespb.Gateway pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *GatewayIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *GatewayIterator) Next() (*networkservicespb.Gateway, error) { var item *networkservicespb.Gateway if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *GatewayIterator) bufLen() int { return len(it.items) } func (it *GatewayIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // GatewayRouteViewIterator manages a stream of *networkservicespb.GatewayRouteView. type GatewayRouteViewIterator struct { items []*networkservicespb.GatewayRouteView pageInfo *iterator.PageInfo nextFunc func() error // 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.GatewayRouteView, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *GatewayRouteViewIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *GatewayRouteViewIterator) Next() (*networkservicespb.GatewayRouteView, error) { var item *networkservicespb.GatewayRouteView if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *GatewayRouteViewIterator) bufLen() int { return len(it.items) } func (it *GatewayRouteViewIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // GrpcRouteIterator manages a stream of *networkservicespb.GrpcRoute. type GrpcRouteIterator struct { items []*networkservicespb.GrpcRoute pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *GrpcRouteIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *GrpcRouteIterator) Next() (*networkservicespb.GrpcRoute, error) { var item *networkservicespb.GrpcRoute if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *GrpcRouteIterator) bufLen() int { return len(it.items) } func (it *GrpcRouteIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // HttpRouteIterator manages a stream of *networkservicespb.HttpRoute. type HttpRouteIterator struct { items []*networkservicespb.HttpRoute pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *HttpRouteIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *HttpRouteIterator) Next() (*networkservicespb.HttpRoute, error) { var item *networkservicespb.HttpRoute if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *HttpRouteIterator) bufLen() int { return len(it.items) } func (it *HttpRouteIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // LbRouteExtensionIterator manages a stream of *networkservicespb.LbRouteExtension. type LbRouteExtensionIterator struct { items []*networkservicespb.LbRouteExtension pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *LbRouteExtensionIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *LbRouteExtensionIterator) Next() (*networkservicespb.LbRouteExtension, error) { var item *networkservicespb.LbRouteExtension if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *LbRouteExtensionIterator) bufLen() int { return len(it.items) } func (it *LbRouteExtensionIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // LbTrafficExtensionIterator manages a stream of *networkservicespb.LbTrafficExtension. type LbTrafficExtensionIterator struct { items []*networkservicespb.LbTrafficExtension pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *LbTrafficExtensionIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *LbTrafficExtensionIterator) Next() (*networkservicespb.LbTrafficExtension, error) { var item *networkservicespb.LbTrafficExtension if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *LbTrafficExtensionIterator) bufLen() int { return len(it.items) } func (it *LbTrafficExtensionIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // LocationIterator manages a stream of *locationpb.Location. type LocationIterator struct { items []*locationpb.Location pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *LocationIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *LocationIterator) Next() (*locationpb.Location, error) { var item *locationpb.Location if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *LocationIterator) bufLen() int { return len(it.items) } func (it *LocationIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // MeshIterator manages a stream of *networkservicespb.Mesh. type MeshIterator struct { items []*networkservicespb.Mesh pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *MeshIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *MeshIterator) Next() (*networkservicespb.Mesh, error) { var item *networkservicespb.Mesh if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *MeshIterator) bufLen() int { return len(it.items) } func (it *MeshIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // MeshRouteViewIterator manages a stream of *networkservicespb.MeshRouteView. type MeshRouteViewIterator struct { items []*networkservicespb.MeshRouteView pageInfo *iterator.PageInfo nextFunc func() error // 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.MeshRouteView, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *MeshRouteViewIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *MeshRouteViewIterator) Next() (*networkservicespb.MeshRouteView, error) { var item *networkservicespb.MeshRouteView if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *MeshRouteViewIterator) bufLen() int { return len(it.items) } func (it *MeshRouteViewIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // OperationIterator manages a stream of *longrunningpb.Operation. type OperationIterator struct { items []*longrunningpb.Operation pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *OperationIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *OperationIterator) Next() (*longrunningpb.Operation, error) { var item *longrunningpb.Operation if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *OperationIterator) bufLen() int { return len(it.items) } func (it *OperationIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // ServiceBindingIterator manages a stream of *networkservicespb.ServiceBinding. type ServiceBindingIterator struct { items []*networkservicespb.ServiceBinding pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *ServiceBindingIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *ServiceBindingIterator) Next() (*networkservicespb.ServiceBinding, error) { var item *networkservicespb.ServiceBinding if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *ServiceBindingIterator) bufLen() int { return len(it.items) } func (it *ServiceBindingIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // ServiceLbPolicyIterator manages a stream of *networkservicespb.ServiceLbPolicy. type ServiceLbPolicyIterator struct { items []*networkservicespb.ServiceLbPolicy pageInfo *iterator.PageInfo nextFunc func() error // 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.ServiceLbPolicy, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *ServiceLbPolicyIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *ServiceLbPolicyIterator) Next() (*networkservicespb.ServiceLbPolicy, error) { var item *networkservicespb.ServiceLbPolicy if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *ServiceLbPolicyIterator) bufLen() int { return len(it.items) } func (it *ServiceLbPolicyIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // TcpRouteIterator manages a stream of *networkservicespb.TcpRoute. type TcpRouteIterator struct { items []*networkservicespb.TcpRoute pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *TcpRouteIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *TcpRouteIterator) Next() (*networkservicespb.TcpRoute, error) { var item *networkservicespb.TcpRoute if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *TcpRouteIterator) bufLen() int { return len(it.items) } func (it *TcpRouteIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // TlsRouteIterator manages a stream of *networkservicespb.TlsRoute. type TlsRouteIterator struct { items []*networkservicespb.TlsRoute pageInfo *iterator.PageInfo nextFunc func() error // 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) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *TlsRouteIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *TlsRouteIterator) Next() (*networkservicespb.TlsRoute, error) { var item *networkservicespb.TlsRoute if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *TlsRouteIterator) bufLen() int { return len(it.items) } func (it *TlsRouteIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // WasmPluginIterator manages a stream of *networkservicespb.WasmPlugin. type WasmPluginIterator struct { items []*networkservicespb.WasmPlugin pageInfo *iterator.PageInfo nextFunc func() error // 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.WasmPlugin, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *WasmPluginIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *WasmPluginIterator) Next() (*networkservicespb.WasmPlugin, error) { var item *networkservicespb.WasmPlugin if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *WasmPluginIterator) bufLen() int { return len(it.items) } func (it *WasmPluginIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // WasmPluginVersionIterator manages a stream of *networkservicespb.WasmPluginVersion. type WasmPluginVersionIterator struct { items []*networkservicespb.WasmPluginVersion pageInfo *iterator.PageInfo nextFunc func() error // 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.WasmPluginVersion, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *WasmPluginVersionIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // 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 (it *WasmPluginVersionIterator) Next() (*networkservicespb.WasmPluginVersion, error) { var item *networkservicespb.WasmPluginVersion if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *WasmPluginVersionIterator) bufLen() int { return len(it.items) } func (it *WasmPluginVersionIterator) takeBuf() interface{} { b := it.items it.items = nil return b }