strongdm 4.7.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/svc.rb CHANGED
@@ -2969,6 +2969,7 @@ module SDM #:nodoc:
2969
2969
  # {Athena}
2970
2970
  # {AuroraMysql}
2971
2971
  # {AuroraPostgres}
2972
+ # {AuroraPostgresIAM}
2972
2973
  # {AWS}
2973
2974
  # {AWSConsole}
2974
2975
  # {AWSConsoleStaticKeyPair}
@@ -3021,6 +3022,7 @@ module SDM #:nodoc:
3021
3022
  # {RabbitMQAMQP091}
3022
3023
  # {RawTCP}
3023
3024
  # {RDP}
3025
+ # {RDSPostgresIAM}
3024
3026
  # {Redis}
3025
3027
  # {Redshift}
3026
3028
  # {SingleStore}
@@ -4018,30 +4020,119 @@ module SDM #:nodoc:
4018
4020
  end
4019
4021
  end
4020
4022
 
4021
- # Workflows are the collection of rules that define the resources to which access can be requested,
4022
- # the users that can request that access, and the mechanism for approving those requests which can either
4023
- # but automatic approval or a set of users authorized to approve the requests.
4023
+ # WorkflowApprovers is an account with the ability to approve requests bound to a workflow.
4024
4024
  #
4025
- # See {Workflow}.
4026
- class Workflows
4025
+ # See {WorkflowApprover}.
4026
+ class WorkflowApprovers
4027
4027
  extend Gem::Deprecate
4028
4028
 
4029
4029
  def initialize(channel, parent)
4030
4030
  begin
4031
- @stub = V1::Workflows::Stub.new(nil, nil, channel_override: channel)
4031
+ @stub = V1::WorkflowApprovers::Stub.new(nil, nil, channel_override: channel)
4032
4032
  rescue => exception
4033
4033
  raise Plumbing::convert_error_to_porcelain(exception)
4034
4034
  end
4035
4035
  @parent = parent
4036
4036
  end
4037
4037
 
4038
- # Lists existing workflows.
4038
+ # Create creates a new workflow approver
4039
+ def create(
4040
+ workflow_approver,
4041
+ deadline: nil
4042
+ )
4043
+ req = V1::WorkflowApproversCreateRequest.new()
4044
+
4045
+ req.workflow_approver = Plumbing::convert_workflow_approver_to_plumbing(workflow_approver)
4046
+ tries = 0
4047
+ plumbing_response = nil
4048
+ loop do
4049
+ begin
4050
+ plumbing_response = @stub.create(req, metadata: @parent.get_metadata("WorkflowApprovers.Create", req), deadline: deadline)
4051
+ rescue => exception
4052
+ if (@parent.shouldRetry(tries, exception))
4053
+ tries + +@parent.jitterSleep(tries)
4054
+ next
4055
+ end
4056
+ raise Plumbing::convert_error_to_porcelain(exception)
4057
+ end
4058
+ break
4059
+ end
4060
+
4061
+ resp = WorkflowApproversCreateResponse.new()
4062
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
4063
+ resp.workflow_approver = Plumbing::convert_workflow_approver_to_porcelain(plumbing_response.workflow_approver)
4064
+ resp
4065
+ end
4066
+
4067
+ # Get reads one workflow approver by ID.
4068
+ def get(
4069
+ id,
4070
+ deadline: nil
4071
+ )
4072
+ req = V1::WorkflowApproverGetRequest.new()
4073
+ if not @parent.snapshot_time.nil?
4074
+ req.meta = V1::GetRequestMetadata.new()
4075
+ req.meta.snapshot_at = @parent.snapshot_time
4076
+ end
4077
+
4078
+ req.id = (id)
4079
+ tries = 0
4080
+ plumbing_response = nil
4081
+ loop do
4082
+ begin
4083
+ plumbing_response = @stub.get(req, metadata: @parent.get_metadata("WorkflowApprovers.Get", req), deadline: deadline)
4084
+ rescue => exception
4085
+ if (@parent.shouldRetry(tries, exception))
4086
+ tries + +@parent.jitterSleep(tries)
4087
+ next
4088
+ end
4089
+ raise Plumbing::convert_error_to_porcelain(exception)
4090
+ end
4091
+ break
4092
+ end
4093
+
4094
+ resp = WorkflowApproverGetResponse.new()
4095
+ resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
4096
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
4097
+ resp.workflow_approver = Plumbing::convert_workflow_approver_to_porcelain(plumbing_response.workflow_approver)
4098
+ resp
4099
+ end
4100
+
4101
+ # Delete deletes a workflow approver
4102
+ def delete(
4103
+ id,
4104
+ deadline: nil
4105
+ )
4106
+ req = V1::WorkflowApproversDeleteRequest.new()
4107
+
4108
+ req.id = (id)
4109
+ tries = 0
4110
+ plumbing_response = nil
4111
+ loop do
4112
+ begin
4113
+ plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("WorkflowApprovers.Delete", req), deadline: deadline)
4114
+ rescue => exception
4115
+ if (@parent.shouldRetry(tries, exception))
4116
+ tries + +@parent.jitterSleep(tries)
4117
+ next
4118
+ end
4119
+ raise Plumbing::convert_error_to_porcelain(exception)
4120
+ end
4121
+ break
4122
+ end
4123
+
4124
+ resp = WorkflowApproversDeleteResponse.new()
4125
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
4126
+ resp
4127
+ end
4128
+
4129
+ # Lists existing workflow approvers.
4039
4130
  def list(
4040
4131
  filter,
4041
4132
  *args,
4042
4133
  deadline: nil
4043
4134
  )
