azure_mgmt_signalr 0.17.4 → 0.17.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_r.rb +11 -1
  3. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_rmanagement_client.rb +1 -1
  4. data/lib/2018-10-01/generated/azure_mgmt_signalr.rb +13 -9
  5. data/lib/2018-10-01/generated/azure_mgmt_signalr/models/error_response.rb +48 -0
  6. data/lib/2018-10-01/generated/azure_mgmt_signalr/models/error_response_body.rb +93 -0
  7. data/lib/2018-10-01/generated/azure_mgmt_signalr/models/feature_flags.rb +16 -0
  8. data/lib/2018-10-01/generated/azure_mgmt_signalr/models/log_specification.rb +57 -0
  9. data/lib/2018-10-01/generated/azure_mgmt_signalr/models/service_specification.rb +21 -0
  10. data/lib/2018-10-01/generated/azure_mgmt_signalr/models/signal_rfeature.rb +12 -6
  11. data/lib/2018-10-01/generated/azure_mgmt_signalr/operations.rb +2 -2
  12. data/lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb +23 -13
  13. data/lib/2018-10-01/generated/azure_mgmt_signalr/signal_rmanagement_client.rb +1 -1
  14. data/lib/2018-10-01/generated/azure_mgmt_signalr/usages.rb +2 -2
  15. data/lib/2020-05-01/generated/azure_mgmt_signalr.rb +76 -0
  16. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/aclaction.rb +16 -0
  17. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/dimension.rb +80 -0
  18. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/error_response.rb +48 -0
  19. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/error_response_body.rb +93 -0
  20. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/feature_flags.rb +17 -0
  21. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/key_type.rb +16 -0
  22. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/log_specification.rb +57 -0
  23. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/metric_specification.rb +139 -0
  24. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/name_availability.rb +70 -0
  25. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/name_availability_parameters.rb +59 -0
  26. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/network_acl.rb +75 -0
  27. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/operation.rb +96 -0
  28. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/operation_display.rb +79 -0
  29. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/operation_list.rb +102 -0
  30. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/operation_properties.rb +47 -0
  31. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_endpoint.rb +46 -0
  32. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_endpoint_acl.rb +78 -0
  33. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_endpoint_connection.rb +101 -0
  34. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_link_resource.rb +111 -0
  35. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_link_resource_list.rb +102 -0
  36. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_link_service_connection_state.rb +72 -0
  37. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_link_service_connection_status.rb +18 -0
  38. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/provisioning_state.rb +23 -0
  39. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/proxy_resource.rb +63 -0
  40. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/regenerate_key_parameters.rb +48 -0
  41. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/resource.rb +81 -0
  42. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/resource_sku.rb +101 -0
  43. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/serverless_upstream_settings.rb +58 -0
  44. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/service_kind.rb +16 -0
  45. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/service_specification.rb +77 -0
  46. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rcors_settings.rb +57 -0
  47. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rcreate_or_update_properties.rb +117 -0
  48. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rfeature.rb +93 -0
  49. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rkeys.rb +81 -0
  50. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rnetwork_acls.rb +80 -0
  51. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rrequest_type.rb +17 -0
  52. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rresource.rb +294 -0
  53. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rresource_list.rb +101 -0
  54. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rsku_tier.rb +18 -0
  55. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rusage.rb +95 -0
  56. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rusage_list.rb +101 -0
  57. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rusage_name.rb +57 -0
  58. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/tracked_resource.rb +94 -0
  59. data/lib/2020-05-01/generated/azure_mgmt_signalr/models/upstream_template.rb +109 -0
  60. data/lib/2020-05-01/generated/azure_mgmt_signalr/module_definition.rb +9 -0
  61. data/lib/2020-05-01/generated/azure_mgmt_signalr/operations.rb +225 -0
  62. data/lib/2020-05-01/generated/azure_mgmt_signalr/signal_r.rb +1493 -0
  63. data/lib/2020-05-01/generated/azure_mgmt_signalr/signal_rmanagement_client.rb +150 -0
  64. data/lib/2020-05-01/generated/azure_mgmt_signalr/signal_rprivate_endpoint_connections.rb +404 -0
  65. data/lib/2020-05-01/generated/azure_mgmt_signalr/signal_rprivate_link_resources.rb +246 -0
  66. data/lib/2020-05-01/generated/azure_mgmt_signalr/usages.rb +226 -0
  67. data/lib/azure_mgmt_signalr.rb +1 -0
  68. data/lib/profiles/latest/modules/signalr_profile_module.rb +143 -71
  69. data/lib/version.rb +1 -1
  70. metadata +60 -4
