@azure/storage-blob 12.13.0-alpha.20230126.2 → 12.13.0-beta.1

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 (117) hide show
  1. package/dist/index.js +5893 -5343
  2. package/dist/index.js.map +1 -1
  3. package/dist-esm/storage-blob/src/BatchResponse.js.map +1 -1
  4. package/dist-esm/storage-blob/src/BatchResponseParser.js +2 -3
  5. package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
  6. package/dist-esm/storage-blob/src/BlobBatch.js +87 -74
  7. package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
  8. package/dist-esm/storage-blob/src/BlobBatchClient.js +23 -10
  9. package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
  10. package/dist-esm/storage-blob/src/BlobDownloadResponse.js +1 -1
  11. package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
  12. package/dist-esm/storage-blob/src/BlobLeaseClient.js +83 -54
  13. package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
  14. package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -1
  15. package/dist-esm/storage-blob/src/BlobQueryResponse.js +1 -1
  16. package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
  17. package/dist-esm/storage-blob/src/BlobServiceClient.js +165 -67
  18. package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
  19. package/dist-esm/storage-blob/src/Clients.js +889 -651
  20. package/dist-esm/storage-blob/src/Clients.js.map +1 -1
  21. package/dist-esm/storage-blob/src/ContainerClient.js +238 -115
  22. package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
  23. package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -1
  24. package/dist-esm/storage-blob/src/Pipeline.js +40 -194
  25. package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
  26. package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +1 -1
  27. package/dist-esm/storage-blob/src/StorageClient.js +17 -4
  28. package/dist-esm/storage-blob/src/StorageClient.js.map +1 -1
  29. package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -1
  30. package/dist-esm/storage-blob/src/TelemetryPolicyFactory.js +50 -0
  31. package/dist-esm/storage-blob/src/TelemetryPolicyFactory.js.map +1 -0
  32. package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +1 -1
  33. package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -1
  34. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -1
  35. package/dist-esm/storage-blob/src/generated/src/index.js +1 -1
  36. package/dist-esm/storage-blob/src/generated/src/index.js.map +1 -1
  37. package/dist-esm/storage-blob/src/generated/src/models/index.js +1 -248
  38. package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -1
  39. package/dist-esm/storage-blob/src/generated/src/models/mappers.js +11 -13
  40. package/dist-esm/storage-blob/src/generated/src/models/mappers.js.map +1 -1
  41. package/dist-esm/storage-blob/src/generated/src/models/parameters.js +5 -5
  42. package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -1
  43. package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js +27 -11
  44. package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js.map +1 -1
  45. package/dist-esm/storage-blob/src/generated/src/operations/blob.js +110 -28
  46. package/dist-esm/storage-blob/src/generated/src/operations/blob.js.map +1 -1
  47. package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js +43 -16
  48. package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js.map +1 -1
  49. package/dist-esm/storage-blob/src/generated/src/operations/container.js +86 -22
  50. package/dist-esm/storage-blob/src/generated/src/operations/container.js.map +1 -1
  51. package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js +54 -16
  52. package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js.map +1 -1
  53. package/dist-esm/storage-blob/src/generated/src/operations/service.js +42 -12
  54. package/dist-esm/storage-blob/src/generated/src/operations/service.js.map +1 -1
  55. package/dist-esm/storage-blob/src/generated/src/storageClient.js +10 -32
  56. package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
  57. package/dist-esm/storage-blob/src/generated/src/storageClientContext.js +39 -0
  58. package/dist-esm/storage-blob/src/generated/src/storageClientContext.js.map +1 -0
  59. package/dist-esm/storage-blob/src/generatedModels.js.map +1 -1
  60. package/dist-esm/storage-blob/src/index.browser.js +2 -3
  61. package/dist-esm/storage-blob/src/index.browser.js.map +1 -1
  62. package/dist-esm/storage-blob/src/index.js +2 -3
  63. package/dist-esm/storage-blob/src/index.js.map +1 -1
  64. package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -1
  65. package/dist-esm/storage-blob/src/policies/CredentialPolicy.js +1 -1
  66. package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +1 -1
  67. package/dist-esm/storage-blob/src/policies/StorageBearerTokenChallengeAuthenticationPolicy.js +245 -0
  68. package/dist-esm/storage-blob/src/policies/StorageBearerTokenChallengeAuthenticationPolicy.js.map +1 -0
  69. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +1 -2
  70. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
  71. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +1 -1
  72. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
  73. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  74. package/dist-esm/storage-blob/src/policies/TelemetryPolicy.js +36 -0
  75. package/dist-esm/storage-blob/src/policies/TelemetryPolicy.js.map +1 -0
  76. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +1 -1
  77. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
  78. package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -1
  79. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +2 -10
  80. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
  81. package/dist-esm/storage-blob/src/utils/cache.js +2 -8
  82. package/dist-esm/storage-blob/src/utils/cache.js.map +1 -1
  83. package/dist-esm/storage-blob/src/utils/constants.js +2 -2
  84. package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
  85. package/dist-esm/storage-blob/src/utils/tracing.js +18 -5
  86. package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -1
  87. package/dist-esm/storage-blob/src/utils/utils.common.js +42 -91
  88. package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
  89. package/package.json +8 -16
  90. package/types/3.1/storage-blob.d.ts +625 -2332
  91. package/types/latest/storage-blob.d.ts +606 -2493
  92. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js +0 -9
  93. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js.map +0 -1
  94. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js +0 -9
  95. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js.map +0 -1
  96. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js +0 -9
  97. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js.map +0 -1
  98. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js +0 -9
  99. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js.map +0 -1
  100. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js +0 -14
  101. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js.map +0 -1
  102. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js +0 -9
  103. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js.map +0 -1
  104. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js +0 -9
  105. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js.map +0 -1
  106. package/dist-esm/storage-blob/src/policies/PathParameterWorkaroundPolicy.js +0 -25
  107. package/dist-esm/storage-blob/src/policies/PathParameterWorkaroundPolicy.js.map +0 -1
  108. package/dist-esm/storage-blob/src/policies/RequestPolicy.js +0 -40
  109. package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +0 -1
  110. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +0 -31
  111. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +0 -1
  112. package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +0 -165
  113. package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +0 -1
  114. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +0 -18
  115. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +0 -1
  116. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +0 -131
  117. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +0 -1
