@azure/arm-storageimportexport 1.3.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +69 -80
  4. package/dist/index.js +1999 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/models/index.d.ts +504 -0
  13. package/dist-esm/src/models/index.d.ts.map +1 -0
  14. package/dist-esm/src/models/index.js +40 -0
  15. package/dist-esm/src/models/index.js.map +1 -0
  16. package/dist-esm/src/models/mappers.d.ts +25 -0
  17. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  18. package/{esm → dist-esm/src}/models/mappers.js +570 -422
  19. package/dist-esm/src/models/mappers.js.map +1 -0
  20. package/dist-esm/src/models/parameters.d.ts +17 -0
  21. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/parameters.js +79 -49
  23. package/dist-esm/src/models/parameters.js.map +1 -0
  24. package/dist-esm/src/operations/bitLockerKeys.d.ts +32 -0
  25. package/dist-esm/src/operations/bitLockerKeys.d.ts.map +1 -0
  26. package/dist-esm/src/operations/bitLockerKeys.js +101 -0
  27. package/dist-esm/src/operations/bitLockerKeys.js.map +1 -0
  28. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  29. package/dist-esm/src/operations/index.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/operations/index.js +3 -5
  31. package/dist-esm/src/operations/index.js.map +1 -0
  32. package/dist-esm/src/operations/jobs.d.ts +92 -0
  33. package/dist-esm/src/operations/jobs.d.ts.map +1 -0
  34. package/dist-esm/src/operations/jobs.js +376 -0
  35. package/dist-esm/src/operations/jobs.js.map +1 -0
  36. package/dist-esm/src/operations/locations.d.ts +35 -0
  37. package/dist-esm/src/operations/locations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/locations.js +117 -0
  39. package/dist-esm/src/operations/locations.js.map +1 -0
  40. package/dist-esm/src/operations/operations.d.ts +26 -0
  41. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/operations.js +90 -0
  43. package/dist-esm/src/operations/operations.js.map +1 -0
  44. package/dist-esm/src/operationsInterfaces/bitLockerKeys.d.ts +14 -0
  45. package/dist-esm/src/operationsInterfaces/bitLockerKeys.d.ts.map +1 -0
  46. package/dist-esm/src/operationsInterfaces/bitLockerKeys.js +9 -0
  47. package/dist-esm/src/operationsInterfaces/bitLockerKeys.js.map +1 -0
  48. package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
  49. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  50. package/dist-esm/src/operationsInterfaces/index.js +12 -0
  51. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/jobs.d.ts +54 -0
  53. package/dist-esm/src/operationsInterfaces/jobs.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/jobs.js +9 -0
  55. package/dist-esm/src/operationsInterfaces/jobs.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/locations.d.ts +19 -0
  57. package/dist-esm/src/operationsInterfaces/locations.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/locations.js +9 -0
  59. package/dist-esm/src/operationsInterfaces/locations.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  61. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  64. package/dist-esm/src/storageImportExport.d.ts +22 -0
  65. package/dist-esm/src/storageImportExport.d.ts.map +1 -0
  66. package/dist-esm/src/storageImportExport.js +54 -0
  67. package/dist-esm/src/storageImportExport.js.map +1 -0
  68. package/dist-esm/test/sampleTest.d.ts +2 -0
  69. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  70. package/dist-esm/test/sampleTest.js +40 -0
  71. package/dist-esm/test/sampleTest.js.map +1 -0
  72. package/package.json +85 -26
  73. package/review/arm-storageimportexport.api.md +438 -0
  74. package/rollup.config.js +184 -27
  75. package/src/index.ts +12 -0
  76. package/src/models/index.ts +432 -839
  77. package/src/models/mappers.ts +575 -424
  78. package/src/models/parameters.ts +101 -50
  79. package/src/operations/bitLockerKeys.ts +90 -55
  80. package/src/operations/index.ts +3 -5
  81. package/src/operations/jobs.ts +302 -335
  82. package/src/operations/locations.ts +85 -78
  83. package/src/operations/operations.ts +66 -42
  84. package/src/operationsInterfaces/bitLockerKeys.ts +27 -0
  85. package/src/operationsInterfaces/index.ts +12 -0
  86. package/src/operationsInterfaces/jobs.ts +99 -0
  87. package/src/operationsInterfaces/locations.ts +38 -0
  88. package/src/operationsInterfaces/operations.ts +22 -0
  89. package/src/storageImportExport.ts +92 -0
  90. package/tsconfig.json +20 -7
  91. package/types/arm-storageimportexport.d.ts +671 -0
  92. package/types/tsdoc-metadata.json +11 -0
  93. package/dist/arm-storageimportexport.js +0 -1764
  94. package/dist/arm-storageimportexport.js.map +0 -1
  95. package/dist/arm-storageimportexport.min.js +0 -1
  96. package/dist/arm-storageimportexport.min.js.map +0 -1
  97. package/esm/models/bitLockerKeysMappers.d.ts +0 -2
  98. package/esm/models/bitLockerKeysMappers.d.ts.map +0 -1
  99. package/esm/models/bitLockerKeysMappers.js +0 -11
  100. package/esm/models/bitLockerKeysMappers.js.map +0 -1
  101. package/esm/models/index.d.ts +0 -928
  102. package/esm/models/index.d.ts.map +0 -1
  103. package/esm/models/index.js +0 -10
  104. package/esm/models/index.js.map +0 -1
  105. package/esm/models/jobsMappers.d.ts +0 -2
  106. package/esm/models/jobsMappers.d.ts.map +0 -1
  107. package/esm/models/jobsMappers.js +0 -11
  108. package/esm/models/jobsMappers.js.map +0 -1
  109. package/esm/models/locationsMappers.d.ts +0 -2
  110. package/esm/models/locationsMappers.d.ts.map +0 -1
  111. package/esm/models/locationsMappers.js +0 -11
  112. package/esm/models/locationsMappers.js.map +0 -1
  113. package/esm/models/mappers.d.ts +0 -23
  114. package/esm/models/mappers.d.ts.map +0 -1
  115. package/esm/models/mappers.js.map +0 -1
  116. package/esm/models/operationsMappers.d.ts +0 -2
  117. package/esm/models/operationsMappers.d.ts.map +0 -1
  118. package/esm/models/operationsMappers.js +0 -11
  119. package/esm/models/operationsMappers.js.map +0 -1
  120. package/esm/models/parameters.d.ts +0 -12
  121. package/esm/models/parameters.d.ts.map +0 -1
  122. package/esm/models/parameters.js.map +0 -1
  123. package/esm/operations/bitLockerKeys.d.ts +0 -37
  124. package/esm/operations/bitLockerKeys.d.ts.map +0 -1
  125. package/esm/operations/bitLockerKeys.js +0 -58
  126. package/esm/operations/bitLockerKeys.js.map +0 -1
  127. package/esm/operations/index.d.ts.map +0 -1
  128. package/esm/operations/index.js.map +0 -1
  129. package/esm/operations/jobs.d.ts +0 -189
  130. package/esm/operations/jobs.d.ts.map +0 -1
  131. package/esm/operations/jobs.js +0 -276
  132. package/esm/operations/jobs.js.map +0 -1
  133. package/esm/operations/locations.d.ts +0 -48
  134. package/esm/operations/locations.d.ts.map +0 -1
  135. package/esm/operations/locations.js +0 -79
  136. package/esm/operations/locations.js.map +0 -1
  137. package/esm/operations/operations.d.ts +0 -28
  138. package/esm/operations/operations.d.ts.map +0 -1
  139. package/esm/operations/operations.js +0 -51
  140. package/esm/operations/operations.js.map +0 -1
  141. package/esm/storageImportExportManagementClient.d.ts +0 -27
  142. package/esm/storageImportExportManagementClient.d.ts.map +0 -1
  143. package/esm/storageImportExportManagementClient.js +0 -41
  144. package/esm/storageImportExportManagementClient.js.map +0 -1
  145. package/esm/storageImportExportManagementClientContext.d.ts +0 -22
  146. package/esm/storageImportExportManagementClientContext.d.ts.map +0 -1
  147. package/esm/storageImportExportManagementClientContext.js +0 -60
  148. package/esm/storageImportExportManagementClientContext.js.map +0 -1
  149. package/src/models/bitLockerKeysMappers.ts +0 -17
  150. package/src/models/jobsMappers.ts +0 -27
  151. package/src/models/locationsMappers.ts +0 -17
  152. package/src/models/operationsMappers.ts +0 -17
  153. package/src/storageImportExportManagementClient.ts +0 -54
  154. package/src/storageImportExportManagementClientContext.ts +0 -67
