azure_mgmt_import_export 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2016-11-01/generated/azure_mgmt_import_export.rb +51 -0
  4. data/lib/2016-11-01/generated/azure_mgmt_import_export/bit_locker_keys.rb +122 -0
  5. data/lib/2016-11-01/generated/azure_mgmt_import_export/jobs.rb +886 -0
  6. data/lib/2016-11-01/generated/azure_mgmt_import_export/locations.rb +207 -0
  7. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/drive_bit_locker_key.rb +57 -0
  8. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/drive_state.rb +21 -0
  9. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/drive_status.rb +175 -0
  10. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/error_response.rb +100 -0
  11. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/error_response_error_details_item.rb +69 -0
  12. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/export.rb +89 -0
  13. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/get_bit_locker_keys_response.rb +55 -0
  14. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/job_details.rb +257 -0
  15. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/job_response.rb +105 -0
  16. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/list_jobs_response.rb +98 -0
  17. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/list_operations_response.rb +55 -0
  18. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/location.rb +207 -0
  19. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/locations_response.rb +55 -0
  20. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/operation.rb +92 -0
  21. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/package_infomation.rb +81 -0
  22. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/put_job_parameters.rb +70 -0
  23. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/return_address.rb +139 -0
  24. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/return_shipping.rb +57 -0
  25. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/shipping_information.rb +129 -0
  26. data/lib/2016-11-01/generated/azure_mgmt_import_export/models/update_job_parameters.rb +156 -0
  27. data/lib/2016-11-01/generated/azure_mgmt_import_export/module_definition.rb +9 -0
  28. data/lib/2016-11-01/generated/azure_mgmt_import_export/operations.rb +112 -0
  29. data/lib/2016-11-01/generated/azure_mgmt_import_export/storage_import_export.rb +142 -0
  30. data/lib/azure_mgmt_import_export.rb +6 -0
  31. data/lib/module_definition.rb +7 -0
  32. data/lib/profiles/latest/importexport_latest_profile_client.rb +40 -0
  33. data/lib/profiles/latest/importexport_module_definition.rb +8 -0
  34. data/lib/profiles/latest/modules/importexport_profile_module.rb +147 -0
  35. data/lib/version.rb +7 -0
  36. metadata +151 -0
