| 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 recaptchaenterprise |
| 18 |
|
| 19 |
import ( |
| 20 |
recaptchaenterprisepb "cloud.google.com/go/recaptchaenterprise/v2/apiv1/recaptchaenterprisepb" |
| 21 |
"google.golang.org/api/iterator" |
| 22 |
) |
| 23 |
|
| 24 |
// FirewallPolicyIterator manages a stream of *recaptchaenterprisepb.FirewallPolicy. |
| 25 |
type FirewallPolicyIterator struct { |
| 26 |
items []*recaptchaenterprisepb.FirewallPolicy |
| 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 []*recaptchaenterprisepb.FirewallPolicy, nextPageToken string, err error) |
| 42 |
} |
| 43 |
|
| 44 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 45 |
func (it *FirewallPolicyIterator) 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 *FirewallPolicyIterator) Next() (*recaptchaenterprisepb.FirewallPolicy, error) { |
| 52 |
var item *recaptchaenterprisepb.FirewallPolicy |
| 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 *FirewallPolicyIterator) bufLen() int { |
| 62 |
return len(it.items) |
| 63 |
} |
| 64 |
|
| 65 |
func (it *FirewallPolicyIterator) takeBuf() interface{} { |
| 66 |
b := it.items |
| 67 |
it.items = nil |
| 68 |
return b |
| 69 |
} |
| 70 |
|
| 71 |
// IpOverrideDataIterator manages a stream of *recaptchaenterprisepb.IpOverrideData. |
| 72 |
type IpOverrideDataIterator struct { |
| 73 |
items []*recaptchaenterprisepb.IpOverrideData |
| 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 []*recaptchaenterprisepb.IpOverrideData, nextPageToken string, err error) |
| 89 |
} |
| 90 |
|
| 91 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 92 |
func (it *IpOverrideDataIterator) 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 *IpOverrideDataIterator) Next() (*recaptchaenterprisepb.IpOverrideData, error) { |
| 99 |
var item *recaptchaenterprisepb.IpOverrideData |
| 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 *IpOverrideDataIterator) bufLen() int { |
| 109 |
return len(it.items) |
| 110 |
} |
| 111 |
|
| 112 |
func (it *IpOverrideDataIterator) takeBuf() interface{} { |
| 113 |
b := it.items |
| 114 |
it.items = nil |
| 115 |
return b |
| 116 |
} |
| 117 |
|
| 118 |
// KeyIterator manages a stream of *recaptchaenterprisepb.Key. |
| 119 |
type KeyIterator struct { |
| 120 |
items []*recaptchaenterprisepb.Key |
| 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 []*recaptchaenterprisepb.Key, nextPageToken string, err error) |
| 136 |
} |
| 137 |
|
| 138 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 139 |
func (it *KeyIterator) 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 *KeyIterator) Next() (*recaptchaenterprisepb.Key, error) { |
| 146 |
var item *recaptchaenterprisepb.Key |
| 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 *KeyIterator) bufLen() int { |
| 156 |
return len(it.items) |
| 157 |
} |
| 158 |
|
| 159 |
func (it *KeyIterator) takeBuf() interface{} { |
| 160 |
b := it.items |
| 161 |
it.items = nil |
| 162 |
return b |
| 163 |
} |
| 164 |
|
| 165 |
// RelatedAccountGroupIterator manages a stream of *recaptchaenterprisepb.RelatedAccountGroup. |
| 166 |
type RelatedAccountGroupIterator struct { |
| 167 |
items []*recaptchaenterprisepb.RelatedAccountGroup |
| 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 []*recaptchaenterprisepb.RelatedAccountGroup, nextPageToken string, err error) |
| 183 |
} |
| 184 |
|
| 185 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 186 |
func (it *RelatedAccountGroupIterator) 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 *RelatedAccountGroupIterator) Next() (*recaptchaenterprisepb.RelatedAccountGroup, error) { |
| 193 |
var item *recaptchaenterprisepb.RelatedAccountGroup |
| 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 *RelatedAccountGroupIterator) bufLen() int { |
| 203 |
return len(it.items) |
| 204 |
} |
| 205 |
|
| 206 |
func (it *RelatedAccountGroupIterator) takeBuf() interface{} { |
| 207 |
b := it.items |
| 208 |
it.items = nil |
| 209 |
return b |
| 210 |
} |
| 211 |
|
| 212 |
// RelatedAccountGroupMembershipIterator manages a stream of *recaptchaenterprisepb.RelatedAccountGroupMembership. |
| 213 |
type RelatedAccountGroupMembershipIterator struct { |
| 214 |
items []*recaptchaenterprisepb.RelatedAccountGroupMembership |
| 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 []*recaptchaenterprisepb.RelatedAccountGroupMembership, nextPageToken string, err error) |
| 230 |
} |
| 231 |
|
| 232 |
// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. |
| 233 |
func (it *RelatedAccountGroupMembershipIterator) 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 *RelatedAccountGroupMembershipIterator) Next() (*recaptchaenterprisepb.RelatedAccountGroupMembership, error) { |
| 240 |
var item *recaptchaenterprisepb.RelatedAccountGroupMembership |
| 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 *RelatedAccountGroupMembershipIterator) bufLen() int { |
| 250 |
return len(it.items) |
| 251 |
} |
| 252 |
|
| 253 |
func (it *RelatedAccountGroupMembershipIterator) takeBuf() interface{} { |
| 254 |
b := it.items |
| 255 |
it.items = nil |
| 256 |
return b |
| 257 |
} |