azure_mgmt_signalr 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/key_type.rb +16 -0
  4. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/metric_specification.rb +119 -0
  5. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/name_availability.rb +70 -0
  6. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/name_availability_parameters.rb +59 -0
  7. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/operation.rb +84 -0
  8. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/operation_display.rb +79 -0
  9. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/operation_list.rb +102 -0
  10. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/operation_properties.rb +47 -0
  11. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/provisioning_state.rb +23 -0
  12. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/regenerate_key_parameters.rb +48 -0
  13. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/resource.rb +72 -0
  14. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/resource_sku.rb +98 -0
  15. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/service_specification.rb +56 -0
  16. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/signal_rcreate_or_update_properties.rb +49 -0
  17. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/signal_rcreate_parameters.rb +85 -0
  18. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/signal_rkeys.rb +57 -0
  19. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/signal_rresource.rb +177 -0
  20. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/signal_rresource_list.rb +101 -0
  21. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/signal_rsku_tier.rb +17 -0
  22. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/signal_rupdate_parameters.rb +81 -0
  23. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/models/tracked_resource.rb +94 -0
  24. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/module_definition.rb +9 -0
  25. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/operations.rb +221 -0
  26. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_r.rb +1335 -0
  27. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_rmanagement_client.rb +136 -0
  28. data/lib/2018-03-01-preview/generated/azure_mgmt_signalr.rb +50 -0
  29. data/lib/azure_mgmt_signalr.rb +5 -0
  30. data/lib/module_definition.rb +7 -0
  31. data/lib/profiles/latest/modules/signalr_profile_module.rb +147 -0
  32. data/lib/profiles/latest/signalr_latest_profile_client.rb +40 -0
  33. data/lib/profiles/latest/signalr_module_definition.rb +8 -0
  34. data/lib/version.rb +7 -0
  35. metadata +151 -0
