// 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 apihub import ( "context" "time" apihubpb "cloud.google.com/go/apihub/apiv1/apihubpb" "cloud.google.com/go/longrunning" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/iterator" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) // CollectApiDataOperation manages a long-running operation from CollectApiData. type CollectApiDataOperation 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 *CollectApiDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apihubpb.CollectApiDataResponse, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.CollectApiDataResponse 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 *CollectApiDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apihubpb.CollectApiDataResponse, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.CollectApiDataResponse 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 *CollectApiDataOperation) Metadata() (*apihubpb.OperationMetadata, error) { var meta apihubpb.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 *CollectApiDataOperation) 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 *CollectApiDataOperation) Name() string { return op.lro.Name() } // CreateApiHubInstanceOperation manages a long-running operation from CreateApiHubInstance. type CreateApiHubInstanceOperation 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 *CreateApiHubInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apihubpb.ApiHubInstance, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.ApiHubInstance 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 *CreateApiHubInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apihubpb.ApiHubInstance, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.ApiHubInstance 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 *CreateApiHubInstanceOperation) Metadata() (*apihubpb.OperationMetadata, error) { var meta apihubpb.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 *CreateApiHubInstanceOperation) 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 *CreateApiHubInstanceOperation) Name() string { return op.lro.Name() } // CreatePluginInstanceOperation manages a long-running operation from CreatePluginInstance. type CreatePluginInstanceOperation 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 *CreatePluginInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apihubpb.PluginInstance, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.PluginInstance 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 *CreatePluginInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apihubpb.PluginInstance, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.PluginInstance 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 *CreatePluginInstanceOperation) Metadata() (*apihubpb.OperationMetadata, error) { var meta apihubpb.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 *CreatePluginInstanceOperation) 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 *CreatePluginInstanceOperation) Name() string { return op.lro.Name() } // DeleteApiHubInstanceOperation manages a long-running operation from DeleteApiHubInstance. type DeleteApiHubInstanceOperation 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 *DeleteApiHubInstanceOperation) 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 *DeleteApiHubInstanceOperation) 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 *DeleteApiHubInstanceOperation) Metadata() (*apihubpb.OperationMetadata, error) { var meta apihubpb.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 *DeleteApiHubInstanceOperation) 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 *DeleteApiHubInstanceOperation) Name() string { return op.lro.Name() } // DeletePluginInstanceOperation manages a long-running operation from DeletePluginInstance. type DeletePluginInstanceOperation 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 *DeletePluginInstanceOperation) 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 *DeletePluginInstanceOperation) 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 *DeletePluginInstanceOperation) Metadata() (*apihubpb.OperationMetadata, error) { var meta apihubpb.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 *DeletePluginInstanceOperation) 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 *DeletePluginInstanceOperation) Name() string { return op.lro.Name() } // DeletePluginOperation manages a long-running operation from DeletePlugin. type DeletePluginOperation 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 *DeletePluginOperation) 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 *DeletePluginOperation) 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 *DeletePluginOperation) Metadata() (*apihubpb.OperationMetadata, error) { var meta apihubpb.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 *DeletePluginOperation) 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 *DeletePluginOperation) Name() string { return op.lro.Name() } // DisablePluginInstanceActionOperation manages a long-running operation from DisablePluginInstanceAction. type DisablePluginInstanceActionOperation 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 *DisablePluginInstanceActionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apihubpb.DisablePluginInstanceActionResponse, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.DisablePluginInstanceActionResponse 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 *DisablePluginInstanceActionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apihubpb.DisablePluginInstanceActionResponse, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.DisablePluginInstanceActionResponse 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 *DisablePluginInstanceActionOperation) Metadata() (*apihubpb.OperationMetadata, error) { var meta apihubpb.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 *DisablePluginInstanceActionOperation) 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 *DisablePluginInstanceActionOperation) Name() string { return op.lro.Name() } // EnablePluginInstanceActionOperation manages a long-running operation from EnablePluginInstanceAction. type EnablePluginInstanceActionOperation 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 *EnablePluginInstanceActionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apihubpb.EnablePluginInstanceActionResponse, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.EnablePluginInstanceActionResponse 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 *EnablePluginInstanceActionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apihubpb.EnablePluginInstanceActionResponse, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.EnablePluginInstanceActionResponse 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 *EnablePluginInstanceActionOperation) Metadata() (*apihubpb.OperationMetadata, error) { var meta apihubpb.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 *EnablePluginInstanceActionOperation) 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 *EnablePluginInstanceActionOperation) Name() string { return op.lro.Name() } // ExecutePluginInstanceActionOperation manages a long-running operation from ExecutePluginInstanceAction. type ExecutePluginInstanceActionOperation 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 *ExecutePluginInstanceActionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apihubpb.ExecutePluginInstanceActionResponse, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.ExecutePluginInstanceActionResponse 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 *ExecutePluginInstanceActionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apihubpb.ExecutePluginInstanceActionResponse, error) { opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp apihubpb.ExecutePluginInstanceActionResponse 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 *ExecutePluginInstanceActionOperation) Metadata() (*apihubpb.OperationMetadata, error) { var meta apihubpb.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 *ExecutePluginInstanceActionOperation) 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 *ExecutePluginInstanceActionOperation) Name() string { return op.lro.Name() } // ApiIterator manages a stream of *apihubpb.Api. type ApiIterator struct { items []*apihubpb.Api 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 []*apihubpb.Api, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *ApiIterator) 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 *ApiIterator) Next() (*apihubpb.Api, error) { var item *apihubpb.Api if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *ApiIterator) bufLen() int { return len(it.items) } func (it *ApiIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // ApiOperationIterator manages a stream of *apihubpb.ApiOperation. type ApiOperationIterator struct { items []*apihubpb.ApiOperation 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 []*apihubpb.ApiOperation, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *ApiOperationIterator) 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 *ApiOperationIterator) Next() (*apihubpb.ApiOperation, error) { var item *apihubpb.ApiOperation if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *ApiOperationIterator) bufLen() int { return len(it.items) } func (it *ApiOperationIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // AttributeIterator manages a stream of *apihubpb.Attribute. type AttributeIterator struct { items []*apihubpb.Attribute 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 []*apihubpb.Attribute, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *AttributeIterator) 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 *AttributeIterator) Next() (*apihubpb.Attribute, error) { var item *apihubpb.Attribute if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *AttributeIterator) bufLen() int { return len(it.items) } func (it *AttributeIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // CurationIterator manages a stream of *apihubpb.Curation. type CurationIterator struct { items []*apihubpb.Curation 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 []*apihubpb.Curation, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *CurationIterator) 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 *CurationIterator) Next() (*apihubpb.Curation, error) { var item *apihubpb.Curation if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *CurationIterator) bufLen() int { return len(it.items) } func (it *CurationIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // DependencyIterator manages a stream of *apihubpb.Dependency. type DependencyIterator struct { items []*apihubpb.Dependency 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 []*apihubpb.Dependency, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *DependencyIterator) 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 *DependencyIterator) Next() (*apihubpb.Dependency, error) { var item *apihubpb.Dependency if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *DependencyIterator) bufLen() int { return len(it.items) } func (it *DependencyIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // DeploymentIterator manages a stream of *apihubpb.Deployment. type DeploymentIterator struct { items []*apihubpb.Deployment 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 []*apihubpb.Deployment, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *DeploymentIterator) 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 *DeploymentIterator) Next() (*apihubpb.Deployment, error) { var item *apihubpb.Deployment if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *DeploymentIterator) bufLen() int { return len(it.items) } func (it *DeploymentIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // DiscoveredApiObservationIterator manages a stream of *apihubpb.DiscoveredApiObservation. type DiscoveredApiObservationIterator struct { items []*apihubpb.DiscoveredApiObservation 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 []*apihubpb.DiscoveredApiObservation, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *DiscoveredApiObservationIterator) 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 *DiscoveredApiObservationIterator) Next() (*apihubpb.DiscoveredApiObservation, error) { var item *apihubpb.DiscoveredApiObservation if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *DiscoveredApiObservationIterator) bufLen() int { return len(it.items) } func (it *DiscoveredApiObservationIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // DiscoveredApiOperationIterator manages a stream of *apihubpb.DiscoveredApiOperation. type DiscoveredApiOperationIterator struct { items []*apihubpb.DiscoveredApiOperation 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 []*apihubpb.DiscoveredApiOperation, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *DiscoveredApiOperationIterator) 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 *DiscoveredApiOperationIterator) Next() (*apihubpb.DiscoveredApiOperation, error) { var item *apihubpb.DiscoveredApiOperation if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *DiscoveredApiOperationIterator) bufLen() int { return len(it.items) } func (it *DiscoveredApiOperationIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // ExternalApiIterator manages a stream of *apihubpb.ExternalApi. type ExternalApiIterator struct { items []*apihubpb.ExternalApi 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 []*apihubpb.ExternalApi, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *ExternalApiIterator) 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 *ExternalApiIterator) Next() (*apihubpb.ExternalApi, error) { var item *apihubpb.ExternalApi if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *ExternalApiIterator) bufLen() int { return len(it.items) } func (it *ExternalApiIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // HostProjectRegistrationIterator manages a stream of *apihubpb.HostProjectRegistration. type HostProjectRegistrationIterator struct { items []*apihubpb.HostProjectRegistration 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 []*apihubpb.HostProjectRegistration, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *HostProjectRegistrationIterator) 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 *HostProjectRegistrationIterator) Next() (*apihubpb.HostProjectRegistration, error) { var item *apihubpb.HostProjectRegistration if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *HostProjectRegistrationIterator) bufLen() int { return len(it.items) } func (it *HostProjectRegistrationIterator) 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 } // 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 } // PluginInstanceIterator manages a stream of *apihubpb.PluginInstance. type PluginInstanceIterator struct { items []*apihubpb.PluginInstance 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 []*apihubpb.PluginInstance, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *PluginInstanceIterator) 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 *PluginInstanceIterator) Next() (*apihubpb.PluginInstance, error) { var item *apihubpb.PluginInstance if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *PluginInstanceIterator) bufLen() int { return len(it.items) } func (it *PluginInstanceIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // PluginIterator manages a stream of *apihubpb.Plugin. type PluginIterator struct { items []*apihubpb.Plugin 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 []*apihubpb.Plugin, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *PluginIterator) 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 *PluginIterator) Next() (*apihubpb.Plugin, error) { var item *apihubpb.Plugin if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *PluginIterator) bufLen() int { return len(it.items) } func (it *PluginIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // RuntimeProjectAttachmentIterator manages a stream of *apihubpb.RuntimeProjectAttachment. type RuntimeProjectAttachmentIterator struct { items []*apihubpb.RuntimeProjectAttachment 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 []*apihubpb.RuntimeProjectAttachment, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *RuntimeProjectAttachmentIterator) 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 *RuntimeProjectAttachmentIterator) Next() (*apihubpb.RuntimeProjectAttachment, error) { var item *apihubpb.RuntimeProjectAttachment if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *RuntimeProjectAttachmentIterator) bufLen() int { return len(it.items) } func (it *RuntimeProjectAttachmentIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // SearchResultIterator manages a stream of *apihubpb.SearchResult. type SearchResultIterator struct { items []*apihubpb.SearchResult 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 []*apihubpb.SearchResult, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *SearchResultIterator) 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 *SearchResultIterator) Next() (*apihubpb.SearchResult, error) { var item *apihubpb.SearchResult if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *SearchResultIterator) bufLen() int { return len(it.items) } func (it *SearchResultIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // SpecIterator manages a stream of *apihubpb.Spec. type SpecIterator struct { items []*apihubpb.Spec 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 []*apihubpb.Spec, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *SpecIterator) 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 *SpecIterator) Next() (*apihubpb.Spec, error) { var item *apihubpb.Spec if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *SpecIterator) bufLen() int { return len(it.items) } func (it *SpecIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // VersionIterator manages a stream of *apihubpb.Version. type VersionIterator struct { items []*apihubpb.Version 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 []*apihubpb.Version, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *VersionIterator) 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 *VersionIterator) Next() (*apihubpb.Version, error) { var item *apihubpb.Version if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *VersionIterator) bufLen() int { return len(it.items) } func (it *VersionIterator) takeBuf() interface{} { b := it.items it.items = nil return b }