4044
- req = V1::WorkflowListRequest.new()
4135
+ req = V1::WorkflowApproversListRequest.new()
4045
4136
  req.meta = V1::ListRequestMetadata.new()
4046
4137
  if @parent.page_limit > 0
4047
4138
  req.meta.limit = @parent.page_limit
@@ -4055,7 +4146,7 @@ module SDM #:nodoc:
4055
4146
  tries = 0
4056
4147
  loop do
4057
4148
  begin
4058
- plumbing_response = @stub.list(req, metadata: @parent.get_metadata("Workflows.List", req), deadline: deadline)
4149
+ plumbing_response = @stub.list(req, metadata: @parent.get_metadata("WorkflowApprovers.List", req), deadline: deadline)
4059
4150
  rescue => exception
4060
4151
  if (@parent.shouldRetry(tries, exception))
4061
4152
  tries + +@parent.jitterSleep(tries)
@@ -4064,8 +4155,8 @@ module SDM #:nodoc:
4064
4155
  raise Plumbing::convert_error_to_porcelain(exception)
4065
4156
  end
4066
4157
  tries = 0
4067
- plumbing_response.workflows.each do |plumbing_item|
4068
- g.yield Plumbing::convert_workflow_to_porcelain(plumbing_item)
4158
+ plumbing_response.workflow_approvers.each do |plumbing_item|
4159
+ g.yield Plumbing::convert_workflow_approver_to_porcelain(plumbing_item)
4069
4160
  end
4070
4161
  break if plumbing_response.meta.next_cursor == ""
4071
4162
  req.meta.cursor = plumbing_response.meta.next_cursor
@@ -4075,22 +4166,33 @@ module SDM #:nodoc:
4075
4166
  end
4076
4167
  end
4077
4168
 
4078
- # SnapshotWorkflows exposes the read only methods of the Workflows
4169
+ # SnapshotWorkflowApprovers exposes the read only methods of the WorkflowApprovers
4079
4170
  # service for historical queries.
4080
- class SnapshotWorkflows
4171
+ class SnapshotWorkflowApprovers
4081
4172
  extend Gem::Deprecate
4082
4173
 
