Method: SDM::IdentitySets#create
- Defined in:
- lib/svc.rb
#create(identity_set, deadline: nil) ⇒ Object
Create registers a new IdentitySet.
2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 |
# File 'lib/svc.rb', line 2395 def create( identity_set, deadline: nil ) req = V1::IdentitySetCreateRequest.new() req.identity_set = Plumbing::convert_identity_set_to_plumbing(identity_set) tries = 0 plumbing_response = nil loop do begin plumbing_response = @stub.create(req, metadata: @parent.("IdentitySets.Create", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception)) tries + +@parent.jitterSleep(tries) next end raise Plumbing::convert_error_to_porcelain(exception) end break end resp = IdentitySetCreateResponse.new() resp.identity_set = Plumbing::convert_identity_set_to_porcelain(plumbing_response.identity_set) resp. = Plumbing::(plumbing_response.) resp.rate_limit = Plumbing::(plumbing_response.rate_limit) resp end |