@@ -1,97 +1,108 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/locationsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Locations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
14
13
  import * as Parameters from "../models/parameters";
15
- import { StorageImportExportManagementClientContext } from "../storageImportExportManagementClientContext";
14
+ import { StorageImportExport } from "../storageImportExport";
15
+ import {
16
+ Location,
17
+ LocationsListOptionalParams,
18
+ LocationsListResponse,
19
+ LocationsGetOptionalParams,
20
+ LocationsGetResponse
21
+ } from "../models";
16
22
 
17
- /** Class representing a Locations. */
18
- export class Locations {
19
- private readonly client: StorageImportExportManagementClientContext;
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing Locations operations. */
25
+ export class LocationsImpl implements Locations {
26
+ private readonly client: StorageImportExport;
20
27
 
21
28
  /**
22
- * Create a Locations.
23
- * @param {StorageImportExportManagementClientContext} client Reference to the service client.
29
+ * Initialize a new instance of the class Locations class.
30
+ * @param client Reference to the service client
24
31
  */
25
- constructor(client: StorageImportExportManagementClientContext) {
32
+ constructor(client: StorageImportExport) {
26
33
  this.client = client;
27
34
  }
28
35
 
29
36
  /**
30
- * Returns a list of locations to which you can ship the disks associated with an import or export
31
- * job. A location is a Microsoft data center region.
32
- * @param [options] The optional parameters
33
- * @returns Promise<Models.LocationsListResponse>
37
+ * Returns a list of locations to which you can ship the disks associated with an import or export job.
38
+ * A location is a Microsoft data center region.
39
+ * @param options The options parameters.
34
40
  */
35
- list(options?: msRest.RequestOptionsBase): Promise<Models.LocationsListResponse>;
36
- /**
37
- * @param callback The callback
38
- */
39
- list(callback: msRest.ServiceCallback<Models.LocationsResponse>): void;
40
- /**
41
- * @param options The optional parameters
42
- * @param callback The callback
43
- */
44
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.LocationsResponse>): void;
45
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.LocationsResponse>, callback?: msRest.ServiceCallback<Models.LocationsResponse>): Promise<Models.LocationsListResponse> {
46
- return this.client.sendOperationRequest(
47
- {
48
- options
41
+ public list(
42
+ options?: LocationsListOptionalParams
43
+ ): PagedAsyncIterableIterator<Location> {
44
+ const iter = this.listPagingAll(options);
45
+ return {
46
+ next() {
47
+ return iter.next();
48
+ },
49
+ [Symbol.asyncIterator]() {
50
+ return this;
49
51
  },
50
- listOperationSpec,
51
- callback) as Promise<Models.LocationsListResponse>;
52
+ byPage: () => {
53
+ return this.listPagingPage(options);
54
+ }
55
+ };
56
+ }
57
+
58
+ private async *listPagingPage(
59
+ options?: LocationsListOptionalParams
60
+ ): AsyncIterableIterator<Location[]> {
61
+ let result = await this._list(options);
62
+ yield result.value || [];
63
+ }
64
+
65
+ private async *listPagingAll(
66
+ options?: LocationsListOptionalParams
67
+ ): AsyncIterableIterator<Location> {
68
+ for await (const page of this.listPagingPage(options)) {
69
+ yield* page;
70
+ }
52
71
  }
53
72
 
54
73
  /**
55
- * Returns the details about a location to which you can ship the disks associated with an import
56
- * or export job. A location is an Azure region.
57
- * @param locationName The name of the location. For example, West US or westus.
58
- * @param [options] The optional parameters
59
- * @returns Promise<Models.LocationsGetResponse>
60
- */
61
- get(locationName: string, options?: msRest.RequestOptionsBase): Promise<Models.LocationsGetResponse>;
62
- /**
63
- * @param locationName The name of the location. For example, West US or westus.
64
- * @param callback The callback
74
+ * Returns a list of locations to which you can ship the disks associated with an import or export job.
75
+ * A location is a Microsoft data center region.
76
+ * @param options The options parameters.
65
77
  */
66
- get(locationName: string, callback: msRest.ServiceCallback<Models.Location>): void;
78
+ private _list(
79
+ options?: LocationsListOptionalParams
80
+ ): Promise<LocationsListResponse> {
81
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
82
+ }
83
+
67
84
  /**
85
+ * Returns the details about a location to which you can ship the disks associated with an import or
86
+ * export job. A location is an Azure region.
68
87
  * @param locationName The name of the location. For example, West US or westus.
69
- * @param options The optional parameters
70
- * @param callback The callback
88
+ * @param options The options parameters.
71
89
  */
72
- get(locationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Location>): void;
73
- get(locationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Location>, callback?: msRest.ServiceCallback<Models.Location>): Promise<Models.LocationsGetResponse> {
90
+ get(
91
+ locationName: string,
92
+ options?: LocationsGetOptionalParams
93
+ ): Promise<LocationsGetResponse> {
74
94
  return this.client.sendOperationRequest(
75
- {
76
- locationName,
77
- options
78
- },
79
- getOperationSpec,
80
- callback) as Promise<Models.LocationsGetResponse>;
95
+ { locationName, options },
96
+ getOperationSpec
97
+ );
81
98
  }
82
99
  }
83
-
84
100
  // Operation Specifications
85
- const serializer = new msRest.Serializer(Mappers);
86
- const listOperationSpec: msRest.OperationSpec = {
101
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
102
+
103
+ const listOperationSpec: coreClient.OperationSpec = {
104
+ path: "/providers/Microsoft.ImportExport/locations",
87
105
  httpMethod: "GET",
88
- path: "providers/Microsoft.ImportExport/locations",
89
- queryParameters: [
90
- Parameters.apiVersion
91
- ],
92
- headerParameters: [
93
- Parameters.acceptLanguage
94
- ],
95
106
  responses: {
96
107
  200: {
97
108
  bodyMapper: Mappers.LocationsResponse
@@ -100,21 +111,14 @@ const listOperationSpec: msRest.OperationSpec = {
100
111
  bodyMapper: Mappers.ErrorResponse
101
112
  }
102
113
  },
114
+ queryParameters: [Parameters.apiVersion],
115
+ urlParameters: [Parameters.$host],
116
+ headerParameters: [Parameters.accept, Parameters.acceptLanguage],
103
117
  serializer
104
118
  };
105
-
106
- const getOperationSpec: msRest.OperationSpec = {
119
+ const getOperationSpec: coreClient.OperationSpec = {
120
+ path: "/providers/Microsoft.ImportExport/locations/{locationName}",
107
121
  httpMethod: "GET",
108
- path: "providers/Microsoft.ImportExport/locations/{locationName}",
109
- urlParameters: [
110
- Parameters.locationName
111
- ],
112
- queryParameters: [
113
- Parameters.apiVersion
114
- ],
115
- headerParameters: [
116
- Parameters.acceptLanguage
117
- ],
118
122
  responses: {
119
123
  200: {
120
124
  bodyMapper: Mappers.Location
@@ -123,5 +127,8 @@ const getOperationSpec: msRest.OperationSpec = {
123
127
  bodyMapper: Mappers.ErrorResponse
124
128
  }
125
129
  },
130
+ queryParameters: [Parameters.apiVersion],
131
+ urlParameters: [Parameters.$host, Parameters.locationName],
132
+ headerParameters: [Parameters.accept, Parameters.acceptLanguage],
126
133
  serializer
127
134
  };
@@ -1,67 +1,88 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/operationsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Operations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
14
13
  import * as Parameters from "../models/parameters";
15
- import { StorageImportExportManagementClientContext } from "../storageImportExportManagementClientContext";
14
+ import { StorageImportExport } from "../storageImportExport";
15
+ import {
16
+ Operation,
17
+ OperationsListOptionalParams,
18
+ OperationsListResponse
19
+ } from "../models";
16
20
 
17
- /** Class representing a Operations. */
18
- export class Operations {
19
- private readonly client: StorageImportExportManagementClientContext;
21
+ /// <reference lib="esnext.asynciterable" />
22
+ /** Class containing Operations operations. */
23
+ export class OperationsImpl implements Operations {
24
+ private readonly client: StorageImportExport;
20
25
 
21
26
  /**
22
- * Create a Operations.
23
- * @param {StorageImportExportManagementClientContext} client Reference to the service client.
27
+ * Initialize a new instance of the class Operations class.
28
+ * @param client Reference to the service client
24
29
  */
25
- constructor(client: StorageImportExportManagementClientContext) {
30
+ constructor(client: StorageImportExport) {
26
31
  this.client = client;
27
32
  }
28
33
 
29
34
  /**
30
35
  * Returns the list of operations supported by the import/export resource provider.
31
- * @param [options] The optional parameters
32
- * @returns Promise<Models.OperationsListResponse>
36
+ * @param options The options parameters.
33
37
  */
34
- list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
35
- /**
36
- * @param callback The callback
37
- */
38
- list(callback: msRest.ServiceCallback<Models.ListOperationsResponse>): void;
38
+ public list(
39
+ options?: OperationsListOptionalParams
40
+ ): PagedAsyncIterableIterator<Operation> {
41
+ const iter = this.listPagingAll(options);
42
+ return {
43
+ next() {
44
+ return iter.next();
45
+ },
46
+ [Symbol.asyncIterator]() {
47
+ return this;
48
+ },
49
+ byPage: () => {
50
+ return this.listPagingPage(options);
51
+ }
52
+ };
53
+ }
54
+
55
+ private async *listPagingPage(
56
+ options?: OperationsListOptionalParams
57
+ ): AsyncIterableIterator<Operation[]> {
58
+ let result = await this._list(options);
59
+ yield result.value || [];
60
+ }
61
+
62
+ private async *listPagingAll(
63
+ options?: OperationsListOptionalParams
64
+ ): AsyncIterableIterator<Operation> {
65
+ for await (const page of this.listPagingPage(options)) {
66
+ yield* page;
67
+ }
68
+ }
69
+
39
70
  /**
40
- * @param options The optional parameters
41
- * @param callback The callback
71
+ * Returns the list of operations supported by the import/export resource provider.
72
+ * @param options The options parameters.
42
73
  */
43
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ListOperationsResponse>): void;
44
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ListOperationsResponse>, callback?: msRest.ServiceCallback<Models.ListOperationsResponse>): Promise<Models.OperationsListResponse> {
45
- return this.client.sendOperationRequest(
46
- {
47
- options
48
- },
49
- listOperationSpec,
50
- callback) as Promise<Models.OperationsListResponse>;
74
+ private _list(
75
+ options?: OperationsListOptionalParams
76
+ ): Promise<OperationsListResponse> {
77
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
51
78
  }
52
79
  }
53
-
54
80
  // Operation Specifications
55
- const serializer = new msRest.Serializer(Mappers);
56
- const listOperationSpec: msRest.OperationSpec = {
81
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
82
+
83
+ const listOperationSpec: coreClient.OperationSpec = {
84
+ path: "/providers/Microsoft.ImportExport/operations",
57
85
  httpMethod: "GET",
58
- path: "providers/Microsoft.ImportExport/operations",
59
- queryParameters: [
60
- Parameters.apiVersion
61
- ],
62
- headerParameters: [
63
- Parameters.acceptLanguage
64
- ],
65
86
  responses: {
66
87
  200: {
67
88
  bodyMapper: Mappers.ListOperationsResponse
@@ -70,5 +91,8 @@ const listOperationSpec: msRest.OperationSpec = {
70
91
  bodyMapper: Mappers.ErrorResponse
71
92
  }
72
93
  },
94
+ queryParameters: [Parameters.apiVersion],
95
+ urlParameters: [Parameters.$host],
96
+ headerParameters: [Parameters.accept, Parameters.acceptLanguage],
73
97
  serializer
74
98
  };
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { DriveBitLockerKey, BitLockerKeysListOptionalParams } from "../models";
11
+
12
+ /// <reference lib="esnext.asynciterable" />
13
+ /** Interface representing a BitLockerKeys. */
14
+ export interface BitLockerKeys {
15
+ /**
16
+ * Returns the BitLocker Keys for all drives in the specified job.
17
+ * @param jobName The name of the import/export job.
18
+ * @param resourceGroupName The resource group name uniquely identifies the resource group within the
19
+ * user subscription.
20
+ * @param options The options parameters.
21
+ */
22
+ list(
23
+ jobName: string,
24
+ resourceGroupName: string,
25
+ options?: BitLockerKeysListOptionalParams
26
+ ): PagedAsyncIterableIterator<DriveBitLockerKey>;
27
+ }
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ export * from "./locations";
10
+ export * from "./jobs";
11
+ export * from "./bitLockerKeys";
12
+ export * from "./operations";
@@ -0,0 +1,99 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import {
11
+ JobResponse,
12
+ JobsListBySubscriptionOptionalParams,
13
+ JobsListByResourceGroupOptionalParams,
14
+ JobsGetOptionalParams,
15
+ JobsGetResponse,
16
+ UpdateJobParameters,
17
+ JobsUpdateOptionalParams,
18
+ JobsUpdateResponse,
19
+ PutJobParameters,
20
+ JobsCreateOptionalParams,
21
+ JobsCreateResponse,
22
+ JobsDeleteOptionalParams
23
+ } from "../models";
24
+
25
+ /// <reference lib="esnext.asynciterable" />
26
+ /** Interface representing a Jobs. */
27
+ export interface Jobs {
28
+ /**
29
+ * Returns all active and completed jobs in a subscription.
30
+ * @param options The options parameters.
31
+ */
32
+ listBySubscription(
33
+ options?: JobsListBySubscriptionOptionalParams
34
+ ): PagedAsyncIterableIterator<JobResponse>;
35
+ /**
36
+ * Returns all active and completed jobs in a resource group.
37
+ * @param resourceGroupName The resource group name uniquely identifies the resource group within the
38
+ * user subscription.
39
+ * @param options The options parameters.
40
+ */
41
+ listByResourceGroup(
42
+ resourceGroupName: string,
43
+ options?: JobsListByResourceGroupOptionalParams
44
+ ): PagedAsyncIterableIterator<JobResponse>;
45
+ /**
46
+ * Gets information about an existing job.
47
+ * @param jobName The name of the import/export job.
48
+ * @param resourceGroupName The resource group name uniquely identifies the resource group within the
49
+ * user subscription.
50
+ * @param options The options parameters.
51
+ */
52
+ get(
53
+ jobName: string,
54
+ resourceGroupName: string,
55
+ options?: JobsGetOptionalParams
56
+ ): Promise<JobsGetResponse>;
57
+ /**
58
+ * Updates specific properties of a job. You can call this operation to notify the Import/Export
59
+ * service that the hard drives comprising the import or export job have been shipped to the Microsoft
60
+ * data center. It can also be used to cancel an existing job.
61
+ * @param jobName The name of the import/export job.
62
+ * @param resourceGroupName The resource group name uniquely identifies the resource group within the
63
+ * user subscription.
64
+ * @param body The parameters to update in the job
65
+ * @param options The options parameters.
66
+ */
67
+ update(
68
+ jobName: string,
69
+ resourceGroupName: string,
70
+ body: UpdateJobParameters,
71
+ options?: JobsUpdateOptionalParams
72
+ ): Promise<JobsUpdateResponse>;
73
+ /**
74
+ * Creates a new job or updates an existing job in the specified subscription.
75
+ * @param jobName The name of the import/export job.
76
+ * @param resourceGroupName The resource group name uniquely identifies the resource group within the
77
+ * user subscription.
78
+ * @param body The parameters used for creating the job
79
+ * @param options The options parameters.
80
+ */
81
+ create(
82
+ jobName: string,
83
+ resourceGroupName: string,
84
+ body: PutJobParameters,
85
+ options?: JobsCreateOptionalParams
86
+ ): Promise<JobsCreateResponse>;
87
+ /**
88
+ * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.
89
+ * @param jobName The name of the import/export job.
90
+ * @param resourceGroupName The resource group name uniquely identifies the resource group within the
91
+ * user subscription.
92
+ * @param options The options parameters.
93
+ */
94
+ delete(
95
+ jobName: string,
96
+ resourceGroupName: string,
97
+ options?: JobsDeleteOptionalParams
98
+ ): Promise<void>;
99
+ }
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import {
11
+ Location,
12
+ LocationsListOptionalParams,
13
+ LocationsGetOptionalParams,
14
+ LocationsGetResponse
15
+ } from "../models";
16
+
17
+ /// <reference lib="esnext.asynciterable" />
18
+ /** Interface representing a Locations. */
19
+ export interface Locations {
20
+ /**
21
+ * Returns a list of locations to which you can ship the disks associated with an import or export job.
22
+ * A location is a Microsoft data center region.
23
+ * @param options The options parameters.
24
+ */
25
+ list(
26
+ options?: LocationsListOptionalParams
27
+ ): PagedAsyncIterableIterator<Location>;
28
+ /**
29
+ * Returns the details about a location to which you can ship the disks associated with an import or
30
+ * export job. A location is an Azure region.
31
+ * @param locationName The name of the location. For example, West US or westus.
32
+ * @param options The options parameters.
33
+ */
34
+ get(
35
+ locationName: string,
36
+ options?: LocationsGetOptionalParams
37
+ ): Promise<LocationsGetResponse>;
38
+ }
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Operation, OperationsListOptionalParams } from "../models";
11
+
12
+ /// <reference lib="esnext.asynciterable" />
13
+ /** Interface representing a Operations. */
14
+ export interface Operations {
15
+ /**
16
+ * Returns the list of operations supported by the import/export resource provider.
17
+ * @param options The options parameters.
18
+ */
19
+ list(
20
+ options?: OperationsListOptionalParams
21
+ ): PagedAsyncIterableIterator<Operation>;
22
+ }
@@ -0,0 +1,92 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import * as coreClient from "@azure/core-client";
10
+ import * as coreAuth from "@azure/core-auth";
11
+ import {
12
+ LocationsImpl,
13
+ JobsImpl,
14
+ BitLockerKeysImpl,
15
+ OperationsImpl
16
+ } from "./operations";
17
+ import {
18
+ Locations,
19
+ Jobs,
20
+ BitLockerKeys,
21
+ Operations
22
+ } from "./operationsInterfaces";
23
+ import { StorageImportExportOptionalParams } from "./models";
24
+
25
+ export class StorageImportExport extends coreClient.ServiceClient {
26
+ $host: string;
27
+ apiVersion: string;
28
+ acceptLanguage?: string;
29
+ subscriptionId: string;
30
+
31
+ /**
32
+ * Initializes a new instance of the StorageImportExport class.
33
+ * @param credentials Subscription credentials which uniquely identify client subscription.
34
+ * @param subscriptionId The subscription ID for the Azure user.
35
+ * @param options The parameter options
36
+ */
37
+ constructor(
38
+ credentials: coreAuth.TokenCredential,
39
+ subscriptionId: string,
40
+ options?: StorageImportExportOptionalParams
41
+ ) {
42
+ if (credentials === undefined) {
43
+ throw new Error("'credentials' cannot be null");
44
+ }
45
+ if (subscriptionId === undefined) {
46
+ throw new Error("'subscriptionId' cannot be null");
47
+ }
48
+
49
+ // Initializing default values for options
50
+ if (!options) {
51
+ options = {};
52
+ }
53
+ const defaults: StorageImportExportOptionalParams = {
54
+ requestContentType: "application/json; charset=utf-8",
55
+ credential: credentials
56
+ };
57
+
58
+ const packageDetails = `azsdk-js-arm-storageimportexport/2.0.0`;
59
+ const userAgentPrefix =
60
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
61
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
62
+ : `${packageDetails}`;
63
+
64
+ if (!options.credentialScopes) {
65
+ options.credentialScopes = ["https://management.azure.com/.default"];
66
+ }
67
+ const optionsWithDefaults = {
68
+ ...defaults,
69
+ ...options,
70
+ userAgentOptions: {
71
+ userAgentPrefix
72
+ },
73
+ baseUri: options.endpoint || "https://management.azure.com"
74
+ };
75
+ super(optionsWithDefaults);
76
+ // Parameter assignments
77
+ this.subscriptionId = subscriptionId;
78
+
79
+ // Assigning values to Constant parameters
80
+ this.$host = options.$host || "https://management.azure.com";
81
+ this.apiVersion = options.apiVersion || "2021-01-01";
82
+ this.locations = new LocationsImpl(this);
83
+ this.jobs = new JobsImpl(this);
84
+ this.bitLockerKeys = new BitLockerKeysImpl(this);
85
+ this.operations = new OperationsImpl(this);
86
+ }
87
+
88
+ locations: Locations;
89
+ jobs: Jobs;
90
+ bitLockerKeys: BitLockerKeys;
91
+ operations: Operations;
92
+ }