4083
- def initialize(workflows)
4084
- @workflows = workflows
4174
+ def initialize(workflow_approvers)
4175
+ @workflow_approvers = workflow_approvers
4085
4176
  end
4086
4177
 
4087
- # Lists existing workflows.
4178
+ # Get reads one workflow approver by ID.
4179
+ def get(
4180
+ id,
4181
+ deadline: nil
4182
+ )
4183
+ return @workflow_approvers.get(
4184
+ id,
4185
+ deadline: deadline,
4186
+ )
4187
+ end
4188
+
4189
+ # Lists existing workflow approvers.
4088
4190
  def list(
4089
4191
  filter,
4090
4192
  *args,
4091
4193
  deadline: nil
4092
4194
  )
4093
- return @workflows.list(
4195
+ return @workflow_approvers.list(
4094
4196
  filter,
4095
4197
  *args,
4096
4198
  deadline: deadline,
@@ -4153,6 +4255,85 @@ module SDM #:nodoc:
4153
4255
  end
4154
4256
  end
4155
4257
 
4258
+ # WorkflowAssignments links a Resource to a Workflow. The assigned resources are those that a user can request
4259
+ # access to via the workflow.
4260
+ #
4261
+ # See {WorkflowAssignment}.
4262
+ class WorkflowAssignments
4263
+ extend Gem::Deprecate
4264
+
4265
+ def initialize(channel, parent)
4266
+ begin
4267
+ @stub = V1::WorkflowAssignments::Stub.new(nil, nil, channel_override: channel)
4268
+ rescue => exception
4269
+ raise Plumbing::convert_error_to_porcelain(exception)
4270
+ end
4271
+ @parent = parent
4272
+ end
4273
+
4274
+ # Lists existing workflow assignments.
4275
+ def list(
4276
+ filter,
4277
+ *args,
4278
+ deadline: nil
4279
+ )
4280
+ req = V1::WorkflowAssignmentsListRequest.new()
4281
+ req.meta = V1::ListRequestMetadata.new()
4282
+ if @parent.page_limit > 0
4283
+ req.meta.limit = @parent.page_limit
4284
+ end
4285
+ if not @parent.snapshot_time.nil?
4286
+ req.meta.snapshot_at = @parent.snapshot_time
4287
+ end
4288
+
4289
+ req.filter = Plumbing::quote_filter_args(filter, *args)
4290
+ resp = Enumerator::Generator.new { |g|
4291
+ tries = 0
4292
+ loop do
4293
+ begin
4294
+ plumbing_response = @stub.list(req, metadata: @parent.get_metadata("WorkflowAssignments.List", req), deadline: deadline)
4295
+ rescue => exception
4296
+ if (@parent.shouldRetry(tries, exception))
4297
+ tries + +@parent.jitterSleep(tries)
4298
+ next
4299
+ end
4300
+ raise Plumbing::convert_error_to_porcelain(exception)
4301
+ end
4302
+ tries = 0
4303
+ plumbing_response.workflow_assignments.each do |plumbing_item|
4304
+ g.yield Plumbing::convert_workflow_assignment_to_porcelain(plumbing_item)
4305
+ end
4306
+ break if plumbing_response.meta.next_cursor == ""
4307
+ req.meta.cursor = plumbing_response.meta.next_cursor
4308
+ end
4309
+ }
4310
+ resp
4311
+ end
4312
+ end
4313
+
4314
+ # SnapshotWorkflowAssignments exposes the read only methods of the WorkflowAssignments
4315
+ # service for historical queries.
4316
+ class SnapshotWorkflowAssignments
4317
+ extend Gem::Deprecate
4318
+
4319
+ def initialize(workflow_assignments)
4320
+ @workflow_assignments = workflow_assignments
4321
+ end
4322
+
4323
+ # Lists existing workflow assignments.
4324
+ def list(
4325
+ filter,
4326
+ *args,
4327
+ deadline: nil
4328
+ )
4329
+ return @workflow_assignments.list(
4330
+ filter,
4331
+ *args,
4332
+ deadline: deadline,
4333
+ )
4334
+ end
4335
+ end
4336
+
4156
4337
  # WorkflowAssignmentsHistory provides records of all changes to the state of a WorkflowAssignment.
4157
4338
  #
4158
4339
  # See {WorkflowAssignmentHistory}.
@@ -4208,6 +4389,187 @@ module SDM #:nodoc:
4208
4389
  end
4209
4390
  end
4210
4391
 
4392
+ # WorkflowRole links a role to a workflow. The linked roles indicate which roles a user must be a part of
4393
+ # to request access to a resource via the workflow.
4394
+ #
4395
+ # See {WorkflowRole}.
4396
+ class WorkflowRoles
4397
+ extend Gem::Deprecate
4398
+
4399
+ def initialize(channel, parent)
4400
+ begin
4401
+ @stub = V1::WorkflowRoles::Stub.new(nil, nil, channel_override: channel)
4402
+ rescue => exception
4403
+ raise Plumbing::convert_error_to_porcelain(exception)
4404
+ end
4405
+ @parent = parent
4406
+ end
4407
+
4408
+ # Create creates a new workflow role
4409
+ def create(
4410
+ workflow_role,
4411
+ deadline: nil
4412
+ )
4413
+ req = V1::WorkflowRolesCreateRequest.new()
4414
+
4415
+ req.workflow_role = Plumbing::convert_workflow_role_to_plumbing(workflow_role)
4416
+ tries = 0
4417
+ plumbing_response = nil
4418
+ loop do
4419
+ begin
4420
+ plumbing_response = @stub.create(req, metadata: @parent.get_metadata("WorkflowRoles.Create", req), deadline: deadline)
4421
+ rescue => exception
4422
+ if (@parent.shouldRetry(tries, exception))
4423
+ tries + +@parent.jitterSleep(tries)
4424
+ next
4425
+ end
4426
+ raise Plumbing::convert_error_to_porcelain(exception)
4427
+ end
4428
+ break
4429
+ end
4430
+
4431
+ resp = WorkflowRolesCreateResponse.new()
4432
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
4433
+ resp.workflow_role = Plumbing::convert_workflow_role_to_porcelain(plumbing_response.workflow_role)
4434
+ resp
4435
+ end
4436
+
4437
+ # Get reads one workflow role by ID.
4438
+ def get(
4439
+ id,
4440
+ deadline: nil
4441
+ )
4442
+ req = V1::WorkflowRoleGetRequest.new()
4443
+ if not @parent.snapshot_time.nil?
4444
+ req.meta = V1::GetRequestMetadata.new()
4445
+ req.meta.snapshot_at = @parent.snapshot_time
4446
+ end
4447
+
4448
+ req.id = (id)
4449
+ tries = 0
4450
+ plumbing_response = nil
4451
+ loop do
4452
+ begin
4453
+ plumbing_response = @stub.get(req, metadata: @parent.get_metadata("WorkflowRoles.Get", req), deadline: deadline)
4454
+ rescue => exception
4455
+ if (@parent.shouldRetry(tries, exception))
4456
+ tries + +@parent.jitterSleep(tries)
4457
+ next
4458
+ end
4459
+ raise Plumbing::convert_error_to_porcelain(exception)
4460
+ end
4461
+ break
4462
+ end
4463
+
4464
+ resp = WorkflowRoleGetResponse.new()
4465
+ resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
4466
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
4467
+ resp.workflow_role = Plumbing::convert_workflow_role_to_porcelain(plumbing_response.workflow_role)
4468
+ resp
4469
+ end
4470
+
4471
+ # Delete deletes a workflow role
4472
+ def delete(
4473
+ id,
4474
+ deadline: nil
4475
+ )
4476
+ req = V1::WorkflowRolesDeleteRequest.new()
4477
+
4478
+ req.id = (id)
4479
+ tries = 0
4480
+ plumbing_response = nil
4481
+ loop do
4482
+ begin
4483
+ plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("WorkflowRoles.Delete", req), deadline: deadline)
4484
+ rescue => exception
4485
+ if (@parent.shouldRetry(tries, exception))
4486
+ tries + +@parent.jitterSleep(tries)
4487
+ next
4488
+ end
4489
+ raise Plumbing::convert_error_to_porcelain(exception)
4490
+ end
4491
+ break
4492
+ end
4493
+
4494
+ resp = WorkflowRolesDeleteResponse.new()
4495
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
4496
+ resp
4497
+ end
4498
+
4499
+ # Lists existing workflow roles.
4500
+ def list(
4501
+ filter,
4502
+ *args,
4503
+ deadline: nil
4504
+ )
4505
+ req = V1::WorkflowRolesListRequest.new()
4506
+ req.meta = V1::ListRequestMetadata.new()
4507
+ if @parent.page_limit > 0
4508
+ req.meta.limit = @parent.page_limit
4509
+ end
4510
+ if not @parent.snapshot_time.nil?
4511
+ req.meta.snapshot_at = @parent.snapshot_time
4512
+ end
4513
+
4514
+ req.filter = Plumbing::quote_filter_args(filter, *args)
4515
+ resp = Enumerator::Generator.new { |g|
4516
+ tries = 0
4517
+ loop do
4518
+ begin
4519
+ plumbing_response = @stub.list(req, metadata: @parent.get_metadata("WorkflowRoles.List", req), deadline: deadline)
4520
+ rescue => exception
4521
+ if (@parent.shouldRetry(tries, exception))
4522
+ tries + +@parent.jitterSleep(tries)
4523
+ next
4524
+ end
4525
+ raise Plumbing::convert_error_to_porcelain(exception)
4526
+ end
4527
+ tries = 0
4528
+ plumbing_response.workflow_role.each do |plumbing_item|
4529
+ g.yield Plumbing::convert_workflow_role_to_porcelain(plumbing_item)
4530
+ end
4531
+ break if plumbing_response.meta.next_cursor == ""
4532
+ req.meta.cursor = plumbing_response.meta.next_cursor
4533
+ end
4534
+ }
4535
+ resp
4536
+ end
4537
+ end
4538
+
4539
+ # SnapshotWorkflowRoles exposes the read only methods of the WorkflowRoles
4540
+ # service for historical queries.
4541
+ class SnapshotWorkflowRoles
4542
+ extend Gem::Deprecate
4543
+
4544
+ def initialize(workflow_roles)
4545
+ @workflow_roles = workflow_roles
4546
+ end
4547
+
4548
+ # Get reads one workflow role by ID.
4549
+ def get(
4550
+ id,
4551
+ deadline: nil
4552
+ )
4553
+ return @workflow_roles.get(
4554
+ id,
4555
+ deadline: deadline,
4556
+ )
4557
+ end
4558
+
4559
+ # Lists existing workflow roles.
4560
+ def list(
4561
+ filter,
4562
+ *args,
4563
+ deadline: nil
4564
+ )
4565
+ return @workflow_roles.list(
4566
+ filter,
4567
+ *args,
4568
+ deadline: deadline,
4569
+ )
4570
+ end
4571
+ end
4572
+
4211
4573
  # WorkflowRolesHistory provides records of all changes to the state of a WorkflowRole
4212
4574
  #
4213
4575
  # See {WorkflowRoleHistory}.
@@ -4263,6 +4625,218 @@ module SDM #:nodoc:
4263
4625
  end
4264
4626
  end
4265
4627
 
4628
+ # Workflows are the collection of rules that define the resources to which access can be requested,
4629
+ # the users that can request that access, and the mechanism for approving those requests which can either
4630
+ # be automatic approval or a set of users authorized to approve the requests.
4631
+ #
4632
+ # See {Workflow}.
4633
+ class Workflows
4634
+ extend Gem::Deprecate
4635
+
4636
+ def initialize(channel, parent)
4637
+ begin
4638
+ @stub = V1::Workflows::Stub.new(nil, nil, channel_override: channel)
4639
+ rescue => exception
4640
+ raise Plumbing::convert_error_to_porcelain(exception)
4641
+ end
4642
+ @parent = parent
4643
+ end
4644
+
4645
+ # Create creates a new workflow and requires a name for the workflow.
4646
+ def create(
4647
+ workflow,
4648
+ deadline: nil
4649
+ )
4650
+ req = V1::WorkflowCreateRequest.new()
4651
+
4652
+ req.workflow = Plumbing::convert_workflow_to_plumbing(workflow)
4653
+ tries = 0
4654
+ plumbing_response = nil
4655
+ loop do
4656
+ begin
4657
+ plumbing_response = @stub.create(req, metadata: @parent.get_metadata("Workflows.Create", req), deadline: deadline)
4658
+ rescue => exception
4659
+ if (@parent.shouldRetry(tries, exception))
4660
+ tries + +@parent.jitterSleep(tries)
4661
+ next
4662
+ end
4663
+ raise Plumbing::convert_error_to_porcelain(exception)
4664
+ end
4665
+ break
4666
+ end
4667
+
4668
+ resp = WorkflowCreateResponse.new()
4669
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
4670
+ resp.workflow = Plumbing::convert_workflow_to_porcelain(plumbing_response.workflow)
4671
+ resp
4672
+ end
4673
+
4674
+ # Get reads one workflow by ID.
4675
+ def get(
4676
+ id,
4677
+ deadline: nil
4678
+ )
4679
+ req = V1::WorkflowGetRequest.new()
4680
+ if not @parent.snapshot_time.nil?
4681
+ req.meta = V1::GetRequestMetadata.new()
4682
+ req.meta.snapshot_at = @parent.snapshot_time
4683
+ end
4684
+
4685
+ req.id = (id)
4686
+ tries = 0
4687
+ plumbing_response = nil
4688
+ loop do
4689
+ begin
4690
+ plumbing_response = @stub.get(req, metadata: @parent.get_metadata("Workflows.Get", req), deadline: deadline)
4691
+ rescue => exception
4692
+ if (@parent.shouldRetry(tries, exception))
4693
+ tries + +@parent.jitterSleep(tries)
4694
+ next
4695
+ end
4696
+ raise Plumbing::convert_error_to_porcelain(exception)
4697
+ end
4698
+ break
4699
+ end
4700
+
4701
+ resp = WorkflowGetResponse.new()
4702
+ resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
4703
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
4704
+ resp.workflow = Plumbing::convert_workflow_to_porcelain(plumbing_response.workflow)
4705
+ resp
4706
+ end
4707
+
4708
+ # Delete deletes an existing workflow.
4709
+ def delete(
4710
+ id,
4711
+ deadline: nil
4712
+ )
4713
+ req = V1::WorkflowDeleteRequest.new()
4714
+
4715
+ req.id = (id)
4716
+ tries = 0
4717
+ plumbing_response = nil
4718
+ loop do
4719
+ begin
4720
+ plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("Workflows.Delete", req), deadline: deadline)
4721
+ rescue => exception
4722
+ if (@parent.shouldRetry(tries, exception))
4723
+ tries + +@parent.jitterSleep(tries)
4724
+ next
4725
+ end
4726
+ raise Plumbing::convert_error_to_porcelain(exception)
4727
+ end
4728
+ break
4729
+ end
4730
+
4731
+ resp = WorkflowDeleteResponse.new()
4732
+ resp.id = (plumbing_response.id)
4733
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
4734
+ resp
4735
+ end
4736
+
4737
+ # Update updates an existing workflow.
4738
+ def update(
4739
+ workflow,
4740
+ deadline: nil
4741
+ )
4742
+ req = V1::WorkflowUpdateRequest.new()
4743
+
4744
+ req.workflow = Plumbing::convert_workflow_to_plumbing(workflow)
4745
+ tries = 0
4746
+ plumbing_response = nil
4747
+ loop do
4748
+ begin
4749
+ plumbing_response = @stub.update(req, metadata: @parent.get_metadata("Workflows.Update", req), deadline: deadline)
4750
+ rescue => exception
4751
+ if (@parent.shouldRetry(tries, exception))
4752
+ tries + +@parent.jitterSleep(tries)
4753
+ next
4754
+ end
4755
+ raise Plumbing::convert_error_to_porcelain(exception)
4756
+ end
4757
+ break
4758
+ end
4759
+
4760
+ resp = WorkflowUpdateResponse.new()
4761
+ resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
4762
+ resp.workflow = Plumbing::convert_workflow_to_porcelain(plumbing_response.workflow)
4763
+ resp
4764
+ end
4765
+
4766
+ # Lists existing workflows.
4767
+ def list(
4768
+ filter,
4769
+ *args,
4770
+ deadline: nil
4771
+ )
4772
+ req = V1::WorkflowListRequest.new()
4773
+ req.meta = V1::ListRequestMetadata.new()
4774
+ if @parent.page_limit > 0
4775
+ req.meta.limit = @parent.page_limit
4776
+ end
4777
+ if not @parent.snapshot_time.nil?
4778
+ req.meta.snapshot_at = @parent.snapshot_time
4779
+ end
4780
+
4781
+ req.filter = Plumbing::quote_filter_args(filter, *args)
4782
+ resp = Enumerator::Generator.new { |g|
4783
+ tries = 0
4784
+ loop do
4785
+ begin
4786
+ plumbing_response = @stub.list(req, metadata: @parent.get_metadata("Workflows.List", req), deadline: deadline)
4787
+ rescue => exception
4788
+ if (@parent.shouldRetry(tries, exception))
4789
+ tries + +@parent.jitterSleep(tries)
4790
+ next
4791
+ end
4792
+ raise Plumbing::convert_error_to_porcelain(exception)
4793
+ end
4794
+ tries = 0
4795
+ plumbing_response.workflows.each do |plumbing_item|
4796
+ g.yield Plumbing::convert_workflow_to_porcelain(plumbing_item)
4797
+ end
4798
+ break if plumbing_response.meta.next_cursor == ""
4799
+ req.meta.cursor = plumbing_response.meta.next_cursor
4800
+ end
4801
+ }
4802
+ resp
4803
+ end
4804
+ end
4805
+
4806
+ # SnapshotWorkflows exposes the read only methods of the Workflows
4807
+ # service for historical queries.
4808
+ class SnapshotWorkflows
4809
+ extend Gem::Deprecate
4810
+
4811
+ def initialize(workflows)
4812
+ @workflows = workflows
4813
+ end
4814
+
4815
+ # Get reads one workflow by ID.
4816
+ def get(
4817
+ id,
4818
+ deadline: nil
4819
+ )
4820
+ return @workflows.get(
4821
+ id,
4822
+ deadline: deadline,
4823
+ )
4824
+ end
4825
+
4826
+ # Lists existing workflows.
4827
+ def list(
4828
+ filter,
4829
+ *args,
4830
+ deadline: nil
4831
+ )
4832
+ return @workflows.list(
4833
+ filter,
4834
+ *args,
4835
+ deadline: deadline,
4836
+ )
4837
+ end
4838
+ end
4839
+
4266
4840
  # WorkflowsHistory provides records of all changes to the state of a Workflow.
4267
4841
  #
4268
4842
  # See {WorkflowHistory}.
data/lib/version CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  module SDM
16
- VERSION = "4.7.0"
16
+ VERSION = "5.0.0"
17
17
  end
data/lib/version.rb CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  module SDM
16
- VERSION = "4.7.0"
16
+ VERSION = "5.0.0"
17
17
  end