@@ -0,0 +1,101 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Signalr::Mgmt::V2020_05_01
7
+ module Models
8
+ #
9
+ # Object that includes an array of SignalR resource usages and a possible
10
+ # link for next set.
11
+ #
12
+ class SignalRUsageList
13
+
14
+ include MsRestAzure
15
+
16
+ include MsRest::JSONable
17
+ # @return [Array<SignalRUsage>] List of SignalR usages
18
+ attr_accessor :value
19
+
20
+ # @return [String] The URL the client should use to fetch the next page
21
+ # (per server side paging).
22
+ # It's null for now, added for future use.
23
+ attr_accessor :next_link
24
+
25
+ # return [Proc] with next page method call.
26
+ attr_accessor :next_method
27
+
28
+ #
29
+ # Gets the rest of the items for the request, enabling auto-pagination.
30
+ #
31
+ # @return [Array<SignalRUsage>] operation results.
32
+ #
33
+ def get_all_items
34
+ items = @value
35
+ page = self
36
+ while page.next_link != nil && !page.next_link.strip.empty? do
37
+ page = page.get_next_page
38
+ items.concat(page.value)
39
+ end
40
+ items
41
+ end
42
+
43
+ #
44
+ # Gets the next page of results.
45
+ #
46
+ # @return [SignalRUsageList] with next page content.
47
+ #
48
+ def get_next_page
49
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
50
+ unless response.nil?
51
+ @next_link = response.body.next_link
52
+ @value = response.body.value
53
+ self
54
+ end
55
+ end
56
+
57
+ #
58
+ # Mapper for SignalRUsageList class as Ruby Hash.
59
+ # This will be used for serialization/deserialization.
60
+ #
61
+ def self.mapper()
62
+ {
63
+ client_side_validation: true,
64
+ required: false,
65
+ serialized_name: 'SignalRUsageList',
66
+ type: {
67
+ name: 'Composite',
68
+ class_name: 'SignalRUsageList',
69
+ model_properties: {
70
+ value: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ serialized_name: 'value',
74
+ type: {
75
+ name: 'Sequence',
76
+ element: {
77
+ client_side_validation: true,
78
+ required: false,
79
+ serialized_name: 'SignalRUsageElementType',
80
+ type: {
81
+ name: 'Composite',
82
+ class_name: 'SignalRUsage'
83
+ }
84
+ }
85
+ }
86
+ },
87
+ next_link: {
88
+ client_side_validation: true,
89
+ required: false,
90
+ serialized_name: 'nextLink',
91
+ type: {
92
+ name: 'String'
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,57 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Signalr::Mgmt::V2020_05_01
7
+ module Models
8
+ #
9
+ # Localizable String object containing the name and a localized value.
10
+ #
11
+ class SignalRUsageName
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The identifier of the usage.
16
+ attr_accessor :value
17
+
18
+ # @return [String] Localized name of the usage.
19
+ attr_accessor :localized_value
20
+
21
+
22
+ #
23
+ # Mapper for SignalRUsageName class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'SignalRUsageName',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'SignalRUsageName',
34
+ model_properties: {
35
+ value: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'value',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ localized_value: {
44
+ client_side_validation: true,
45
+ required: false,
46
+ serialized_name: 'localizedValue',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,94 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Signalr::Mgmt::V2020_05_01
7
+ module Models
8
+ #
9
+ # The resource model definition for a ARM tracked top level resource.
10
+ #
11
+ class TrackedResource < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The GEO location of the SignalR service. e.g. West US
16
+ # | East US | North Central US | South Central US.
17
+ attr_accessor :location
18
+
19
+ # @return [Hash{String => String}] Tags of the service which is a list of
20
+ # key value pairs that describe the resource.
21
+ attr_accessor :tags
22
+
23
+
24
+ #
25
+ # Mapper for TrackedResource class as Ruby Hash.
26
+ # This will be used for serialization/deserialization.
27
+ #
28
+ def self.mapper()
29
+ {
30
+ client_side_validation: true,
31
+ required: false,
32
+ serialized_name: 'TrackedResource',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'TrackedResource',
36
+ model_properties: {
37
+ id: {
38
+ client_side_validation: true,
39
+ required: false,
40
+ read_only: true,
41
+ serialized_name: 'id',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ },
46
+ name: {
47
+ client_side_validation: true,
48
+ required: false,
49
+ read_only: true,
50
+ serialized_name: 'name',
51
+ type: {
52
+ name: 'String'
53
+ }
54
+ },
55
+ type: {
56
+ client_side_validation: true,
57
+ required: false,
58
+ read_only: true,
59
+ serialized_name: 'type',
60
+ type: {
61
+ name: 'String'
62
+ }
63
+ },
64
+ location: {
65
+ client_side_validation: true,
66
+ required: false,
67
+ serialized_name: 'location',
68
+ type: {
69
+ name: 'String'
70
+ }
71
+ },
72
+ tags: {
73
+ client_side_validation: true,
74
+ required: false,
75
+ serialized_name: 'tags',
76
+ type: {
77
+ name: 'Dictionary',
78
+ value: {
79
+ client_side_validation: true,
80
+ required: false,
81
+ serialized_name: 'StringElementType',
82
+ type: {
83
+ name: 'String'
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,109 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Signalr::Mgmt::V2020_05_01
7
+ module Models
8
+ #
9
+ # Upstream template item settings. It defines the Upstream URL of the
10
+ # incoming requests.
11
+ # The template defines the pattern of the event, the hub or the category of
12
+ # the incoming request that matches current URL template.
13
+ #
14
+ class UpstreamTemplate
15
+
16
+ include MsRestAzure
17
+
18
+ # @return [String] Gets or sets the matching pattern for hub names. If
19
+ # not set, it matches any hub.
20
+ # There are 3 kind of patterns supported:
21
+ # 1. "*", it to matches any hub name
22
+ # 2. Combine multiple hubs with ",", for example "hub1,hub2", it matches
23
+ # "hub1" and "hub2"
24
+ # 3. The single hub name, for example, "hub1", it matches "hub1"
25
+ attr_accessor :hub_pattern
26
+
27
+ # @return [String] Gets or sets the matching pattern for event names. If
28
+ # not set, it matches any event.
29
+ # There are 3 kind of patterns supported:
30
+ # 1. "*", it to matches any event name
31
+ # 2. Combine multiple events with ",", for example "connect,disconnect",
32
+ # it matches event "connect" and "disconnect"
33
+ # 3. The single event name, for example, "connect", it matches "connect"
34
+ attr_accessor :event_pattern
35
+
36
+ # @return [String] Gets or sets the matching pattern for category names.
37
+ # If not set, it matches any category.
38
+ # There are 3 kind of patterns supported:
39
+ # 1. "*", it to matches any category name
40
+ # 2. Combine multiple categories with ",", for example
41
+ # "connections,messages", it matches category "connections" and
42
+ # "messages"
43
+ # 3. The single category name, for example, "connections", it matches the
44
+ # category "connections"
45
+ attr_accessor :category_pattern
46
+
47
+ # @return [String] Gets or sets the Upstream URL template. You can use 3
48
+ # predefined parameters {hub}, {category} {event} inside the template,
49
+ # the value of the Upstream URL is dynamically calculated when the client
50
+ # request comes in.
51
+ # For example, if the urlTemplate is
52
+ # `http://example.com/{hub}/api/{event}`, with a client request from hub
53
+ # `chat` connects, it will first POST to this URL:
54
+ # `http://example.com/chat/api/connect`.
55
+ attr_accessor :url_template
56
+
57
+
58
+ #
59
+ # Mapper for UpstreamTemplate class as Ruby Hash.
60
+ # This will be used for serialization/deserialization.
61
+ #
62
+ def self.mapper()
63
+ {
64
+ client_side_validation: true,
65
+ required: false,
66
+ serialized_name: 'UpstreamTemplate',
67
+ type: {
68
+ name: 'Composite',
69
+ class_name: 'UpstreamTemplate',
70
+ model_properties: {
71
+ hub_pattern: {
72
+ client_side_validation: true,
73
+ required: false,
74
+ serialized_name: 'hubPattern',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ },
79
+ event_pattern: {
80
+ client_side_validation: true,
81
+ required: false,
82
+ serialized_name: 'eventPattern',
83
+ type: {
84
+ name: 'String'
85
+ }
86
+ },
87
+ category_pattern: {
88
+ client_side_validation: true,
89
+ required: false,
90
+ serialized_name: 'categoryPattern',
91
+ type: {
92
+ name: 'String'
93
+ }
94
+ },
95
+ url_template: {
96
+ client_side_validation: true,
97
+ required: true,
98
+ serialized_name: 'urlTemplate',
99
+ type: {
100
+ name: 'String'
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::Signalr end
8
+ module Azure::Signalr::Mgmt end
9
+ module Azure::Signalr::Mgmt::V2020_05_01 end
@@ -0,0 +1,225 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Signalr::Mgmt::V2020_05_01
7
+ #
8
+ # REST API for Azure SignalR Service
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [SignalRManagementClient] reference to the SignalRManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all of the available REST API operations of the
26
+ # Microsoft.SignalRService provider.
27
+ #
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [Array<Operation>] operation results.
32
+ #
33
+ def list(custom_headers:nil)
34
+ first_page = list_as_lazy(custom_headers:custom_headers)
35
+ first_page.get_all_items
36
+ end
37
+
38
+ #
39
+ # Lists all of the available REST API operations of the
40
+ # Microsoft.SignalRService provider.
41
+ #
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_with_http_info(custom_headers:nil)
48
+ list_async(custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Lists all of the available REST API operations of the
53
+ # Microsoft.SignalRService provider.
54
+ #
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(custom_headers:nil)
61
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
+
63
+
64
+ request_headers = {}
65
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
66
+
67
+ # Set Headers
68
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
69
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
70
+ path_template = 'providers/Microsoft.SignalRService/operations'
71
+
72
+ request_url = @base_url || @client.base_url
73
+
74
+ options = {
75
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
76
+ query_params: {'api-version' => @client.api_version},
77
+ headers: request_headers.merge(custom_headers || {}),
78
+ base_url: request_url
79
+ }
80
+ promise = @client.make_request_async(:get, path_template, options)
81
+
82
+ promise = promise.then do |result|
83
+ http_response = result.response
84
+ status_code = http_response.status
85
+ response_content = http_response.body
86
+ unless status_code == 200
87
+ error_model = JSON.load(response_content)
88
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
89
+ end
90
+
91
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
92
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
93
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
94
+ # Deserialize Response
95
+ if status_code == 200
96
+ begin
97
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
98
+ result_mapper = Azure::Signalr::Mgmt::V2020_05_01::Models::OperationList.mapper()
99
+ result.body = @client.deserialize(result_mapper, parsed_response)
100
+ rescue Exception => e
101
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
102
+ end
103
+ end
104
+
105
+ result
106
+ end
107
+
108
+ promise.execute
109
+ end
110
+
111
+ #
112
+ # Lists all of the available REST API operations of the
113
+ # Microsoft.SignalRService provider.
114
+ #
115
+ # @param next_page_link [String] The NextLink from the previous successful call
116
+ # to List operation.
117
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
118
+ # will be added to the HTTP request.
119
+ #
120
+ # @return [OperationList] operation results.
121
+ #
122
+ def list_next(next_page_link, custom_headers:nil)
123
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
124
+ response.body unless response.nil?
125
+ end
126
+
127
+ #
128
+ # Lists all of the available REST API operations of the
129
+ # Microsoft.SignalRService provider.
130
+ #
131
+ # @param next_page_link [String] The NextLink from the previous successful call
132
+ # to List operation.
133
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
134
+ # will be added to the HTTP request.
135
+ #
136
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
137
+ #
138
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
139
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
140
+ end
141
+
142
+ #
143
+ # Lists all of the available REST API operations of the
144
+ # Microsoft.SignalRService provider.
145
+ #
146
+ # @param next_page_link [String] The NextLink from the previous successful call
147
+ # to List operation.
148
+ # @param [Hash{String => String}] A hash of custom headers that will be added
149
+ # to the HTTP request.
150
+ #
151
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
152
+ #
153
+ def list_next_async(next_page_link, custom_headers:nil)
154
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
155
+
156
+
157
+ request_headers = {}
158
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
159
+
160
+ # Set Headers
161
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
162
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
163
+ path_template = '{nextLink}'
164
+
165
+ request_url = @base_url || @client.base_url
166
+
167
+ options = {
168
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
169
+ skip_encoding_path_params: {'nextLink' => next_page_link},
170
+ headers: request_headers.merge(custom_headers || {}),
171
+ base_url: request_url
172
+ }
173
+ promise = @client.make_request_async(:get, path_template, options)
174
+
175
+ promise = promise.then do |result|
176
+ http_response = result.response
177
+ status_code = http_response.status
178
+ response_content = http_response.body
179
+ unless status_code == 200
180
+ error_model = JSON.load(response_content)
181
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
182
+ end
183
+
184
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
185
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
186
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
187
+ # Deserialize Response
188
+ if status_code == 200
189
+ begin
190
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
191
+ result_mapper = Azure::Signalr::Mgmt::V2020_05_01::Models::OperationList.mapper()
192
+ result.body = @client.deserialize(result_mapper, parsed_response)
193
+ rescue Exception => e
194
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
195
+ end
196
+ end
197
+
198
+ result
199
+ end
200
+
201
+ promise.execute
202
+ end
203
+
204
+ #
205
+ # Lists all of the available REST API operations of the
206
+ # Microsoft.SignalRService provider.
207
+ #
208
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
209
+ # will be added to the HTTP request.
210
+ #
211
+ # @return [OperationList] which provide lazy access to pages of the response.
212
+ #
213
+ def list_as_lazy(custom_headers:nil)
214
+ response = list_async(custom_headers:custom_headers).value!
215
+ unless response.nil?
216
+ page = response.body
217
+ page.next_method = Proc.new do |next_page_link|
218
+ list_next_async(next_page_link, custom_headers:custom_headers)
219
+ end
220
+ page
221
+ end
222
+ end
223
+
224
+ end
225
+ end