@@ -5,11 +5,11 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import * as coreClient from "@azure/core-client";
8
+ import * as coreHttp from "@azure/core-http";
9
9
  import * as Mappers from "../models/mappers";
10
10
  import * as Parameters from "../models/parameters";
11
- /** Class containing BlockBlob operations. */
12
- export class BlockBlobImpl {
11
+ /** Class representing a BlockBlob. */
12
+ export class BlockBlob {
13
13
  /**
14
14
  * Initialize a new instance of the class BlockBlob class.
15
15
  * @param client Reference to the service client
@@ -27,7 +27,12 @@ export class BlockBlobImpl {
27
27
  * @param options The options parameters.
28
28
  */
29
29
  upload(contentLength, body, options) {
30
- return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec);
30
+ const operationArguments = {
31
+ contentLength,
32
+ body,
33
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
34
+ };
35
+ return this.client.sendOperationRequest(operationArguments, uploadOperationSpec);
31
36
  }
32
37
  /**
33
38
  * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read
@@ -43,7 +48,12 @@ export class BlockBlobImpl {
43
48
  * @param options The options parameters.
44
49
  */
45
50
  putBlobFromUrl(contentLength, copySource, options) {
46
- return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec);
51
+ const operationArguments = {
52
+ contentLength,
53
+ copySource,
54
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
55
+ };
56
+ return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec);
47
57
  }
48
58
  /**
49
59
  * The Stage Block operation creates a new block to be committed as part of a blob
@@ -55,7 +65,13 @@ export class BlockBlobImpl {
55
65
  * @param options The options parameters.
56
66
  */
57
67
  stageBlock(blockId, contentLength, body, options) {
58
- return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec);
68
+ const operationArguments = {
69
+ blockId,
70
+ contentLength,
71
+ body,
72
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
73
+ };
74
+ return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec);
59
75
  }
60
76
  /**
61
77
  * The Stage Block operation creates a new block to be committed as part of a blob where the contents
@@ -68,7 +84,13 @@ export class BlockBlobImpl {
68
84
  * @param options The options parameters.
69
85
  */
70
86
  stageBlockFromURL(blockId, contentLength, sourceUrl, options) {
71
- return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec);
87
+ const operationArguments = {
88
+ blockId,
89
+ contentLength,
90
+ sourceUrl,
91
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
92
+ };
93
+ return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec);
72
94
  }
73
95
  /**
74
96
  * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the
@@ -82,7 +104,11 @@ export class BlockBlobImpl {
82
104
  * @param options The options parameters.
83
105
  */
84
106
  commitBlockList(blocks, options) {
85
- return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec);
107
+ const operationArguments = {
108
+ blocks,
109
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
110
+ };
111
+ return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec);
86
112
  }
