@azure/arm-imagebuilder 1.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 (77) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +98 -0
  4. package/dist/index.js +2270 -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/imageBuilderClient.d.ts +20 -0
  9. package/dist-esm/src/imageBuilderClient.d.ts.map +1 -0
  10. package/dist-esm/src/imageBuilderClient.js +53 -0
  11. package/dist-esm/src/imageBuilderClient.js.map +1 -0
  12. package/dist-esm/src/index.d.ts +5 -0
  13. package/dist-esm/src/index.d.ts.map +1 -0
  14. package/dist-esm/src/index.js +12 -0
  15. package/dist-esm/src/index.js.map +1 -0
  16. package/dist-esm/src/lroImpl.d.ts +16 -0
  17. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  18. package/dist-esm/src/lroImpl.js +29 -0
  19. package/dist-esm/src/lroImpl.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +562 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +37 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +53 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/dist-esm/src/models/mappers.js +1092 -0
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +13 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +118 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/dist-esm/src/operations/index.d.ts +3 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/dist-esm/src/operations/index.js +10 -0
  35. package/dist-esm/src/operations/index.js.map +1 -0
  36. package/dist-esm/src/operations/operations.d.ts +32 -0
  37. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/operations.js +120 -0
  39. package/dist-esm/src/operations/operations.js.map +1 -0
  40. package/dist-esm/src/operations/virtualMachineImageTemplates.d.ts +167 -0
  41. package/dist-esm/src/operations/virtualMachineImageTemplates.d.ts.map +1 -0
  42. package/dist-esm/src/operations/virtualMachineImageTemplates.js +791 -0
  43. package/dist-esm/src/operations/virtualMachineImageTemplates.js.map +1 -0
  44. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
  45. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  46. package/dist-esm/src/operationsInterfaces/index.js +10 -0
  47. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  48. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  49. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  50. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  51. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/virtualMachineImageTemplates.d.ts +114 -0
  53. package/dist-esm/src/operationsInterfaces/virtualMachineImageTemplates.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/virtualMachineImageTemplates.js +9 -0
  55. package/dist-esm/src/operationsInterfaces/virtualMachineImageTemplates.js.map +1 -0
  56. package/dist-esm/test/imagebuilder_examples.d.ts +4 -0
  57. package/dist-esm/test/imagebuilder_examples.d.ts.map +1 -0
  58. package/dist-esm/test/imagebuilder_examples.js +201 -0
  59. package/dist-esm/test/imagebuilder_examples.js.map +1 -0
  60. package/package.json +95 -0
  61. package/review/arm-imagebuilder.api.md +509 -0
  62. package/rollup.config.js +188 -0
  63. package/src/imageBuilderClient.ts +83 -0
  64. package/src/index.ts +12 -0
  65. package/src/lroImpl.ts +34 -0
  66. package/src/models/index.ts +668 -0
  67. package/src/models/mappers.ts +1214 -0
  68. package/src/models/parameters.ts +137 -0
  69. package/src/operations/index.ts +10 -0
  70. package/src/operations/operations.ts +137 -0
  71. package/src/operations/virtualMachineImageTemplates.ts +1085 -0
  72. package/src/operationsInterfaces/index.ts +10 -0
  73. package/src/operationsInterfaces/operations.ts +22 -0
  74. package/src/operationsInterfaces/virtualMachineImageTemplates.ts +213 -0
  75. package/tsconfig.json +19 -0
  76. package/types/arm-imagebuilder.d.ts +779 -0
  77. package/types/tsdoc-metadata.json +11 -0
