| 1 |
// Copyright 2025 Google LLC |
| 2 |
// |
| 3 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
// you may not use this file except in compliance with the License. |
| 5 |
// You may obtain a copy of the License at |
| 6 |
// |
| 7 |
// https://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
// |
| 9 |
// Unless required by applicable law or agreed to in writing, software |
| 10 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
// See the License for the specific language governing permissions and |
| 13 |
// limitations under the License. |
| 14 |
|
| 15 |
// Code generated by protoc-gen-go_gapic. DO NOT EDIT. |
| 16 |
|
| 17 |
package accounts |
| 18 |
|
| 19 |
import ( |
| 20 |
accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb" |
| 21 |
"google.golang.org/api/iterator" |
| 22 |
) |
| 23 |
|
| 24 |
// AccountIssueIterator manages a stream of *accountspb.AccountIssue. |
| 25 |
type AccountIssueIterator struct { |
| 26 |
items []*accountspb.AccountIssue |
| 27 |
pageInfo *iterator.PageInfo |
| 28 |
nextFunc func() error |
| 29 |
|
| 30 |
// Response is the raw response for the current page. |
| 31 |
// It must be cast to the RPC response type. |
| 32 |
// Calling Next() or InternalFetch() updates this value. |
| 33 |
Response interface{} |
| 34 |
|
| 35 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 36 |
// It is not part of the stable interface of this package. |
| 37 |
// |
| 38 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 39 |
// The number of results is no greater than pageSize. |
| 40 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 41 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.AccountIssue, nextPageToken string, err error) |
| 42 |
} |
| 43 |
|
| 44 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 45 |
func (it *AccountIssueIterator) PageInfo() *iterator.PageInfo { |
| 46 |
return it.pageInfo |
| 47 |
} |
| 48 |
|
| 49 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 50 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 51 |
func (it *AccountIssueIterator) Next() (*accountspb.AccountIssue, error) { |
| 52 |
var item *accountspb.AccountIssue |
| 53 |
if err := it.nextFunc(); err != nil { |
| 54 |
return item, err |
| 55 |
} |
| 56 |
item = it.items[0] |
| 57 |
it.items = it.items[1:] |
| 58 |
return item, nil |
| 59 |
} |
| 60 |
|
| 61 |
func (it *AccountIssueIterator) bufLen() int { |
| 62 |
return len(it.items) |
| 63 |
} |
| 64 |
|
| 65 |
func (it *AccountIssueIterator) takeBuf() interface{} { |
| 66 |
b := it.items |
| 67 |
it.items = nil |
| 68 |
return b |
| 69 |
} |
| 70 |
|
| 71 |
// AccountIterator manages a stream of *accountspb.Account. |
| 72 |
type AccountIterator struct { |
| 73 |
items []*accountspb.Account |
| 74 |
pageInfo *iterator.PageInfo |
| 75 |
nextFunc func() error |
| 76 |
|
| 77 |
// Response is the raw response for the current page. |
| 78 |
// It must be cast to the RPC response type. |
| 79 |
// Calling Next() or InternalFetch() updates this value. |
| 80 |
Response interface{} |
| 81 |
|
| 82 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 83 |
// It is not part of the stable interface of this package. |
| 84 |
// |
| 85 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 86 |
// The number of results is no greater than pageSize. |
| 87 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 88 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.Account, nextPageToken string, err error) |
| 89 |
} |
| 90 |
|
| 91 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 92 |
func (it *AccountIterator) PageInfo() *iterator.PageInfo { |
| 93 |
return it.pageInfo |
| 94 |
} |
| 95 |
|
| 96 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 97 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 98 |
func (it *AccountIterator) Next() (*accountspb.Account, error) { |
| 99 |
var item *accountspb.Account |
| 100 |
if err := it.nextFunc(); err != nil { |
| 101 |
return item, err |
| 102 |
} |
| 103 |
item = it.items[0] |
| 104 |
it.items = it.items[1:] |
| 105 |
return item, nil |
| 106 |
} |
| 107 |
|
| 108 |
func (it *AccountIterator) bufLen() int { |
| 109 |
return len(it.items) |
| 110 |
} |
| 111 |
|
| 112 |
func (it *AccountIterator) takeBuf() interface{} { |
| 113 |
b := it.items |
| 114 |
it.items = nil |
| 115 |
return b |
| 116 |
} |
| 117 |
|
| 118 |
// AccountRelationshipIterator manages a stream of *accountspb.AccountRelationship. |
| 119 |
type AccountRelationshipIterator struct { |
| 120 |
items []*accountspb.AccountRelationship |
| 121 |
pageInfo *iterator.PageInfo |
| 122 |
nextFunc func() error |
| 123 |
|
| 124 |
// Response is the raw response for the current page. |
| 125 |
// It must be cast to the RPC response type. |
| 126 |
// Calling Next() or InternalFetch() updates this value. |
| 127 |
Response interface{} |
| 128 |
|
| 129 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 130 |
// It is not part of the stable interface of this package. |
| 131 |
// |
| 132 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 133 |
// The number of results is no greater than pageSize. |
| 134 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 135 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.AccountRelationship, nextPageToken string, err error) |
| 136 |
} |
| 137 |
|
| 138 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 139 |
func (it *AccountRelationshipIterator) PageInfo() *iterator.PageInfo { |
| 140 |
return it.pageInfo |
| 141 |
} |
| 142 |
|
| 143 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 144 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 145 |
func (it *AccountRelationshipIterator) Next() (*accountspb.AccountRelationship, error) { |
| 146 |
var item *accountspb.AccountRelationship |
| 147 |
if err := it.nextFunc(); err != nil { |
| 148 |
return item, err |
| 149 |
} |
| 150 |
item = it.items[0] |
| 151 |
it.items = it.items[1:] |
| 152 |
return item, nil |
| 153 |
} |
| 154 |
|
| 155 |
func (it *AccountRelationshipIterator) bufLen() int { |
| 156 |
return len(it.items) |
| 157 |
} |
| 158 |
|
| 159 |
func (it *AccountRelationshipIterator) takeBuf() interface{} { |
| 160 |
b := it.items |
| 161 |
it.items = nil |
| 162 |
return b |
| 163 |
} |
| 164 |
|
| 165 |
// AccountServiceIterator manages a stream of *accountspb.AccountService. |
| 166 |
type AccountServiceIterator struct { |
| 167 |
items []*accountspb.AccountService |
| 168 |
pageInfo *iterator.PageInfo |
| 169 |
nextFunc func() error |
| 170 |
|
| 171 |
// Response is the raw response for the current page. |
| 172 |
// It must be cast to the RPC response type. |
| 173 |
// Calling Next() or InternalFetch() updates this value. |
| 174 |
Response interface{} |
| 175 |
|
| 176 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 177 |
// It is not part of the stable interface of this package. |
| 178 |
// |
| 179 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 180 |
// The number of results is no greater than pageSize. |
| 181 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 182 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.AccountService, nextPageToken string, err error) |
| 183 |
} |
| 184 |
|
| 185 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 186 |
func (it *AccountServiceIterator) PageInfo() *iterator.PageInfo { |
| 187 |
return it.pageInfo |
| 188 |
} |
| 189 |
|
| 190 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 191 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 192 |
func (it *AccountServiceIterator) Next() (*accountspb.AccountService, error) { |
| 193 |
var item *accountspb.AccountService |
| 194 |
if err := it.nextFunc(); err != nil { |
| 195 |
return item, err |
| 196 |
} |
| 197 |
item = it.items[0] |
| 198 |
it.items = it.items[1:] |
| 199 |
return item, nil |
| 200 |
} |
| 201 |
|
| 202 |
func (it *AccountServiceIterator) bufLen() int { |
| 203 |
return len(it.items) |
| 204 |
} |
| 205 |
|
| 206 |
func (it *AccountServiceIterator) takeBuf() interface{} { |
| 207 |
b := it.items |
| 208 |
it.items = nil |
| 209 |
return b |
| 210 |
} |
| 211 |
|
| 212 |
// GbpAccountIterator manages a stream of *accountspb.GbpAccount. |
| 213 |
type GbpAccountIterator struct { |
| 214 |
items []*accountspb.GbpAccount |
| 215 |
pageInfo *iterator.PageInfo |
| 216 |
nextFunc func() error |
| 217 |
|
| 218 |
// Response is the raw response for the current page. |
| 219 |
// It must be cast to the RPC response type. |
| 220 |
// Calling Next() or InternalFetch() updates this value. |
| 221 |
Response interface{} |
| 222 |
|
| 223 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 224 |
// It is not part of the stable interface of this package. |
| 225 |
// |
| 226 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 227 |
// The number of results is no greater than pageSize. |
| 228 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 229 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.GbpAccount, nextPageToken string, err error) |
| 230 |
} |
| 231 |
|
| 232 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 233 |
func (it *GbpAccountIterator) PageInfo() *iterator.PageInfo { |
| 234 |
return it.pageInfo |
| 235 |
} |
| 236 |
|
| 237 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 238 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 239 |
func (it *GbpAccountIterator) Next() (*accountspb.GbpAccount, error) { |
| 240 |
var item *accountspb.GbpAccount |
| 241 |
if err := it.nextFunc(); err != nil { |
| 242 |
return item, err |
| 243 |
} |
| 244 |
item = it.items[0] |
| 245 |
it.items = it.items[1:] |
| 246 |
return item, nil |
| 247 |
} |
| 248 |
|
| 249 |
func (it *GbpAccountIterator) bufLen() int { |
| 250 |
return len(it.items) |
| 251 |
} |
| 252 |
|
| 253 |
func (it *GbpAccountIterator) takeBuf() interface{} { |
| 254 |
b := it.items |
| 255 |
it.items = nil |
| 256 |
return b |
| 257 |
} |
| 258 |
|
| 259 |
// LfpProviderIterator manages a stream of *accountspb.LfpProvider. |
| 260 |
type LfpProviderIterator struct { |
| 261 |
items []*accountspb.LfpProvider |
| 262 |
pageInfo *iterator.PageInfo |
| 263 |
nextFunc func() error |
| 264 |
|
| 265 |
// Response is the raw response for the current page. |
| 266 |
// It must be cast to the RPC response type. |
| 267 |
// Calling Next() or InternalFetch() updates this value. |
| 268 |
Response interface{} |
| 269 |
|
| 270 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 271 |
// It is not part of the stable interface of this package. |
| 272 |
// |
| 273 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 274 |
// The number of results is no greater than pageSize. |
| 275 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 276 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.LfpProvider, nextPageToken string, err error) |
| 277 |
} |
| 278 |
|
| 279 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 280 |
func (it *LfpProviderIterator) PageInfo() *iterator.PageInfo { |
| 281 |
return it.pageInfo |
| 282 |
} |
| 283 |
|
| 284 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 285 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 286 |
func (it *LfpProviderIterator) Next() (*accountspb.LfpProvider, error) { |
| 287 |
var item *accountspb.LfpProvider |
| 288 |
if err := it.nextFunc(); err != nil { |
| 289 |
return item, err |
| 290 |
} |
| 291 |
item = it.items[0] |
| 292 |
it.items = it.items[1:] |
| 293 |
return item, nil |
| 294 |
} |
| 295 |
|
| 296 |
func (it *LfpProviderIterator) bufLen() int { |
| 297 |
return len(it.items) |
| 298 |
} |
| 299 |
|
| 300 |
func (it *LfpProviderIterator) takeBuf() interface{} { |
| 301 |
b := it.items |
| 302 |
it.items = nil |
| 303 |
return b |
| 304 |
} |
| 305 |
|
| 306 |
// OmnichannelSettingIterator manages a stream of *accountspb.OmnichannelSetting. |
| 307 |
type OmnichannelSettingIterator struct { |
| 308 |
items []*accountspb.OmnichannelSetting |
| 309 |
pageInfo *iterator.PageInfo |
| 310 |
nextFunc func() error |
| 311 |
|
| 312 |
// Response is the raw response for the current page. |
| 313 |
// It must be cast to the RPC response type. |
| 314 |
// Calling Next() or InternalFetch() updates this value. |
| 315 |
Response interface{} |
| 316 |
|
| 317 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 318 |
// It is not part of the stable interface of this package. |
| 319 |
// |
| 320 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 321 |
// The number of results is no greater than pageSize. |
| 322 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 323 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.OmnichannelSetting, nextPageToken string, err error) |
| 324 |
} |
| 325 |
|
| 326 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 327 |
func (it *OmnichannelSettingIterator) PageInfo() *iterator.PageInfo { |
| 328 |
return it.pageInfo |
| 329 |
} |
| 330 |
|
| 331 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 332 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 333 |
func (it *OmnichannelSettingIterator) Next() (*accountspb.OmnichannelSetting, error) { |
| 334 |
var item *accountspb.OmnichannelSetting |
| 335 |
if err := it.nextFunc(); err != nil { |
| 336 |
return item, err |
| 337 |
} |
| 338 |
item = it.items[0] |
| 339 |
it.items = it.items[1:] |
| 340 |
return item, nil |
| 341 |
} |
| 342 |
|
| 343 |
func (it *OmnichannelSettingIterator) bufLen() int { |
| 344 |
return len(it.items) |
| 345 |
} |
| 346 |
|
| 347 |
func (it *OmnichannelSettingIterator) takeBuf() interface{} { |
| 348 |
b := it.items |
| 349 |
it.items = nil |
| 350 |
return b |
| 351 |
} |
| 352 |
|
| 353 |
// OnlineReturnPolicyIterator manages a stream of *accountspb.OnlineReturnPolicy. |
| 354 |
type OnlineReturnPolicyIterator struct { |
| 355 |
items []*accountspb.OnlineReturnPolicy |
| 356 |
pageInfo *iterator.PageInfo |
| 357 |
nextFunc func() error |
| 358 |
|
| 359 |
// Response is the raw response for the current page. |
| 360 |
// It must be cast to the RPC response type. |
| 361 |
// Calling Next() or InternalFetch() updates this value. |
| 362 |
Response interface{} |
| 363 |
|
| 364 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 365 |
// It is not part of the stable interface of this package. |
| 366 |
// |
| 367 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 368 |
// The number of results is no greater than pageSize. |
| 369 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 370 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.OnlineReturnPolicy, nextPageToken string, err error) |
| 371 |
} |
| 372 |
|
| 373 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 374 |
func (it *OnlineReturnPolicyIterator) PageInfo() *iterator.PageInfo { |
| 375 |
return it.pageInfo |
| 376 |
} |
| 377 |
|
| 378 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 379 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 380 |
func (it *OnlineReturnPolicyIterator) Next() (*accountspb.OnlineReturnPolicy, error) { |
| 381 |
var item *accountspb.OnlineReturnPolicy |
| 382 |
if err := it.nextFunc(); err != nil { |
| 383 |
return item, err |
| 384 |
} |
| 385 |
item = it.items[0] |
| 386 |
it.items = it.items[1:] |
| 387 |
return item, nil |
| 388 |
} |
| 389 |
|
| 390 |
func (it *OnlineReturnPolicyIterator) bufLen() int { |
| 391 |
return len(it.items) |
| 392 |
} |
| 393 |
|
| 394 |
func (it *OnlineReturnPolicyIterator) takeBuf() interface{} { |
| 395 |
b := it.items |
| 396 |
it.items = nil |
| 397 |
return b |
| 398 |
} |
| 399 |
|
| 400 |
// ProgramIterator manages a stream of *accountspb.Program. |
| 401 |
type ProgramIterator struct { |
| 402 |
items []*accountspb.Program |
| 403 |
pageInfo *iterator.PageInfo |
| 404 |
nextFunc func() error |
| 405 |
|
| 406 |
// Response is the raw response for the current page. |
| 407 |
// It must be cast to the RPC response type. |
| 408 |
// Calling Next() or InternalFetch() updates this value. |
| 409 |
Response interface{} |
| 410 |
|
| 411 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 412 |
// It is not part of the stable interface of this package. |
| 413 |
// |
| 414 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 415 |
// The number of results is no greater than pageSize. |
| 416 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 417 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.Program, nextPageToken string, err error) |
| 418 |
} |
| 419 |
|
| 420 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 421 |
func (it *ProgramIterator) PageInfo() *iterator.PageInfo { |
| 422 |
return it.pageInfo |
| 423 |
} |
| 424 |
|
| 425 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 426 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 427 |
func (it *ProgramIterator) Next() (*accountspb.Program, error) { |
| 428 |
var item *accountspb.Program |
| 429 |
if err := it.nextFunc(); err != nil { |
| 430 |
return item, err |
| 431 |
} |
| 432 |
item = it.items[0] |
| 433 |
it.items = it.items[1:] |
| 434 |
return item, nil |
| 435 |
} |
| 436 |
|
| 437 |
func (it *ProgramIterator) bufLen() int { |
| 438 |
return len(it.items) |
| 439 |
} |
| 440 |
|
| 441 |
func (it *ProgramIterator) takeBuf() interface{} { |
| 442 |
b := it.items |
| 443 |
it.items = nil |
| 444 |
return b |
| 445 |
} |
| 446 |
|
| 447 |
// RegionIterator manages a stream of *accountspb.Region. |
| 448 |
type RegionIterator struct { |
| 449 |
items []*accountspb.Region |
| 450 |
pageInfo *iterator.PageInfo |
| 451 |
nextFunc func() error |
| 452 |
|
| 453 |
// Response is the raw response for the current page. |
| 454 |
// It must be cast to the RPC response type. |
| 455 |
// Calling Next() or InternalFetch() updates this value. |
| 456 |
Response interface{} |
| 457 |
|
| 458 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 459 |
// It is not part of the stable interface of this package. |
| 460 |
// |
| 461 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 462 |
// The number of results is no greater than pageSize. |
| 463 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 464 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.Region, nextPageToken string, err error) |
| 465 |
} |
| 466 |
|
| 467 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 468 |
func (it *RegionIterator) PageInfo() *iterator.PageInfo { |
| 469 |
return it.pageInfo |
| 470 |
} |
| 471 |
|
| 472 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 473 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 474 |
func (it *RegionIterator) Next() (*accountspb.Region, error) { |
| 475 |
var item *accountspb.Region |
| 476 |
if err := it.nextFunc(); err != nil { |
| 477 |
return item, err |
| 478 |
} |
| 479 |
item = it.items[0] |
| 480 |
it.items = it.items[1:] |
| 481 |
return item, nil |
| 482 |
} |
| 483 |
|
| 484 |
func (it *RegionIterator) bufLen() int { |
| 485 |
return len(it.items) |
| 486 |
} |
| 487 |
|
| 488 |
func (it *RegionIterator) takeBuf() interface{} { |
| 489 |
b := it.items |
| 490 |
it.items = nil |
| 491 |
return b |
| 492 |
} |
| 493 |
|
| 494 |
// UserIterator manages a stream of *accountspb.User. |
| 495 |
type UserIterator struct { |
| 496 |
items []*accountspb.User |
| 497 |
pageInfo *iterator.PageInfo |
| 498 |
nextFunc func() error |
| 499 |
|
| 500 |
// Response is the raw response for the current page. |
| 501 |
// It must be cast to the RPC response type. |
| 502 |
// Calling Next() or InternalFetch() updates this value. |
| 503 |
Response interface{} |
| 504 |
|
| 505 |
// InternalFetch is for use by the Google Cloud Libraries only. |
| 506 |
// It is not part of the stable interface of this package. |
| 507 |
// |
| 508 |
// InternalFetch returns results from a single call to the underlying RPC. |
| 509 |
// The number of results is no greater than pageSize. |
| 510 |
// If there are no more results, nextPageToken is empty and err is nil. |
| 511 |
InternalFetch func(pageSize int, pageToken string) (results []*accountspb.User, nextPageToken string, err error) |
| 512 |
} |
| 513 |
|
| 514 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 515 |
func (it *UserIterator) PageInfo() *iterator.PageInfo { |
| 516 |
return it.pageInfo |
| 517 |
} |
| 518 |
|
| 519 |
// Next returns the next result. Its second return value is iterator.Done if there are no more |
| 520 |
// results. Once Next returns Done, all subsequent calls will return Done. |
| 521 |
func (it *UserIterator) Next() (*accountspb.User, error) { |
| 522 |
var item *accountspb.User |
| 523 |
if err := it.nextFunc(); err != nil { |
| 524 |
return item, err |
| 525 |
} |
| 526 |
item = it.items[0] |
| 527 |
it.items = it.items[1:] |
| 528 |
return item, nil |
| 529 |
} |
| 530 |
|
| 531 |
func (it *UserIterator) bufLen() int { |
| 532 |
return len(it.items) |
| 533 |
} |
| 534 |
|
| 535 |
func (it *UserIterator) takeBuf() interface{} { |
| 536 |
b := it.items |
| 537 |
it.items = nil |
| 538 |
return b |
| 539 |
} |