87
113
  /**
88
114
  * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block
@@ -92,11 +118,16 @@ export class BlockBlobImpl {
92
118
  * @param options The options parameters.
93
119
  */
94
120
  getBlockList(listType, options) {
95
- return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec);
121
+ const operationArguments = {
122
+ listType,
123
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
124
+ };
125
+ return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec);
96
126
  }
97
127
  }
98
128
  // Operation Specifications
99
- const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true);
129
+ const xmlSerializer = new coreHttp.Serializer(Mappers, /* isXml */ true);
130
+ const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
100
131
  const uploadOperationSpec = {
101
132
  path: "/{containerName}/{blob}",
102
133
  httpMethod: "PUT",
@@ -144,10 +175,8 @@ const uploadOperationSpec = {
144
175
  Parameters.accept2,
145
176
  Parameters.blobType2
146
177
  ],
147
- isXML: true,
148
- contentType: "application/xml; charset=utf-8",
149
178
  mediaType: "binary",
150
- serializer: xmlSerializer
179
+ serializer
151
180
  };
152
181
  const putBlobFromUrlOperationSpec = {
153
182
  path: "/{containerName}/{blob}",
@@ -236,10 +265,8 @@ const stageBlockOperationSpec = {
236
265
  Parameters.contentType1,
237
266
  Parameters.accept2
238
267
  ],
239
- isXML: true,
240
- contentType: "application/xml; charset=utf-8",
241
268
  mediaType: "binary",
242
- serializer: xmlSerializer
269
+ serializer
243
270
  };