@@ -0,0 +1,137 @@
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 {
10
+ OperationParameter,
11
+ OperationURLParameter,
12
+ OperationQueryParameter
13
+ } from "@azure/core-client";
14
+ import {
15
+ ImageTemplate as ImageTemplateMapper,
16
+ ImageTemplateUpdateParameters as ImageTemplateUpdateParametersMapper
17
+ } from "../models/mappers";
18
+
19
+ export const accept: OperationParameter = {
20
+ parameterPath: "accept",
21
+ mapper: {
22
+ defaultValue: "application/json",
23
+ isConstant: true,
24
+ serializedName: "Accept",
25
+ type: {
26
+ name: "String"
27
+ }
28
+ }
29
+ };
30
+
31
+ export const $host: OperationURLParameter = {
32
+ parameterPath: "$host",
33
+ mapper: {
34
+ serializedName: "$host",
35
+ required: true,
36
+ type: {
37
+ name: "String"
38
+ }
39
+ },
40
+ skipEncoding: true
41
+ };
42
+
43
+ export const subscriptionId: OperationURLParameter = {
44
+ parameterPath: "subscriptionId",
45
+ mapper: {
46
+ serializedName: "subscriptionId",
47
+ required: true,
48
+ type: {
49
+ name: "String"
50
+ }
51
+ }
52
+ };
53
+
54
+ export const apiVersion: OperationQueryParameter = {
55
+ parameterPath: "apiVersion",
56
+ mapper: {
57
+ defaultValue: "2021-10-01",
58
+ isConstant: true,
59
+ serializedName: "api-version",
60
+ type: {
61
+ name: "String"
62
+ }
63
+ }
64
+ };
65
+
66
+ export const resourceGroupName: OperationURLParameter = {
67
+ parameterPath: "resourceGroupName",
68
+ mapper: {
69
+ serializedName: "resourceGroupName",
70
+ required: true,
71
+ type: {
72
+ name: "String"
73
+ }
74
+ }
75
+ };
76
+
77
+ export const contentType: OperationParameter = {
78
+ parameterPath: ["options", "contentType"],
79
+ mapper: {
80
+ defaultValue: "application/json",
81
+ isConstant: true,
82
+ serializedName: "Content-Type",
83
+ type: {
84
+ name: "String"
85
+ }
86
+ }
87
+ };
88
+
89
+ export const parameters: OperationParameter = {
90
+ parameterPath: "parameters",
91
+ mapper: ImageTemplateMapper
92
+ };
93
+
94
+ export const imageTemplateName: OperationURLParameter = {
95
+ parameterPath: "imageTemplateName",
96
+ mapper: {
97
+ constraints: {
98
+ Pattern: new RegExp("^[A-Za-z0-9-_.]{1,64}$")
99
+ },
100
+ serializedName: "imageTemplateName",
101
+ required: true,
102
+ type: {
103
+ name: "String"
104
+ }
105
+ }
106
+ };
107
+
108
+ export const parameters1: OperationParameter = {
109
+ parameterPath: "parameters",
110
+ mapper: ImageTemplateUpdateParametersMapper
111
+ };
112
+
113
+ export const runOutputName: OperationURLParameter = {
114
+ parameterPath: "runOutputName",
115
+ mapper: {
116
+ constraints: {
117
+ Pattern: new RegExp("^[A-Za-z0-9-_.]{1,64}$")
118
+ },
119
+ serializedName: "runOutputName",
120
+ required: true,
121
+ type: {
122
+ name: "String"
123
+ }
124
+ }
125
+ };
126
+
127
+ export const nextLink: OperationURLParameter = {
128
+ parameterPath: "nextLink",
129
+ mapper: {
130
+ serializedName: "nextLink",
131
+ required: true,
132
+ type: {
133
+ name: "String"
134
+ }
135
+ },
136
+ skipEncoding: true
137
+ };
@@ -0,0 +1,10 @@
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 "./virtualMachineImageTemplates";
10
+ export * from "./operations";
@@ -0,0 +1,137 @@
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 { Operations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { ImageBuilderClient } from "../imageBuilderClient";
15
+ import {
16
+ Operation,
17
+ OperationsListNextOptionalParams,
18
+ OperationsListOptionalParams,
19
+ OperationsListResponse,
20
+ OperationsListNextResponse
21
+ } from "../models";
22
+
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing Operations operations. */
25
+ export class OperationsImpl implements Operations {
26
+ private readonly client: ImageBuilderClient;
27
+
28
+ /**
29
+ * Initialize a new instance of the class Operations class.
30
+ * @param client Reference to the service client
31
+ */
32
+ constructor(client: ImageBuilderClient) {
33
+ this.client = client;
34
+ }
35
+
36
+ /**
37
+ * Lists available operations for the Microsoft.VirtualMachineImages provider
38
+ * @param options The options parameters.
39
+ */
40
+ public list(
41
+ options?: OperationsListOptionalParams
42
+ ): PagedAsyncIterableIterator<Operation> {
43
+ const iter = this.listPagingAll(options);
44
+ return {
45
+ next() {
46
+ return iter.next();
47
+ },
48
+ [Symbol.asyncIterator]() {
49
+ return this;
50
+ },
51
+ byPage: () => {
52
+ return this.listPagingPage(options);
53
+ }
54
+ };
55
+ }
56
+
57
+ private async *listPagingPage(
58
+ options?: OperationsListOptionalParams
59
+ ): AsyncIterableIterator<Operation[]> {
60
+ let result = await this._list(options);
61
+ yield result.value || [];
62
+ let continuationToken = result.nextLink;
63
+ while (continuationToken) {
64
+ result = await this._listNext(continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ yield result.value || [];
67
+ }
68
+ }
69
+
70
+ private async *listPagingAll(
71
+ options?: OperationsListOptionalParams
72
+ ): AsyncIterableIterator<Operation> {
73
+ for await (const page of this.listPagingPage(options)) {
74
+ yield* page;
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Lists available operations for the Microsoft.VirtualMachineImages provider
80
+ * @param options The options parameters.
81
+ */
82
+ private _list(
83
+ options?: OperationsListOptionalParams
84
+ ): Promise<OperationsListResponse> {
85
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
86
+ }
87
+
88
+ /**
89
+ * ListNext
90
+ * @param nextLink The nextLink from the previous successful call to the List method.
91
+ * @param options The options parameters.
92
+ */
93
+ private _listNext(
94
+ nextLink: string,
95
+ options?: OperationsListNextOptionalParams
96
+ ): Promise<OperationsListNextResponse> {
97
+ return this.client.sendOperationRequest(
98
+ { nextLink, options },
99
+ listNextOperationSpec
100
+ );
101
+ }
102
+ }
103
+ // Operation Specifications
104
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
105
+
106
+ const listOperationSpec: coreClient.OperationSpec = {
107
+ path: "/providers/Microsoft.VirtualMachineImages/operations",
108
+ httpMethod: "GET",
109
+ responses: {
110
+ 200: {
111
+ bodyMapper: Mappers.OperationListResult
112
+ },
113
+ default: {
114
+ bodyMapper: Mappers.CloudError
115
+ }
116
+ },
117
+ queryParameters: [Parameters.apiVersion],
118
+ urlParameters: [Parameters.$host],
119
+ headerParameters: [Parameters.accept],
120
+ serializer
121
+ };
122
+ const listNextOperationSpec: coreClient.OperationSpec = {
123
+ path: "{nextLink}",
124
+ httpMethod: "GET",
125
+ responses: {
126
+ 200: {
127
+ bodyMapper: Mappers.OperationListResult
128
+ },
129
+ default: {
130
+ bodyMapper: Mappers.CloudError
131
+ }
132
+ },
133
+ queryParameters: [Parameters.apiVersion],
134
+ urlParameters: [Parameters.$host, Parameters.nextLink],
135
+ headerParameters: [Parameters.accept],
136
+ serializer
137
+ };