@@ -0,0 +1,17 @@
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::V2018_03_01_preview
7
+ module Models
8
+ #
9
+ # Defines values for SignalRSkuTier
10
+ #
11
+ module SignalRSkuTier
12
+ Free = "Free"
13
+ Basic = "Basic"
14
+ Premium = "Premium"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,81 @@
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::V2018_03_01_preview
7
+ module Models
8
+ #
9
+ # Parameters for SignalR service update operation
10
+ #
11
+ class SignalRUpdateParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Hash{String => String}] A list of key value pairs that
16
+ # describe the resource.
17
+ attr_accessor :tags
18
+
19
+ # @return [ResourceSku] The billing information of the resource.(e.g.
20
+ # basic vs. standard)
21
+ attr_accessor :sku
22
+
23
+ # @return [SignalRCreateOrUpdateProperties] Settings used to provision or
24
+ # configure the resource
25
+ attr_accessor :properties
26
+
27
+
28
+ #
29
+ # Mapper for SignalRUpdateParameters class as Ruby Hash.
30
+ # This will be used for serialization/deserialization.
31
+ #
32
+ def self.mapper()
33
+ {
34
+ client_side_validation: true,
35
+ required: false,
36
+ serialized_name: 'SignalRUpdateParameters',
37
+ type: {
38
+ name: 'Composite',
39
+ class_name: 'SignalRUpdateParameters',
40
+ model_properties: {
41
+ tags: {
42
+ client_side_validation: true,
43
+ required: false,
44
+ serialized_name: 'tags',
45
+ type: {
46
+ name: 'Dictionary',
47
+ value: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ serialized_name: 'StringElementType',
51
+ type: {
52
+ name: 'String'
53
+ }
54
+ }
55
+ }
56
+ },
57
+ sku: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ serialized_name: 'sku',
61
+ type: {
62
+ name: 'Composite',
63
+ class_name: 'ResourceSku'
64
+ }
65
+ },
66
+ properties: {
67
+ client_side_validation: true,
68
+ required: false,
69
+ serialized_name: 'properties',
70
+ type: {
71
+ name: 'Composite',
72
+ class_name: 'SignalRCreateOrUpdateProperties'
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ end
79
+ end
80
+ end
81
+ 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::V2018_03_01_preview
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,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::V2018_03_01_preview end
@@ -0,0 +1,221 @@
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::V2018_03_01_preview
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
+ @client.api_version = '2018-03-01-preview'
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 MsRestAzure::AzureOperationError.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
+ # Deserialize Response
93
+ if status_code == 200
94
+ begin
95
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
96
+ result_mapper = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::OperationList.mapper()
97
+ result.body = @client.deserialize(result_mapper, parsed_response)
98
+ rescue Exception => e
99
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
100
+ end
101
+ end
102
+
103
+ result
104
+ end
105
+
106
+ promise.execute
107
+ end
108
+
109
+ #
110
+ # Lists all of the available REST API operations of the
111
+ # Microsoft.SignalRService provider.
112
+ #
113
+ # @param next_page_link [String] The NextLink from the previous successful call
114
+ # to List operation.
115
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
116
+ # will be added to the HTTP request.
117
+ #
118
+ # @return [OperationList] operation results.
119
+ #
120
+ def list_next(next_page_link, custom_headers:nil)
121
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
122
+ response.body unless response.nil?
123
+ end
124
+
125
+ #
126
+ # Lists all of the available REST API operations of the
127
+ # Microsoft.SignalRService provider.
128
+ #
129
+ # @param next_page_link [String] The NextLink from the previous successful call
130
+ # to List operation.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
135
+ #
136
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
137
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
138
+ end
139
+
140
+ #
141
+ # Lists all of the available REST API operations of the
142
+ # Microsoft.SignalRService provider.
143
+ #
144
+ # @param next_page_link [String] The NextLink from the previous successful call
145
+ # to List operation.
146
+ # @param [Hash{String => String}] A hash of custom headers that will be added
147
+ # to the HTTP request.
148
+ #
149
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
150
+ #
151
+ def list_next_async(next_page_link, custom_headers:nil)
152
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
153
+
154
+
155
+ request_headers = {}
156
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
157
+
158
+ # Set Headers
159
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
160
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
161
+ path_template = '{nextLink}'
162
+
163
+ request_url = @base_url || @client.base_url
164
+
165
+ options = {
166
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
167
+ skip_encoding_path_params: {'nextLink' => next_page_link},
168
+ headers: request_headers.merge(custom_headers || {}),
169
+ base_url: request_url
170
+ }
171
+ promise = @client.make_request_async(:get, path_template, options)
172
+
173
+ promise = promise.then do |result|
174
+ http_response = result.response
175
+ status_code = http_response.status
176
+ response_content = http_response.body
177
+ unless status_code == 200
178
+ error_model = JSON.load(response_content)
179
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
180
+ end
181
+
182
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
183
+ # Deserialize Response
184
+ if status_code == 200
185
+ begin
186
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
187
+ result_mapper = Azure::Signalr::Mgmt::V2018_03_01_preview::Models::OperationList.mapper()
188
+ result.body = @client.deserialize(result_mapper, parsed_response)
189
+ rescue Exception => e
190
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
191
+ end
192
+ end
193
+
194
+ result
195
+ end
196
+
197
+ promise.execute
198
+ end
199
+
200
+ #
201
+ # Lists all of the available REST API operations of the
202
+ # Microsoft.SignalRService provider.
203
+ #
204
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
205
+ # will be added to the HTTP request.
206
+ #
207
+ # @return [OperationList] which provide lazy access to pages of the response.
208
+ #
209
+ def list_as_lazy(custom_headers:nil)
210
+ response = list_async(custom_headers:custom_headers).value!
211
+ unless response.nil?
212
+ page = response.body
213
+ page.next_method = Proc.new do |next_page_link|
214
+ list_next_async(next_page_link, custom_headers:custom_headers)
215
+ end
216
+ page
217
+ end
218
+ end
219
+
220
+ end
221
+ end