244
271
  const stageBlockFromURLOperationSpec = {
245
272
  path: "/{containerName}/{blob}",
@@ -1 +1 @@
1
- {"version":3,"file":"blockBlob.js","sourceRoot":"","sources":["../../../../../../src/generated/src/operations/blockBlob.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAmBnD,6CAA6C;AAC7C,MAAM,OAAO,aAAa;IAGxB;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CACJ,aAAqB,EACrB,IAAsC,EACtC,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,EAChC,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,cAAc,CACZ,aAAqB,EACrB,UAAkB,EAClB,OAA+C;QAE/C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,EACtC,2BAA2B,CAC5B,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,UAAU,CACR,OAAe,EACf,aAAqB,EACrB,IAAsC,EACtC,OAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,EACzC,uBAAuB,CACxB,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,iBAAiB,CACf,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,OAAkD;QAElD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,EAC9C,8BAA8B,CAC/B,CAAC;IACJ,C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K;IAChB,UAAU,EAAE,aAAa;CAC1B,CAAC;AACF,MAAM,yBAAyB,GAA6B;IAC1D,IAAI,EAAE,yBAAyB;IAC/B,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,SAAS;YAC7B,aAAa,EAAE,OAAO,CAAC,4BAA4B;SACpD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,qCAAqC;SAC7D;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,QAAQ;KACpB;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;IAC/B,gBAAgB,EAAE;QAChB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,MAAM;KAClB;IACD,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,aAAa;CAC1B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { BlockBlob } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClient } from \"../storageClient\";\nimport {\n BlockBlobUploadOptionalParams,\n BlockBlobUploadResponse,\n BlockBlobPutBlobFromUrlOptionalParams,\n BlockBlobPutBlobFromUrlResponse,\n BlockBlobStageBlockOptionalParams,\n BlockBlobStageBlockResponse,\n BlockBlobStageBlockFromURLOptionalParams,\n BlockBlobStageBlockFromURLResponse,\n BlockLookupList,\n BlockBlobCommitBlockListOptionalParams,\n BlockBlobCommitBlockListResponse,\n BlockListType,\n BlockBlobGetBlockListOptionalParams,\n BlockBlobGetBlockListResponse\n} from \"../models\";\n\n/** Class containing BlockBlob operations. */\nexport class BlockBlobImpl implements BlockBlob {\n private readonly client: StorageClient;\n\n /**\n * Initialize a new instance of the class BlockBlob class.\n * @param client Reference to the service client\n */\n constructor(client: StorageClient) {\n this.client = client;\n }\n\n /**\n * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing\n * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put\n * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a\n * partial update of the content of a block blob, use the Put Block List operation.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n upload(\n contentLength: number,\n body: coreRestPipeline.RequestBodyType,\n options?: BlockBlobUploadOptionalParams\n ): Promise<BlockBlobUploadResponse> {\n return this.client.sendOperationRequest(\n { contentLength, body, options },\n uploadOperationSpec\n );\n }\n\n /**\n * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read\n * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are\n * not supported with Put Blob from URL; the content of an existing blob is overwritten with the\n * content of the new blob. To perform partial updates to a block blob’s contents using a source URL,\n * use the Put Block from URL API in conjunction with Put Block List.\n * @param contentLength The length of the request.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to\n * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would\n * appear in a request URI. The source blob must either be public or must be authenticated via a shared\n * access signature.\n * @param options The options parameters.\n */\n putBlobFromUrl(\n contentLength: number,\n copySource: string,\n options?: BlockBlobPutBlobFromUrlOptionalParams\n ): Promise<BlockBlobPutBlobFromUrlResponse> {\n return this.client.sendOperationRequest(\n { contentLength, copySource, options },\n putBlobFromUrlOperationSpec\n );\n }\n\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string\n * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified\n * for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n stageBlock(\n blockId: string,\n contentLength: number,\n body: coreRestPipeline.RequestBodyType,\n options?: BlockBlobStageBlockOptionalParams\n ): Promise<BlockBlobStageBlockResponse> {\n return this.client.sendOperationRequest(\n { blockId, contentLength, body, options },\n stageBlockOperationSpec\n );\n }\n\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob where the contents\n * are read from a URL.\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string\n * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified\n * for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param sourceUrl Specify a URL to the copy source.\n * @param options The options parameters.\n */\n stageBlockFromURL(\n blockId: string,\n contentLength: number,\n sourceUrl: string,\n options?: BlockBlobStageBlockFromURLOptionalParams\n ): Promise<BlockBlobStageBlockFromURLResponse> {\n return this.client.sendOperationRequest(\n { blockId, contentLength, sourceUrl, options },\n stageBlockFromURLOperationSpec\n );\n }\n\n /**\n * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the\n * blob. In order to be written as part of a blob, a block must have been successfully written to the\n * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading\n * only those blocks that have changed, then committing the new and existing blocks together. You can\n * do this by specifying whether to commit a block from the committed block list or from the\n * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list\n * it may belong to.\n * @param blocks Blob Blocks.\n * @param options The options parameters.\n */\n commitBlockList(\n blocks: BlockLookupList,\n options?: BlockBlobCommitBlockListOptionalParams\n ): Promise<BlockBlobCommitBlockListResponse> {\n return this.client.sendOperationRequest(\n { blocks, options },\n commitBlockListOperationSpec\n );\n }\n\n /**\n * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block\n * blob\n * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted\n * blocks, or both lists together.\n * @param options The options parameters.\n */\n getBlockList(\n listType: BlockListType,\n options?: BlockBlobGetBlockListOptionalParams\n ): Promise<BlockBlobGetBlockListResponse> {\n return this.client.sendOperationRequest(\n { listType, options },\n getBlockListOperationSpec\n );\n }\n}\n// Operation Specifications\nconst xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true);\n\nconst uploadOperationSpec: coreClient.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobUploadHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobUploadExceptionHeaders\n }\n },\n requestBody: Parameters.body1,\n queryParameters: [Parameters.timeoutInSeconds],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.contentLength,\n Parameters.metadata,\n Parameters.leaseId,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.blobCacheControl,\n Parameters.blobContentType,\n Parameters.blobContentMD5,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentDisposition,\n Parameters.immutabilityPolicyExpiry,\n Parameters.immutabilityPolicyMode,\n Parameters.encryptionScope,\n Parameters.tier,\n Parameters.blobTagsString,\n Parameters.legalHold1,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.contentType1,\n Parameters.accept2,\n Parameters.blobType2\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"binary\",\n serializer: xmlSerializer\n};\nconst putBlobFromUrlOperationSpec: coreClient.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders\n }\n },\n queryParameters: [Parameters.timeoutInSeconds],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.accept1,\n Parameters.contentLength,\n Parameters.metadata,\n Parameters.leaseId,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.blobCacheControl,\n Parameters.blobContentType,\n Parameters.blobContentMD5,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentDisposition,\n Parameters.encryptionScope,\n Parameters.tier,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch,\n Parameters.sourceIfTags,\n Parameters.copySource,\n Parameters.blobTagsString,\n Parameters.sourceContentMD5,\n Parameters.copySourceAuthorization,\n Parameters.copySourceTags,\n Parameters.transactionalContentMD5,\n Parameters.blobType2,\n Parameters.copySourceBlobProperties\n ],\n isXML: true,\n serializer: xmlSerializer\n};\nconst stageBlockOperationSpec: coreClient.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobStageBlockHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders\n }\n },\n requestBody: Parameters.body1,\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp24,\n Parameters.blockId\n ],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.contentLength,\n Parameters.leaseId,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.encryptionScope,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.contentType1,\n Parameters.accept2\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"binary\",\n serializer: xmlSerializer\n};\nconst stageBlockFromURLOperationSpec: coreClient.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders\n }\n },\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp24,\n Parameters.blockId\n ],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.accept1,\n Parameters.contentLength,\n Parameters.leaseId,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.encryptionScope,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch,\n Parameters.sourceContentMD5,\n Parameters.copySourceAuthorization,\n Parameters.sourceUrl,\n Parameters.sourceContentCrc64,\n Parameters.sourceRange1\n ],\n isXML: true,\n serializer: xmlSerializer\n};\nconst commitBlockListOperationSpec: coreClient.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobCommitBlockListHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders\n }\n },\n requestBody: Parameters.blocks,\n queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.version,\n Parameters.requestId,\n Parameters.metadata,\n Parameters.leaseId,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.blobCacheControl,\n Parameters.blobContentType,\n Parameters.blobContentMD5,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentDisposition,\n Parameters.immutabilityPolicyExpiry,\n Parameters.immutabilityPolicyMode,\n Parameters.encryptionScope,\n Parameters.tier,\n Parameters.blobTagsString,\n Parameters.legalHold1,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer\n};\nconst getBlockListOperationSpec: coreClient.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BlockList,\n headersMapper: Mappers.BlockBlobGetBlockListHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders\n }\n },\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.snapshot,\n Parameters.comp25,\n Parameters.listType\n ],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.accept1,\n Parameters.leaseId,\n Parameters.ifTags\n ],\n isXML: true,\n serializer: xmlSerializer\n};\n"]}
1
+ {"version":3,"file":"blockBlob.js","sourceRoot":"","sources":["../../../../../../src/generated/src/operations/blockBlob.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAmBnD,sCAAsC;AACtC,MAAM,OAAO,SAAS;IAGpB;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACH,MA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,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,uBAAuB;QAClC,UAAU,CAAC,yBAAyB;KACrC;IACD,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,gCAAgC;IAC7C,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,aAAa;CAC1B,CAAC;AACF,MAAM,yBAAyB,GAA2B;IACxD,IAAI,EAAE,yBAAyB;IAC/B,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,SAAS;YAC7B,aAAa,EAAE,OAAO,CAAC,4BAA4B;SACpD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,qCAAqC;SAC7D;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,QAAQ;KACpB;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;IAC/B,gBAAgB,EAAE;QAChB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,MAAM;KAClB;IACD,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,aAAa;CAC1B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\nimport {\n BlockBlobUploadOptionalParams,\n BlockBlobUploadResponse,\n BlockBlobPutBlobFromUrlOptionalParams,\n BlockBlobPutBlobFromUrlResponse,\n BlockBlobStageBlockOptionalParams,\n BlockBlobStageBlockResponse,\n BlockBlobStageBlockFromURLOptionalParams,\n BlockBlobStageBlockFromURLResponse,\n BlockLookupList,\n BlockBlobCommitBlockListOptionalParams,\n BlockBlobCommitBlockListResponse,\n BlockListType,\n BlockBlobGetBlockListOptionalParams,\n BlockBlobGetBlockListResponse\n} from \"../models\";\n\n/** Class representing a BlockBlob. */\nexport class BlockBlob {\n private readonly client: StorageClientContext;\n\n /**\n * Initialize a new instance of the class BlockBlob class.\n * @param client Reference to the service client\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing\n * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put\n * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a\n * partial update of the content of a block blob, use the Put Block List operation.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n upload(\n contentLength: number,\n body: coreHttp.HttpRequestBody,\n options?: BlockBlobUploadOptionalParams\n ): Promise<BlockBlobUploadResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n contentLength,\n body,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n uploadOperationSpec\n ) as Promise<BlockBlobUploadResponse>;\n }\n\n /**\n * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read\n * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are\n * not supported with Put Blob from URL; the content of an existing blob is overwritten with the\n * content of the new blob. To perform partial updates to a block blob’s contents using a source URL,\n * use the Put Block from URL API in conjunction with Put Block List.\n * @param contentLength The length of the request.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to\n * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would\n * appear in a request URI. The source blob must either be public or must be authenticated via a shared\n * access signature.\n * @param options The options parameters.\n */\n putBlobFromUrl(\n contentLength: number,\n copySource: string,\n options?: BlockBlobPutBlobFromUrlOptionalParams\n ): Promise<BlockBlobPutBlobFromUrlResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n contentLength,\n copySource,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n putBlobFromUrlOperationSpec\n ) as Promise<BlockBlobPutBlobFromUrlResponse>;\n }\n\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string\n * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified\n * for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n stageBlock(\n blockId: string,\n contentLength: number,\n body: coreHttp.HttpRequestBody,\n options?: BlockBlobStageBlockOptionalParams\n ): Promise<BlockBlobStageBlockResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n blockId,\n contentLength,\n body,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n stageBlockOperationSpec\n ) as Promise<BlockBlobStageBlockResponse>;\n }\n\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob where the contents\n * are read from a URL.\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string\n * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified\n * for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param sourceUrl Specify a URL to the copy source.\n * @param options The options parameters.\n */\n stageBlockFromURL(\n blockId: string,\n contentLength: number,\n sourceUrl: string,\n options?: BlockBlobStageBlockFromURLOptionalParams\n ): Promise<BlockBlobStageBlockFromURLResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n blockId,\n contentLength,\n sourceUrl,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n stageBlockFromURLOperationSpec\n ) as Promise<BlockBlobStageBlockFromURLResponse>;\n }\n\n /**\n * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the\n * blob. In order to be written as part of a blob, a block must have been successfully written to the\n * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading\n * only those blocks that have changed, then committing the new and existing blocks together. You can\n * do this by specifying whether to commit a block from the committed block list or from the\n * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list\n * it may belong to.\n * @param blocks Blob Blocks.\n * @param options The options parameters.\n */\n commitBlockList(\n blocks: BlockLookupList,\n options?: BlockBlobCommitBlockListOptionalParams\n ): Promise<BlockBlobCommitBlockListResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n blocks,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n commitBlockListOperationSpec\n ) as Promise<BlockBlobCommitBlockListResponse>;\n }\n\n /**\n * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block\n * blob\n * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted\n * blocks, or both lists together.\n * @param options The options parameters.\n */\n getBlockList(\n listType: BlockListType,\n options?: BlockBlobGetBlockListOptionalParams\n ): Promise<BlockBlobGetBlockListResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n listType,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n getBlockListOperationSpec\n ) as Promise<BlockBlobGetBlockListResponse>;\n }\n}\n// Operation Specifications\nconst xmlSerializer = new coreHttp.Serializer(Mappers, /* isXml */ true);\nconst serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);\n\nconst uploadOperationSpec: coreHttp.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobUploadHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobUploadExceptionHeaders\n }\n },\n requestBody: Parameters.body1,\n queryParameters: [Parameters.timeoutInSeconds],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.contentLength,\n Parameters.metadata,\n Parameters.leaseId,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.blobCacheControl,\n Parameters.blobContentType,\n Parameters.blobContentMD5,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentDisposition,\n Parameters.immutabilityPolicyExpiry,\n Parameters.immutabilityPolicyMode,\n Parameters.encryptionScope,\n Parameters.tier,\n Parameters.blobTagsString,\n Parameters.legalHold1,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.contentType1,\n Parameters.accept2,\n Parameters.blobType2\n ],\n mediaType: \"binary\",\n serializer\n};\nconst putBlobFromUrlOperationSpec: coreHttp.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders\n }\n },\n queryParameters: [Parameters.timeoutInSeconds],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.accept1,\n Parameters.contentLength,\n Parameters.metadata,\n Parameters.leaseId,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.blobCacheControl,\n Parameters.blobContentType,\n Parameters.blobContentMD5,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentDisposition,\n Parameters.encryptionScope,\n Parameters.tier,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch,\n Parameters.sourceIfTags,\n Parameters.copySource,\n Parameters.blobTagsString,\n Parameters.sourceContentMD5,\n Parameters.copySourceAuthorization,\n Parameters.copySourceTags,\n Parameters.transactionalContentMD5,\n Parameters.blobType2,\n Parameters.copySourceBlobProperties\n ],\n isXML: true,\n serializer: xmlSerializer\n};\nconst stageBlockOperationSpec: coreHttp.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobStageBlockHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders\n }\n },\n requestBody: Parameters.body1,\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp24,\n Parameters.blockId\n ],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.contentLength,\n Parameters.leaseId,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.encryptionScope,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.contentType1,\n Parameters.accept2\n ],\n mediaType: \"binary\",\n serializer\n};\nconst stageBlockFromURLOperationSpec: coreHttp.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders\n }\n },\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp24,\n Parameters.blockId\n ],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.accept1,\n Parameters.contentLength,\n Parameters.leaseId,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.encryptionScope,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch,\n Parameters.sourceContentMD5,\n Parameters.copySourceAuthorization,\n Parameters.sourceUrl,\n Parameters.sourceContentCrc64,\n Parameters.sourceRange1\n ],\n isXML: true,\n serializer: xmlSerializer\n};\nconst commitBlockListOperationSpec: coreHttp.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobCommitBlockListHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders\n }\n },\n requestBody: Parameters.blocks,\n queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.version,\n Parameters.requestId,\n Parameters.metadata,\n Parameters.leaseId,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.blobCacheControl,\n Parameters.blobContentType,\n Parameters.blobContentMD5,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentDisposition,\n Parameters.immutabilityPolicyExpiry,\n Parameters.immutabilityPolicyMode,\n Parameters.encryptionScope,\n Parameters.tier,\n Parameters.blobTagsString,\n Parameters.legalHold1,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer\n};\nconst getBlockListOperationSpec: coreHttp.OperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BlockList,\n headersMapper: Mappers.BlockBlobGetBlockListHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders\n }\n },\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.snapshot,\n Parameters.comp25,\n Parameters.listType\n ],\n urlParameters: [Parameters.url],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.accept1,\n Parameters.leaseId,\n Parameters.ifTags\n ],\n isXML: true,\n serializer: xmlSerializer\n};\n"]}
@@ -5,11 +5,11 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import * as coreClient from "@azure/core-client";
8
+ import * as coreHttp from "@azure/core-http";
9
9
  import * as Mappers from "../models/mappers";
10
10
  import * as Parameters from "../models/parameters";
11
- /** Class containing Container operations. */
12
- export class ContainerImpl {
11
+ /** Class representing a Container. */
12
+ export class Container {
13
13
  /**
14
14
  * Initialize a new instance of the class Container class.
15
15
  * @param client Reference to the service client
@@ -23,7 +23,10 @@ export class ContainerImpl {
23
23
  * @param options The options parameters.
24
24
  */
25
25
  create(options) {
26
- return this.client.sendOperationRequest({ options }, createOperationSpec);
26
+ const operationArguments = {
27
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
28
+ };
29
+ return this.client.sendOperationRequest(operationArguments, createOperationSpec);
27
30
  }
28
31
  /**
29
32
  * returns all user-defined metadata and system properties for the specified container. The data
@@ -31,7 +34,10 @@ export class ContainerImpl {
31
34
  * @param options The options parameters.
32
35
  */
33
36
  getProperties(options) {
34
- return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec);
37
+ const operationArguments = {
38
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
39
+ };
40
+ return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
35
41
  }
36
42
  /**
37
43
  * operation marks the specified container for deletion. The container and any blobs contained within
@@ -39,14 +45,20 @@ export class ContainerImpl {
39
45
  * @param options The options parameters.
40
46
  */
41
47
  delete(options) {
42
- return this.client.sendOperationRequest({ options }, deleteOperationSpec);
48
+ const operationArguments = {
49
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
50
+ };
51
+ return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
43
52
  }
44
53
  /**
45
54
  * operation sets one or more user-defined name-value pairs for the specified container.
46
55
  * @param options The options parameters.
47
56
  */
48
57
  setMetadata(options) {
49
- return this.client.sendOperationRequest({ options }, setMetadataOperationSpec);
58
+ const operationArguments = {
59
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
60
+ };
61
+ return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);
50
62
  }
51
63
  /**
52
64
  * gets the permissions for the specified container. The permissions indicate whether container data
@@ -54,7 +66,10 @@ export class ContainerImpl {
54
66
  * @param options The options parameters.
55
67
  */
56
68
  getAccessPolicy(options) {
57
- return this.client.sendOperationRequest({ options }, getAccessPolicyOperationSpec);
69
+ const operationArguments = {
70
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
71
+ };
72
+ return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);
58
73
  }
