| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package oracledatabase |
| 18 |
|
| 19 |
import ( |
| 20 |
"context" |
| 21 |
"time" |
| 22 |
|
| 23 |
"cloud.google.com/go/longrunning" |
| 24 |
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" |
| 25 |
oracledatabasepb "cloud.google.com/go/oracledatabase/apiv1/oracledatabasepb" |
| 26 |
gax "github.com/googleapis/gax-go/v2" |
| 27 |
"google.golang.org/api/iterator" |
| 28 |
locationpb "google.golang.org/genproto/googleapis/cloud/location" |
| 29 |
) |
| 30 |
|
| 31 |
|
| 32 |
type CreateAutonomousDatabaseOperation struct { |
| 33 |
lro *longrunning.Operation |
| 34 |
pollPath string |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
func (op *CreateAutonomousDatabaseOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.AutonomousDatabase, error) { |
| 41 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 42 |
var resp oracledatabasepb.AutonomousDatabase |
| 43 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 44 |
return nil, err |
| 45 |
} |
| 46 |
return &resp, nil |
| 47 |
} |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
func (op *CreateAutonomousDatabaseOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.AutonomousDatabase, error) { |
| 59 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 60 |
var resp oracledatabasepb.AutonomousDatabase |
| 61 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 62 |
return nil, err |
| 63 |
} |
| 64 |
if !op.Done() { |
| 65 |
return nil, nil |
| 66 |
} |
| 67 |
return &resp, nil |
| 68 |
} |
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
func (op *CreateAutonomousDatabaseOperation) Metadata() (*oracledatabasepb.OperationMetadata, error) { |
| 75 |
var meta oracledatabasepb.OperationMetadata |
| 76 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 77 |
return nil, nil |
| 78 |
} else if err != nil { |
| 79 |
return nil, err |
| 80 |
} |
| 81 |
return &meta, nil |
| 82 |
} |
| 83 |
|
| 84 |
|
| 85 |
func (op *CreateAutonomousDatabaseOperation) Done() bool { |
| 86 |
return op.lro.Done() |
| 87 |
} |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
func (op *CreateAutonomousDatabaseOperation) Name() string { |
| 92 |
return op.lro.Name() |
| 93 |
} |
| 94 |
|
| 95 |
|
| 96 |
type CreateCloudExadataInfrastructureOperation struct { |
| 97 |
lro *longrunning.Operation |
| 98 |
pollPath string |
| 99 |
} |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
func (op *CreateCloudExadataInfrastructureOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.CloudExadataInfrastructure, error) { |
| 105 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 106 |
var resp oracledatabasepb.CloudExadataInfrastructure |
| 107 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 108 |
return nil, err |
| 109 |
} |
| 110 |
return &resp, nil |
| 111 |
} |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
func (op *CreateCloudExadataInfrastructureOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.CloudExadataInfrastructure, error) { |
| 123 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 124 |
var resp oracledatabasepb.CloudExadataInfrastructure |
| 125 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 126 |
return nil, err |
| 127 |
} |
| 128 |
if !op.Done() { |
| 129 |
return nil, nil |
| 130 |
} |
| 131 |
return &resp, nil |
| 132 |
} |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
func (op *CreateCloudExadataInfrastructureOperation) Metadata() (*oracledatabasepb.OperationMetadata, error) { |
| 139 |
var meta oracledatabasepb.OperationMetadata |
| 140 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 141 |
return nil, nil |
| 142 |
} else if err != nil { |
| 143 |
return nil, err |
| 144 |
} |
| 145 |
return &meta, nil |
| 146 |
} |
| 147 |
|
| 148 |
|
| 149 |
func (op *CreateCloudExadataInfrastructureOperation) Done() bool { |
| 150 |
return op.lro.Done() |
| 151 |
} |
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
func (op *CreateCloudExadataInfrastructureOperation) Name() string { |
| 156 |
return op.lro.Name() |
| 157 |
} |
| 158 |
|
| 159 |
|
| 160 |
type CreateCloudVmClusterOperation struct { |
| 161 |
lro *longrunning.Operation |
| 162 |
pollPath string |
| 163 |
} |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
func (op *CreateCloudVmClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.CloudVmCluster, error) { |
| 169 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 170 |
var resp oracledatabasepb.CloudVmCluster |
| 171 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 172 |
return nil, err |
| 173 |
} |
| 174 |
return &resp, nil |
| 175 |
} |
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
func (op *CreateCloudVmClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.CloudVmCluster, error) { |
| 187 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 188 |
var resp oracledatabasepb.CloudVmCluster |
| 189 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 190 |
return nil, err |
| 191 |
} |
| 192 |
if !op.Done() { |
| 193 |
return nil, nil |
| 194 |
} |
| 195 |
return &resp, nil |
| 196 |
} |
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
func (op *CreateCloudVmClusterOperation) Metadata() (*oracledatabasepb.OperationMetadata, error) { |
| 203 |
var meta oracledatabasepb.OperationMetadata |
| 204 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 205 |
return nil, nil |
| 206 |
} else if err != nil { |
| 207 |
return nil, err |
| 208 |
} |
| 209 |
return &meta, nil |
| 210 |
} |
| 211 |
|
| 212 |
|
| 213 |
func (op *CreateCloudVmClusterOperation) Done() bool { |
| 214 |
return op.lro.Done() |
| 215 |
} |
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
func (op *CreateCloudVmClusterOperation) Name() string { |
| 220 |
return op.lro.Name() |
| 221 |
} |
| 222 |
|
| 223 |
|
| 224 |
type DeleteAutonomousDatabaseOperation struct { |
| 225 |
lro *longrunning.Operation |
| 226 |
pollPath string |
| 227 |
} |
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
func (op *DeleteAutonomousDatabaseOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { |
| 233 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 234 |
return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) |
| 235 |
} |
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
func (op *DeleteAutonomousDatabaseOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { |
| 247 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 248 |
return op.lro.Poll(ctx, nil, opts...) |
| 249 |
} |
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
func (op *DeleteAutonomousDatabaseOperation) Metadata() (*oracledatabasepb.OperationMetadata, error) { |
| 256 |
var meta oracledatabasepb.OperationMetadata |
| 257 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 258 |
return nil, nil |
| 259 |
} else if err != nil { |
| 260 |
return nil, err |
| 261 |
} |
| 262 |
return &meta, nil |
| 263 |
} |
| 264 |
|
| 265 |
|
| 266 |
func (op *DeleteAutonomousDatabaseOperation) Done() bool { |
| 267 |
return op.lro.Done() |
| 268 |
} |
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
func (op *DeleteAutonomousDatabaseOperation) Name() string { |
| 273 |
return op.lro.Name() |
| 274 |
} |
| 275 |
|
| 276 |
|
| 277 |
type DeleteCloudExadataInfrastructureOperation struct { |
| 278 |
lro *longrunning.Operation |
| 279 |
pollPath string |
| 280 |
} |
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
func (op *DeleteCloudExadataInfrastructureOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { |
| 286 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 287 |
return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) |
| 288 |
} |
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
func (op *DeleteCloudExadataInfrastructureOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { |
| 300 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 301 |
return op.lro.Poll(ctx, nil, opts...) |
| 302 |
} |
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
func (op *DeleteCloudExadataInfrastructureOperation) Metadata() (*oracledatabasepb.OperationMetadata, error) { |
| 309 |
var meta oracledatabasepb.OperationMetadata |
| 310 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 311 |
return nil, nil |
| 312 |
} else if err != nil { |
| 313 |
return nil, err |
| 314 |
} |
| 315 |
return &meta, nil |
| 316 |
} |
| 317 |
|
| 318 |
|
| 319 |
func (op *DeleteCloudExadataInfrastructureOperation) Done() bool { |
| 320 |
return op.lro.Done() |
| 321 |
} |
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
func (op *DeleteCloudExadataInfrastructureOperation) Name() string { |
| 326 |
return op.lro.Name() |
| 327 |
} |
| 328 |
|
| 329 |
|
| 330 |
type DeleteCloudVmClusterOperation struct { |
| 331 |
lro *longrunning.Operation |
| 332 |
pollPath string |
| 333 |
} |
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
func (op *DeleteCloudVmClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { |
| 339 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 340 |
return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) |
| 341 |
} |
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
func (op *DeleteCloudVmClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { |
| 353 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 354 |
return op.lro.Poll(ctx, nil, opts...) |
| 355 |
} |
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
func (op *DeleteCloudVmClusterOperation) Metadata() (*oracledatabasepb.OperationMetadata, error) { |
| 362 |
var meta oracledatabasepb.OperationMetadata |
| 363 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 364 |
return nil, nil |
| 365 |
} else if err != nil { |
| 366 |
return nil, err |
| 367 |
} |
| 368 |
return &meta, nil |
| 369 |
} |
| 370 |
|
| 371 |
|
| 372 |
func (op *DeleteCloudVmClusterOperation) Done() bool { |
| 373 |
return op.lro.Done() |
| 374 |
} |
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
func (op *DeleteCloudVmClusterOperation) Name() string { |
| 379 |
return op.lro.Name() |
| 380 |
} |
| 381 |
|
| 382 |
|
| 383 |
type RestartAutonomousDatabaseOperation struct { |
| 384 |
lro *longrunning.Operation |
| 385 |
pollPath string |
| 386 |
} |
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
func (op *RestartAutonomousDatabaseOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.AutonomousDatabase, error) { |
| 392 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 393 |
var resp oracledatabasepb.AutonomousDatabase |
| 394 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 395 |
return nil, err |
| 396 |
} |
| 397 |
return &resp, nil |
| 398 |
} |
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
func (op *RestartAutonomousDatabaseOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.AutonomousDatabase, error) { |
| 410 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 411 |
var resp oracledatabasepb.AutonomousDatabase |
| 412 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 413 |
return nil, err |
| 414 |
} |
| 415 |
if !op.Done() { |
| 416 |
return nil, nil |
| 417 |
} |
| 418 |
return &resp, nil |
| 419 |
} |
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
func (op *RestartAutonomousDatabaseOperation) Metadata() (*oracledatabasepb.OperationMetadata, error) { |
| 426 |
var meta oracledatabasepb.OperationMetadata |
| 427 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 428 |
return nil, nil |
| 429 |
} else if err != nil { |
| 430 |
return nil, err |
| 431 |
} |
| 432 |
return &meta, nil |
| 433 |
} |
| 434 |
|
| 435 |
|
| 436 |
func (op *RestartAutonomousDatabaseOperation) Done() bool { |
| 437 |
return op.lro.Done() |
| 438 |
} |
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
func (op *RestartAutonomousDatabaseOperation) Name() string { |
| 443 |
return op.lro.Name() |
| 444 |
} |
| 445 |
|
| 446 |
|
| 447 |
type RestoreAutonomousDatabaseOperation struct { |
| 448 |
lro *longrunning.Operation |
| 449 |
pollPath string |
| 450 |
} |
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
func (op *RestoreAutonomousDatabaseOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.AutonomousDatabase, error) { |
| 456 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 457 |
var resp oracledatabasepb.AutonomousDatabase |
| 458 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 459 |
return nil, err |
| 460 |
} |
| 461 |
return &resp, nil |
| 462 |
} |
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
func (op *RestoreAutonomousDatabaseOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.AutonomousDatabase, error) { |
| 474 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 475 |
var resp oracledatabasepb.AutonomousDatabase |
| 476 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 477 |
return nil, err |
| 478 |
} |
| 479 |
if !op.Done() { |
| 480 |
return nil, nil |
| 481 |
} |
| 482 |
return &resp, nil |
| 483 |
} |
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
func (op *RestoreAutonomousDatabaseOperation) Metadata() (*oracledatabasepb.OperationMetadata, error) { |
| 490 |
var meta oracledatabasepb.OperationMetadata |
| 491 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 492 |
return nil, nil |
| 493 |
} else if err != nil { |
| 494 |
return nil, err |
| 495 |
} |
| 496 |
return &meta, nil |
| 497 |
} |
| 498 |
|
| 499 |
|
| 500 |
func (op *RestoreAutonomousDatabaseOperation) Done() bool { |
| 501 |
return op.lro.Done() |
| 502 |
} |
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
func (op *RestoreAutonomousDatabaseOperation) Name() string { |
| 507 |
return op.lro.Name() |
| 508 |
} |
| 509 |
|
| 510 |
|
| 511 |
type StartAutonomousDatabaseOperation struct { |
| 512 |
lro *longrunning.Operation |
| 513 |
pollPath string |
| 514 |
} |
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
func (op *StartAutonomousDatabaseOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.AutonomousDatabase, error) { |
| 520 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 521 |
var resp oracledatabasepb.AutonomousDatabase |
| 522 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 523 |
return nil, err |
| 524 |
} |
| 525 |
return &resp, nil |
| 526 |
} |
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
func (op *StartAutonomousDatabaseOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.AutonomousDatabase, error) { |
| 538 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 539 |
var resp oracledatabasepb.AutonomousDatabase |
| 540 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 541 |
return nil, err |
| 542 |
} |
| 543 |
if !op.Done() { |
| 544 |
return nil, nil |
| 545 |
} |
| 546 |
return &resp, nil |
| 547 |
} |
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
func (op *StartAutonomousDatabaseOperation) Metadata() (*oracledatabasepb.OperationMetadata, error) { |
| 554 |
var meta oracledatabasepb.OperationMetadata |
| 555 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 556 |
return nil, nil |
| 557 |
} else if err != nil { |
| 558 |
return nil, err |
| 559 |
} |
| 560 |
return &meta, nil |
| 561 |
} |
| 562 |
|
| 563 |
|
| 564 |
func (op *StartAutonomousDatabaseOperation) Done() bool { |
| 565 |
return op.lro.Done() |
| 566 |
} |
| 567 |
|
| 568 |
|
| 569 |
|
| 570 |
func (op *StartAutonomousDatabaseOperation) Name() string { |
| 571 |
return op.lro.Name() |
| 572 |
} |
| 573 |
|
| 574 |
|
| 575 |
type StopAutonomousDatabaseOperation struct { |
| 576 |
lro *longrunning.Operation |
| 577 |
pollPath string |
| 578 |
} |
| 579 |
|
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
func (op *StopAutonomousDatabaseOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.AutonomousDatabase, error) { |
| 584 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 585 |
var resp oracledatabasepb.AutonomousDatabase |
| 586 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 587 |
return nil, err |
| 588 |
} |
| 589 |
return &resp, nil |
| 590 |
} |
| 591 |
|
| 592 |
|
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
|
| 599 |
|
| 600 |
|
| 601 |
func (op *StopAutonomousDatabaseOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*oracledatabasepb.AutonomousDatabase, error) { |
| 602 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 603 |
var resp oracledatabasepb.AutonomousDatabase |
| 604 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 605 |
return nil, err |
| 606 |
} |
| 607 |
if !op.Done() { |
| 608 |
return nil, nil |
| 609 |
} |
| 610 |
return &resp, nil |
| 611 |
} |
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
func (op *StopAutonomousDatabaseOperation) Metadata() (*oracledatabasepb.OperationMetadata, error) { |
| 618 |
var meta oracledatabasepb.OperationMetadata |
| 619 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 620 |
return nil, nil |
| 621 |
} else if err != nil { |
| 622 |
return nil, err |
| 623 |
} |
| 624 |
return &meta, nil |
| 625 |
} |
| 626 |
|
| 627 |
|
| 628 |
func (op *StopAutonomousDatabaseOperation) Done() bool { |
| 629 |
return op.lro.Done() |
| 630 |
} |
| 631 |
|
| 632 |
|
| 633 |
|
| 634 |
func (op *StopAutonomousDatabaseOperation) Name() string { |
| 635 |
return op.lro.Name() |
| 636 |
} |
| 637 |
|
| 638 |
|
| 639 |
type AutonomousDatabaseBackupIterator struct { |
| 640 |
items []*oracledatabasepb.AutonomousDatabaseBackup |
| 641 |
pageInfo *iterator.PageInfo |
| 642 |
nextFunc func() error |
| 643 |
|
| 644 |
|
| 645 |
|
| 646 |
|
| 647 |
Response interface{} |
| 648 |
|
| 649 |
|
| 650 |
|
| 651 |
|
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.AutonomousDatabaseBackup, nextPageToken string, err error) |
| 656 |
} |
| 657 |
|
| 658 |
|
| 659 |
func (it *AutonomousDatabaseBackupIterator) PageInfo() *iterator.PageInfo { |
| 660 |
return it.pageInfo |
| 661 |
} |
| 662 |
|
| 663 |
|
| 664 |
|
| 665 |
func (it *AutonomousDatabaseBackupIterator) Next() (*oracledatabasepb.AutonomousDatabaseBackup, error) { |
| 666 |
var item *oracledatabasepb.AutonomousDatabaseBackup |
| 667 |
if err := it.nextFunc(); err != nil { |
| 668 |
return item, err |
| 669 |
} |
| 670 |
item = it.items[0] |
| 671 |
it.items = it.items[1:] |
| 672 |
return item, nil |
| 673 |
} |
| 674 |
|
| 675 |
func (it *AutonomousDatabaseBackupIterator) bufLen() int { |
| 676 |
return len(it.items) |
| 677 |
} |
| 678 |
|
| 679 |
func (it *AutonomousDatabaseBackupIterator) takeBuf() interface{} { |
| 680 |
b := it.items |
| 681 |
it.items = nil |
| 682 |
return b |
| 683 |
} |
| 684 |
|
| 685 |
|
| 686 |
type AutonomousDatabaseCharacterSetIterator struct { |
| 687 |
items []*oracledatabasepb.AutonomousDatabaseCharacterSet |
| 688 |
pageInfo *iterator.PageInfo |
| 689 |
nextFunc func() error |
| 690 |
|
| 691 |
|
| 692 |
|
| 693 |
|
| 694 |
Response interface{} |
| 695 |
|
| 696 |
|
| 697 |
|
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.AutonomousDatabaseCharacterSet, nextPageToken string, err error) |
| 703 |
} |
| 704 |
|
| 705 |
|
| 706 |
func (it *AutonomousDatabaseCharacterSetIterator) PageInfo() *iterator.PageInfo { |
| 707 |
return it.pageInfo |
| 708 |
} |
| 709 |
|
| 710 |
|
| 711 |
|
| 712 |
func (it *AutonomousDatabaseCharacterSetIterator) Next() (*oracledatabasepb.AutonomousDatabaseCharacterSet, error) { |
| 713 |
var item *oracledatabasepb.AutonomousDatabaseCharacterSet |
| 714 |
if err := it.nextFunc(); err != nil { |
| 715 |
return item, err |
| 716 |
} |
| 717 |
item = it.items[0] |
| 718 |
it.items = it.items[1:] |
| 719 |
return item, nil |
| 720 |
} |
| 721 |
|
| 722 |
func (it *AutonomousDatabaseCharacterSetIterator) bufLen() int { |
| 723 |
return len(it.items) |
| 724 |
} |
| 725 |
|
| 726 |
func (it *AutonomousDatabaseCharacterSetIterator) takeBuf() interface{} { |
| 727 |
b := it.items |
| 728 |
it.items = nil |
| 729 |
return b |
| 730 |
} |
| 731 |
|
| 732 |
|
| 733 |
type AutonomousDatabaseIterator struct { |
| 734 |
items []*oracledatabasepb.AutonomousDatabase |
| 735 |
pageInfo *iterator.PageInfo |
| 736 |
nextFunc func() error |
| 737 |
|
| 738 |
|
| 739 |
|
| 740 |
|
| 741 |
Response interface{} |
| 742 |
|
| 743 |
|
| 744 |
|
| 745 |
|
| 746 |
|
| 747 |
|
| 748 |
|
| 749 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.AutonomousDatabase, nextPageToken string, err error) |
| 750 |
} |
| 751 |
|
| 752 |
|
| 753 |
func (it *AutonomousDatabaseIterator) PageInfo() *iterator.PageInfo { |
| 754 |
return it.pageInfo |
| 755 |
} |
| 756 |
|
| 757 |
|
| 758 |
|
| 759 |
func (it *AutonomousDatabaseIterator) Next() (*oracledatabasepb.AutonomousDatabase, error) { |
| 760 |
var item *oracledatabasepb.AutonomousDatabase |
| 761 |
if err := it.nextFunc(); err != nil { |
| 762 |
return item, err |
| 763 |
} |
| 764 |
item = it.items[0] |
| 765 |
it.items = it.items[1:] |
| 766 |
return item, nil |
| 767 |
} |
| 768 |
|
| 769 |
func (it *AutonomousDatabaseIterator) bufLen() int { |
| 770 |
return len(it.items) |
| 771 |
} |
| 772 |
|
| 773 |
func (it *AutonomousDatabaseIterator) takeBuf() interface{} { |
| 774 |
b := it.items |
| 775 |
it.items = nil |
| 776 |
return b |
| 777 |
} |
| 778 |
|
| 779 |
|
| 780 |
type AutonomousDbVersionIterator struct { |
| 781 |
items []*oracledatabasepb.AutonomousDbVersion |
| 782 |
pageInfo *iterator.PageInfo |
| 783 |
nextFunc func() error |
| 784 |
|
| 785 |
|
| 786 |
|
| 787 |
|
| 788 |
Response interface{} |
| 789 |
|
| 790 |
|
| 791 |
|
| 792 |
|
| 793 |
|
| 794 |
|
| 795 |
|
| 796 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.AutonomousDbVersion, nextPageToken string, err error) |
| 797 |
} |
| 798 |
|
| 799 |
|
| 800 |
func (it *AutonomousDbVersionIterator) PageInfo() *iterator.PageInfo { |
| 801 |
return it.pageInfo |
| 802 |
} |
| 803 |
|
| 804 |
|
| 805 |
|
| 806 |
func (it *AutonomousDbVersionIterator) Next() (*oracledatabasepb.AutonomousDbVersion, error) { |
| 807 |
var item *oracledatabasepb.AutonomousDbVersion |
| 808 |
if err := it.nextFunc(); err != nil { |
| 809 |
return item, err |
| 810 |
} |
| 811 |
item = it.items[0] |
| 812 |
it.items = it.items[1:] |
| 813 |
return item, nil |
| 814 |
} |
| 815 |
|
| 816 |
func (it *AutonomousDbVersionIterator) bufLen() int { |
| 817 |
return len(it.items) |
| 818 |
} |
| 819 |
|
| 820 |
func (it *AutonomousDbVersionIterator) takeBuf() interface{} { |
| 821 |
b := it.items |
| 822 |
it.items = nil |
| 823 |
return b |
| 824 |
} |
| 825 |
|
| 826 |
|
| 827 |
type CloudExadataInfrastructureIterator struct { |
| 828 |
items []*oracledatabasepb.CloudExadataInfrastructure |
| 829 |
pageInfo *iterator.PageInfo |
| 830 |
nextFunc func() error |
| 831 |
|
| 832 |
|
| 833 |
|
| 834 |
|
| 835 |
Response interface{} |
| 836 |
|
| 837 |
|
| 838 |
|
| 839 |
|
| 840 |
|
| 841 |
|
| 842 |
|
| 843 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.CloudExadataInfrastructure, nextPageToken string, err error) |
| 844 |
} |
| 845 |
|
| 846 |
|
| 847 |
func (it *CloudExadataInfrastructureIterator) PageInfo() *iterator.PageInfo { |
| 848 |
return it.pageInfo |
| 849 |
} |
| 850 |
|
| 851 |
|
| 852 |
|
| 853 |
func (it *CloudExadataInfrastructureIterator) Next() (*oracledatabasepb.CloudExadataInfrastructure, error) { |
| 854 |
var item *oracledatabasepb.CloudExadataInfrastructure |
| 855 |
if err := it.nextFunc(); err != nil { |
| 856 |
return item, err |
| 857 |
} |
| 858 |
item = it.items[0] |
| 859 |
it.items = it.items[1:] |
| 860 |
return item, nil |
| 861 |
} |
| 862 |
|
| 863 |
func (it *CloudExadataInfrastructureIterator) bufLen() int { |
| 864 |
return len(it.items) |
| 865 |
} |
| 866 |
|
| 867 |
func (it *CloudExadataInfrastructureIterator) takeBuf() interface{} { |
| 868 |
b := it.items |
| 869 |
it.items = nil |
| 870 |
return b |
| 871 |
} |
| 872 |
|
| 873 |
|
| 874 |
type CloudVmClusterIterator struct { |
| 875 |
items []*oracledatabasepb.CloudVmCluster |
| 876 |
pageInfo *iterator.PageInfo |
| 877 |
nextFunc func() error |
| 878 |
|
| 879 |
|
| 880 |
|
| 881 |
|
| 882 |
Response interface{} |
| 883 |
|
| 884 |
|
| 885 |
|
| 886 |
|
| 887 |
|
| 888 |
|
| 889 |
|
| 890 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.CloudVmCluster, nextPageToken string, err error) |
| 891 |
} |
| 892 |
|
| 893 |
|
| 894 |
func (it *CloudVmClusterIterator) PageInfo() *iterator.PageInfo { |
| 895 |
return it.pageInfo |
| 896 |
} |
| 897 |
|
| 898 |
|
| 899 |
|
| 900 |
func (it *CloudVmClusterIterator) Next() (*oracledatabasepb.CloudVmCluster, error) { |
| 901 |
var item *oracledatabasepb.CloudVmCluster |
| 902 |
if err := it.nextFunc(); err != nil { |
| 903 |
return item, err |
| 904 |
} |
| 905 |
item = it.items[0] |
| 906 |
it.items = it.items[1:] |
| 907 |
return item, nil |
| 908 |
} |
| 909 |
|
| 910 |
func (it *CloudVmClusterIterator) bufLen() int { |
| 911 |
return len(it.items) |
| 912 |
} |
| 913 |
|
| 914 |
func (it *CloudVmClusterIterator) takeBuf() interface{} { |
| 915 |
b := it.items |
| 916 |
it.items = nil |
| 917 |
return b |
| 918 |
} |
| 919 |
|
| 920 |
|
| 921 |
type DbNodeIterator struct { |
| 922 |
items []*oracledatabasepb.DbNode |
| 923 |
pageInfo *iterator.PageInfo |
| 924 |
nextFunc func() error |
| 925 |
|
| 926 |
|
| 927 |
|
| 928 |
|
| 929 |
Response interface{} |
| 930 |
|
| 931 |
|
| 932 |
|
| 933 |
|
| 934 |
|
| 935 |
|
| 936 |
|
| 937 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.DbNode, nextPageToken string, err error) |
| 938 |
} |
| 939 |
|
| 940 |
|
| 941 |
func (it *DbNodeIterator) PageInfo() *iterator.PageInfo { |
| 942 |
return it.pageInfo |
| 943 |
} |
| 944 |
|
| 945 |
|
| 946 |
|
| 947 |
func (it *DbNodeIterator) Next() (*oracledatabasepb.DbNode, error) { |
| 948 |
var item *oracledatabasepb.DbNode |
| 949 |
if err := it.nextFunc(); err != nil { |
| 950 |
return item, err |
| 951 |
} |
| 952 |
item = it.items[0] |
| 953 |
it.items = it.items[1:] |
| 954 |
return item, nil |
| 955 |
} |
| 956 |
|
| 957 |
func (it *DbNodeIterator) bufLen() int { |
| 958 |
return len(it.items) |
| 959 |
} |
| 960 |
|
| 961 |
func (it *DbNodeIterator) takeBuf() interface{} { |
| 962 |
b := it.items |
| 963 |
it.items = nil |
| 964 |
return b |
| 965 |
} |
| 966 |
|
| 967 |
|
| 968 |
type DbServerIterator struct { |
| 969 |
items []*oracledatabasepb.DbServer |
| 970 |
pageInfo *iterator.PageInfo |
| 971 |
nextFunc func() error |
| 972 |
|
| 973 |
|
| 974 |
|
| 975 |
|
| 976 |
Response interface{} |
| 977 |
|
| 978 |
|
| 979 |
|
| 980 |
|
| 981 |
|
| 982 |
|
| 983 |
|
| 984 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.DbServer, nextPageToken string, err error) |
| 985 |
} |
| 986 |
|
| 987 |
|
| 988 |
func (it *DbServerIterator) PageInfo() *iterator.PageInfo { |
| 989 |
return it.pageInfo |
| 990 |
} |
| 991 |
|
| 992 |
|
| 993 |
|
| 994 |
func (it *DbServerIterator) Next() (*oracledatabasepb.DbServer, error) { |
| 995 |
var item *oracledatabasepb.DbServer |
| 996 |
if err := it.nextFunc(); err != nil { |
| 997 |
return item, err |
| 998 |
} |
| 999 |
item = it.items[0] |
| 1000 |
it.items = it.items[1:] |
| 1001 |
return item, nil |
| 1002 |
} |
| 1003 |
|
| 1004 |
func (it *DbServerIterator) bufLen() int { |
| 1005 |
return len(it.items) |
| 1006 |
} |
| 1007 |
|
| 1008 |
func (it *DbServerIterator) takeBuf() interface{} { |
| 1009 |
b := it.items |
| 1010 |
it.items = nil |
| 1011 |
return b |
| 1012 |
} |
| 1013 |
|
| 1014 |
|
| 1015 |
type DbSystemShapeIterator struct { |
| 1016 |
items []*oracledatabasepb.DbSystemShape |
| 1017 |
pageInfo *iterator.PageInfo |
| 1018 |
nextFunc func() error |
| 1019 |
|
| 1020 |
|
| 1021 |
|
| 1022 |
|
| 1023 |
Response interface{} |
| 1024 |
|
| 1025 |
|
| 1026 |
|
| 1027 |
|
| 1028 |
|
| 1029 |
|
| 1030 |
|
| 1031 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.DbSystemShape, nextPageToken string, err error) |
| 1032 |
} |
| 1033 |
|
| 1034 |
|
| 1035 |
func (it *DbSystemShapeIterator) PageInfo() *iterator.PageInfo { |
| 1036 |
return it.pageInfo |
| 1037 |
} |
| 1038 |
|
| 1039 |
|
| 1040 |
|
| 1041 |
func (it *DbSystemShapeIterator) Next() (*oracledatabasepb.DbSystemShape, error) { |
| 1042 |
var item *oracledatabasepb.DbSystemShape |
| 1043 |
if err := it.nextFunc(); err != nil { |
| 1044 |
return item, err |
| 1045 |
} |
| 1046 |
item = it.items[0] |
| 1047 |
it.items = it.items[1:] |
| 1048 |
return item, nil |
| 1049 |
} |
| 1050 |
|
| 1051 |
func (it *DbSystemShapeIterator) bufLen() int { |
| 1052 |
return len(it.items) |
| 1053 |
} |
| 1054 |
|
| 1055 |
func (it *DbSystemShapeIterator) takeBuf() interface{} { |
| 1056 |
b := it.items |
| 1057 |
it.items = nil |
| 1058 |
return b |
| 1059 |
} |
| 1060 |
|
| 1061 |
|
| 1062 |
type EntitlementIterator struct { |
| 1063 |
items []*oracledatabasepb.Entitlement |
| 1064 |
pageInfo *iterator.PageInfo |
| 1065 |
nextFunc func() error |
| 1066 |
|
| 1067 |
|
| 1068 |
|
| 1069 |
|
| 1070 |
Response interface{} |
| 1071 |
|
| 1072 |
|
| 1073 |
|
| 1074 |
|
| 1075 |
|
| 1076 |
|
| 1077 |
|
| 1078 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.Entitlement, nextPageToken string, err error) |
| 1079 |
} |
| 1080 |
|
| 1081 |
|
| 1082 |
func (it *EntitlementIterator) PageInfo() *iterator.PageInfo { |
| 1083 |
return it.pageInfo |
| 1084 |
} |
| 1085 |
|
| 1086 |
|
| 1087 |
|
| 1088 |
func (it *EntitlementIterator) Next() (*oracledatabasepb.Entitlement, error) { |
| 1089 |
var item *oracledatabasepb.Entitlement |
| 1090 |
if err := it.nextFunc(); err != nil { |
| 1091 |
return item, err |
| 1092 |
} |
| 1093 |
item = it.items[0] |
| 1094 |
it.items = it.items[1:] |
| 1095 |
return item, nil |
| 1096 |
} |
| 1097 |
|
| 1098 |
func (it *EntitlementIterator) bufLen() int { |
| 1099 |
return len(it.items) |
| 1100 |
} |
| 1101 |
|
| 1102 |
func (it *EntitlementIterator) takeBuf() interface{} { |
| 1103 |
b := it.items |
| 1104 |
it.items = nil |
| 1105 |
return b |
| 1106 |
} |
| 1107 |
|
| 1108 |
|
| 1109 |
type GiVersionIterator struct { |
| 1110 |
items []*oracledatabasepb.GiVersion |
| 1111 |
pageInfo *iterator.PageInfo |
| 1112 |
nextFunc func() error |
| 1113 |
|
| 1114 |
|
| 1115 |
|
| 1116 |
|
| 1117 |
Response interface{} |
| 1118 |
|
| 1119 |
|
| 1120 |
|
| 1121 |
|
| 1122 |
|
| 1123 |
|
| 1124 |
|
| 1125 |
InternalFetch func(pageSize int, pageToken string) (results []*oracledatabasepb.GiVersion, nextPageToken string, err error) |
| 1126 |
} |
| 1127 |
|
| 1128 |
|
| 1129 |
func (it *GiVersionIterator) PageInfo() *iterator.PageInfo { |
| 1130 |
return it.pageInfo |
| 1131 |
} |
| 1132 |
|
| 1133 |
|
| 1134 |
|
| 1135 |
func (it *GiVersionIterator) Next() (*oracledatabasepb.GiVersion, error) { |
| 1136 |
var item *oracledatabasepb.GiVersion |
| 1137 |
if err := it.nextFunc(); err != nil { |
| 1138 |
return item, err |
| 1139 |
} |
| 1140 |
item = it.items[0] |
| 1141 |
it.items = it.items[1:] |
| 1142 |
return item, nil |
| 1143 |
} |
| 1144 |
|
| 1145 |
func (it *GiVersionIterator) bufLen() int { |
| 1146 |
return len(it.items) |
| 1147 |
} |
| 1148 |
|
| 1149 |
func (it *GiVersionIterator) takeBuf() interface{} { |
| 1150 |
b := it.items |
| 1151 |
it.items = nil |
| 1152 |
return b |
| 1153 |
} |
| 1154 |
|
| 1155 |
|
| 1156 |
type LocationIterator struct { |
| 1157 |
items []*locationpb.Location |
| 1158 |
pageInfo *iterator.PageInfo |
| 1159 |
nextFunc func() error |
| 1160 |
|
| 1161 |
|
| 1162 |
|
| 1163 |
|
| 1164 |
Response interface{} |
| 1165 |
|
| 1166 |
|
| 1167 |
|
| 1168 |
|
| 1169 |
|
| 1170 |
|
| 1171 |
|
| 1172 |
InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) |
| 1173 |
} |
| 1174 |
|
| 1175 |
|
| 1176 |
func (it *LocationIterator) PageInfo() *iterator.PageInfo { |
| 1177 |
return it.pageInfo |
| 1178 |
} |
| 1179 |
|
| 1180 |
|
| 1181 |
|
| 1182 |
func (it *LocationIterator) Next() (*locationpb.Location, error) { |
| 1183 |
var item *locationpb.Location |
| 1184 |
if err := it.nextFunc(); err != nil { |
| 1185 |
return item, err |
| 1186 |
} |
| 1187 |
item = it.items[0] |
| 1188 |
it.items = it.items[1:] |
| 1189 |
return item, nil |
| 1190 |
} |
| 1191 |
|
| 1192 |
func (it *LocationIterator) bufLen() int { |
| 1193 |
return len(it.items) |
| 1194 |
} |
| 1195 |
|
| 1196 |
func (it *LocationIterator) takeBuf() interface{} { |
| 1197 |
b := it.items |
| 1198 |
it.items = nil |
| 1199 |
return b |
| 1200 |
} |
| 1201 |
|
| 1202 |
|
| 1203 |
type OperationIterator struct { |
| 1204 |
items []*longrunningpb.Operation |
| 1205 |
pageInfo *iterator.PageInfo |
| 1206 |
nextFunc func() error |
| 1207 |
|
| 1208 |
|
| 1209 |
|
| 1210 |
|
| 1211 |
Response interface{} |
| 1212 |
|
| 1213 |
|
| 1214 |
|
| 1215 |
|
| 1216 |
|
| 1217 |
|
| 1218 |
|
| 1219 |
InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) |
| 1220 |
} |
| 1221 |
|
| 1222 |
|
| 1223 |
func (it *OperationIterator) PageInfo() *iterator.PageInfo { |
| 1224 |
return it.pageInfo |
| 1225 |
} |
| 1226 |
|
| 1227 |
|
| 1228 |
|
| 1229 |
func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { |
| 1230 |
var item *longrunningpb.Operation |
| 1231 |
if err := it.nextFunc(); err != nil { |
| 1232 |
return item, err |
| 1233 |
} |
| 1234 |
item = it.items[0] |
| 1235 |
it.items = it.items[1:] |
| 1236 |
return item, nil |
| 1237 |
} |
| 1238 |
|
| 1239 |
func (it *OperationIterator) bufLen() int { |
| 1240 |
return len(it.items) |
| 1241 |
} |
| 1242 |
|
| 1243 |
func (it *OperationIterator) takeBuf() interface{} { |
| 1244 |
b := it.items |
| 1245 |
it.items = nil |
| 1246 |
return b |
| 1247 |
} |