Class: SDM::RemoteIdentityGroups
- Inherits:
-
Object
- Object
- SDM::RemoteIdentityGroups
- Extended by:
- Gem::Deprecate
- Defined in:
- lib/svc.rb
Overview
A RemoteIdentityGroup is a named grouping of Remote Identities for Accounts. An Account's relationship to a RemoteIdentityGroup is defined via RemoteIdentity objects.
See RemoteIdentityGroup.
Instance Method Summary collapse
-
#get(id, deadline: nil) ⇒ Object
Get reads one RemoteIdentityGroup by ID.
-
#initialize(channel, parent) ⇒ RemoteIdentityGroups
constructor
A new instance of RemoteIdentityGroups.
-
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of RemoteIdentityGroups matching a given set of criteria.
Constructor Details
#initialize(channel, parent) ⇒ RemoteIdentityGroups
Returns a new instance of RemoteIdentityGroups.
916 917 918 919 920 921 922 923 |
# File 'lib/svc.rb', line 916 def initialize(channel, parent) begin @stub = V1::RemoteIdentityGroups::Stub.new(nil, nil, channel_override: channel) rescue => exception raise Plumbing::convert_error_to_porcelain(exception) end @parent = parent end |
Instance Method Details
#get(id, deadline: nil) ⇒ Object
Get reads one RemoteIdentityGroup by ID.
926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 |
# File 'lib/svc.rb', line 926 def get( id, deadline: nil ) req = V1::RemoteIdentityGroupGetRequest.new() req.id = (id) tries = 0 plumbing_response = nil loop do begin plumbing_response = @stub.get(req, metadata: @parent.("RemoteIdentityGroups.Get", 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 = RemoteIdentityGroupGetResponse.new() resp. = Plumbing::(plumbing_response.) resp.rate_limit = Plumbing::(plumbing_response.rate_limit) resp.remote_identity_group = Plumbing::convert_remote_identity_group_to_porcelain(plumbing_response.remote_identity_group) resp end |
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of RemoteIdentityGroups matching a given set of criteria.
956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 |
# File 'lib/svc.rb', line 956 def list( filter, *args, deadline: nil ) req = V1::RemoteIdentityGroupListRequest.new() req. = V1::ListRequestMetadata.new() page_size_option = @parent.["PageSize"] if page_size_option.is_a? Integer req..limit = page_size_option 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.("RemoteIdentityGroups.List", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception)) tries + +@parent.jitterSleep(tries) next end raise Plumbing::convert_error_to_porcelain(exception) end tries = 0 plumbing_response.remote_identity_groups.each do |plumbing_item| g.yield Plumbing::convert_remote_identity_group_to_porcelain(plumbing_item) end break if plumbing_response..next_cursor == "" req..cursor = plumbing_response..next_cursor end } resp end |