azure_mgmt_storagecache 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2019-08-01-preview/generated/azure_mgmt_storagecache.rb +1 -1
  3. data/lib/2019-08-01-preview/generated/azure_mgmt_storagecache/caches.rb +1 -1
  4. data/lib/2019-08-01-preview/generated/azure_mgmt_storagecache/operations.rb +1 -1
  5. data/lib/2019-08-01-preview/generated/azure_mgmt_storagecache/skus.rb +1 -1
  6. data/lib/2019-08-01-preview/generated/azure_mgmt_storagecache/{storage_cache_mgmt_client.rb → storage_cache_management_client.rb} +8 -4
  7. data/lib/2019-08-01-preview/generated/azure_mgmt_storagecache/storage_targets.rb +1 -1
  8. data/lib/2019-08-01-preview/generated/azure_mgmt_storagecache/usage_models.rb +1 -1
  9. data/lib/2019-11-01/generated/azure_mgmt_storagecache.rb +61 -0
  10. data/lib/2019-11-01/generated/azure_mgmt_storagecache/caches.rb +1477 -0
  11. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/api_operation.rb +59 -0
  12. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/api_operation_display.rb +69 -0
  13. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/api_operation_list_result.rb +101 -0
  14. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/cache.rb +188 -0
  15. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/cache_health.rb +60 -0
  16. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/cache_sku.rb +46 -0
  17. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/cache_upgrade_status.rb +101 -0
  18. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/caches_list_result.rb +100 -0
  19. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/clfs_target.rb +46 -0
  20. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/cloud_error.rb +47 -0
  21. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/cloud_error_body.rb +92 -0
  22. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/firmware_status_type.rb +16 -0
  23. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/health_state_type.rb +23 -0
  24. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/namespace_junction.rb +68 -0
  25. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/nfs3target.rb +62 -0
  26. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/provisioning_state_type.rb +20 -0
  27. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/reason_code.rb +16 -0
  28. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/resource_sku.rb +143 -0
  29. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/resource_sku_capabilities.rb +57 -0
  30. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/resource_sku_location_info.rb +65 -0
  31. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/resource_skus_result.rb +100 -0
  32. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/restriction.rb +86 -0
  33. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/storage_target.rb +155 -0
  34. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/storage_target_type.rb +17 -0
  35. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/storage_targets_result.rb +99 -0
  36. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/unknown_target.rb +55 -0
  37. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/usage_model.rb +71 -0
  38. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/usage_model_display.rb +46 -0
  39. data/lib/2019-11-01/generated/azure_mgmt_storagecache/models/usage_models_result.rb +99 -0
  40. data/lib/2019-11-01/generated/azure_mgmt_storagecache/module_definition.rb +9 -0
  41. data/lib/2019-11-01/generated/azure_mgmt_storagecache/operations.rb +221 -0
  42. data/lib/2019-11-01/generated/azure_mgmt_storagecache/skus.rb +223 -0
  43. data/lib/2019-11-01/generated/azure_mgmt_storagecache/storage_cache_management_client.rb +153 -0
  44. data/lib/2019-11-01/generated/azure_mgmt_storagecache/storage_targets.rb +670 -0
  45. data/lib/2019-11-01/generated/azure_mgmt_storagecache/usage_models.rb +223 -0
  46. data/lib/azure_mgmt_storagecache.rb +1 -0
  47. data/lib/profiles/latest/modules/storagecache_profile_module.rb +64 -64
  48. data/lib/version.rb +1 -1
  49. metadata +40 -3