59
74
  /**
60
75
  * sets the permissions for the specified container. The permissions indicate whether blobs in a
@@ -62,14 +77,20 @@ export class ContainerImpl {
62
77
  * @param options The options parameters.
63
78
  */
64
79
  setAccessPolicy(options) {
65
- return this.client.sendOperationRequest({ options }, setAccessPolicyOperationSpec);
80
+ const operationArguments = {
81
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
82
+ };
83
+ return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);
66
84
  }
67
85
  /**
68
86
  * Restores a previously-deleted container.
69
87
  * @param options The options parameters.
70
88
  */
71
89
  restore(options) {
72
- return this.client.sendOperationRequest({ options }, restoreOperationSpec);
90
+ const operationArguments = {
91
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
92
+ };
93
+ return this.client.sendOperationRequest(operationArguments, restoreOperationSpec);
73
94
  }
74
95
  /**
75
96
  * Renames an existing container.
@@ -77,7 +98,11 @@ export class ContainerImpl {
77
98
  * @param options The options parameters.
78
99
  */
79
100
  rename(sourceContainerName, options) {
80
- return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec);
101
+ const operationArguments = {
102
+ sourceContainerName,
103
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
104
+ };
105
+ return this.client.sendOperationRequest(operationArguments, renameOperationSpec);
81
106
  }