@@ -0,0 +1,207 @@
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::ImportExport::Mgmt::V2016_11_01
7
+ #
8
+ # The Storage Import/Export Resource Provider API.
9
+ #
10
+ class Locations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Locations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [StorageImportExport] reference to the StorageImportExport
22
+ attr_reader :client
23
+
24
+ #
25
+ # Returns a list of locations to which you can ship the disks associated with
26
+ # an import or export job. A location is a Microsoft data center region.
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 [LocationsResponse] operation results.
32
+ #
33
+ def list(custom_headers:nil)
34
+ response = list_async(custom_headers:custom_headers).value!
35
+ response.body unless response.nil?
36
+ end
37
+
38
+ #
39
+ # Returns a list of locations to which you can ship the disks associated with
40
+ # an import or export job. A location is a Microsoft data center region.
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
+ # Returns a list of locations to which you can ship the disks associated with
53
+ # an import or export job. A location is a Microsoft data center region.
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 = '2016-11-01'
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.ImportExport/locations'
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::ImportExport::Mgmt::V2016_11_01::Models::LocationsResponse.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
+ # Returns the details about a location to which you can ship the disks
113
+ # associated with an import or export job. A location is an Azure region.
114
+ #
115
+ # @param location_name [String] The name of the location. For example, West US
116
+ # or westus.
117
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
118
+ # will be added to the HTTP request.
119
+ #
120
+ # @return [Location] operation results.
121
+ #
122
+ def get(location_name, custom_headers:nil)
123
+ response = get_async(location_name, custom_headers:custom_headers).value!
124
+ response.body unless response.nil?
125
+ end
126
+
127
+ #
128
+ # Returns the details about a location to which you can ship the disks
129
+ # associated with an import or export job. A location is an Azure region.
130
+ #
131
+ # @param location_name [String] The name of the location. For example, West US
132
+ # or westus.
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 get_with_http_info(location_name, custom_headers:nil)
139
+ get_async(location_name, custom_headers:custom_headers).value!
140
+ end
141
+
142
+ #
143
+ # Returns the details about a location to which you can ship the disks
144
+ # associated with an import or export job. A location is an Azure region.
145
+ #
146
+ # @param location_name [String] The name of the location. For example, West US
147
+ # or westus.
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 get_async(location_name, custom_headers:nil)
154
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
155
+ @client.api_version = '2016-11-01'
156
+
157
+
158
+ request_headers = {}
159
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
160
+
161
+ # Set Headers
162
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
163
+ request_headers['Accept-Language'] = @client.accept_language unless @client.accept_language.nil?
164
+ path_template = 'providers/Microsoft.ImportExport/locations/{locationName}'
165
+
166
+ request_url = @base_url || @client.base_url
167
+
168
+ options = {
169
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
170
+ path_params: {'locationName' => location_name},
171
+ query_params: {'api-version' => @client.api_version},
172
+ headers: request_headers.merge(custom_headers || {}),
173
+ base_url: request_url
174
+ }
175
+ promise = @client.make_request_async(:get, path_template, options)
176
+
177
+ promise = promise.then do |result|
178
+ http_response = result.response
179
+ status_code = http_response.status
180
+ response_content = http_response.body
181
+ unless status_code == 200
182
+ error_model = JSON.load(response_content)
183
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
184
+ end
185
+
186
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
187
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
188
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
189
+ # Deserialize Response
190
+ if status_code == 200
191
+ begin
192
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
193
+ result_mapper = Azure::ImportExport::Mgmt::V2016_11_01::Models::Location.mapper()
194
+ result.body = @client.deserialize(result_mapper, parsed_response)
195
+ rescue Exception => e
196
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
197
+ end
198
+ end
199
+
200
+ result
201
+ end
202
+
203
+ promise.execute
204
+ end
205
+
206
+ end
207
+ 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::ImportExport::Mgmt::V2016_11_01
7
+ module Models
8
+ #
9
+ # BitLocker recovery key or password to the specified drive
10
+ #
11
+ class DriveBitLockerKey
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] BitLocker recovery key or password
16
+ attr_accessor :bit_locker_key
17
+
18
+ # @return [String] Drive ID
19
+ attr_accessor :drive_id
20
+
21
+
22
+ #
23
+ # Mapper for DriveBitLockerKey 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: 'DriveBitLockerKey',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'DriveBitLockerKey',
34
+ model_properties: {
35
+ bit_locker_key: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'bitLockerKey',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ drive_id: {
44
+ client_side_validation: true,
45
+ required: false,
46
+ serialized_name: 'driveId',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,21 @@
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::ImportExport::Mgmt::V2016_11_01
7
+ module Models
8
+ #
9
+ # Defines values for DriveState
10
+ #
11
+ module DriveState
12
+ Specified = "Specified"
13
+ Received = "Received"
14
+ NeverReceived = "NeverReceived"
15
+ Transferring = "Transferring"
16
+ Completed = "Completed"
17
+ CompletedMoreInfo = "CompletedMoreInfo"
18
+ ShippedBack = "ShippedBack"
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,175 @@
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::ImportExport::Mgmt::V2016_11_01
7
+ module Models
8
+ #
9
+ # Provides information about the drive's status
10
+ #
11
+ class DriveStatus
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The drive's hardware serial number, without spaces.
16
+ attr_accessor :drive_id
17
+
18
+ # @return [String] The BitLocker key used to encrypt the drive.
19
+ attr_accessor :bit_locker_key
20
+
21
+ # @return [String] The relative path of the manifest file on the drive.
22
+ attr_accessor :manifest_file
23
+
24
+ # @return [String] The Base16-encoded MD5 hash of the manifest file on
25
+ # the drive.
26
+ attr_accessor :manifest_hash
27
+
28
+ # @return [String] The drive header hash value.
29
+ attr_accessor :drive_header_hash
30
+
31
+ # @return [DriveState] The drive's current state. Possible values
32
+ # include: 'Specified', 'Received', 'NeverReceived', 'Transferring',
33
+ # 'Completed', 'CompletedMoreInfo', 'ShippedBack'
34
+ attr_accessor :state
35
+
36
+ # @return [String] Detailed status about the data transfer process. This
37
+ # field is not returned in the response until the drive is in the
38
+ # Transferring state.
39
+ attr_accessor :copy_status
40
+
41
+ # @return [Integer] Percentage completed for the drive.
42
+ attr_accessor :percent_complete
43
+
44
+ # @return [String] A URI that points to the blob containing the verbose
45
+ # log for the data transfer operation.
46
+ attr_accessor :verbose_log_uri
47
+
48
+ # @return [String] A URI that points to the blob containing the error log
49
+ # for the data transfer operation.
50
+ attr_accessor :error_log_uri
51
+
52
+ # @return [String] A URI that points to the blob containing the drive
53
+ # manifest file.
54
+ attr_accessor :manifest_uri
55
+
56
+ # @return [Integer] Bytes successfully transferred for the drive.
57
+ attr_accessor :bytes_succeeded
58
+
59
+
60
+ #
61
+ # Mapper for DriveStatus class as Ruby Hash.
62
+ # This will be used for serialization/deserialization.
63
+ #
64
+ def self.mapper()
65
+ {
66
+ client_side_validation: true,
67
+ required: false,
68
+ serialized_name: 'DriveStatus',
69
+ type: {
70
+ name: 'Composite',
71
+ class_name: 'DriveStatus',
72
+ model_properties: {
73
+ drive_id: {
74
+ client_side_validation: true,
75
+ required: false,
76
+ serialized_name: 'driveId',
77
+ type: {
78
+ name: 'String'
79
+ }
80
+ },
81
+ bit_locker_key: {
82
+ client_side_validation: true,
83
+ required: false,
84
+ serialized_name: 'bitLockerKey',
85
+ type: {
86
+ name: 'String'
87
+ }
88
+ },
89
+ manifest_file: {
90
+ client_side_validation: true,
91
+ required: false,
92
+ serialized_name: 'manifestFile',
93
+ type: {
94
+ name: 'String'
95
+ }
96
+ },
97
+ manifest_hash: {
98
+ client_side_validation: true,
99
+ required: false,
100
+ serialized_name: 'manifestHash',
101
+ type: {
102
+ name: 'String'
103
+ }
104
+ },
105
+ drive_header_hash: {
106
+ client_side_validation: true,
107
+ required: false,
108
+ serialized_name: 'driveHeaderHash',
109
+ type: {
110
+ name: 'String'
111
+ }
112
+ },
113
+ state: {
114
+ client_side_validation: true,
115
+ required: false,
116
+ serialized_name: 'state',
117
+ type: {
118
+ name: 'String'
119
+ }
120
+ },
121
+ copy_status: {
122
+ client_side_validation: true,
123
+ required: false,
124
+ serialized_name: 'copyStatus',
125
+ type: {
126
+ name: 'String'
127
+ }
128
+ },
129
+ percent_complete: {
130
+ client_side_validation: true,
131
+ required: false,
132
+ serialized_name: 'percentComplete',
133
+ type: {
134
+ name: 'Number'
135
+ }
136
+ },
137
+ verbose_log_uri: {
138
+ client_side_validation: true,
139
+ required: false,
140
+ serialized_name: 'verboseLogUri',
141
+ type: {
142
+ name: 'String'
143
+ }
144
+ },
145
+ error_log_uri: {
146
+ client_side_validation: true,
147
+ required: false,
148
+ serialized_name: 'errorLogUri',
149
+ type: {
150
+ name: 'String'
151
+ }
152
+ },
153
+ manifest_uri: {
154
+ client_side_validation: true,
155
+ required: false,
156
+ serialized_name: 'manifestUri',
157
+ type: {
158
+ name: 'String'
159
+ }
160
+ },
161
+ bytes_succeeded: {
162
+ client_side_validation: true,
163
+ required: false,
164
+ serialized_name: 'bytesSucceeded',
165
+ type: {
166
+ name: 'Number'
167
+ }
168
+ }
169
+ }
170
+ }
171
+ }
172
+ end
173
+ end
174
+ end
175
+ end