Class: SDM::GroupsRolesHistory
- Inherits:
-
Object
- Object
- SDM::GroupsRolesHistory
- Extended by:
- Gem::Deprecate
- Defined in:
- lib/svc.rb
Overview
GroupsRolesHistory records all changes to the state of a GroupRole.
See GroupRoleHistory.
Instance Method Summary collapse
-
#initialize(channel, parent) ⇒ GroupsRolesHistory
constructor
A new instance of GroupsRolesHistory.
-
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of GroupRoleHistory records matching a given set of criteria.
Constructor Details
#initialize(channel, parent) ⇒ GroupsRolesHistory
Returns a new instance of GroupsRolesHistory.
3258 3259 3260 3261 3262 3263 3264 3265 |
# File 'lib/svc.rb', line 3258 def initialize(channel, parent) begin @stub = V1::GroupsRolesHistory::Stub.new(nil, nil, channel_override: channel) rescue => exception raise Plumbing::convert_error_to_porcelain(exception) end @parent = parent end |
Instance Method Details
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of GroupRoleHistory records matching a given set of criteria.
3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 |
# File 'lib/svc.rb', line 3268 def list( filter, *args, deadline: nil ) req = V1::GroupRoleHistoryListRequest.new() req. = V1::ListRequestMetadata.new() if not @parent.page_limit.nil? req..limit = @parent.page_limit end if not @parent.snapshot_time.nil? req..snapshot_at = @parent.snapshot_time end req.filter = Plumbing::quote_filter_args(filter, *args) resp = Enumerator::Generator.new { |g| tries = 0 loop do begin plumbing_response = @stub.list(req, metadata: @parent.("GroupsRolesHistory.List", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception, deadline)) tries + +sleep(@parent.exponentialBackoff(tries, deadline)) next end raise Plumbing::convert_error_to_porcelain(exception) end tries = 0 plumbing_response.history.each do |plumbing_item| g.yield Plumbing::convert_group_role_history_to_porcelain(plumbing_item) end break if plumbing_response..next_cursor == "" req..cursor = plumbing_response..next_cursor end } resp end |