82
107
  /**
83
108
  * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
@@ -88,7 +113,13 @@ export class ContainerImpl {
88
113
  * @param options The options parameters.
89
114
  */
90
115
  submitBatch(contentLength, multipartContentType, body, options) {
91
- return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec);
116
+ const operationArguments = {
117
+ contentLength,
118
+ multipartContentType,
119
+ body,
120
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
121
+ };
122
+ return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);
92
123
  }
93
124
  /**
94
125
  * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given
@@ -96,7 +127,10 @@ export class ContainerImpl {
96
127
  * @param options The options parameters.
97
128
  */
98
129
  filterBlobs(options) {
99
- return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec);
130
+ const operationArguments = {
131
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
132
+ };
133
+ return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);
100
134
  }
101
135
  /**
102
136
  * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@@ -104,7 +138,10 @@ export class ContainerImpl {
104
138
  * @param options The options parameters.
105
139
  */
106
140
  acquireLease(options) {
107
- return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec);
141
+ const operationArguments = {
142
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
143
+ };
144
+ return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);
108
145
  }
109
146
  /**
110
147
  * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@@ -113,7 +150,11 @@ export class ContainerImpl {
113
150
  * @param options The options parameters.
114
151
  */
115
152
  releaseLease(leaseId, options) {
116
- return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec);
153
+ const operationArguments = {
154
+ leaseId,
155
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
156
+ };
157
+ return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);
117
158
  }
