// 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 accounts import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" "google.golang.org/api/iterator" ) // AccountIssueIterator manages a stream of *accountspb.AccountIssue. type AccountIssueIterator struct { items []*accountspb.AccountIssue 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 []*accountspb.AccountIssue, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *AccountIssueIterator) 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 *AccountIssueIterator) Next() (*accountspb.AccountIssue, error) { var item *accountspb.AccountIssue if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *AccountIssueIterator) bufLen() int { return len(it.items) } func (it *AccountIssueIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // AccountIterator manages a stream of *accountspb.Account. type AccountIterator struct { items []*accountspb.Account 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 []*accountspb.Account, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *AccountIterator) 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 *AccountIterator) Next() (*accountspb.Account, error) { var item *accountspb.Account if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *AccountIterator) bufLen() int { return len(it.items) } func (it *AccountIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // AccountTaxIterator manages a stream of *accountspb.AccountTax. type AccountTaxIterator struct { items []*accountspb.AccountTax 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 []*accountspb.AccountTax, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *AccountTaxIterator) 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 *AccountTaxIterator) Next() (*accountspb.AccountTax, error) { var item *accountspb.AccountTax if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *AccountTaxIterator) bufLen() int { return len(it.items) } func (it *AccountTaxIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // GbpAccountIterator manages a stream of *accountspb.GbpAccount. type GbpAccountIterator struct { items []*accountspb.GbpAccount 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 []*accountspb.GbpAccount, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *GbpAccountIterator) 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 *GbpAccountIterator) Next() (*accountspb.GbpAccount, error) { var item *accountspb.GbpAccount if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *GbpAccountIterator) bufLen() int { return len(it.items) } func (it *GbpAccountIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // LfpProviderIterator manages a stream of *accountspb.LfpProvider. type LfpProviderIterator struct { items []*accountspb.LfpProvider 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 []*accountspb.LfpProvider, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *LfpProviderIterator) 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 *LfpProviderIterator) Next() (*accountspb.LfpProvider, error) { var item *accountspb.LfpProvider if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *LfpProviderIterator) bufLen() int { return len(it.items) } func (it *LfpProviderIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // OmnichannelSettingIterator manages a stream of *accountspb.OmnichannelSetting. type OmnichannelSettingIterator struct { items []*accountspb.OmnichannelSetting 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 []*accountspb.OmnichannelSetting, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *OmnichannelSettingIterator) 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 *OmnichannelSettingIterator) Next() (*accountspb.OmnichannelSetting, error) { var item *accountspb.OmnichannelSetting if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *OmnichannelSettingIterator) bufLen() int { return len(it.items) } func (it *OmnichannelSettingIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // OnlineReturnPolicyIterator manages a stream of *accountspb.OnlineReturnPolicy. type OnlineReturnPolicyIterator struct { items []*accountspb.OnlineReturnPolicy 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 []*accountspb.OnlineReturnPolicy, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *OnlineReturnPolicyIterator) 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 *OnlineReturnPolicyIterator) Next() (*accountspb.OnlineReturnPolicy, error) { var item *accountspb.OnlineReturnPolicy if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *OnlineReturnPolicyIterator) bufLen() int { return len(it.items) } func (it *OnlineReturnPolicyIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // ProgramIterator manages a stream of *accountspb.Program. type ProgramIterator struct { items []*accountspb.Program 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 []*accountspb.Program, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *ProgramIterator) 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 *ProgramIterator) Next() (*accountspb.Program, error) { var item *accountspb.Program if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *ProgramIterator) bufLen() int { return len(it.items) } func (it *ProgramIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // RegionIterator manages a stream of *accountspb.Region. type RegionIterator struct { items []*accountspb.Region 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 []*accountspb.Region, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *RegionIterator) 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 *RegionIterator) Next() (*accountspb.Region, error) { var item *accountspb.Region if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *RegionIterator) bufLen() int { return len(it.items) } func (it *RegionIterator) takeBuf() interface{} { b := it.items it.items = nil return b } // UserIterator manages a stream of *accountspb.User. type UserIterator struct { items []*accountspb.User 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 []*accountspb.User, nextPageToken string, err error) } // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *UserIterator) 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 *UserIterator) Next() (*accountspb.User, error) { var item *accountspb.User if err := it.nextFunc(); err != nil { return item, err } item = it.items[0] it.items = it.items[1:] return item, nil } func (it *UserIterator) bufLen() int { return len(it.items) } func (it *UserIterator) takeBuf() interface{} { b := it.items it.items = nil return b }