Method: SDM::RemoteIdentities#update
- Defined in:
- lib/svc.rb
#update(remote_identity, deadline: nil) ⇒ Object
Update replaces all the fields of a RemoteIdentity by ID.
843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 |
# File 'lib/svc.rb', line 843 def update( remote_identity, deadline: nil ) req = V1::RemoteIdentityUpdateRequest.new() req.remote_identity = Plumbing::convert_remote_identity_to_plumbing(remote_identity) tries = 0 plumbing_response = nil loop do begin plumbing_response = @stub.update(req, metadata: @parent.("RemoteIdentities.Update", 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 = RemoteIdentityUpdateResponse.new() resp. = Plumbing::(plumbing_response.) resp.rate_limit = Plumbing::(plumbing_response.rate_limit) resp.remote_identity = Plumbing::convert_remote_identity_to_porcelain(plumbing_response.remote_identity) resp end |