118
159
  /**
119
160
  * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@@ -122,7 +163,11 @@ export class ContainerImpl {
122
163
  * @param options The options parameters.
123
164
  */
124
165
  renewLease(leaseId, options) {
125
- return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec);
166
+ const operationArguments = {
167
+ leaseId,
168
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
169
+ };
170
+ return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);
126
171
  }
127
172
  /**
128
173
  * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@@ -130,7 +175,10 @@ export class ContainerImpl {
130
175
  * @param options The options parameters.
131
176
  */
132
177
  breakLease(options) {
133
- return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec);
178
+ const operationArguments = {
179
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
180
+ };
181
+ return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);
134
182
  }
135
183
  /**
136
184
  * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@@ -142,14 +190,22 @@ export class ContainerImpl {
142
190
  * @param options The options parameters.
143
191
  */
144
192
  changeLease(leaseId, proposedLeaseId, options) {
145
- return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec);
193
+ const operationArguments = {
194
+ leaseId,
195
+ proposedLeaseId,
196
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
197
+ };
198
+ return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);
146
199
  }
147
200
  /**
148
201
  * [Update] The List Blobs operation returns a list of the blobs under the specified container
149
202
  * @param options The options parameters.
150
203
  */
151
204
  listBlobFlatSegment(options) {
152
- return this.client.sendOperationRequest({ options }, listBlobFlatSegmentOperationSpec);
205
+ const operationArguments = {
206
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
207
+ };
208
+ return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec);
153
209
  }