@@ -0,0 +1,55 @@
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::StorageCache::Mgmt::V2019_11_01
7
+ module Models
8
+ #
9
+ # Storage container for use as an Unknown Storage Target.
10
+ #
11
+ class UnknownTarget
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Hash{String => String}] Dictionary of string->string pairs
16
+ # containing information about the Storage Target.
17
+ attr_accessor :unknown_map
18
+
19
+
20
+ #
21
+ # Mapper for UnknownTarget class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'unknown',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'UnknownTarget',
32
+ model_properties: {
33
+ unknown_map: {
34
+ client_side_validation: true,
35
+ required: false,
36
+ serialized_name: 'unknownMap',
37
+ type: {
38
+ name: 'Dictionary',
39
+ value: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'StringElementType',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,71 @@
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::StorageCache::Mgmt::V2019_11_01
7
+ module Models
8
+ #
9
+ # A usage model.
10
+ #
11
+ class UsageModel
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [UsageModelDisplay] Localized information describing this usage
16
+ # model.
17
+ attr_accessor :display
18
+
19
+ # @return [String] Non-localized keyword name for this usage model.
20
+ attr_accessor :model_name
21
+
22
+ # @return [String] The type of Storage Target to which this model is
23
+ # applicable (only nfs3 as of this version).
24
+ attr_accessor :target_type
25
+
26
+
27
+ #
28
+ # Mapper for UsageModel class as Ruby Hash.
29
+ # This will be used for serialization/deserialization.
30
+ #
31
+ def self.mapper()
32
+ {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'UsageModel',
36
+ type: {
37
+ name: 'Composite',
38
+ class_name: 'UsageModel',
39
+ model_properties: {
40
+ display: {
41
+ client_side_validation: true,
42
+ required: false,
43
+ serialized_name: 'display',
44
+ type: {
45
+ name: 'Composite',
46
+ class_name: 'UsageModelDisplay'
47
+ }
48
+ },
49
+ model_name: {
50
+ client_side_validation: true,
51
+ required: false,
52
+ serialized_name: 'modelName',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ target_type: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ serialized_name: 'targetType',
61
+ type: {
62
+ name: 'String'
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,46 @@
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::StorageCache::Mgmt::V2019_11_01
7
+ module Models
8
+ #
9
+ # Localized information describing this usage model.
10
+ #
11
+ class UsageModelDisplay
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] String to display for this usage model.
16
+ attr_accessor :description
17
+
18
+
19
+ #
20
+ # Mapper for UsageModelDisplay class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ client_side_validation: true,
26
+ required: false,
27
+ serialized_name: 'UsageModel_display',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'UsageModelDisplay',
31
+ model_properties: {
32
+ description: {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'description',
36
+ type: {
37
+ name: 'String'
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,99 @@
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::StorageCache::Mgmt::V2019_11_01
7
+ module Models
8
+ #
9
+ # A list of Cache usage models.
10
+ #
11
+ class UsageModelsResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [String] The URI to fetch the next page of Cache usage models.
17
+ attr_accessor :next_link
18
+
19
+ # @return [Array<UsageModel>] The list of usage models available for the
20
+ # subscription.
21
+ attr_accessor :value
22
+
23
+ # return [Proc] with next page method call.
24
+ attr_accessor :next_method
25
+
26
+ #
27
+ # Gets the rest of the items for the request, enabling auto-pagination.
28
+ #
29
+ # @return [Array<UsageModel>] operation results.
30
+ #
31
+ def get_all_items
32
+ items = @value
33
+ page = self
34
+ while page.next_link != nil && !page.next_link.strip.empty? do
35
+ page = page.get_next_page
36
+ items.concat(page.value)
37
+ end
38
+ items
39
+ end
40
+
41
+ #
42
+ # Gets the next page of results.
43
+ #
44
+ # @return [UsageModelsResult] with next page content.
45
+ #
46
+ def get_next_page
47
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
48
+ unless response.nil?
49
+ @next_link = response.body.next_link
50
+ @value = response.body.value
51
+ self
52
+ end
53
+ end
54
+
55
+ #
56
+ # Mapper for UsageModelsResult class as Ruby Hash.
57
+ # This will be used for serialization/deserialization.
58
+ #
59
+ def self.mapper()
60
+ {
61
+ client_side_validation: true,
62
+ required: false,
63
+ serialized_name: 'UsageModelsResult',
64
+ type: {
65
+ name: 'Composite',
66
+ class_name: 'UsageModelsResult',
67
+ model_properties: {
68
+ next_link: {
69
+ client_side_validation: true,
70
+ required: false,
71
+ serialized_name: 'nextLink',
72
+ type: {
73
+ name: 'String'
74
+ }
75
+ },
76
+ value: {
77
+ client_side_validation: true,
78
+ required: false,
79
+ serialized_name: 'value',
80
+ type: {
81
+ name: 'Sequence',
82
+ element: {
83
+ client_side_validation: true,
84
+ required: false,
85
+ serialized_name: 'UsageModelElementType',
86
+ type: {
87
+ name: 'Composite',
88
+ class_name: 'UsageModel'
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ end
97
+ end
98
+ end
99
+ 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::StorageCache end
8
+ module Azure::StorageCache::Mgmt end
9
+ module Azure::StorageCache::Mgmt::V2019_11_01 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::StorageCache::Mgmt::V2019_11_01
7
+ #
8
+ # A Storage Cache provides scalable caching service for NAS clients, serving
9
+ # data from either NFSv3 or Blob at-rest storage (referred to as "Storage
10
+ # Targets"). These operations allow you to manage Caches.
11
+ #
12
+ class Operations
13
+ include MsRestAzure
14
+
15
+ #
16
+ # Creates and initializes a new instance of the Operations class.
17
+ # @param client service class for accessing basic functionality.
18
+ #
19
+ def initialize(client)
20
+ @client = client
21
+ end
22
+
23
+ # @return [StorageCacheManagementClient] reference to the StorageCacheManagementClient
24
+ attr_reader :client
25
+
26
+ #
27
+ # Lists all of the available Resource Provider operations.
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<ApiOperation>] operation results.
33
+ #
34
+ def list(custom_headers:nil)
35
+ first_page = list_as_lazy(custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Lists all of the available Resource Provider operations.
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 Resource Provider operations.
53
+ #
54
+ # @param [Hash{String => String}] A hash of custom headers that will be added
55
+ # to the HTTP request.
56
+ #
57
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
58
+ #
59
+ def list_async(custom_headers:nil)
60
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
61
+
62
+
63
+ request_headers = {}
64
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
65
+
66
+ # Set Headers
67
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
68
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
69
+ path_template = 'providers/Microsoft.StorageCache/operations'
70
+
71
+ request_url = @base_url || @client.base_url
72
+
73
+ options = {
74
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
75
+ query_params: {'api-version' => @client.api_version},
76
+ headers: request_headers.merge(custom_headers || {}),
77
+ base_url: request_url
78
+ }
79
+ promise = @client.make_request_async(:get, path_template, options)
80
+
81
+ promise = promise.then do |result|
82
+ http_response = result.response
83
+ status_code = http_response.status
84
+ response_content = http_response.body
85
+ unless status_code == 200
86
+ error_model = JSON.load(response_content)
87
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
88
+ end
89
+
90
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
91
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
92
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
93
+ # Deserialize Response
94
+ if status_code == 200
95
+ begin
96
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
97
+ result_mapper = Azure::StorageCache::Mgmt::V2019_11_01::Models::ApiOperationListResult.mapper()
98
+ result.body = @client.deserialize(result_mapper, parsed_response)
99
+ rescue Exception => e
100
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
101
+ end
102
+ end
103
+
104
+ result
105
+ end
106
+
107
+ promise.execute
108
+ end
109
+
110
+ #
111
+ # Lists all of the available Resource Provider operations.
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 [ApiOperationListResult] 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 Resource Provider operations.
127
+ #
128
+ # @param next_page_link [String] The NextLink from the previous successful call
129
+ # to List operation.
130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
131
+ # will be added to the HTTP request.
132
+ #
133
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
134
+ #
135
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
136
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
137
+ end
138
+
139
+ #
140
+ # Lists all of the available Resource Provider operations.
141
+ #
142
+ # @param next_page_link [String] The NextLink from the previous successful call
143
+ # to List operation.
144
+ # @param [Hash{String => String}] A hash of custom headers that will be added
145
+ # to the HTTP request.
146
+ #
147
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
148
+ #
149
+ def list_next_async(next_page_link, custom_headers:nil)
150
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
151
+
152
+
153
+ request_headers = {}
154
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
155
+
156
+ # Set Headers
157
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
158
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
159
+ path_template = '{nextLink}'
160
+
161
+ request_url = @base_url || @client.base_url
162
+
163
+ options = {
164
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
165
+ skip_encoding_path_params: {'nextLink' => next_page_link},
166
+ headers: request_headers.merge(custom_headers || {}),
167
+ base_url: request_url
168
+ }
169
+ promise = @client.make_request_async(:get, path_template, options)
170
+
171
+ promise = promise.then do |result|
172
+ http_response = result.response
173
+ status_code = http_response.status
174
+ response_content = http_response.body
175
+ unless status_code == 200
176
+ error_model = JSON.load(response_content)
177
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
178
+ end
179
+
180
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
181
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
182
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::StorageCache::Mgmt::V2019_11_01::Models::ApiOperationListResult.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 Resource Provider operations.
202
+ #
203
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
204
+ # will be added to the HTTP request.
205
+ #
206
+ # @return [ApiOperationListResult] which provide lazy access to pages of the
207
+ # 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