154
210
  /**
155
211
  * [Update] The List Blobs operation returns a list of the blobs under the specified container
@@ -160,18 +216,25 @@ export class ContainerImpl {
160
216
  * @param options The options parameters.
161
217
  */
162
218
  listBlobHierarchySegment(delimiter, options) {
163
- return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec);
219
+ const operationArguments = {
220
+ delimiter,
221
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
222
+ };
223
+ return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec);
164
224
  }
165
225
  /**
166
226
  * Returns the sku name and account kind
167
227
  * @param options The options parameters.
168
228
  */
169
229
  getAccountInfo(options) {
170
- return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec);
230
+ const operationArguments = {
231
+ options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
232
+ };
233
+ return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);
171
234
  }
172
235
  }
173
236
  // Operation Specifications
174
- const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true);
237
+ const xmlSerializer = new coreHttp.Serializer(Mappers, /* isXml */ true);
175
238
  const createOperationSpec = {
176
239
  path: "/{containerName}",
177
240
  httpMethod: "PUT",
@@ -428,6 +491,7 @@ const submitBatchOperationSpec = {
428
491
  ],
429
492
  urlParameters: [Parameters.url],
430
493
  headerParameters: [
494
+ Parameters.contentType,
431
495
  Parameters.accept,
432
496
  Parameters.version,
433
497
  Parameters.requestId,