From 04588614714d589c8777f067e400b7b92eec92c9 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 30 Apr 2025 02:11:36 +0000 Subject: [PATCH] CodeGen from PR 34359 in Azure/azure-rest-api-specs Merge b6b3ffa319c03720cb157da45f59bc098ee784e1 into 8e055e235cf019f5090d2cc661b865ba06775de2 --- common/config/rush/pnpm-lock.yaml | 70 +- rush.json | 9 +- sdk/storage/azure-storage-blob-rest/LICENSE | 21 + sdk/storage/azure-storage-blob-rest/README.md | 55 + .../api-extractor.json | 31 + .../azure-storage-blob-rest/eslint.config.mjs | 14 + .../azure-storage-blob-rest/package.json | 107 + .../azure-storage-blob-rest/sample.env | 1 + .../azure-storage-blob-rest/src/blobClient.ts | 53 + .../src/clientDefinitions.ts | 1082 +++++ .../azure-storage-blob-rest/src/index.ts | 14 + .../src/isUnexpected.ts | 757 ++++ .../azure-storage-blob-rest/src/logger.ts | 5 + .../azure-storage-blob-rest/src/models.ts | 248 ++ .../src/outputModels.ts | 546 +++ .../azure-storage-blob-rest/src/parameters.ts | 3522 +++++++++++++++++ .../azure-storage-blob-rest/src/responses.ts | 1881 +++++++++ .../test/public/sampleTest.spec.ts | 20 + .../test/public/utils/recordedClient.ts | 23 + .../test/snippets.spec.ts | 11 + .../tsconfig.browser.config.json | 3 + .../azure-storage-blob-rest/tsconfig.json | 10 + .../tsconfig.samples.json | 8 + .../azure-storage-blob-rest/tsconfig.src.json | 3 + .../tsconfig.test.json | 3 + .../azure-storage-blob-rest/tsp-location.yaml | 4 + .../vitest.browser.config.ts | 17 + .../azure-storage-blob-rest/vitest.config.ts | 16 + .../vitest.esm.config.ts | 12 + sdk/storage/ci.yml | 6 +- 30 files changed, 8534 insertions(+), 18 deletions(-) create mode 100644 sdk/storage/azure-storage-blob-rest/LICENSE create mode 100644 sdk/storage/azure-storage-blob-rest/README.md create mode 100644 sdk/storage/azure-storage-blob-rest/api-extractor.json create mode 100644 sdk/storage/azure-storage-blob-rest/eslint.config.mjs create mode 100644 sdk/storage/azure-storage-blob-rest/package.json create mode 100644 sdk/storage/azure-storage-blob-rest/sample.env create mode 100644 sdk/storage/azure-storage-blob-rest/src/blobClient.ts create mode 100644 sdk/storage/azure-storage-blob-rest/src/clientDefinitions.ts create mode 100644 sdk/storage/azure-storage-blob-rest/src/index.ts create mode 100644 sdk/storage/azure-storage-blob-rest/src/isUnexpected.ts create mode 100644 sdk/storage/azure-storage-blob-rest/src/logger.ts create mode 100644 sdk/storage/azure-storage-blob-rest/src/models.ts create mode 100644 sdk/storage/azure-storage-blob-rest/src/outputModels.ts create mode 100644 sdk/storage/azure-storage-blob-rest/src/parameters.ts create mode 100644 sdk/storage/azure-storage-blob-rest/src/responses.ts create mode 100644 sdk/storage/azure-storage-blob-rest/test/public/sampleTest.spec.ts create mode 100644 sdk/storage/azure-storage-blob-rest/test/public/utils/recordedClient.ts create mode 100644 sdk/storage/azure-storage-blob-rest/test/snippets.spec.ts create mode 100644 sdk/storage/azure-storage-blob-rest/tsconfig.browser.config.json create mode 100644 sdk/storage/azure-storage-blob-rest/tsconfig.json create mode 100644 sdk/storage/azure-storage-blob-rest/tsconfig.samples.json create mode 100644 sdk/storage/azure-storage-blob-rest/tsconfig.src.json create mode 100644 sdk/storage/azure-storage-blob-rest/tsconfig.test.json create mode 100644 sdk/storage/azure-storage-blob-rest/tsp-location.yaml create mode 100644 sdk/storage/azure-storage-blob-rest/vitest.browser.config.ts create mode 100644 sdk/storage/azure-storage-blob-rest/vitest.config.ts create mode 100644 sdk/storage/azure-storage-blob-rest/vitest.esm.config.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 6ed4bd304667..a45697e40378 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -856,6 +856,9 @@ importers: '@rush-temp/attestation': specifier: file:./projects/attestation.tgz version: file:projects/attestation.tgz(@types/debug@4.1.12)(tsx@4.19.3)(vite@6.3.3(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.1))(yaml@2.7.1) + '@rush-temp/azure-storage-blob-rest': + specifier: file:./projects/azure-storage-blob-rest.tgz + version: file:projects/azure-storage-blob-rest.tgz(@types/debug@4.1.12)(tsx@4.19.3)(vite@6.3.3(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.1))(yaml@2.7.1) '@rush-temp/batch': specifier: file:./projects/batch.tgz version: file:projects/batch.tgz(@types/debug@4.1.12)(tsx@4.19.3)(vite@6.3.3(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.1))(yaml@2.7.1) @@ -2880,7 +2883,7 @@ packages: version: 0.0.0 '@rush-temp/arm-iotfirmwaredefense@file:projects/arm-iotfirmwaredefense.tgz': - resolution: {integrity: sha512-uG5UwXuZw39+ZtzQIWjrncKO9wTGuCru8h/T7RskNv8CKxuy+Q3Rv22x0GIVP7jfPgIshSv3KmXpK4WYvnYs0Q==, tarball: file:projects/arm-iotfirmwaredefense.tgz} + resolution: {integrity: sha512-VosDsn3Jyydk96qaX2fTcLg+gTL+N1kbIOh52JrEaaDdcELmtJcJ+Vz6BwJbFm/ByQFpKcvGELMXuZFw/QI7nQ==, tarball: file:projects/arm-iotfirmwaredefense.tgz} version: 0.0.0 '@rush-temp/arm-iothub-profile-2020-09-01-hybrid@file:projects/arm-iothub-profile-2020-09-01-hybrid.tgz': @@ -3439,6 +3442,10 @@ packages: resolution: {integrity: sha512-MYUYjG90tY6X1qaJyrFH7qd4ndfKpVQhLUYibmqtoSkjFvs+uR6lh1K75cFvzmNhe5D9YAWpKRfQwLfMC2rtMQ==, tarball: file:projects/attestation.tgz} version: 0.0.0 + '@rush-temp/azure-storage-blob-rest@file:projects/azure-storage-blob-rest.tgz': + resolution: {integrity: sha512-r3HZ61fn0kQ+z44j2zPB6AJ+ghd2OLmOdipYELPRcQYHpemwcl+mhT7WFU/UI2RcyAWE3ntPRMbIb4SVasUDOQ==, tarball: file:projects/azure-storage-blob-rest.tgz} + version: 0.0.0 + '@rush-temp/batch@file:projects/batch.tgz': resolution: {integrity: sha512-0lJBMO9HJ5ljwFRJ/NubrZC8cJgU+L0vfcTknTtZzzP0NCnG+KnvfxKZ/0qvtnysbFYyE5E9xaEBOVQfNk6BMA==, tarball: file:projects/batch.tgz} version: 0.0.0 @@ -3524,7 +3531,7 @@ packages: version: 0.0.0 '@rush-temp/core-client@file:projects/core-client.tgz': - resolution: {integrity: sha512-j6hx5Yuzt1PhSywtDlY8ky0yfMcCvNxfDk1O0slDdAP0ab84Ax+E5FsM3FJZ9GwjVfsGXEhqUbfOlTfmtk4Oww==, tarball: file:projects/core-client.tgz} + resolution: {integrity: sha512-+NJNEAvfot12qN/e6EqYyY7MzMw2GA2SQQPDzZp+f/DGsXrFJrl8GBGqNIM6E7JoMOU+siBpQUF3w2p70t1Nyw==, tarball: file:projects/core-client.tgz} version: 0.0.0 '@rush-temp/core-http-compat@file:projects/core-http-compat.tgz': @@ -3740,7 +3747,7 @@ packages: version: 0.0.0 '@rush-temp/openai@file:projects/openai.tgz': - resolution: {integrity: sha512-b6LjLNglBGfbrTXmqOmB8CSVbeXhIRQgUbvW+7Kuq9iiMW7WnJALqlHRT+Tk9uY86xIqSWo8F5CyHsmsWzXPSg==, tarball: file:projects/openai.tgz} + resolution: {integrity: sha512-rDQ+qDu7fLRrh7vnpgr1JTKAyo1uyjvrC/XI/ObEOry4F9miUcAP8T3zcBqK6EEZmMDqpc6PyQU/FSe/zc2Hig==, tarball: file:projects/openai.tgz} version: 0.0.0 '@rush-temp/opentelemetry-instrumentation-azure-sdk@file:projects/opentelemetry-instrumentation-azure-sdk.tgz': @@ -13507,7 +13514,7 @@ snapshots: '@vitest/browser': 3.1.2(playwright@1.52.0)(vite@6.3.3(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.1))(vitest@3.1.2) '@vitest/coverage-istanbul': 3.1.2(vitest@3.1.2) dotenv: 16.5.0 - eslint: 9.25.0 + eslint: 9.25.1 playwright: 1.52.0 tslib: 2.8.1 typescript: 5.8.3 @@ -18364,6 +18371,41 @@ snapshots: - webdriverio - yaml + '@rush-temp/azure-storage-blob-rest@file:projects/azure-storage-blob-rest.tgz(@types/debug@4.1.12)(tsx@4.19.3)(vite@6.3.3(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.1))(yaml@2.7.1)': + dependencies: + '@types/node': 18.19.87 + '@vitest/browser': 3.1.2(playwright@1.52.0)(vite@6.3.3(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.1))(vitest@3.1.2) + '@vitest/coverage-istanbul': 3.1.2(vitest@3.1.2) + dotenv: 16.5.0 + eslint: 9.25.1 + playwright: 1.52.0 + tslib: 2.8.1 + typescript: 5.8.3 + vitest: 3.1.2(@types/debug@4.1.12)(@types/node@18.19.87)(@vitest/browser@3.1.2)(tsx@4.19.3)(yaml@2.7.1) + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@types/debug' + - '@vitest/ui' + - bufferutil + - happy-dom + - jiti + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - utf-8-validate + - vite + - webdriverio + - yaml + '@rush-temp/batch@file:projects/batch.tgz(@types/debug@4.1.12)(tsx@4.19.3)(vite@6.3.3(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.1))(yaml@2.7.1)': dependencies: '@types/node': 18.19.87 @@ -22906,7 +22948,7 @@ snapshots: '@types/bunyan@1.8.11': dependencies: - '@types/node': 18.19.87 + '@types/node': 22.7.9 '@types/chai-as-promised@8.0.2': dependencies: @@ -22944,7 +22986,7 @@ snapshots: '@types/express-serve-static-core@5.0.6': dependencies: - '@types/node': 18.19.87 + '@types/node': 22.7.9 '@types/qs': 6.9.18 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -22965,7 +23007,7 @@ snapshots: '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 18.19.87 + '@types/node': 22.7.9 '@types/fs-extra@8.1.5': dependencies: @@ -22974,7 +23016,7 @@ snapshots: '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.19.87 + '@types/node': 22.7.9 '@types/http-errors@2.0.4': {} @@ -22991,7 +23033,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 18.19.87 + '@types/node': 22.7.9 '@types/jsonwebtoken@9.0.9': dependencies: @@ -23023,7 +23065,7 @@ snapshots: '@types/mysql@2.15.26': dependencies: - '@types/node': 18.19.87 + '@types/node': 22.7.9 '@types/node-fetch@2.6.12': dependencies: @@ -23052,7 +23094,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 18.19.87 + '@types/node': 22.7.9 pg-protocol: 1.9.5 pg-types: 2.2.0 @@ -23069,7 +23111,7 @@ snapshots: '@types/readdir-glob@1.1.5': dependencies: - '@types/node': 18.19.87 + '@types/node': 22.7.9 '@types/resolve@1.20.2': {} @@ -23092,7 +23134,7 @@ snapshots: '@types/through@0.0.33': dependencies: - '@types/node': 18.19.87 + '@types/node': 22.7.9 '@types/triple-beam@1.3.5': {} @@ -23325,7 +23367,7 @@ snapshots: ajv-formats@3.0.1: dependencies: - ajv: 8.13.0 + ajv: 8.17.1 ajv@6.12.6: dependencies: diff --git a/rush.json b/rush.json index fe92c30e745a..0e503f4fdc1e 100644 --- a/rush.json +++ b/rush.json @@ -1,7 +1,7 @@ /** * This is the main configuration file for Rush. * For full documentation, please see https://rushjs.io - */ { + */{ "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", /** * (Required) This specifies the version of the Rush engine to be used in this repo. @@ -2366,6 +2366,11 @@ "packageName": "@azure/arm-carbonoptimization", "projectFolder": "sdk/carbonoptimization/arm-carbonoptimization", "versionPolicyName": "management" + }, + { + "packageName": "@azure-rest/azure-storage-blob-rest", + "projectFolder": "sdk/storage/azure-storage-blob-rest", + "versionPolicyName": "client" } ] -} +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-rest/LICENSE b/sdk/storage/azure-storage-blob-rest/LICENSE new file mode 100644 index 000000000000..63447fd8bbbf --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-rest/README.md b/sdk/storage/azure-storage-blob-rest/README.md new file mode 100644 index 000000000000..04c74e36f03d --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/README.md @@ -0,0 +1,55 @@ +# Azure Blob REST client library for JavaScript + +Azure.Storage.Blob Service + +**Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library** + +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/azure-storage-blob-rest) +- [Package (NPM)](https://www.npmjs.com/package/@azure-rest/azure-storage-blob-rest) +- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure-rest/azure-storage-blob-rest?view=azure-node-preview) + +## Getting started + +### Currently supported environments + +- LTS versions of Node.js + +### Prerequisites + +- You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package. + +### Install the `@azure-rest/azure-storage-blob-rest` package + +Install the Azure Blob REST client REST client library for JavaScript with `npm`: + +```bash +npm install @azure-rest/azure-storage-blob-rest +``` + +### Create and authenticate a `BlobClient` + +To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token), +provide an instance of the desired credential type obtained from the +[@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library. + +To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) + +After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use. +As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential) +can be used to authenticate the client. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```ts snippet:SetLogLevel +import { setLogLevel } from "@azure/logger"; + +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). diff --git a/sdk/storage/azure-storage-blob-rest/api-extractor.json b/sdk/storage/azure-storage-blob-rest/api-extractor.json new file mode 100644 index 000000000000..34324a137a72 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "dist/esm/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "dist/azure-storage-blob-rest.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-rest/eslint.config.mjs b/sdk/storage/azure-storage-blob-rest/eslint.config.mjs new file mode 100644 index 000000000000..6d2f8a5914c3 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/eslint.config.mjs @@ -0,0 +1,14 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]); diff --git a/sdk/storage/azure-storage-blob-rest/package.json b/sdk/storage/azure-storage-blob-rest/package.json new file mode 100644 index 000000000000..8008c03192a7 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/package.json @@ -0,0 +1,107 @@ +{ + "name": "@azure-rest/azure-storage-blob-rest", + "version": "1.0.0-beta.1", + "description": "Azure.Storage.Blob Service", + "engines": { + "node": ">=18.0.0" + }, + "sideEffects": false, + "autoPublish": false, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false, + "project": "./tsconfig.src.json" + }, + "type": "module", + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "files": [ + "dist/", + "README.md", + "LICENSE" + ], + "sdk-type": "client", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/azure-storage-blob-rest/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/blobClient.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@azure-rest/core-client": "^2.3.1", + "@azure/core-auth": "^1.9.0", + "@azure/core-rest-pipeline": "^1.19.1", + "@azure/logger": "^1.1.4", + "tslib": "^2.8.1" + }, + "devDependencies": { + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^4.9.1", + "@types/node": "^18.0.0", + "@vitest/browser": "^3.0.9", + "@vitest/coverage-istanbul": "^3.0.9", + "dotenv": "^16.0.0", + "eslint": "^9.9.0", + "playwright": "^1.52.0", + "typescript": "~5.8.2", + "vitest": "^3.0.9" + }, + "scripts": { + "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", + "build:samples": "echo skipped", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "execute:samples": "echo skipped", + "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "generate:client": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "pack": "npm pack 2>&1", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest", + "update-snippets": "dev-tool run update-snippets" + }, + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js" +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-rest/sample.env b/sdk/storage/azure-storage-blob-rest/sample.env new file mode 100644 index 000000000000..508439fc7d62 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/sample.env @@ -0,0 +1 @@ +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-rest/src/blobClient.ts b/sdk/storage/azure-storage-blob-rest/src/blobClient.ts new file mode 100644 index 000000000000..51eb33712ce5 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/blobClient.ts @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { ClientOptions } from "@azure-rest/core-client"; +import { getClient } from "@azure-rest/core-client"; +import { logger } from "./logger.js"; +import type { TokenCredential, KeyCredential } from "@azure/core-auth"; +import type { BlobClient } from "./clientDefinitions.js"; + +/** The optional parameters for the client */ +export interface BlobClientOptions extends ClientOptions {} + +/** + * Initialize a new instance of `BlobClient` + * @param url - The host name of the blob storage account, e.g. accountName.blob.core.windows.net + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters + */ +export default function createClient( + url: string, + credentials: TokenCredential | KeyCredential, + options: BlobClientOptions = {}, +): BlobClient { + const endpointUrl = options.endpoint ?? options.baseUrl ?? `${url}`; + const userAgentInfo = `azsdk-js-azure-storage-blob-rest/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` + : `${userAgentInfo}`; + options = { + ...options, + userAgentOptions: { + userAgentPrefix, + }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, + credentials: { + scopes: options.credentials?.scopes ?? ["https://storage.azure.com/.default"], + apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? "api-key", + }, + }; + const client = getClient(endpointUrl, credentials, options) as BlobClient; + + client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + if (options.apiVersion) { + logger.warning( + "This client does not support client api-version, please change it at the operation level", + ); + } + + return client; +} diff --git a/sdk/storage/azure-storage-blob-rest/src/clientDefinitions.ts b/sdk/storage/azure-storage-blob-rest/src/clientDefinitions.ts new file mode 100644 index 000000000000..4b8cccdb0cee --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/clientDefinitions.ts @@ -0,0 +1,1082 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + SetPropertiesParameters, + GetPropertiesParameters, + GetStatisticsParameters, + ListContainersSegmentParameters, + GetUserDelegationKeyParameters, + GetAccountInfoParameters, + SubmitBatchParameters, + FilterBlobsParameters, + ContainerCreateParameters, + ContainerGetPropertiesParameters, + ContainerDeleteParameters, + ContainerSetMetadataParameters, + ContainerGetAccessPolicyParameters, + ContainerSetAccessPolicyParameters, + ContainerRestoreParameters, + ContainerRenameParameters, + ContainerSubmitBatchParameters, + ContainerFilterBlobsParameters, + ContainerAcquireLeaseParameters, + ContainerReleaseLeaseParameters, + ContainerRenewLeaseParameters, + ContainerBreakLeaseParameters, + ContainerChangeLeaseParameters, + ContainerListBlobFlatSegmentParameters, + ContainerListBlobHierarchySegmentParameters, + ContainerGetAccountInfoParameters, + ContainerBlobDownloadParameters, + ContainerBlobGetPropertiesParameters, + ContainerBlobDeleteParameters, + ContainerBlobStartCopyFromUrlParameters, + ContainerBlobUndeleteParameters, + ContainerBlobSetExpiryParameters, + ContainerBlobSetHttpHeadersParameters, + ContainerBlobSetImmutabilityPolicyParameters, + ContainerBlobDeleteImmutabilityPolicyParameters, + ContainerBlobSetLegalHoldParameters, + ContainerBlobSetMetadataParameters, + ContainerBlobAcquireLeaseParameters, + ContainerBlobReleaseLeaseParameters, + ContainerBlobRenewLeaseParameters, + ContainerBlobChangeLeaseParameters, + ContainerBlobBreakLeaseParameters, + ContainerBlobCreateSnapshotParameters, + ContainerBlobCopyFromUrlParameters, + ContainerBlobAbortCopyFromUrlParameters, + ContainerBlobSetTierParameters, + ContainerBlobGetAccountInfoParameters, + ContainerBlobGetTagsParameters, + ContainerBlobSetTagsParameters, + ContainerBlobPageBlobCreateParameters, + ContainerBlobPageBlobUploadPagesParameters, + ContainerBlobPageBlobClearPagesParameters, + ContainerBlobPageBlobUploadPagesFromUrlParameters, + ContainerBlobPageBlobGetPageRangesParameters, + ContainerBlobPageBlobGetPageRangesDiffParameters, + ContainerBlobPageBlobResizeParameters, + ContainerBlobPageBlobUpdateSequenceNumberParameters, + ContainerBlobPageBlobCopyIncrementalParameters, + ContainerBlobAppendBlobCreateParameters, + ContainerBlobAppendBlobAppendBlockParameters, + ContainerBlobAppendBlobAppendBlockFromUrlParameters, + ContainerBlobAppendBlobSealParameters, + ContainerBlobBlockBlobUploadParameters, + ContainerBlobBlockBlobPutBlobFromUrlParameters, + ContainerBlobBlockBlobStageBlockParameters, + ContainerBlobBlockBlobStageBlockFromUrlParameters, + ContainerBlobBlockBlobCommitBlockListParameters, + ContainerBlobBlockBlobGetBlockListParameters, + ContainerBlobBlockBlobQueryParameters, +} from "./parameters.js"; +import type { + SetProperties202Response, + SetPropertiesDefaultResponse, + GetProperties200Response, + GetPropertiesDefaultResponse, + GetStatistics200Response, + GetStatisticsDefaultResponse, + ListContainersSegment200Response, + ListContainersSegmentDefaultResponse, + GetUserDelegationKey200Response, + GetUserDelegationKeyDefaultResponse, + GetAccountInfo200Response, + GetAccountInfoDefaultResponse, + SubmitBatch200Response, + SubmitBatchDefaultResponse, + FilterBlobs200Response, + FilterBlobsDefaultResponse, + ContainerCreate201Response, + ContainerCreateDefaultResponse, + ContainerGetProperties200Response, + ContainerGetPropertiesDefaultResponse, + ContainerDelete202Response, + ContainerDeleteDefaultResponse, + ContainerSetMetadata200Response, + ContainerSetMetadataDefaultResponse, + ContainerGetAccessPolicy200Response, + ContainerGetAccessPolicyDefaultResponse, + ContainerSetAccessPolicy200Response, + ContainerSetAccessPolicyDefaultResponse, + ContainerRestore201Response, + ContainerRestoreDefaultResponse, + ContainerRename200Response, + ContainerRenameDefaultResponse, + ContainerSubmitBatch202Response, + ContainerSubmitBatchDefaultResponse, + ContainerFilterBlobs200Response, + ContainerFilterBlobsDefaultResponse, + ContainerAcquireLease201Response, + ContainerAcquireLeaseDefaultResponse, + ContainerReleaseLease200Response, + ContainerReleaseLeaseDefaultResponse, + ContainerRenewLease200Response, + ContainerRenewLeaseDefaultResponse, + ContainerBreakLease202Response, + ContainerBreakLeaseDefaultResponse, + ContainerChangeLease200Response, + ContainerChangeLeaseDefaultResponse, + ContainerListBlobFlatSegment200Response, + ContainerListBlobFlatSegmentDefaultResponse, + ContainerListBlobHierarchySegment200Response, + ContainerListBlobHierarchySegmentDefaultResponse, + ContainerGetAccountInfo200Response, + ContainerGetAccountInfoDefaultResponse, + ContainerBlobDownload200Response, + ContainerBlobDownload206Response, + ContainerBlobDownloadDefaultResponse, + ContainerBlobGetProperties200Response, + ContainerBlobGetPropertiesDefaultResponse, + ContainerBlobDelete202Response, + ContainerBlobDeleteDefaultResponse, + ContainerBlobStartCopyFromUrl202Response, + ContainerBlobStartCopyFromUrlDefaultResponse, + ContainerBlobUndelete200Response, + ContainerBlobUndeleteDefaultResponse, + ContainerBlobSetExpiry200Response, + ContainerBlobSetExpiryDefaultResponse, + ContainerBlobSetHttpHeaders200Response, + ContainerBlobSetHttpHeadersDefaultResponse, + ContainerBlobSetImmutabilityPolicy200Response, + ContainerBlobSetImmutabilityPolicyDefaultResponse, + ContainerBlobDeleteImmutabilityPolicy200Response, + ContainerBlobDeleteImmutabilityPolicyDefaultResponse, + ContainerBlobSetLegalHold200Response, + ContainerBlobSetLegalHoldDefaultResponse, + ContainerBlobSetMetadata200Response, + ContainerBlobSetMetadataDefaultResponse, + ContainerBlobAcquireLease201Response, + ContainerBlobAcquireLeaseDefaultResponse, + ContainerBlobReleaseLease200Response, + ContainerBlobReleaseLeaseDefaultResponse, + ContainerBlobRenewLease200Response, + ContainerBlobRenewLeaseDefaultResponse, + ContainerBlobChangeLease200Response, + ContainerBlobChangeLeaseDefaultResponse, + ContainerBlobBreakLease202Response, + ContainerBlobBreakLeaseDefaultResponse, + ContainerBlobCreateSnapshot201Response, + ContainerBlobCreateSnapshotDefaultResponse, + ContainerBlobCopyFromUrl202Response, + ContainerBlobCopyFromUrlDefaultResponse, + ContainerBlobAbortCopyFromUrl204Response, + ContainerBlobAbortCopyFromUrlDefaultResponse, + ContainerBlobSetTier200Response, + ContainerBlobSetTier202Response, + ContainerBlobSetTierDefaultResponse, + ContainerBlobGetAccountInfo200Response, + ContainerBlobGetAccountInfoDefaultResponse, + ContainerBlobGetTags200Response, + ContainerBlobGetTagsDefaultResponse, + ContainerBlobSetTags204Response, + ContainerBlobSetTagsDefaultResponse, + ContainerBlobPageBlobCreate201Response, + ContainerBlobPageBlobCreateDefaultResponse, + ContainerBlobPageBlobUploadPages201Response, + ContainerBlobPageBlobUploadPagesDefaultResponse, + ContainerBlobPageBlobClearPages201Response, + ContainerBlobPageBlobClearPagesDefaultResponse, + ContainerBlobPageBlobUploadPagesFromUrl201Response, + ContainerBlobPageBlobUploadPagesFromUrlDefaultResponse, + ContainerBlobPageBlobGetPageRanges200Response, + ContainerBlobPageBlobGetPageRangesDefaultResponse, + ContainerBlobPageBlobGetPageRangesDiff200Response, + ContainerBlobPageBlobGetPageRangesDiffDefaultResponse, + ContainerBlobPageBlobResize200Response, + ContainerBlobPageBlobResizeDefaultResponse, + ContainerBlobPageBlobUpdateSequenceNumber200Response, + ContainerBlobPageBlobUpdateSequenceNumberDefaultResponse, + ContainerBlobPageBlobCopyIncremental202Response, + ContainerBlobPageBlobCopyIncrementalDefaultResponse, + ContainerBlobAppendBlobCreate201Response, + ContainerBlobAppendBlobCreateDefaultResponse, + ContainerBlobAppendBlobAppendBlock201Response, + ContainerBlobAppendBlobAppendBlockDefaultResponse, + ContainerBlobAppendBlobAppendBlockFromUrl201Response, + ContainerBlobAppendBlobAppendBlockFromUrlDefaultResponse, + ContainerBlobAppendBlobSeal200Response, + ContainerBlobAppendBlobSealDefaultResponse, + ContainerBlobBlockBlobUpload201Response, + ContainerBlobBlockBlobUploadDefaultResponse, + ContainerBlobBlockBlobPutBlobFromUrl201Response, + ContainerBlobBlockBlobPutBlobFromUrlDefaultResponse, + ContainerBlobBlockBlobStageBlock201Response, + ContainerBlobBlockBlobStageBlockDefaultResponse, + ContainerBlobBlockBlobStageBlockFromUrl201Response, + ContainerBlobBlockBlobStageBlockFromUrlDefaultResponse, + ContainerBlobBlockBlobCommitBlockList201Response, + ContainerBlobBlockBlobCommitBlockListDefaultResponse, + ContainerBlobBlockBlobGetBlockList200Response, + ContainerBlobBlockBlobGetBlockListDefaultResponse, + ContainerBlobBlockBlobQuery200Response, + ContainerBlobBlockBlobQuery206Response, + ContainerBlobBlockBlobQueryDefaultResponse, +} from "./responses.js"; +import type { Client, StreamableMethod } from "@azure-rest/core-client"; + +export interface SetProperties { + /** Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules */ + put( + options: SetPropertiesParameters, + ): StreamableMethod; + /** Retrieves properties of a storage account's Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ + get( + options: GetPropertiesParameters, + ): StreamableMethod; +} + +export interface GetStatistics { + /** Retrieves statistics related to replication for the Blob service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account. */ + get( + options: GetStatisticsParameters, + ): StreamableMethod; +} + +export interface ListContainersSegment { + /** The List Containers Segment operation returns a list of the containers under the specified account */ + get( + options: ListContainersSegmentParameters, + ): StreamableMethod; +} + +export interface GetUserDelegationKey { + /** Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token authentication. */ + post( + options: GetUserDelegationKeyParameters, + ): StreamableMethod; +} + +export interface GetAccountInfo { + /** Returns the sku name and account kind. */ + get( + options: GetAccountInfoParameters, + ): StreamableMethod; +} + +export interface SubmitBatch { + /** The Batch operation allows multiple API calls to be embedded into a single HTTP request. */ + post( + options: SubmitBatchParameters, + ): StreamableMethod; +} + +export interface FilterBlobs { + /** The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search expression. */ + get( + options: FilterBlobsParameters, + ): StreamableMethod; +} + +export interface ContainerCreate { + /** Creates a new container under the specified account. If the container with the same name already exists, the operation fails. */ + put( + options: ContainerCreateParameters, + ): StreamableMethod; + /** returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs */ + get( + options: ContainerGetPropertiesParameters, + ): StreamableMethod; + /** operation marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection */ + delete( + options: ContainerDeleteParameters, + ): StreamableMethod; +} + +export interface ContainerSetMetadata { + /** operation sets one or more user-defined name-value pairs for the specified container. */ + put( + options: ContainerSetMetadataParameters, + ): StreamableMethod; +} + +export interface ContainerGetAccessPolicy { + /** gets the permissions for the specified container. The permissions indicate whether container data may be accessed publicly. */ + get( + options: ContainerGetAccessPolicyParameters, + ): StreamableMethod< + ContainerGetAccessPolicy200Response | ContainerGetAccessPolicyDefaultResponse + >; + /** sets the permissions for the specified container. The permissions indicate whether blobs in a container may be accessed publicly. */ + put( + options: ContainerSetAccessPolicyParameters, + ): StreamableMethod< + ContainerSetAccessPolicy200Response | ContainerSetAccessPolicyDefaultResponse + >; +} + +export interface ContainerRestore { + /** Restores a previously-deleted container. */ + put( + options: ContainerRestoreParameters, + ): StreamableMethod; +} + +export interface ContainerRename { + /** Renames an existing container. */ + put( + options: ContainerRenameParameters, + ): StreamableMethod; +} + +export interface ContainerSubmitBatch { + /** The Batch operation allows multiple API calls to be embedded into a single HTTP request. */ + post( + options: ContainerSubmitBatchParameters, + ): StreamableMethod; +} + +export interface ContainerFilterBlobs { + /** The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search expression. Filter blobs searches within the given container. */ + get( + options: ContainerFilterBlobsParameters, + ): StreamableMethod; +} + +export interface ContainerAcquireLease { + /** The Acquire Lease operation requests a new lease on a container. The lease lock duration can be 15 to 60 seconds, or can be infinite. */ + put( + options: ContainerAcquireLeaseParameters, + ): StreamableMethod; +} + +export interface ContainerReleaseLease { + /** The Release Lease operation frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the container. */ + put( + options: ContainerReleaseLeaseParameters, + ): StreamableMethod; +} + +export interface ContainerRenewLease { + /** The Renew Lease operation renews an existing lease. */ + put( + options: ContainerRenewLeaseParameters, + ): StreamableMethod; +} + +export interface ContainerBreakLease { + /** The Break Lease operation ends a lease and ensures that another client can't acquire a new lease until the current lease period has expired. */ + put( + options: ContainerBreakLeaseParameters, + ): StreamableMethod; +} + +export interface ContainerChangeLease { + /** The Change Lease operation is used to change the ID of an existing lease. */ + put( + options: ContainerChangeLeaseParameters, + ): StreamableMethod; +} + +export interface ContainerListBlobFlatSegment { + /** The List Blobs operation returns a list of the blobs under the specified container. */ + get( + options: ContainerListBlobFlatSegmentParameters, + ): StreamableMethod< + ContainerListBlobFlatSegment200Response | ContainerListBlobFlatSegmentDefaultResponse + >; +} + +export interface ContainerListBlobHierarchySegment { + /** The List Blobs operation returns a list of the blobs under the specified container. A delimiter can be used to traverse a virtual hierarchy of blobs as though it were a file system. */ + get( + options: ContainerListBlobHierarchySegmentParameters, + ): StreamableMethod< + ContainerListBlobHierarchySegment200Response | ContainerListBlobHierarchySegmentDefaultResponse + >; +} + +export interface ContainerGetAccountInfo { + /** Returns the sku name and account kind */ + get( + options: ContainerGetAccountInfoParameters, + ): StreamableMethod; +} + +export interface ContainerBlobDownload { + /** The Download operation reads or downloads a blob from the system, including its metadata and properties. You can also call Download to read a snapshot. */ + get( + options: ContainerBlobDownloadParameters, + ): StreamableMethod< + | ContainerBlobDownload200Response + | ContainerBlobDownload206Response + | ContainerBlobDownloadDefaultResponse + >; + /** The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob. */ + head( + options: ContainerBlobGetPropertiesParameters, + ): StreamableMethod< + ContainerBlobGetProperties200Response | ContainerBlobGetPropertiesDefaultResponse + >; + /** If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the \"include=deleted\" query parameter to discover which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 (ResourceNotFound). */ + delete( + options: ContainerBlobDeleteParameters, + ): StreamableMethod; + /** The Start Copy From URL operation copies a blob or an internet resource to a new blob. */ + put( + options: ContainerBlobStartCopyFromUrlParameters, + ): StreamableMethod< + ContainerBlobStartCopyFromUrl202Response | ContainerBlobStartCopyFromUrlDefaultResponse + >; +} + +export interface ContainerBlobUndelete { + /** Undelete a blob that was previously soft deleted */ + put( + options: ContainerBlobUndeleteParameters, + ): StreamableMethod; +} + +export interface ContainerBlobSetExpiry { + /** Set the expiration time of a blob */ + put( + options: ContainerBlobSetExpiryParameters, + ): StreamableMethod; +} + +export interface ContainerBlobSetHttpHeaders { + /** The Set HTTP Headers operation sets system properties on the blob. */ + put( + options: ContainerBlobSetHttpHeadersParameters, + ): StreamableMethod< + ContainerBlobSetHttpHeaders200Response | ContainerBlobSetHttpHeadersDefaultResponse + >; +} + +export interface ContainerBlobSetImmutabilityPolicy { + /** Set the immutability policy of a blob */ + put( + options: ContainerBlobSetImmutabilityPolicyParameters, + ): StreamableMethod< + | ContainerBlobSetImmutabilityPolicy200Response + | ContainerBlobSetImmutabilityPolicyDefaultResponse + >; + /** The Delete Immutability Policy operation deletes the immutability policy on the blob. */ + delete( + options: ContainerBlobDeleteImmutabilityPolicyParameters, + ): StreamableMethod< + | ContainerBlobDeleteImmutabilityPolicy200Response + | ContainerBlobDeleteImmutabilityPolicyDefaultResponse + >; +} + +export interface ContainerBlobSetLegalHold { + /** The Set Legal Hold operation sets a legal hold on the blob. */ + put( + options: ContainerBlobSetLegalHoldParameters, + ): StreamableMethod< + ContainerBlobSetLegalHold200Response | ContainerBlobSetLegalHoldDefaultResponse + >; +} + +export interface ContainerBlobSetMetadata { + /** The Set Metadata operation sets user-defined metadata for the specified blob as one or more name-value pairs. */ + put( + options: ContainerBlobSetMetadataParameters, + ): StreamableMethod< + ContainerBlobSetMetadata200Response | ContainerBlobSetMetadataDefaultResponse + >; +} + +export interface ContainerBlobAcquireLease { + /** The Acquire Lease operation requests a new lease on a blob. The lease lock duration can be 15 to 60 seconds, or can be infinite. */ + put( + options: ContainerBlobAcquireLeaseParameters, + ): StreamableMethod< + ContainerBlobAcquireLease201Response | ContainerBlobAcquireLeaseDefaultResponse + >; +} + +export interface ContainerBlobReleaseLease { + /** The Release Lease operation frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the blob. */ + put( + options: ContainerBlobReleaseLeaseParameters, + ): StreamableMethod< + ContainerBlobReleaseLease200Response | ContainerBlobReleaseLeaseDefaultResponse + >; +} + +export interface ContainerBlobRenewLease { + /** The Renew Lease operation renews an existing lease. */ + put( + options: ContainerBlobRenewLeaseParameters, + ): StreamableMethod; +} + +export interface ContainerBlobChangeLease { + /** The Change Lease operation is used to change the ID of an existing lease. */ + put( + options: ContainerBlobChangeLeaseParameters, + ): StreamableMethod< + ContainerBlobChangeLease200Response | ContainerBlobChangeLeaseDefaultResponse + >; +} + +export interface ContainerBlobBreakLease { + /** The Break Lease operation ends a lease and ensures that another client can't acquire a new lease until the current lease period has expired. */ + put( + options: ContainerBlobBreakLeaseParameters, + ): StreamableMethod; +} + +export interface ContainerBlobCreateSnapshot { + /** The Create Snapshot operation creates a read-only snapshot of a blob */ + put( + options: ContainerBlobCreateSnapshotParameters, + ): StreamableMethod< + ContainerBlobCreateSnapshot201Response | ContainerBlobCreateSnapshotDefaultResponse + >; +} + +export interface ContainerBlobCopyFromUrl { + /** The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response until the copy is complete. */ + put( + options: ContainerBlobCopyFromUrlParameters, + ): StreamableMethod< + ContainerBlobCopyFromUrl202Response | ContainerBlobCopyFromUrlDefaultResponse + >; +} + +export interface ContainerBlobAbortCopyFromUrl { + /** The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with zero length and full metadata. */ + put( + options: ContainerBlobAbortCopyFromUrlParameters, + ): StreamableMethod< + ContainerBlobAbortCopyFromUrl204Response | ContainerBlobAbortCopyFromUrlDefaultResponse + >; +} + +export interface ContainerBlobSetTier { + /** The Set Tier operation sets the tier on a block blob. The operation is allowed on a page blob or block blob, but not on an append blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag. */ + put( + options: ContainerBlobSetTierParameters, + ): StreamableMethod< + | ContainerBlobSetTier200Response + | ContainerBlobSetTier202Response + | ContainerBlobSetTierDefaultResponse + >; +} + +export interface ContainerBlobGetAccountInfo { + /** Returns the sku name and account kind */ + get( + options: ContainerBlobGetAccountInfoParameters, + ): StreamableMethod< + ContainerBlobGetAccountInfo200Response | ContainerBlobGetAccountInfoDefaultResponse + >; +} + +export interface ContainerBlobGetTags { + /** The Get Blob Tags operation enables users to get tags on a blob. */ + get( + options: ContainerBlobGetTagsParameters, + ): StreamableMethod; + /** The Set Tags operation enables users to set tags on a blob. */ + put( + options: ContainerBlobSetTagsParameters, + ): StreamableMethod; +} + +export interface ContainerBlobPageBlobCreate { + /** The Create operation creates a new page blob. */ + put( + options: ContainerBlobPageBlobCreateParameters, + ): StreamableMethod< + ContainerBlobPageBlobCreate201Response | ContainerBlobPageBlobCreateDefaultResponse + >; +} + +export interface ContainerBlobPageBlobUploadPages { + /** The Upload Pages operation writes a range of pages to a page blob */ + put( + options: ContainerBlobPageBlobUploadPagesParameters, + ): StreamableMethod< + ContainerBlobPageBlobUploadPages201Response | ContainerBlobPageBlobUploadPagesDefaultResponse + >; +} + +export interface ContainerBlobPageBlobClearPages { + /** The Clear Pages operation clears a range of pages from a page blob */ + put( + options: ContainerBlobPageBlobClearPagesParameters, + ): StreamableMethod< + ContainerBlobPageBlobClearPages201Response | ContainerBlobPageBlobClearPagesDefaultResponse + >; +} + +export interface ContainerBlobPageBlobUploadPagesFromUrl { + /** The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. */ + put( + options: ContainerBlobPageBlobUploadPagesFromUrlParameters, + ): StreamableMethod< + | ContainerBlobPageBlobUploadPagesFromUrl201Response + | ContainerBlobPageBlobUploadPagesFromUrlDefaultResponse + >; +} + +export interface ContainerBlobPageBlobGetPageRanges { + /** The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a page blob. */ + get( + options: ContainerBlobPageBlobGetPageRangesParameters, + ): StreamableMethod< + | ContainerBlobPageBlobGetPageRanges200Response + | ContainerBlobPageBlobGetPageRangesDefaultResponse + >; +} + +export interface ContainerBlobPageBlobGetPageRangesDiff { + /** The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob or snapshot of a page blob. */ + get( + options: ContainerBlobPageBlobGetPageRangesDiffParameters, + ): StreamableMethod< + | ContainerBlobPageBlobGetPageRangesDiff200Response + | ContainerBlobPageBlobGetPageRangesDiffDefaultResponse + >; +} + +export interface ContainerBlobPageBlobResize { + /** The Resize operation increases the size of the page blob to the specified size. */ + put( + options: ContainerBlobPageBlobResizeParameters, + ): StreamableMethod< + ContainerBlobPageBlobResize200Response | ContainerBlobPageBlobResizeDefaultResponse + >; +} + +export interface ContainerBlobPageBlobUpdateSequenceNumber { + /** The Update Sequence Number operation sets the blob's sequence number. The operation will fail if the specified sequence number is less than the current sequence number of the blob. */ + put( + options: ContainerBlobPageBlobUpdateSequenceNumberParameters, + ): StreamableMethod< + | ContainerBlobPageBlobUpdateSequenceNumber200Response + | ContainerBlobPageBlobUpdateSequenceNumberDefaultResponse + >; +} + +export interface ContainerBlobPageBlobCopyIncremental { + /** The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. This API is supported since REST version 2016-05-31. */ + put( + options: ContainerBlobPageBlobCopyIncrementalParameters, + ): StreamableMethod< + | ContainerBlobPageBlobCopyIncremental202Response + | ContainerBlobPageBlobCopyIncrementalDefaultResponse + >; +} + +export interface ContainerBlobAppendBlobCreate { + /** The Create operation creates a new append blob. */ + put( + options: ContainerBlobAppendBlobCreateParameters, + ): StreamableMethod< + ContainerBlobAppendBlobCreate201Response | ContainerBlobAppendBlobCreateDefaultResponse + >; +} + +export interface ContainerBlobAppendBlobAppendBlock { + /** The Append Block operation commits a new block of data to the end of an append blob. */ + put( + options: ContainerBlobAppendBlobAppendBlockParameters, + ): StreamableMethod< + | ContainerBlobAppendBlobAppendBlock201Response + | ContainerBlobAppendBlobAppendBlockDefaultResponse + >; +} + +export interface ContainerBlobAppendBlobAppendBlockFromUrl { + /** The Append Block From URL operation creates a new block to be committed as part of an append blob where the contents are read from a URL. */ + put( + options: ContainerBlobAppendBlobAppendBlockFromUrlParameters, + ): StreamableMethod< + | ContainerBlobAppendBlobAppendBlockFromUrl201Response + | ContainerBlobAppendBlobAppendBlockFromUrlDefaultResponse + >; +} + +export interface ContainerBlobAppendBlobSeal { + /** The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 version or later. */ + put( + options: ContainerBlobAppendBlobSealParameters, + ): StreamableMethod< + ContainerBlobAppendBlobSeal200Response | ContainerBlobAppendBlobSealDefaultResponse + >; +} + +export interface ContainerBlobBlockBlobUpload { + /** The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List operation. */ + put( + options: ContainerBlobBlockBlobUploadParameters, + ): StreamableMethod< + ContainerBlobBlockBlobUpload201Response | ContainerBlobBlockBlobUploadDefaultResponse + >; +} + +export interface ContainerBlobBlockBlobPutBlobFromUrl { + /** The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial updates to a block blob’s contents using a source URL, use the Put Block from URL API in conjunction with Put Block List. */ + put( + options: ContainerBlobBlockBlobPutBlobFromUrlParameters, + ): StreamableMethod< + | ContainerBlobBlockBlobPutBlobFromUrl201Response + | ContainerBlobBlockBlobPutBlobFromUrlDefaultResponse + >; +} + +export interface ContainerBlobBlockBlobStageBlock { + /** The Stage Block operation creates a new block to be committed as part of a blob */ + put( + options: ContainerBlobBlockBlobStageBlockParameters, + ): StreamableMethod< + ContainerBlobBlockBlobStageBlock201Response | ContainerBlobBlockBlobStageBlockDefaultResponse + >; +} + +export interface ContainerBlobBlockBlobStageBlockFromUrl { + /** The Stage Block From URL operation creates a new block to be committed as part of a blob where the contents are read from a URL. */ + put( + options: ContainerBlobBlockBlobStageBlockFromUrlParameters, + ): StreamableMethod< + | ContainerBlobBlockBlobStageBlockFromUrl201Response + | ContainerBlobBlockBlobStageBlockFromUrlDefaultResponse + >; +} + +export interface ContainerBlobBlockBlobCommitBlockList { + /** The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then committing the new and existing blocks together. You can do this by specifying whether to commit a block from the committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the block, whichever list it may belong to. */ + put( + options: ContainerBlobBlockBlobCommitBlockListParameters, + ): StreamableMethod< + | ContainerBlobBlockBlobCommitBlockList201Response + | ContainerBlobBlockBlobCommitBlockListDefaultResponse + >; + /** The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. */ + get( + options: ContainerBlobBlockBlobGetBlockListParameters, + ): StreamableMethod< + | ContainerBlobBlockBlobGetBlockList200Response + | ContainerBlobBlockBlobGetBlockListDefaultResponse + >; +} + +export interface ContainerBlobBlockBlobQuery { + /** The Query operation enables users to select/project on blob data by providing simple query expressions. */ + post( + options: ContainerBlobBlockBlobQueryParameters, + ): StreamableMethod< + | ContainerBlobBlockBlobQuery200Response + | ContainerBlobBlockBlobQuery206Response + | ContainerBlobBlockBlobQueryDefaultResponse + >; +} + +export interface Routes { + /** Resource for '/?restype=service&comp=properties' has methods for the following verbs: put, get */ + (path: "/?restype=service&comp=properties"): SetProperties; + /** Resource for '/?restype=service&comp=stats' has methods for the following verbs: get */ + (path: "/?restype=service&comp=stats"): GetStatistics; + /** Resource for '/?comp=list' has methods for the following verbs: get */ + (path: "/?comp=list"): ListContainersSegment; + /** Resource for '/?restype=service&comp=userdelegationkey' has methods for the following verbs: post */ + (path: "/?restype=service&comp=userdelegationkey"): GetUserDelegationKey; + /** Resource for '/?restype=account&comp=properties' has methods for the following verbs: get */ + (path: "/?restype=account&comp=properties"): GetAccountInfo; + /** Resource for '/?comp=batch' has methods for the following verbs: post */ + (path: "/?comp=batch"): SubmitBatch; + /** Resource for '/?comp=blobs' has methods for the following verbs: get */ + (path: "/?comp=blobs"): FilterBlobs; + /** Resource for '/\{containerName\}?restype=container' has methods for the following verbs: put, get, delete */ + (path: "/{containerName}?restype=container", containerName: string): ContainerCreate; + /** Resource for '/\{containerName\}?restype=container&comp=metadata' has methods for the following verbs: put */ + ( + path: "/{containerName}?restype=container&comp=metadata", + containerName: string, + ): ContainerSetMetadata; + /** Resource for '/\{containerName\}?restype=container&comp=acl' has methods for the following verbs: get, put */ + ( + path: "/{containerName}?restype=container&comp=acl", + containerName: string, + ): ContainerGetAccessPolicy; + /** Resource for '/\{containerName\}?restype=container&comp=undelete' has methods for the following verbs: put */ + ( + path: "/{containerName}?restype=container&comp=undelete", + containerName: string, + ): ContainerRestore; + /** Resource for '/\{containerName\}?restype=container&comp=rename' has methods for the following verbs: put */ + (path: "/{containerName}?restype=container&comp=rename", containerName: string): ContainerRename; + /** Resource for '/\{containerName\}?restype=container&comp=batch' has methods for the following verbs: post */ + ( + path: "/{containerName}?restype=container&comp=batch", + containerName: string, + ): ContainerSubmitBatch; + /** Resource for '/\{containerName\}?restype=container&comp=blobs' has methods for the following verbs: get */ + ( + path: "/{containerName}?restype=container&comp=blobs", + containerName: string, + ): ContainerFilterBlobs; + /** Resource for '/\{containerName\}?comp=lease&restype=container&acquire' has methods for the following verbs: put */ + ( + path: "/{containerName}?comp=lease&restype=container&acquire", + containerName: string, + ): ContainerAcquireLease; + /** Resource for '/\{containerName\}?comp=lease&restype=container&release' has methods for the following verbs: put */ + ( + path: "/{containerName}?comp=lease&restype=container&release", + containerName: string, + ): ContainerReleaseLease; + /** Resource for '/\{containerName\}?comp=lease&restype=container&renew' has methods for the following verbs: put */ + ( + path: "/{containerName}?comp=lease&restype=container&renew", + containerName: string, + ): ContainerRenewLease; + /** Resource for '/\{containerName\}?comp=lease&restype=container&break' has methods for the following verbs: put */ + ( + path: "/{containerName}?comp=lease&restype=container&break", + containerName: string, + ): ContainerBreakLease; + /** Resource for '/\{containerName\}?comp=lease&restype=container&change' has methods for the following verbs: put */ + ( + path: "/{containerName}?comp=lease&restype=container&change", + containerName: string, + ): ContainerChangeLease; + /** Resource for '/\{containerName\}?restype=container&comp=list&flat' has methods for the following verbs: get */ + ( + path: "/{containerName}?restype=container&comp=list&flat", + containerName: string, + ): ContainerListBlobFlatSegment; + /** Resource for '/\{containerName\}?restype=container&comp=list&hierarchy' has methods for the following verbs: get */ + ( + path: "/{containerName}?restype=container&comp=list&hierarchy", + containerName: string, + ): ContainerListBlobHierarchySegment; + /** Resource for '/\{containerName\}?restype=account&comp=properties' has methods for the following verbs: get */ + ( + path: "/{containerName}?restype=account&comp=properties", + containerName: string, + ): ContainerGetAccountInfo; + /** Resource for '/\{containerName\}/\{blobName\}' has methods for the following verbs: get, head, delete, put */ + ( + path: "/{containerName}/{blobName}", + containerName: string, + blobName: string, + ): ContainerBlobDownload; + /** Resource for '/\{containerName\}/\{blobName\}?comp=undelete' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=undelete", + containerName: string, + blobName: string, + ): ContainerBlobUndelete; + /** Resource for '/\{containerName\}/\{blobName\}?comp=expiry' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=expiry", + containerName: string, + blobName: string, + ): ContainerBlobSetExpiry; + /** Resource for '/\{containerName\}/\{blobName\}?comp=properties&SetHTTPHeaders' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=properties&SetHTTPHeaders", + containerName: string, + blobName: string, + ): ContainerBlobSetHttpHeaders; + /** Resource for '/\{containerName\}/\{blobName\}?comp=immutabilityPolicies' has methods for the following verbs: put, delete */ + ( + path: "/{containerName}/{blobName}?comp=immutabilityPolicies", + containerName: string, + blobName: string, + ): ContainerBlobSetImmutabilityPolicy; + /** Resource for '/\{containerName\}/\{blobName\}?comp=legalhold' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=legalhold", + containerName: string, + blobName: string, + ): ContainerBlobSetLegalHold; + /** Resource for '/\{containerName\}/\{blobName\}?comp=metadata' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=metadata", + containerName: string, + blobName: string, + ): ContainerBlobSetMetadata; + /** Resource for '/\{containerName\}/\{blobName\}?comp=lease&acquire' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=lease&acquire", + containerName: string, + blobName: string, + ): ContainerBlobAcquireLease; + /** Resource for '/\{containerName\}/\{blobName\}?comp=lease&release' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=lease&release", + containerName: string, + blobName: string, + ): ContainerBlobReleaseLease; + /** Resource for '/\{containerName\}/\{blobName\}?comp=lease&renew' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=lease&renew", + containerName: string, + blobName: string, + ): ContainerBlobRenewLease; + /** Resource for '/\{containerName\}/\{blobName\}?comp=lease&change' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=lease&change", + containerName: string, + blobName: string, + ): ContainerBlobChangeLease; + /** Resource for '/\{containerName\}/\{blobName\}?comp=lease&break' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=lease&break", + containerName: string, + blobName: string, + ): ContainerBlobBreakLease; + /** Resource for '/\{containerName\}/\{blobName\}?comp=snapshot' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=snapshot", + containerName: string, + blobName: string, + ): ContainerBlobCreateSnapshot; + /** Resource for '/\{containerName\}/\{blobName\}?comp=copy&sync' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=copy&sync", + containerName: string, + blobName: string, + ): ContainerBlobCopyFromUrl; + /** Resource for '/\{containerName\}/\{blobName\}?comp=copy©id' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=copy©id", + containerName: string, + blobName: string, + ): ContainerBlobAbortCopyFromUrl; + /** Resource for '/\{containerName\}/\{blobName\}?comp=tier' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=tier", + containerName: string, + blobName: string, + ): ContainerBlobSetTier; + /** Resource for '/\{containerName\}/\{blobName\}?restype=account&comp=properties&blob' has methods for the following verbs: get */ + ( + path: "/{containerName}/{blobName}?restype=account&comp=properties&blob", + containerName: string, + blobName: string, + ): ContainerBlobGetAccountInfo; + /** Resource for '/\{containerName\}/\{blobName\}?comp=tags' has methods for the following verbs: get, put */ + ( + path: "/{containerName}/{blobName}?comp=tags", + containerName: string, + blobName: string, + ): ContainerBlobGetTags; + /** Resource for '/\{containerName\}/\{blobName\}?PageBlob' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?PageBlob", + containerName: string, + blobName: string, + ): ContainerBlobPageBlobCreate; + /** Resource for '/\{containerName\}/\{blobName\}?comp=page&update' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=page&update", + containerName: string, + blobName: string, + ): ContainerBlobPageBlobUploadPages; + /** Resource for '/\{containerName\}/\{blobName\}?comp=page&clear' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=page&clear", + containerName: string, + blobName: string, + ): ContainerBlobPageBlobClearPages; + /** Resource for '/\{containerName\}/\{blobName\}?comp=page&update&fromUrl' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=page&update&fromUrl", + containerName: string, + blobName: string, + ): ContainerBlobPageBlobUploadPagesFromUrl; + /** Resource for '/\{containerName\}/\{blobName\}?comp=pagelist' has methods for the following verbs: get */ + ( + path: "/{containerName}/{blobName}?comp=pagelist", + containerName: string, + blobName: string, + ): ContainerBlobPageBlobGetPageRanges; + /** Resource for '/\{containerName\}/\{blobName\}?comp=pagelist&diff' has methods for the following verbs: get */ + ( + path: "/{containerName}/{blobName}?comp=pagelist&diff", + containerName: string, + blobName: string, + ): ContainerBlobPageBlobGetPageRangesDiff; + /** Resource for '/\{containerName\}/\{blobName\}?comp=properties&Resize' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=properties&Resize", + containerName: string, + blobName: string, + ): ContainerBlobPageBlobResize; + /** Resource for '/\{containerName\}/\{blobName\}?comp=properties&UpdateSequenceNumber' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=properties&UpdateSequenceNumber", + containerName: string, + blobName: string, + ): ContainerBlobPageBlobUpdateSequenceNumber; + /** Resource for '/\{containerName\}/\{blobName\}?comp=incrementalcopy' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=incrementalcopy", + containerName: string, + blobName: string, + ): ContainerBlobPageBlobCopyIncremental; + /** Resource for '/\{containerName\}/\{blobName\}?AppendBlob' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?AppendBlob", + containerName: string, + blobName: string, + ): ContainerBlobAppendBlobCreate; + /** Resource for '/\{containerName\}/\{blobName\}?comp=appendblock' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=appendblock", + containerName: string, + blobName: string, + ): ContainerBlobAppendBlobAppendBlock; + /** Resource for '/\{containerName\}/\{blobName\}?comp=appendblock&fromUrl' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=appendblock&fromUrl", + containerName: string, + blobName: string, + ): ContainerBlobAppendBlobAppendBlockFromUrl; + /** Resource for '/\{containerName\}/\{blobName\}?comp=seal' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=seal", + containerName: string, + blobName: string, + ): ContainerBlobAppendBlobSeal; + /** Resource for '/\{containerName\}/\{blobName\}?BlockBlob' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?BlockBlob", + containerName: string, + blobName: string, + ): ContainerBlobBlockBlobUpload; + /** Resource for '/\{containerName\}/\{blobName\}?BlockBlob&fromUrl' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?BlockBlob&fromUrl", + containerName: string, + blobName: string, + ): ContainerBlobBlockBlobPutBlobFromUrl; + /** Resource for '/\{containerName\}/\{blobName\}?comp=block' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=block", + containerName: string, + blobName: string, + ): ContainerBlobBlockBlobStageBlock; + /** Resource for '/\{containerName\}/\{blobName\}?comp=block&fromURL' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blobName}?comp=block&fromURL", + containerName: string, + blobName: string, + ): ContainerBlobBlockBlobStageBlockFromUrl; + /** Resource for '/\{containerName\}/\{blobName\}?comp=blocklist' has methods for the following verbs: put, get */ + ( + path: "/{containerName}/{blobName}?comp=blocklist", + containerName: string, + blobName: string, + ): ContainerBlobBlockBlobCommitBlockList; + /** Resource for '/\{containerName\}/\{blobName\}?comp=query' has methods for the following verbs: post */ + ( + path: "/{containerName}/{blobName}?comp=query", + containerName: string, + blobName: string, + ): ContainerBlobBlockBlobQuery; +} + +export type BlobClient = Client & { + path: Routes; +}; diff --git a/sdk/storage/azure-storage-blob-rest/src/index.ts b/sdk/storage/azure-storage-blob-rest/src/index.ts new file mode 100644 index 000000000000..068e0ba40b6a --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/index.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import BlobClient from "./blobClient.js"; + +export * from "./blobClient.js"; +export * from "./parameters.js"; +export * from "./responses.js"; +export * from "./clientDefinitions.js"; +export * from "./isUnexpected.js"; +export * from "./models.js"; +export * from "./outputModels.js"; + +export default BlobClient; diff --git a/sdk/storage/azure-storage-blob-rest/src/isUnexpected.ts b/sdk/storage/azure-storage-blob-rest/src/isUnexpected.ts new file mode 100644 index 000000000000..e76aef8ae85d --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/isUnexpected.ts @@ -0,0 +1,757 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + SetProperties202Response, + SetPropertiesDefaultResponse, + GetProperties200Response, + GetPropertiesDefaultResponse, + GetStatistics200Response, + GetStatisticsDefaultResponse, + ListContainersSegment200Response, + ListContainersSegmentDefaultResponse, + GetUserDelegationKey200Response, + GetUserDelegationKeyDefaultResponse, + GetAccountInfo200Response, + GetAccountInfoDefaultResponse, + SubmitBatch200Response, + SubmitBatchDefaultResponse, + FilterBlobs200Response, + FilterBlobsDefaultResponse, + ContainerCreate201Response, + ContainerCreateDefaultResponse, + ContainerGetProperties200Response, + ContainerGetPropertiesDefaultResponse, + ContainerDelete202Response, + ContainerDeleteDefaultResponse, + ContainerSetMetadata200Response, + ContainerSetMetadataDefaultResponse, + ContainerGetAccessPolicy200Response, + ContainerGetAccessPolicyDefaultResponse, + ContainerSetAccessPolicy200Response, + ContainerSetAccessPolicyDefaultResponse, + ContainerRestore201Response, + ContainerRestoreDefaultResponse, + ContainerRename200Response, + ContainerRenameDefaultResponse, + ContainerSubmitBatch202Response, + ContainerSubmitBatchDefaultResponse, + ContainerFilterBlobs200Response, + ContainerFilterBlobsDefaultResponse, + ContainerAcquireLease201Response, + ContainerAcquireLeaseDefaultResponse, + ContainerReleaseLease200Response, + ContainerReleaseLeaseDefaultResponse, + ContainerRenewLease200Response, + ContainerRenewLeaseDefaultResponse, + ContainerBreakLease202Response, + ContainerBreakLeaseDefaultResponse, + ContainerChangeLease200Response, + ContainerChangeLeaseDefaultResponse, + ContainerListBlobFlatSegment200Response, + ContainerListBlobFlatSegmentDefaultResponse, + ContainerListBlobHierarchySegment200Response, + ContainerListBlobHierarchySegmentDefaultResponse, + ContainerGetAccountInfo200Response, + ContainerGetAccountInfoDefaultResponse, + ContainerBlobDownload200Response, + ContainerBlobDownload206Response, + ContainerBlobDownloadDefaultResponse, + ContainerBlobGetProperties200Response, + ContainerBlobGetPropertiesDefaultResponse, + ContainerBlobDelete202Response, + ContainerBlobDeleteDefaultResponse, + ContainerBlobStartCopyFromUrl202Response, + ContainerBlobStartCopyFromUrlDefaultResponse, + ContainerBlobUndelete200Response, + ContainerBlobUndeleteDefaultResponse, + ContainerBlobSetExpiry200Response, + ContainerBlobSetExpiryDefaultResponse, + ContainerBlobSetHttpHeaders200Response, + ContainerBlobSetHttpHeadersDefaultResponse, + ContainerBlobSetImmutabilityPolicy200Response, + ContainerBlobSetImmutabilityPolicyDefaultResponse, + ContainerBlobDeleteImmutabilityPolicy200Response, + ContainerBlobDeleteImmutabilityPolicyDefaultResponse, + ContainerBlobSetLegalHold200Response, + ContainerBlobSetLegalHoldDefaultResponse, + ContainerBlobSetMetadata200Response, + ContainerBlobSetMetadataDefaultResponse, + ContainerBlobAcquireLease201Response, + ContainerBlobAcquireLeaseDefaultResponse, + ContainerBlobReleaseLease200Response, + ContainerBlobReleaseLeaseDefaultResponse, + ContainerBlobRenewLease200Response, + ContainerBlobRenewLeaseDefaultResponse, + ContainerBlobChangeLease200Response, + ContainerBlobChangeLeaseDefaultResponse, + ContainerBlobBreakLease202Response, + ContainerBlobBreakLeaseDefaultResponse, + ContainerBlobCreateSnapshot201Response, + ContainerBlobCreateSnapshotDefaultResponse, + ContainerBlobCopyFromUrl202Response, + ContainerBlobCopyFromUrlDefaultResponse, + ContainerBlobAbortCopyFromUrl204Response, + ContainerBlobAbortCopyFromUrlDefaultResponse, + ContainerBlobSetTier200Response, + ContainerBlobSetTier202Response, + ContainerBlobSetTierDefaultResponse, + ContainerBlobGetAccountInfo200Response, + ContainerBlobGetAccountInfoDefaultResponse, + ContainerBlobGetTags200Response, + ContainerBlobGetTagsDefaultResponse, + ContainerBlobSetTags204Response, + ContainerBlobSetTagsDefaultResponse, + ContainerBlobPageBlobCreate201Response, + ContainerBlobPageBlobCreateDefaultResponse, + ContainerBlobPageBlobUploadPages201Response, + ContainerBlobPageBlobUploadPagesDefaultResponse, + ContainerBlobPageBlobClearPages201Response, + ContainerBlobPageBlobClearPagesDefaultResponse, + ContainerBlobPageBlobUploadPagesFromUrl201Response, + ContainerBlobPageBlobUploadPagesFromUrlDefaultResponse, + ContainerBlobPageBlobGetPageRanges200Response, + ContainerBlobPageBlobGetPageRangesDefaultResponse, + ContainerBlobPageBlobGetPageRangesDiff200Response, + ContainerBlobPageBlobGetPageRangesDiffDefaultResponse, + ContainerBlobPageBlobResize200Response, + ContainerBlobPageBlobResizeDefaultResponse, + ContainerBlobPageBlobUpdateSequenceNumber200Response, + ContainerBlobPageBlobUpdateSequenceNumberDefaultResponse, + ContainerBlobPageBlobCopyIncremental202Response, + ContainerBlobPageBlobCopyIncrementalDefaultResponse, + ContainerBlobAppendBlobCreate201Response, + ContainerBlobAppendBlobCreateDefaultResponse, + ContainerBlobAppendBlobAppendBlock201Response, + ContainerBlobAppendBlobAppendBlockDefaultResponse, + ContainerBlobAppendBlobAppendBlockFromUrl201Response, + ContainerBlobAppendBlobAppendBlockFromUrlDefaultResponse, + ContainerBlobAppendBlobSeal200Response, + ContainerBlobAppendBlobSealDefaultResponse, + ContainerBlobBlockBlobUpload201Response, + ContainerBlobBlockBlobUploadDefaultResponse, + ContainerBlobBlockBlobPutBlobFromUrl201Response, + ContainerBlobBlockBlobPutBlobFromUrlDefaultResponse, + ContainerBlobBlockBlobStageBlock201Response, + ContainerBlobBlockBlobStageBlockDefaultResponse, + ContainerBlobBlockBlobStageBlockFromUrl201Response, + ContainerBlobBlockBlobStageBlockFromUrlDefaultResponse, + ContainerBlobBlockBlobCommitBlockList201Response, + ContainerBlobBlockBlobCommitBlockListDefaultResponse, + ContainerBlobBlockBlobGetBlockList200Response, + ContainerBlobBlockBlobGetBlockListDefaultResponse, + ContainerBlobBlockBlobQuery200Response, + ContainerBlobBlockBlobQuery206Response, + ContainerBlobBlockBlobQueryDefaultResponse, +} from "./responses.js"; + +const responseMap: Record = { + "PUT /?restype=service&comp=properties": ["202"], + "GET /?restype=service&comp=properties": ["200"], + "GET /?restype=service&comp=stats": ["200"], + "GET /?comp=list": ["200"], + "POST /?restype=service&comp=userdelegationkey": ["200"], + "GET /?restype=account&comp=properties": ["200"], + "POST /?comp=batch": ["200"], + "GET /?comp=blobs": ["200"], + "PUT /{containerName}?restype=container": ["201"], + "GET /{containerName}?restype=container": ["200"], + "DELETE /{containerName}?restype=container": ["202"], + "PUT /{containerName}?restype=container&comp=metadata": ["200"], + "GET /{containerName}?restype=container&comp=acl": ["200"], + "PUT /{containerName}?restype=container&comp=acl": ["200"], + "PUT /{containerName}?restype=container&comp=undelete": ["201"], + "PUT /{containerName}?restype=container&comp=rename": ["200"], + "POST /{containerName}?restype=container&comp=batch": ["202"], + "GET /{containerName}?restype=container&comp=blobs": ["200"], + "PUT /{containerName}?comp=lease&restype=container&acquire": ["201"], + "PUT /{containerName}?comp=lease&restype=container&release": ["200"], + "PUT /{containerName}?comp=lease&restype=container&renew": ["200"], + "PUT /{containerName}?comp=lease&restype=container&break": ["202"], + "PUT /{containerName}?comp=lease&restype=container&change": ["200"], + "GET /{containerName}?restype=container&comp=list&flat": ["200"], + "GET /{containerName}?restype=container&comp=list&hierarchy": ["200"], + "GET /{containerName}?restype=account&comp=properties": ["200"], + "GET /{containerName}/{blobName}": ["200", "206"], + "HEAD /{containerName}/{blobName}": ["200"], + "DELETE /{containerName}/{blobName}": ["202"], + "PUT /{containerName}/{blobName}": ["202"], + "PUT /{containerName}/{blobName}?comp=undelete": ["200"], + "PUT /{containerName}/{blobName}?comp=expiry": ["200"], + "PUT /{containerName}/{blobName}?comp=properties&SetHTTPHeaders": ["200"], + "PUT /{containerName}/{blobName}?comp=immutabilityPolicies": ["200"], + "DELETE /{containerName}/{blobName}?comp=immutabilityPolicies": ["200"], + "PUT /{containerName}/{blobName}?comp=legalhold": ["200"], + "PUT /{containerName}/{blobName}?comp=metadata": ["200"], + "PUT /{containerName}/{blobName}?comp=lease&acquire": ["201"], + "PUT /{containerName}/{blobName}?comp=lease&release": ["200"], + "PUT /{containerName}/{blobName}?comp=lease&renew": ["200"], + "PUT /{containerName}/{blobName}?comp=lease&change": ["200"], + "PUT /{containerName}/{blobName}?comp=lease&break": ["202"], + "PUT /{containerName}/{blobName}?comp=snapshot": ["201"], + "PUT /{containerName}/{blobName}?comp=copy&sync": ["202"], + "PUT /{containerName}/{blobName}?comp=copy©id": ["204"], + "PUT /{containerName}/{blobName}?comp=tier": ["200", "202"], + "GET /{containerName}/{blobName}?restype=account&comp=properties&blob": ["200"], + "GET /{containerName}/{blobName}?comp=tags": ["200"], + "PUT /{containerName}/{blobName}?comp=tags": ["204"], + "PUT /{containerName}/{blobName}?PageBlob": ["201"], + "PUT /{containerName}/{blobName}?comp=page&update": ["201"], + "PUT /{containerName}/{blobName}?comp=page&clear": ["201"], + "PUT /{containerName}/{blobName}?comp=page&update&fromUrl": ["201"], + "GET /{containerName}/{blobName}?comp=pagelist": ["200"], + "GET /{containerName}/{blobName}?comp=pagelist&diff": ["200"], + "PUT /{containerName}/{blobName}?comp=properties&Resize": ["200"], + "PUT /{containerName}/{blobName}?comp=properties&UpdateSequenceNumber": ["200"], + "PUT /{containerName}/{blobName}?comp=incrementalcopy": ["202"], + "PUT /{containerName}/{blobName}?AppendBlob": ["201"], + "PUT /{containerName}/{blobName}?comp=appendblock": ["201"], + "PUT /{containerName}/{blobName}?comp=appendblock&fromUrl": ["201"], + "PUT /{containerName}/{blobName}?comp=seal": ["200"], + "PUT /{containerName}/{blobName}?BlockBlob": ["201"], + "PUT /{containerName}/{blobName}?BlockBlob&fromUrl": ["201"], + "PUT /{containerName}/{blobName}?comp=block": ["201"], + "PUT /{containerName}/{blobName}?comp=block&fromURL": ["201"], + "PUT /{containerName}/{blobName}?comp=blocklist": ["201"], + "GET /{containerName}/{blobName}?comp=blocklist": ["200"], + "POST /{containerName}/{blobName}?comp=query": ["200", "206"], +}; + +export function isUnexpected( + response: SetProperties202Response | SetPropertiesDefaultResponse, +): response is SetPropertiesDefaultResponse; +export function isUnexpected( + response: GetProperties200Response | GetPropertiesDefaultResponse, +): response is GetPropertiesDefaultResponse; +export function isUnexpected( + response: GetStatistics200Response | GetStatisticsDefaultResponse, +): response is GetStatisticsDefaultResponse; +export function isUnexpected( + response: ListContainersSegment200Response | ListContainersSegmentDefaultResponse, +): response is ListContainersSegmentDefaultResponse; +export function isUnexpected( + response: GetUserDelegationKey200Response | GetUserDelegationKeyDefaultResponse, +): response is GetUserDelegationKeyDefaultResponse; +export function isUnexpected( + response: GetAccountInfo200Response | GetAccountInfoDefaultResponse, +): response is GetAccountInfoDefaultResponse; +export function isUnexpected( + response: SubmitBatch200Response | SubmitBatchDefaultResponse, +): response is SubmitBatchDefaultResponse; +export function isUnexpected( + response: FilterBlobs200Response | FilterBlobsDefaultResponse, +): response is FilterBlobsDefaultResponse; +export function isUnexpected( + response: ContainerCreate201Response | ContainerCreateDefaultResponse, +): response is ContainerCreateDefaultResponse; +export function isUnexpected( + response: ContainerGetProperties200Response | ContainerGetPropertiesDefaultResponse, +): response is ContainerGetPropertiesDefaultResponse; +export function isUnexpected( + response: ContainerDelete202Response | ContainerDeleteDefaultResponse, +): response is ContainerDeleteDefaultResponse; +export function isUnexpected( + response: ContainerSetMetadata200Response | ContainerSetMetadataDefaultResponse, +): response is ContainerSetMetadataDefaultResponse; +export function isUnexpected( + response: ContainerGetAccessPolicy200Response | ContainerGetAccessPolicyDefaultResponse, +): response is ContainerGetAccessPolicyDefaultResponse; +export function isUnexpected( + response: ContainerSetAccessPolicy200Response | ContainerSetAccessPolicyDefaultResponse, +): response is ContainerSetAccessPolicyDefaultResponse; +export function isUnexpected( + response: ContainerRestore201Response | ContainerRestoreDefaultResponse, +): response is ContainerRestoreDefaultResponse; +export function isUnexpected( + response: ContainerRename200Response | ContainerRenameDefaultResponse, +): response is ContainerRenameDefaultResponse; +export function isUnexpected( + response: ContainerSubmitBatch202Response | ContainerSubmitBatchDefaultResponse, +): response is ContainerSubmitBatchDefaultResponse; +export function isUnexpected( + response: ContainerFilterBlobs200Response | ContainerFilterBlobsDefaultResponse, +): response is ContainerFilterBlobsDefaultResponse; +export function isUnexpected( + response: ContainerAcquireLease201Response | ContainerAcquireLeaseDefaultResponse, +): response is ContainerAcquireLeaseDefaultResponse; +export function isUnexpected( + response: ContainerReleaseLease200Response | ContainerReleaseLeaseDefaultResponse, +): response is ContainerReleaseLeaseDefaultResponse; +export function isUnexpected( + response: ContainerRenewLease200Response | ContainerRenewLeaseDefaultResponse, +): response is ContainerRenewLeaseDefaultResponse; +export function isUnexpected( + response: ContainerBreakLease202Response | ContainerBreakLeaseDefaultResponse, +): response is ContainerBreakLeaseDefaultResponse; +export function isUnexpected( + response: ContainerChangeLease200Response | ContainerChangeLeaseDefaultResponse, +): response is ContainerChangeLeaseDefaultResponse; +export function isUnexpected( + response: ContainerListBlobFlatSegment200Response | ContainerListBlobFlatSegmentDefaultResponse, +): response is ContainerListBlobFlatSegmentDefaultResponse; +export function isUnexpected( + response: + | ContainerListBlobHierarchySegment200Response + | ContainerListBlobHierarchySegmentDefaultResponse, +): response is ContainerListBlobHierarchySegmentDefaultResponse; +export function isUnexpected( + response: ContainerGetAccountInfo200Response | ContainerGetAccountInfoDefaultResponse, +): response is ContainerGetAccountInfoDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobDownload200Response + | ContainerBlobDownload206Response + | ContainerBlobDownloadDefaultResponse, +): response is ContainerBlobDownloadDefaultResponse; +export function isUnexpected( + response: ContainerBlobGetProperties200Response | ContainerBlobGetPropertiesDefaultResponse, +): response is ContainerBlobGetPropertiesDefaultResponse; +export function isUnexpected( + response: ContainerBlobDelete202Response | ContainerBlobDeleteDefaultResponse, +): response is ContainerBlobDeleteDefaultResponse; +export function isUnexpected( + response: ContainerBlobStartCopyFromUrl202Response | ContainerBlobStartCopyFromUrlDefaultResponse, +): response is ContainerBlobStartCopyFromUrlDefaultResponse; +export function isUnexpected( + response: ContainerBlobUndelete200Response | ContainerBlobUndeleteDefaultResponse, +): response is ContainerBlobUndeleteDefaultResponse; +export function isUnexpected( + response: ContainerBlobSetExpiry200Response | ContainerBlobSetExpiryDefaultResponse, +): response is ContainerBlobSetExpiryDefaultResponse; +export function isUnexpected( + response: ContainerBlobSetHttpHeaders200Response | ContainerBlobSetHttpHeadersDefaultResponse, +): response is ContainerBlobSetHttpHeadersDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobSetImmutabilityPolicy200Response + | ContainerBlobSetImmutabilityPolicyDefaultResponse, +): response is ContainerBlobSetImmutabilityPolicyDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobDeleteImmutabilityPolicy200Response + | ContainerBlobDeleteImmutabilityPolicyDefaultResponse, +): response is ContainerBlobDeleteImmutabilityPolicyDefaultResponse; +export function isUnexpected( + response: ContainerBlobSetLegalHold200Response | ContainerBlobSetLegalHoldDefaultResponse, +): response is ContainerBlobSetLegalHoldDefaultResponse; +export function isUnexpected( + response: ContainerBlobSetMetadata200Response | ContainerBlobSetMetadataDefaultResponse, +): response is ContainerBlobSetMetadataDefaultResponse; +export function isUnexpected( + response: ContainerBlobAcquireLease201Response | ContainerBlobAcquireLeaseDefaultResponse, +): response is ContainerBlobAcquireLeaseDefaultResponse; +export function isUnexpected( + response: ContainerBlobReleaseLease200Response | ContainerBlobReleaseLeaseDefaultResponse, +): response is ContainerBlobReleaseLeaseDefaultResponse; +export function isUnexpected( + response: ContainerBlobRenewLease200Response | ContainerBlobRenewLeaseDefaultResponse, +): response is ContainerBlobRenewLeaseDefaultResponse; +export function isUnexpected( + response: ContainerBlobChangeLease200Response | ContainerBlobChangeLeaseDefaultResponse, +): response is ContainerBlobChangeLeaseDefaultResponse; +export function isUnexpected( + response: ContainerBlobBreakLease202Response | ContainerBlobBreakLeaseDefaultResponse, +): response is ContainerBlobBreakLeaseDefaultResponse; +export function isUnexpected( + response: ContainerBlobCreateSnapshot201Response | ContainerBlobCreateSnapshotDefaultResponse, +): response is ContainerBlobCreateSnapshotDefaultResponse; +export function isUnexpected( + response: ContainerBlobCopyFromUrl202Response | ContainerBlobCopyFromUrlDefaultResponse, +): response is ContainerBlobCopyFromUrlDefaultResponse; +export function isUnexpected( + response: ContainerBlobAbortCopyFromUrl204Response | ContainerBlobAbortCopyFromUrlDefaultResponse, +): response is ContainerBlobAbortCopyFromUrlDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobSetTier200Response + | ContainerBlobSetTier202Response + | ContainerBlobSetTierDefaultResponse, +): response is ContainerBlobSetTierDefaultResponse; +export function isUnexpected( + response: ContainerBlobGetAccountInfo200Response | ContainerBlobGetAccountInfoDefaultResponse, +): response is ContainerBlobGetAccountInfoDefaultResponse; +export function isUnexpected( + response: ContainerBlobGetTags200Response | ContainerBlobGetTagsDefaultResponse, +): response is ContainerBlobGetTagsDefaultResponse; +export function isUnexpected( + response: ContainerBlobSetTags204Response | ContainerBlobSetTagsDefaultResponse, +): response is ContainerBlobSetTagsDefaultResponse; +export function isUnexpected( + response: ContainerBlobPageBlobCreate201Response | ContainerBlobPageBlobCreateDefaultResponse, +): response is ContainerBlobPageBlobCreateDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobPageBlobUploadPages201Response + | ContainerBlobPageBlobUploadPagesDefaultResponse, +): response is ContainerBlobPageBlobUploadPagesDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobPageBlobClearPages201Response + | ContainerBlobPageBlobClearPagesDefaultResponse, +): response is ContainerBlobPageBlobClearPagesDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobPageBlobUploadPagesFromUrl201Response + | ContainerBlobPageBlobUploadPagesFromUrlDefaultResponse, +): response is ContainerBlobPageBlobUploadPagesFromUrlDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobPageBlobGetPageRanges200Response + | ContainerBlobPageBlobGetPageRangesDefaultResponse, +): response is ContainerBlobPageBlobGetPageRangesDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobPageBlobGetPageRangesDiff200Response + | ContainerBlobPageBlobGetPageRangesDiffDefaultResponse, +): response is ContainerBlobPageBlobGetPageRangesDiffDefaultResponse; +export function isUnexpected( + response: ContainerBlobPageBlobResize200Response | ContainerBlobPageBlobResizeDefaultResponse, +): response is ContainerBlobPageBlobResizeDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobPageBlobUpdateSequenceNumber200Response + | ContainerBlobPageBlobUpdateSequenceNumberDefaultResponse, +): response is ContainerBlobPageBlobUpdateSequenceNumberDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobPageBlobCopyIncremental202Response + | ContainerBlobPageBlobCopyIncrementalDefaultResponse, +): response is ContainerBlobPageBlobCopyIncrementalDefaultResponse; +export function isUnexpected( + response: ContainerBlobAppendBlobCreate201Response | ContainerBlobAppendBlobCreateDefaultResponse, +): response is ContainerBlobAppendBlobCreateDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobAppendBlobAppendBlock201Response + | ContainerBlobAppendBlobAppendBlockDefaultResponse, +): response is ContainerBlobAppendBlobAppendBlockDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobAppendBlobAppendBlockFromUrl201Response + | ContainerBlobAppendBlobAppendBlockFromUrlDefaultResponse, +): response is ContainerBlobAppendBlobAppendBlockFromUrlDefaultResponse; +export function isUnexpected( + response: ContainerBlobAppendBlobSeal200Response | ContainerBlobAppendBlobSealDefaultResponse, +): response is ContainerBlobAppendBlobSealDefaultResponse; +export function isUnexpected( + response: ContainerBlobBlockBlobUpload201Response | ContainerBlobBlockBlobUploadDefaultResponse, +): response is ContainerBlobBlockBlobUploadDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobBlockBlobPutBlobFromUrl201Response + | ContainerBlobBlockBlobPutBlobFromUrlDefaultResponse, +): response is ContainerBlobBlockBlobPutBlobFromUrlDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobBlockBlobStageBlock201Response + | ContainerBlobBlockBlobStageBlockDefaultResponse, +): response is ContainerBlobBlockBlobStageBlockDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobBlockBlobStageBlockFromUrl201Response + | ContainerBlobBlockBlobStageBlockFromUrlDefaultResponse, +): response is ContainerBlobBlockBlobStageBlockFromUrlDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobBlockBlobCommitBlockList201Response + | ContainerBlobBlockBlobCommitBlockListDefaultResponse, +): response is ContainerBlobBlockBlobCommitBlockListDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobBlockBlobGetBlockList200Response + | ContainerBlobBlockBlobGetBlockListDefaultResponse, +): response is ContainerBlobBlockBlobGetBlockListDefaultResponse; +export function isUnexpected( + response: + | ContainerBlobBlockBlobQuery200Response + | ContainerBlobBlockBlobQuery206Response + | ContainerBlobBlockBlobQueryDefaultResponse, +): response is ContainerBlobBlockBlobQueryDefaultResponse; +export function isUnexpected( + response: + | SetProperties202Response + | SetPropertiesDefaultResponse + | GetProperties200Response + | GetPropertiesDefaultResponse + | GetStatistics200Response + | GetStatisticsDefaultResponse + | ListContainersSegment200Response + | ListContainersSegmentDefaultResponse + | GetUserDelegationKey200Response + | GetUserDelegationKeyDefaultResponse + | GetAccountInfo200Response + | GetAccountInfoDefaultResponse + | SubmitBatch200Response + | SubmitBatchDefaultResponse + | FilterBlobs200Response + | FilterBlobsDefaultResponse + | ContainerCreate201Response + | ContainerCreateDefaultResponse + | ContainerGetProperties200Response + | ContainerGetPropertiesDefaultResponse + | ContainerDelete202Response + | ContainerDeleteDefaultResponse + | ContainerSetMetadata200Response + | ContainerSetMetadataDefaultResponse + | ContainerGetAccessPolicy200Response + | ContainerGetAccessPolicyDefaultResponse + | ContainerSetAccessPolicy200Response + | ContainerSetAccessPolicyDefaultResponse + | ContainerRestore201Response + | ContainerRestoreDefaultResponse + | ContainerRename200Response + | ContainerRenameDefaultResponse + | ContainerSubmitBatch202Response + | ContainerSubmitBatchDefaultResponse + | ContainerFilterBlobs200Response + | ContainerFilterBlobsDefaultResponse + | ContainerAcquireLease201Response + | ContainerAcquireLeaseDefaultResponse + | ContainerReleaseLease200Response + | ContainerReleaseLeaseDefaultResponse + | ContainerRenewLease200Response + | ContainerRenewLeaseDefaultResponse + | ContainerBreakLease202Response + | ContainerBreakLeaseDefaultResponse + | ContainerChangeLease200Response + | ContainerChangeLeaseDefaultResponse + | ContainerListBlobFlatSegment200Response + | ContainerListBlobFlatSegmentDefaultResponse + | ContainerListBlobHierarchySegment200Response + | ContainerListBlobHierarchySegmentDefaultResponse + | ContainerGetAccountInfo200Response + | ContainerGetAccountInfoDefaultResponse + | ContainerBlobDownload200Response + | ContainerBlobDownload206Response + | ContainerBlobDownloadDefaultResponse + | ContainerBlobGetProperties200Response + | ContainerBlobGetPropertiesDefaultResponse + | ContainerBlobDelete202Response + | ContainerBlobDeleteDefaultResponse + | ContainerBlobStartCopyFromUrl202Response + | ContainerBlobStartCopyFromUrlDefaultResponse + | ContainerBlobUndelete200Response + | ContainerBlobUndeleteDefaultResponse + | ContainerBlobSetExpiry200Response + | ContainerBlobSetExpiryDefaultResponse + | ContainerBlobSetHttpHeaders200Response + | ContainerBlobSetHttpHeadersDefaultResponse + | ContainerBlobSetImmutabilityPolicy200Response + | ContainerBlobSetImmutabilityPolicyDefaultResponse + | ContainerBlobDeleteImmutabilityPolicy200Response + | ContainerBlobDeleteImmutabilityPolicyDefaultResponse + | ContainerBlobSetLegalHold200Response + | ContainerBlobSetLegalHoldDefaultResponse + | ContainerBlobSetMetadata200Response + | ContainerBlobSetMetadataDefaultResponse + | ContainerBlobAcquireLease201Response + | ContainerBlobAcquireLeaseDefaultResponse + | ContainerBlobReleaseLease200Response + | ContainerBlobReleaseLeaseDefaultResponse + | ContainerBlobRenewLease200Response + | ContainerBlobRenewLeaseDefaultResponse + | ContainerBlobChangeLease200Response + | ContainerBlobChangeLeaseDefaultResponse + | ContainerBlobBreakLease202Response + | ContainerBlobBreakLeaseDefaultResponse + | ContainerBlobCreateSnapshot201Response + | ContainerBlobCreateSnapshotDefaultResponse + | ContainerBlobCopyFromUrl202Response + | ContainerBlobCopyFromUrlDefaultResponse + | ContainerBlobAbortCopyFromUrl204Response + | ContainerBlobAbortCopyFromUrlDefaultResponse + | ContainerBlobSetTier200Response + | ContainerBlobSetTier202Response + | ContainerBlobSetTierDefaultResponse + | ContainerBlobGetAccountInfo200Response + | ContainerBlobGetAccountInfoDefaultResponse + | ContainerBlobGetTags200Response + | ContainerBlobGetTagsDefaultResponse + | ContainerBlobSetTags204Response + | ContainerBlobSetTagsDefaultResponse + | ContainerBlobPageBlobCreate201Response + | ContainerBlobPageBlobCreateDefaultResponse + | ContainerBlobPageBlobUploadPages201Response + | ContainerBlobPageBlobUploadPagesDefaultResponse + | ContainerBlobPageBlobClearPages201Response + | ContainerBlobPageBlobClearPagesDefaultResponse + | ContainerBlobPageBlobUploadPagesFromUrl201Response + | ContainerBlobPageBlobUploadPagesFromUrlDefaultResponse + | ContainerBlobPageBlobGetPageRanges200Response + | ContainerBlobPageBlobGetPageRangesDefaultResponse + | ContainerBlobPageBlobGetPageRangesDiff200Response + | ContainerBlobPageBlobGetPageRangesDiffDefaultResponse + | ContainerBlobPageBlobResize200Response + | ContainerBlobPageBlobResizeDefaultResponse + | ContainerBlobPageBlobUpdateSequenceNumber200Response + | ContainerBlobPageBlobUpdateSequenceNumberDefaultResponse + | ContainerBlobPageBlobCopyIncremental202Response + | ContainerBlobPageBlobCopyIncrementalDefaultResponse + | ContainerBlobAppendBlobCreate201Response + | ContainerBlobAppendBlobCreateDefaultResponse + | ContainerBlobAppendBlobAppendBlock201Response + | ContainerBlobAppendBlobAppendBlockDefaultResponse + | ContainerBlobAppendBlobAppendBlockFromUrl201Response + | ContainerBlobAppendBlobAppendBlockFromUrlDefaultResponse + | ContainerBlobAppendBlobSeal200Response + | ContainerBlobAppendBlobSealDefaultResponse + | ContainerBlobBlockBlobUpload201Response + | ContainerBlobBlockBlobUploadDefaultResponse + | ContainerBlobBlockBlobPutBlobFromUrl201Response + | ContainerBlobBlockBlobPutBlobFromUrlDefaultResponse + | ContainerBlobBlockBlobStageBlock201Response + | ContainerBlobBlockBlobStageBlockDefaultResponse + | ContainerBlobBlockBlobStageBlockFromUrl201Response + | ContainerBlobBlockBlobStageBlockFromUrlDefaultResponse + | ContainerBlobBlockBlobCommitBlockList201Response + | ContainerBlobBlockBlobCommitBlockListDefaultResponse + | ContainerBlobBlockBlobGetBlockList200Response + | ContainerBlobBlockBlobGetBlockListDefaultResponse + | ContainerBlobBlockBlobQuery200Response + | ContainerBlobBlockBlobQuery206Response + | ContainerBlobBlockBlobQueryDefaultResponse, +): response is + | SetPropertiesDefaultResponse + | GetPropertiesDefaultResponse + | GetStatisticsDefaultResponse + | ListContainersSegmentDefaultResponse + | GetUserDelegationKeyDefaultResponse + | GetAccountInfoDefaultResponse + | SubmitBatchDefaultResponse + | FilterBlobsDefaultResponse + | ContainerCreateDefaultResponse + | ContainerGetPropertiesDefaultResponse + | ContainerDeleteDefaultResponse + | ContainerSetMetadataDefaultResponse + | ContainerGetAccessPolicyDefaultResponse + | ContainerSetAccessPolicyDefaultResponse + | ContainerRestoreDefaultResponse + | ContainerRenameDefaultResponse + | ContainerSubmitBatchDefaultResponse + | ContainerFilterBlobsDefaultResponse + | ContainerAcquireLeaseDefaultResponse + | ContainerReleaseLeaseDefaultResponse + | ContainerRenewLeaseDefaultResponse + | ContainerBreakLeaseDefaultResponse + | ContainerChangeLeaseDefaultResponse + | ContainerListBlobFlatSegmentDefaultResponse + | ContainerListBlobHierarchySegmentDefaultResponse + | ContainerGetAccountInfoDefaultResponse + | ContainerBlobDownloadDefaultResponse + | ContainerBlobGetPropertiesDefaultResponse + | ContainerBlobDeleteDefaultResponse + | ContainerBlobStartCopyFromUrlDefaultResponse + | ContainerBlobUndeleteDefaultResponse + | ContainerBlobSetExpiryDefaultResponse + | ContainerBlobSetHttpHeadersDefaultResponse + | ContainerBlobSetImmutabilityPolicyDefaultResponse + | ContainerBlobDeleteImmutabilityPolicyDefaultResponse + | ContainerBlobSetLegalHoldDefaultResponse + | ContainerBlobSetMetadataDefaultResponse + | ContainerBlobAcquireLeaseDefaultResponse + | ContainerBlobReleaseLeaseDefaultResponse + | ContainerBlobRenewLeaseDefaultResponse + | ContainerBlobChangeLeaseDefaultResponse + | ContainerBlobBreakLeaseDefaultResponse + | ContainerBlobCreateSnapshotDefaultResponse + | ContainerBlobCopyFromUrlDefaultResponse + | ContainerBlobAbortCopyFromUrlDefaultResponse + | ContainerBlobSetTierDefaultResponse + | ContainerBlobGetAccountInfoDefaultResponse + | ContainerBlobGetTagsDefaultResponse + | ContainerBlobSetTagsDefaultResponse + | ContainerBlobPageBlobCreateDefaultResponse + | ContainerBlobPageBlobUploadPagesDefaultResponse + | ContainerBlobPageBlobClearPagesDefaultResponse + | ContainerBlobPageBlobUploadPagesFromUrlDefaultResponse + | ContainerBlobPageBlobGetPageRangesDefaultResponse + | ContainerBlobPageBlobGetPageRangesDiffDefaultResponse + | ContainerBlobPageBlobResizeDefaultResponse + | ContainerBlobPageBlobUpdateSequenceNumberDefaultResponse + | ContainerBlobPageBlobCopyIncrementalDefaultResponse + | ContainerBlobAppendBlobCreateDefaultResponse + | ContainerBlobAppendBlobAppendBlockDefaultResponse + | ContainerBlobAppendBlobAppendBlockFromUrlDefaultResponse + | ContainerBlobAppendBlobSealDefaultResponse + | ContainerBlobBlockBlobUploadDefaultResponse + | ContainerBlobBlockBlobPutBlobFromUrlDefaultResponse + | ContainerBlobBlockBlobStageBlockDefaultResponse + | ContainerBlobBlockBlobStageBlockFromUrlDefaultResponse + | ContainerBlobBlockBlobCommitBlockListDefaultResponse + | ContainerBlobBlockBlobGetBlockListDefaultResponse + | ContainerBlobBlockBlobQueryDefaultResponse { + const lroOriginal = response.headers["x-ms-original-url"]; + const url = new URL(lroOriginal ?? response.request.url); + const method = response.request.method; + let pathDetails = responseMap[`${method} ${url.pathname}`]; + if (!pathDetails) { + pathDetails = getParametrizedPathSuccess(method, url.pathname); + } + return !pathDetails.includes(response.status); +} + +function getParametrizedPathSuccess(method: string, path: string): string[] { + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: string[] = []; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(responseMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/storage/azure-storage-blob-rest/src/logger.ts b/sdk/storage/azure-storage-blob-rest/src/logger.ts new file mode 100644 index 000000000000..b125afbf4aec --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("azure-storage-blob-rest"); diff --git a/sdk/storage/azure-storage-blob-rest/src/models.ts b/sdk/storage/azure-storage-blob-rest/src/models.ts new file mode 100644 index 000000000000..2dfcfd23bd6c --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/models.ts @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** The service properties. */ +export interface StorageServiceProperties { + /** The logging properties. */ + logging?: Logging; + /** The hour metrics properties. */ + hourMetrics?: Metrics; + /** The minute metrics properties. */ + minuteMetrics?: Metrics; + /** The CORS properties. */ + cors?: Array; + /** The default service version. */ + defaultServiceVersion?: string; + /** The delete retention policy. */ + deleteRetentionPolicy?: RetentionPolicy; + /** The static website properties. */ + staticWebsite?: StaticWebsite; +} + +/** Azure Analytics Logging settings. */ +export interface Logging { + /** The version of the logging properties. */ + version: string; + /** Whether delete operation is logged. */ + delete: boolean; + /** Whether read operation is logged. */ + read: boolean; + /** Whether write operation is logged. */ + write: boolean; + /** The retention policy of the logs. */ + retentionPolicy: RetentionPolicy; +} + +/** The retention policy. */ +export interface RetentionPolicy { + /** Whether to enable the retention policy. */ + enabled: boolean; + /** The number of days to retain the logs. */ + days?: number; + /** Whether to allow permanent delete. */ + allowPermanentDelete?: boolean; +} + +/** The metrics properties. */ +export interface Metrics { + /** The version of the metrics properties. */ + version?: string; + /** Whether it is enabled. */ + enabled: boolean; + /** Whether to include API in the metrics. */ + includeApis?: boolean; + /** The retention policy of the metrics. */ + retentionPolicy?: RetentionPolicy; +} + +/** CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain */ +export interface CorsRule { + /** The allowed origins. */ + allowedOrigins: string; + /** The allowed methods. */ + allowedMethods: string; + /** The allowed headers. */ + allowedHeaders: string; + /** The exposed headers. */ + exposedHeaders: string; + /** The maximum age in seconds. */ + maxAgeInSeconds: number; +} + +/** The properties that enable an account to host a static website */ +export interface StaticWebsite { + /** Indicates whether this account is hosting a static website */ + enabled: boolean; + /** The index document. */ + indexDocument?: string; + /** The error document. */ + errorDocument404Path?: string; + /** Absolute path of the default index page */ + defaultIndexDocumentPath?: string; +} + +/** Key information */ +export interface KeyInfo { + /** The date-time the key is active. */ + start: string; + /** The date-time the key expires. */ + expiry: string; +} + +/** Represents blob tags. */ +export interface BlobTags { + /** Represents the blob tags. */ + blobTagSet: Array; +} + +/** The blob tags. */ +export interface BlobTag { + /** The key of the tag. */ + key: string; + /** The value of the tag. */ + value: string; +} + +/** The signed identifier. */ +export interface SignedIdentifier { + /** The unique ID for the signed identifier. */ + id: string; + /** The access policy for the signed identifier. */ + accessPolicy: AccessPolicy; +} + +/** Represents an access policy. */ +export interface AccessPolicy { + /** The date-time the policy is active. */ + start: Date | string; + /** The date-time the policy expires. */ + expiry: Date | string; + /** The permissions for acl the policy. */ + permission: string; +} + +/** The Block lookup list. */ +export interface BlockLookupList { + /** The committed blocks */ + committed?: string[]; + /** The uncommitted blocks */ + uncommitted?: string[]; + /** The latest blocks */ + latest?: string[]; +} + +/** Groups the set of query request settings. */ +export interface QueryRequest { + /** + * Required. The type of the provided query expression. + * + * Possible values: "SQL" + */ + queryType: QueryRequestType; + /** The query expression in SQL. The maximum size of the query expression is 256KiB. */ + expression: string; + /** The input serialization settings. */ + inputSerialization?: QuerySerialization; + /** The output serialization settings. */ + outputSerialization?: QuerySerialization; +} + +/** The query serialization settings. */ +export interface QuerySerialization { + /** The query format. */ + format: QueryFormat; +} + +/** The query format settings. */ +export interface QueryFormat { + /** + * The query type. + * + * Possible values: "delimited", "json", "arrow", "parquet" + */ + type: QueryType; + /** The delimited text configuration. */ + delimitedTextConfiguration?: DelimitedTextConfiguration; + /** The JSON text configuration. */ + jsonTextConfiguration?: JsonTextConfiguration; + /** The Apache Arrow configuration. */ + arrowConfiguration?: ArrowConfiguration; + /** The Parquet configuration. */ + parquetTextConfiguration?: ParquetConfiguration; +} + +/** Represents the delimited text configuration. */ +export interface DelimitedTextConfiguration { + /** The string used to separate columns. */ + columnSeparator?: string; + /** The string used to quote a specific field. */ + fieldQuote?: string; + /** The string used to separate records. */ + recordSeparator?: string; + /** The string used to escape a quote character in a field. */ + escapeChar?: string; + /** Represents whether the data has headers. */ + headersPresent?: boolean; +} + +/** Represents the JSON text configuration. */ +export interface JsonTextConfiguration { + /** The string used to separate records. */ + recordSeparator?: string; +} + +/** Represents the Apache Arrow configuration. */ +export interface ArrowConfiguration { + /** The Apache Arrow schema */ + schema: Array; +} + +/** Represents an Apache Arrow field. */ +export interface ArrowField { + /** The arrow field type. */ + type: string; + /** The arrow field name. */ + name?: string; + /** The arrow field precision. */ + precision?: number; + /** The arrow field scale. */ + scale?: number; +} + +/** Represents the Parquet configuration. */ +export interface ParquetConfiguration extends Record {} + +/** Alias for ListContainersIncludeType */ +export type ListContainersIncludeType = string; +/** Alias for LeaseDuration */ +export type LeaseDuration = string; +/** Alias for PublicAccessType */ +export type PublicAccessType = string; +/** Alias for FilterBlobsIncludeItem */ +export type FilterBlobsIncludeItem = string; +/** Alias for ListBlobsIncludeItem */ +export type ListBlobsIncludeItem = string; +/** Alias for AccessTier */ +export type AccessTier = string; +/** Alias for RehydratePriority */ +export type RehydratePriority = string; +/** Alias for BlobImmutabilityPolicyMode */ +export type BlobImmutabilityPolicyMode = string; +/** Alias for EncryptionAlgorithmType */ +export type EncryptionAlgorithmType = string; +/** Alias for DeleteSnapshotsOptionType */ +export type DeleteSnapshotsOptionType = string; +/** Alias for BlobDeleteType */ +export type BlobDeleteType = string; +/** Alias for BlobExpiryOptions */ +export type BlobExpiryOptions = string; +/** Alias for PremiumPageBlobAccessTier */ +export type PremiumPageBlobAccessTier = string; +/** Alias for SequenceNumberActionType */ +export type SequenceNumberActionType = string; +/** Alias for BlockListType */ +export type BlockListType = string; +/** Alias for QueryRequestType */ +export type QueryRequestType = string; +/** Alias for QueryType */ +export type QueryType = string; diff --git a/sdk/storage/azure-storage-blob-rest/src/outputModels.ts b/sdk/storage/azure-storage-blob-rest/src/outputModels.ts new file mode 100644 index 000000000000..2d853da2c275 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/outputModels.ts @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** Azure Analytics Logging settings. */ +export interface LoggingOutput { + /** The version of the logging properties. */ + version: string; + /** Whether delete operation is logged. */ + delete: boolean; + /** Whether read operation is logged. */ + read: boolean; + /** Whether write operation is logged. */ + write: boolean; + /** The retention policy of the logs. */ + retentionPolicy: RetentionPolicyOutput; +} + +/** The retention policy. */ +export interface RetentionPolicyOutput { + /** Whether to enable the retention policy. */ + enabled: boolean; + /** The number of days to retain the logs. */ + days?: number; + /** Whether to allow permanent delete. */ + allowPermanentDelete?: boolean; +} + +/** The metrics properties. */ +export interface MetricsOutput { + /** The version of the metrics properties. */ + version?: string; + /** Whether it is enabled. */ + enabled: boolean; + /** Whether to include API in the metrics. */ + includeApis?: boolean; + /** The retention policy of the metrics. */ + retentionPolicy?: RetentionPolicyOutput; +} + +/** CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain */ +export interface CorsRuleOutput { + /** The allowed origins. */ + allowedOrigins: string; + /** The allowed methods. */ + allowedMethods: string; + /** The allowed headers. */ + allowedHeaders: string; + /** The exposed headers. */ + exposedHeaders: string; + /** The maximum age in seconds. */ + maxAgeInSeconds: number; +} + +/** The properties that enable an account to host a static website */ +export interface StaticWebsiteOutput { + /** Indicates whether this account is hosting a static website */ + enabled: boolean; + /** The index document. */ + indexDocument?: string; + /** The error document. */ + errorDocument404Path?: string; + /** Absolute path of the default index page */ + defaultIndexDocumentPath?: string; +} + +/** The error response. */ +export interface StorageErrorOutput { + /** The error message. */ + Message?: string; +} + +/** The service properties. */ +export interface StorageServicePropertiesOutput { + /** The logging properties. */ + logging?: LoggingOutput; + /** The hour metrics properties. */ + hourMetrics?: MetricsOutput; + /** The minute metrics properties. */ + minuteMetrics?: MetricsOutput; + /** The CORS properties. */ + cors?: Array; + /** The default service version. */ + defaultServiceVersion?: string; + /** The delete retention policy. */ + deleteRetentionPolicy?: RetentionPolicyOutput; + /** The static website properties. */ + staticWebsite?: StaticWebsiteOutput; +} + +/** Stats for the storage service. */ +export interface StorageServiceStatsOutput { + /** The geo replication stats. */ + geoReplication?: GeoReplicationOutput; +} + +/** Geo-Replication information for the Secondary Storage Service */ +export interface GeoReplicationOutput { + /** + * The status of the secondary location + * + * Possible values: "live", "bootstrap", "unavailable" + */ + status: GeoReplicationStatusTypeOutput; + /** A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads. */ + lastSyncTime: string; +} + +/** The list container segment response */ +export interface ListContainersSegmentResponseOutput { + /** The service endpoint. */ + serviceEndpoint: string; + /** The prefix of the containers. */ + prefix?: string; + /** The marker of the containers. */ + marker?: string; + /** The max results of the containers. */ + maxResults?: number; + /** The container segment. */ + containerItems: Array; + /** The next marker of the containers. */ + NextMarker?: string; +} + +/** An Azure Storage container. */ +export interface ContainerItemOutput { + /** The name of the container. */ + name: string; + /** Whether the container is deleted. */ + delete?: boolean; + /** The version of the container. */ + version?: string; + /** The properties of the container. */ + properties: ContainerPropertiesOutput; + /** The metadata of the container. */ + metadata?: Record; +} + +/** The properties of a container. */ +export interface ContainerPropertiesOutput { + /** The date-time the container was last modified in RFC1123 format. */ + lastModified: string; + /** The ETag of the container. */ + eTag: string; + /** + * The lease status of the container. + * + * Possible values: "unlocked", "locked" + */ + leaseStatus?: LeaseStatusOutput; + /** + * The lease state of the container. + * + * Possible values: "available", "leased", "expired", "breaking", "broken" + */ + leaseState?: LeaseStateOutput; + /** + * The lease duration of the container. + * + * Possible values: "infinite", "fixed" + */ + leaseDuration?: LeaseDurationOutput; + /** + * The public access type of the container. + * + * Possible values: "blob", "container" + */ + publicAccess?: PublicAccessTypeOutput; + /** Whether it has an immutability policy. */ + hasImmutabilityPolicy?: boolean; + /** The has legal hold status of the container. */ + hasLegalHold?: boolean; + /** The default encryption scope of the container. */ + defaultEncryptionScope?: string; + /** Whether to prevent encryption scope override. */ + denyEncryptionScopeOverride?: boolean; + /** The deleted time of the container. */ + deletedTime?: string; + /** The remaining retention days of the container. */ + remainingRetentionDays?: number; + /** Whether immutable storage with versioning is enabled. */ + immutableStorageWithVersioningEnabled?: boolean; +} + +/** A user delegation key. */ +export interface UserDelegationKeyOutput { + /** The Azure Active Directory object ID in GUID format. */ + signedOid: string; + /** The Azure Active Directory tenant ID in GUID format. */ + signedTid: string; + /** The date-time the key is active. */ + signedStart: string; + /** The date-time the key expires. */ + signedExpiry: string; + /** Abbreviation of the Azure Storage service that accepts the key. */ + signedService: string; + /** The service version that created the key. */ + signedVersion: string; + /** The key as a base64 string. */ + value: string; +} + +/** The result of a Filter Blobs API call */ +export interface FilterBlobSegmentOutput { + /** The service endpoint. */ + serviceEndpoint: string; + /** The filter for the blobs. */ + where: string; + /** The blob segment. */ + blobs: Array; + /** The next marker of the blobs. */ + nextMarker?: string; +} + +/** The filter blob item. */ +export interface FilterBlobItemOutput { + /** The name of the blob. */ + name: string; + /** The properties of the blob. */ + containerName: string; + /** The metadata of the blob. */ + tags?: BlobTagsOutput; + /** The version ID of the blob. */ + versionId?: string; + /** Whether it is the current version of the blob */ + isCurrentVersion?: boolean; +} + +/** Represents blob tags. */ +export interface BlobTagsOutput { + /** Represents the blob tags. */ + blobTagSet: Array; +} + +/** The blob tags. */ +export interface BlobTagOutput { + /** The key of the tag. */ + key: string; + /** The value of the tag. */ + value: string; +} + +/** The signed identifier. */ +export interface SignedIdentifierOutput { + /** The unique ID for the signed identifier. */ + id: string; + /** The access policy for the signed identifier. */ + accessPolicy: AccessPolicyOutput; +} + +/** Represents an access policy. */ +export interface AccessPolicyOutput { + /** The date-time the policy is active. */ + start: string; + /** The date-time the policy expires. */ + expiry: string; + /** The permissions for acl the policy. */ + permission: string; +} + +/** An enumeration of blobs. */ +export interface ListBlobsFlatSegmentResponseOutput { + /** The service endpoint. */ + serviceEndpoint: string; + /** The container name. */ + containerName: string; + /** The prefix of the blobs. */ + prefix?: string; + /** The marker of the blobs. */ + marker?: string; + /** The max results of the blobs. */ + maxResults?: number; + /** The blob segment. */ + segment: BlobFlatListSegmentOutput; + /** The next marker of the blobs. */ + nextMarker?: string; +} + +/** The blob flat list segment. */ +export interface BlobFlatListSegmentOutput { + /** The blob items. */ + blobItems: Array; +} + +/** An Azure Storage Blob */ +export interface BlobItemInternalOutput { + /** The name of the blob. */ + name: BlobNameOutput; + /** Whether the blob is deleted. */ + deleted: boolean; + /** The snapshot of the blob. */ + snapshot: string; + /** The version id of the blob. */ + versionId?: string; + /** Whether the blob is the current version. */ + isCurrentVersion?: boolean; + /** The properties of the blob. */ + properties: BlobPropertiesInternalOutput; + /** The metadata of the blob. */ + metadata?: BlobMetadataOutput; + /** The tags of the blob. */ + blobTags?: BlobTagsOutput; + /** The object replication metadata of the blob. */ + objectReplicationMetadata?: ObjectReplicationMetadataOutput; + /** Whether the blog has versions only. */ + hasVersionsOnly?: boolean; +} + +/** Represents a blob name. */ +export interface BlobNameOutput { + /** Whether the blob name is encoded. */ + encoded?: boolean; + /** The blob name. */ + content?: string; +} + +/** The properties of a blob. */ +export interface BlobPropertiesInternalOutput { + /** The date-time the blob was created in RFC1123 format. */ + creationTime?: string; + /** The date-time the blob was last modified in RFC1123 format. */ + lastModified: string; + /** The blog ETag. */ + eTag: string; + /** The content length of the blob. */ + contentLength?: number; + /** The content type of the blob. */ + contentType?: string; + /** The content encoding of the blob. */ + contentEncoding?: string; + /** The content language of the blob. */ + contentLanguage?: string; + /** The content MD5 of the blob. */ + contentMd5?: string; + /** The content disposition of the blob. */ + contentDisposition?: string; + /** The cache control of the blob. */ + cacheControl?: string; + /** The sequence number of the blob. */ + blobSequenceNumber?: number; + /** + * The blob type. + * + * Possible values: "BlockBlob", "PageBlob", "AppendBlob" + */ + blobType?: BlobTypeOutput; + /** + * The lease status of the blob. + * + * Possible values: "unlocked", "locked" + */ + leaseStatus?: LeaseStatusOutput; + /** + * The lease state of the blob. + * + * Possible values: "available", "leased", "expired", "breaking", "broken" + */ + leaseState?: LeaseStateOutput; + /** + * The lease duration of the blob. + * + * Possible values: "infinite", "fixed" + */ + leaseDuration?: LeaseDurationOutput; + /** The copy ID of the blob. */ + copyId?: string; + /** + * The copy status of the blob. + * + * Possible values: "pending", "success", "failed", "aborted" + */ + copyStatus?: CopyStatusOutput; + /** The copy source of the blob. */ + copySource?: string; + /** The copy progress of the blob. */ + copyProgress?: string; + /** The copy completion time of the blob. */ + copyCompletionTime?: string; + /** The copy status description of the blob. */ + copyStatusDescription?: string; + /** Whether the blog is encrypted on the server. */ + serverEncrypted?: boolean; + /** Whether the blog is incremental copy. */ + incrementalCopy?: boolean; + /** The name of the destination snapshot. */ + destinationSnapshot?: string; + /** The time the blob was deleted. */ + deletedTime?: string; + /** The remaining retention days of the blob. */ + remainingRetentionDays?: number; + /** + * The access tier of the blob. + * + * Possible values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold" + */ + accessTier?: AccessTierOutput; + /** Whether the access tier is inferred. */ + accessTierInferred?: boolean; + /** + * The archive status of the blob. + * + * Possible values: "rehydrate-pending-to-hot", "rehydrate-pending-to-cool", "rehydrate-pending-to-cold" + */ + archiveStatus?: ArchiveStatusOutput; + /** Customer provided key sha256 */ + customerProvidedKeySha256?: string; + /** The encryption scope of the blob. */ + encryptionScope?: string; + /** The access tier change time of the blob. */ + accessTierChangeTime?: string; + /** The number of tags for the blob. */ + tagCount?: number; + /** The expire time of the blob. */ + expiryTime?: string; + /** Whether the blob is sealed. */ + sealed?: boolean; + /** + * The rehydrate priority of the blob. + * + * Possible values: "High", "Standard" + */ + rehydratePriority?: RehydratePriorityOutput; + /** The last access time of the blob. */ + lastAccessTime?: string; + /** The immutability policy until time of the blob. */ + immutabilityPolicyUntilDate?: string; + /** + * The immutability policy mode of the blob. + * + * Possible values: "Mutable", "Locked", "Unlocked" + */ + immutabilityPolicyMode?: BlobImmutabilityPolicyModeOutput; + /** Whether the blob is under legal hold. */ + legalHold?: boolean; +} + +/** The blob metadata. */ +export interface BlobMetadataOutput extends Record { + /** Whether the blob metadata is encrypted. */ + encrypted?: string; +} + +/** The object replication metadata. */ +export interface ObjectReplicationMetadataOutput extends Record {} + +/** An enumeration of blobs */ +export interface ListBlobsHierarchySegmentResponseOutput { + /** The service endpoint. */ + serviceEndpoint: string; + /** The container name. */ + containerName: string; + /** The delimiter of the blobs. */ + delimiter?: string; + /** The prefix of the blobs. */ + prefix?: string; + /** The marker of the blobs. */ + marker?: string; + /** The max results of the blobs. */ + maxResults?: number; + /** The blob segment. */ + segment: BlobHierarchyListSegmentOutput; + /** The next marker of the blobs. */ + nextMarker?: string; +} + +/** Represents an array of blobs. */ +export interface BlobHierarchyListSegmentOutput { + /** The blob items */ + blobItems: Array; + /** The blob prefixes. */ + blobPrefixes?: Array; +} + +/** Represents a blob prefix. */ +export interface BlobPrefixOutput { + /** The blob name. */ + name: BlobNameOutput; +} + +/** Represents a page list. */ +export interface PageListOutput { + /** The page ranges. */ + pageRange?: Array; + /** The clear ranges. */ + clearRange?: Array; + /** The next marker. */ + nextMarker?: string; +} + +/** The page range. */ +export interface PageRangeOutput { + /** The start of the byte range. */ + start: number; + /** The end of the byte range. */ + end: number; +} + +/** The clear range. */ +export interface ClearRangeOutput { + /** The start of the byte range. */ + start: number; + /** The end of the byte range. */ + end: number; +} + +/** Contains the committed and uncommitted blocks in a block blob. */ +export interface BlockListOutput { + /** The list of committed blocks. */ + committedBlocks?: Array; + /** The list of uncommitted blocks. */ + uncommittedBlocks?: Array; +} + +/** Represents a single block in a block blob. It describes the block's ID and size. */ +export interface BlockOutput { + /** The base64 encoded block ID. */ + name: string; + /** The block size in bytes. */ + size: number; +} + +/** Alias for GeoReplicationStatusTypeOutput */ +export type GeoReplicationStatusTypeOutput = string; +/** Alias for LeaseStatusOutput */ +export type LeaseStatusOutput = string; +/** Alias for LeaseStateOutput */ +export type LeaseStateOutput = string; +/** Alias for LeaseDurationOutput */ +export type LeaseDurationOutput = string; +/** Alias for PublicAccessTypeOutput */ +export type PublicAccessTypeOutput = string; +/** Alias for SkuNameOutput */ +export type SkuNameOutput = string; +/** Alias for AccountKindOutput */ +export type AccountKindOutput = string; +/** Alias for BlobTypeOutput */ +export type BlobTypeOutput = string; +/** Alias for CopyStatusOutput */ +export type CopyStatusOutput = string; +/** Alias for AccessTierOutput */ +export type AccessTierOutput = string; +/** Alias for ArchiveStatusOutput */ +export type ArchiveStatusOutput = string; +/** Alias for RehydratePriorityOutput */ +export type RehydratePriorityOutput = string; +/** Alias for BlobImmutabilityPolicyModeOutput */ +export type BlobImmutabilityPolicyModeOutput = string; diff --git a/sdk/storage/azure-storage-blob-rest/src/parameters.ts b/sdk/storage/azure-storage-blob-rest/src/parameters.ts new file mode 100644 index 000000000000..d073fc886fdb --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/parameters.ts @@ -0,0 +1,3522 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { RawHttpHeadersInput } from "@azure/core-rest-pipeline"; +import type { RequestParameters } from "@azure-rest/core-client"; +import type { + StorageServiceProperties, + ListContainersIncludeType, + KeyInfo, + FilterBlobsIncludeItem, + PublicAccessType, + SignedIdentifier, + LeaseDuration, + ListBlobsIncludeItem, + EncryptionAlgorithmType, + BlobDeleteType, + DeleteSnapshotsOptionType, + BlobExpiryOptions, + BlobImmutabilityPolicyMode, + AccessTier, + RehydratePriority, + BlobTags, + PremiumPageBlobAccessTier, + SequenceNumberActionType, + BlockLookupList, + BlockListType, + QueryRequest, +} from "./models.js"; + +export interface SetPropertiesHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface SetPropertiesBodyParam { + body: StorageServiceProperties; +} + +export interface SetPropertiesQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface SetPropertiesQueryParam { + queryParameters?: SetPropertiesQueryParamProperties; +} + +export interface SetPropertiesHeaderParam { + headers: RawHttpHeadersInput & SetPropertiesHeaders; +} + +export interface SetPropertiesMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type SetPropertiesParameters = SetPropertiesQueryParam & + SetPropertiesHeaderParam & + SetPropertiesMediaTypesParam & + SetPropertiesBodyParam & + RequestParameters; + +export interface GetPropertiesHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface GetPropertiesQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface GetPropertiesQueryParam { + queryParameters?: GetPropertiesQueryParamProperties; +} + +export interface GetPropertiesHeaderParam { + headers: RawHttpHeadersInput & GetPropertiesHeaders; +} + +export interface GetPropertiesMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type GetPropertiesParameters = GetPropertiesQueryParam & + GetPropertiesHeaderParam & + GetPropertiesMediaTypesParam & + RequestParameters; + +export interface GetStatisticsHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface GetStatisticsQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface GetStatisticsQueryParam { + queryParameters?: GetStatisticsQueryParamProperties; +} + +export interface GetStatisticsHeaderParam { + headers: RawHttpHeadersInput & GetStatisticsHeaders; +} + +export interface GetStatisticsMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type GetStatisticsParameters = GetStatisticsQueryParam & + GetStatisticsHeaderParam & + GetStatisticsMediaTypesParam & + RequestParameters; + +export interface ListContainersSegmentHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** This is the wrapper object for the parameter `include` with explode set to false and style set to form. */ +export interface ListContainersSegmentIncludeQueryParam { + /** Value of the parameter */ + value: ListContainersIncludeType[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +export interface ListContainersSegmentQueryParamProperties { + /** Filters the results to return only containers whose name begins with the specified prefix. */ + prefix?: string; + /** A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client. */ + marker?: string; + /** Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. */ + maxresults?: number; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** Include this parameter to specify that the container's metadata be returned as part of the response body. */ + include?: ListContainersIncludeType[] | ListContainersSegmentIncludeQueryParam; +} + +export interface ListContainersSegmentQueryParam { + queryParameters?: ListContainersSegmentQueryParamProperties; +} + +export interface ListContainersSegmentHeaderParam { + headers: RawHttpHeadersInput & ListContainersSegmentHeaders; +} + +export interface ListContainersSegmentMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ListContainersSegmentParameters = ListContainersSegmentQueryParam & + ListContainersSegmentHeaderParam & + ListContainersSegmentMediaTypesParam & + RequestParameters; + +export interface GetUserDelegationKeyHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface GetUserDelegationKeyBodyParam { + body: KeyInfo; +} + +export interface GetUserDelegationKeyQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface GetUserDelegationKeyQueryParam { + queryParameters?: GetUserDelegationKeyQueryParamProperties; +} + +export interface GetUserDelegationKeyHeaderParam { + headers: RawHttpHeadersInput & GetUserDelegationKeyHeaders; +} + +export interface GetUserDelegationKeyMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type GetUserDelegationKeyParameters = GetUserDelegationKeyQueryParam & + GetUserDelegationKeyHeaderParam & + GetUserDelegationKeyMediaTypesParam & + GetUserDelegationKeyBodyParam & + RequestParameters; + +export interface GetAccountInfoHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface GetAccountInfoQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface GetAccountInfoQueryParam { + queryParameters?: GetAccountInfoQueryParamProperties; +} + +export interface GetAccountInfoHeaderParam { + headers: RawHttpHeadersInput & GetAccountInfoHeaders; +} + +export interface GetAccountInfoMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type GetAccountInfoParameters = GetAccountInfoQueryParam & + GetAccountInfoHeaderParam & + GetAccountInfoMediaTypesParam & + RequestParameters; + +export interface SubmitBatchHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; + /** The length of the request. */ + "Content-Length": number; +} + +export interface SubmitBatchBodyParam { + /** The body of the request. */ + body: { name: string; body: string }; +} + +export interface SubmitBatchQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface SubmitBatchQueryParam { + queryParameters?: SubmitBatchQueryParamProperties; +} + +export interface SubmitBatchHeaderParam { + headers: RawHttpHeadersInput & SubmitBatchHeaders; +} + +export interface SubmitBatchMediaTypesParam { + /** Required. The value of this header must be multipart/mixed with a batch boundary. Example header value: multipart/mixed; boundary=batch_ */ + contentType: "multipart/mixed"; +} + +export type SubmitBatchParameters = SubmitBatchQueryParam & + SubmitBatchHeaderParam & + SubmitBatchMediaTypesParam & + SubmitBatchBodyParam & + RequestParameters; + +export interface FilterBlobsHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** This is the wrapper object for the parameter `include` with explode set to false and style set to form. */ +export interface FilterBlobsIncludeQueryParam { + /** Value of the parameter */ + value: FilterBlobsIncludeItem[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +export interface FilterBlobsQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** Filters the results to return only to return only blobs whose tags match the specified expression. */ + where?: string; + /** A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client. */ + marker?: string; + /** Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. */ + maxresults?: number; + /** Include this parameter to specify one or more datasets to include in the response. */ + include?: FilterBlobsIncludeItem[] | FilterBlobsIncludeQueryParam; +} + +export interface FilterBlobsQueryParam { + queryParameters?: FilterBlobsQueryParamProperties; +} + +export interface FilterBlobsHeaderParam { + headers: RawHttpHeadersInput & FilterBlobsHeaders; +} + +export interface FilterBlobsMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type FilterBlobsParameters = FilterBlobsQueryParam & + FilterBlobsHeaderParam & + FilterBlobsMediaTypesParam & + RequestParameters; + +export interface ContainerCreateHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** + * The public access setting for the container. + * + * Possible values: "blob", "container" + */ + "x-ms-blob-public-access"?: PublicAccessType; + /** Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the container and use for all future writes. */ + "x-ms-default-encryption-scope"?: string; + /** If a blob has a lease and the lease is of infinite duration then the value of this header is set to true, otherwise it is set to false. */ + "x-ms-deny-encryption-scope-override"?: boolean; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerCreateQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerCreateQueryParam { + queryParameters?: ContainerCreateQueryParamProperties; +} + +export interface ContainerCreateHeaderParam { + headers: RawHttpHeadersInput & ContainerCreateHeaders; +} + +export interface ContainerCreateMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerCreateParameters = ContainerCreateQueryParam & + ContainerCreateHeaderParam & + ContainerCreateMediaTypesParam & + RequestParameters; + +export interface ContainerGetPropertiesHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerGetPropertiesQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerGetPropertiesQueryParam { + queryParameters?: ContainerGetPropertiesQueryParamProperties; +} + +export interface ContainerGetPropertiesHeaderParam { + headers: RawHttpHeadersInput & ContainerGetPropertiesHeaders; +} + +export interface ContainerGetPropertiesMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerGetPropertiesParameters = ContainerGetPropertiesQueryParam & + ContainerGetPropertiesHeaderParam & + ContainerGetPropertiesMediaTypesParam & + RequestParameters; + +export interface ContainerDeleteHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. */ + "If-Modified-Since"?: string; + /** A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. */ + "If-Unmodified-Since"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerDeleteQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerDeleteQueryParam { + queryParameters?: ContainerDeleteQueryParamProperties; +} + +export interface ContainerDeleteHeaderParam { + headers: RawHttpHeadersInput & ContainerDeleteHeaders; +} + +export interface ContainerDeleteMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerDeleteParameters = ContainerDeleteQueryParam & + ContainerDeleteHeaderParam & + ContainerDeleteMediaTypesParam & + RequestParameters; + +export interface ContainerSetMetadataHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. */ + "If-Modified-Since"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerSetMetadataQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerSetMetadataQueryParam { + queryParameters?: ContainerSetMetadataQueryParamProperties; +} + +export interface ContainerSetMetadataHeaderParam { + headers: RawHttpHeadersInput & ContainerSetMetadataHeaders; +} + +export interface ContainerSetMetadataMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerSetMetadataParameters = ContainerSetMetadataQueryParam & + ContainerSetMetadataHeaderParam & + ContainerSetMetadataMediaTypesParam & + RequestParameters; + +export interface ContainerGetAccessPolicyHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerGetAccessPolicyQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerGetAccessPolicyQueryParam { + queryParameters?: ContainerGetAccessPolicyQueryParamProperties; +} + +export interface ContainerGetAccessPolicyHeaderParam { + headers: RawHttpHeadersInput & ContainerGetAccessPolicyHeaders; +} + +export interface ContainerGetAccessPolicyMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerGetAccessPolicyParameters = ContainerGetAccessPolicyQueryParam & + ContainerGetAccessPolicyHeaderParam & + ContainerGetAccessPolicyMediaTypesParam & + RequestParameters; + +export interface ContainerSetAccessPolicyHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** + * The public access setting for the container. + * + * Possible values: "blob", "container" + */ + "x-ms-blob-public-access"?: PublicAccessType; + /** A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. */ + "If-Modified-Since"?: string; + /** A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. */ + "If-Unmodified-Since"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerSetAccessPolicyBodyParam { + /** The access control list for the container. */ + body: Array; +} + +export interface ContainerSetAccessPolicyQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerSetAccessPolicyQueryParam { + queryParameters?: ContainerSetAccessPolicyQueryParamProperties; +} + +export interface ContainerSetAccessPolicyHeaderParam { + headers: RawHttpHeadersInput & ContainerSetAccessPolicyHeaders; +} + +export interface ContainerSetAccessPolicyMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerSetAccessPolicyParameters = ContainerSetAccessPolicyQueryParam & + ContainerSetAccessPolicyHeaderParam & + ContainerSetAccessPolicyMediaTypesParam & + ContainerSetAccessPolicyBodyParam & + RequestParameters; + +export interface ContainerRestoreHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Optional. Version 2019-12-12 and later. Specifies the name of the deleted container to restore. */ + "x-ms-deleted-container-name"?: string; + /** Optional. Version 2019-12-12 and later. Specifies the version of the deleted container to restore. */ + "x-ms-deleted-container-version"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerRestoreQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerRestoreQueryParam { + queryParameters?: ContainerRestoreQueryParamProperties; +} + +export interface ContainerRestoreHeaderParam { + headers: RawHttpHeadersInput & ContainerRestoreHeaders; +} + +export interface ContainerRestoreMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerRestoreParameters = ContainerRestoreQueryParam & + ContainerRestoreHeaderParam & + ContainerRestoreMediaTypesParam & + RequestParameters; + +export interface ContainerRenameHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Required. Specifies the name of the container to rename. */ + "x-ms-source-container-name": string; + /** A lease ID for the source path. If specified, the source path must have an active lease and the lease ID must match. */ + "x-ms-source-lease-id"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerRenameQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerRenameQueryParam { + queryParameters?: ContainerRenameQueryParamProperties; +} + +export interface ContainerRenameHeaderParam { + headers: RawHttpHeadersInput & ContainerRenameHeaders; +} + +export interface ContainerRenameMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerRenameParameters = ContainerRenameQueryParam & + ContainerRenameHeaderParam & + ContainerRenameMediaTypesParam & + RequestParameters; + +export interface ContainerSubmitBatchHeaders { + /** The length of the request. */ + "Content-Length": number; + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerSubmitBatchBodyParam { + /** The body of the request. */ + body: { name: string; body: string }; +} + +export interface ContainerSubmitBatchQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerSubmitBatchQueryParam { + queryParameters?: ContainerSubmitBatchQueryParamProperties; +} + +export interface ContainerSubmitBatchHeaderParam { + headers: RawHttpHeadersInput & ContainerSubmitBatchHeaders; +} + +export interface ContainerSubmitBatchMediaTypesParam { + /** Required. The value of this header must be multipart/mixed with a batch boundary. Example header value: multipart/mixed; boundary=batch_ */ + contentType: "multipart/mixed"; +} + +export type ContainerSubmitBatchParameters = ContainerSubmitBatchQueryParam & + ContainerSubmitBatchHeaderParam & + ContainerSubmitBatchMediaTypesParam & + ContainerSubmitBatchBodyParam & + RequestParameters; + +export interface ContainerFilterBlobsHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** This is the wrapper object for the parameter `include` with explode set to false and style set to form. */ +export interface ContainerFilterBlobsIncludeQueryParam { + /** Value of the parameter */ + value: FilterBlobsIncludeItem[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +export interface ContainerFilterBlobsQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** Filters the results to return only to return only blobs whose tags match the specified expression. */ + where?: string; + /** A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client. */ + marker?: string; + /** Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. */ + maxresults?: number; + /** Include this parameter to specify one or more datasets to include in the response. */ + include?: FilterBlobsIncludeItem[] | ContainerFilterBlobsIncludeQueryParam; +} + +export interface ContainerFilterBlobsQueryParam { + queryParameters?: ContainerFilterBlobsQueryParamProperties; +} + +export interface ContainerFilterBlobsHeaderParam { + headers: RawHttpHeadersInput & ContainerFilterBlobsHeaders; +} + +export interface ContainerFilterBlobsMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerFilterBlobsParameters = ContainerFilterBlobsQueryParam & + ContainerFilterBlobsHeaderParam & + ContainerFilterBlobsMediaTypesParam & + RequestParameters; + +export interface ContainerAcquireLeaseHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** + * Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. + * + * Possible values: "infinite", "fixed" + */ + "x-ms-lease-duration"?: LeaseDuration; + /** Optional. The proposed lease ID for the container. */ + "x-ms-proposed-lease-id"?: string; + /** A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. */ + "If-Modified-Since"?: string; + /** A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. */ + "If-Unmodified-Since"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerAcquireLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerAcquireLeaseQueryParam { + queryParameters?: ContainerAcquireLeaseQueryParamProperties; +} + +export interface ContainerAcquireLeaseHeaderParam { + headers: RawHttpHeadersInput & ContainerAcquireLeaseHeaders; +} + +export interface ContainerAcquireLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerAcquireLeaseParameters = ContainerAcquireLeaseQueryParam & + ContainerAcquireLeaseHeaderParam & + ContainerAcquireLeaseMediaTypesParam & + RequestParameters; + +export interface ContainerReleaseLeaseHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Required. A lease ID for the source path. If specified, the source path must have an active lease and the lease ID must match. */ + "x-ms-lease-id": string; + /** A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. */ + "If-Modified-Since"?: string; + /** A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. */ + "If-Unmodified-Since"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerReleaseLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerReleaseLeaseQueryParam { + queryParameters?: ContainerReleaseLeaseQueryParamProperties; +} + +export interface ContainerReleaseLeaseHeaderParam { + headers: RawHttpHeadersInput & ContainerReleaseLeaseHeaders; +} + +export interface ContainerReleaseLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerReleaseLeaseParameters = ContainerReleaseLeaseQueryParam & + ContainerReleaseLeaseHeaderParam & + ContainerReleaseLeaseMediaTypesParam & + RequestParameters; + +export interface ContainerRenewLeaseHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Required. A lease ID for the source path. If specified, the source path must have an active lease and the lease ID must match. */ + "x-ms-lease-id": string; + /** A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. */ + "If-Modified-Since"?: string; + /** A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. */ + "If-Unmodified-Since"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerRenewLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerRenewLeaseQueryParam { + queryParameters?: ContainerRenewLeaseQueryParamProperties; +} + +export interface ContainerRenewLeaseHeaderParam { + headers: RawHttpHeadersInput & ContainerRenewLeaseHeaders; +} + +export interface ContainerRenewLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerRenewLeaseParameters = ContainerRenewLeaseQueryParam & + ContainerRenewLeaseHeaderParam & + ContainerRenewLeaseMediaTypesParam & + RequestParameters; + +export interface ContainerBreakLeaseHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. */ + "If-Modified-Since"?: string; + /** A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. */ + "If-Unmodified-Since"?: string; + /** For a break operation, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately. */ + "x-ms-lease-break-period"?: number; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBreakLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBreakLeaseQueryParam { + queryParameters?: ContainerBreakLeaseQueryParamProperties; +} + +export interface ContainerBreakLeaseHeaderParam { + headers: RawHttpHeadersInput & ContainerBreakLeaseHeaders; +} + +export interface ContainerBreakLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBreakLeaseParameters = ContainerBreakLeaseQueryParam & + ContainerBreakLeaseHeaderParam & + ContainerBreakLeaseMediaTypesParam & + RequestParameters; + +export interface ContainerChangeLeaseHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Required. A lease ID for the source path. If specified, the source path must have an active lease and the lease ID must match. */ + "x-ms-lease-id": string; + /** Required. The proposed lease ID for the container. */ + "x-ms-proposed-lease-id": string; + /** A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. */ + "If-Modified-Since"?: string; + /** A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. */ + "If-Unmodified-Since"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerChangeLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerChangeLeaseQueryParam { + queryParameters?: ContainerChangeLeaseQueryParamProperties; +} + +export interface ContainerChangeLeaseHeaderParam { + headers: RawHttpHeadersInput & ContainerChangeLeaseHeaders; +} + +export interface ContainerChangeLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerChangeLeaseParameters = ContainerChangeLeaseQueryParam & + ContainerChangeLeaseHeaderParam & + ContainerChangeLeaseMediaTypesParam & + RequestParameters; + +export interface ContainerListBlobFlatSegmentHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** This is the wrapper object for the parameter `include` with explode set to false and style set to form. */ +export interface ContainerListBlobFlatSegmentIncludeQueryParam { + /** Value of the parameter */ + value: ListBlobsIncludeItem[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +export interface ContainerListBlobFlatSegmentQueryParamProperties { + /** Filters the results to return only containers whose name begins with the specified prefix. */ + prefix?: string; + /** A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client. */ + marker?: string; + /** Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. */ + maxresults?: number; + /** Include this parameter to specify one or more datasets to include in the response. */ + include?: ListBlobsIncludeItem[] | ContainerListBlobFlatSegmentIncludeQueryParam; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerListBlobFlatSegmentQueryParam { + queryParameters?: ContainerListBlobFlatSegmentQueryParamProperties; +} + +export interface ContainerListBlobFlatSegmentHeaderParam { + headers: RawHttpHeadersInput & ContainerListBlobFlatSegmentHeaders; +} + +export interface ContainerListBlobFlatSegmentMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerListBlobFlatSegmentParameters = ContainerListBlobFlatSegmentQueryParam & + ContainerListBlobFlatSegmentHeaderParam & + ContainerListBlobFlatSegmentMediaTypesParam & + RequestParameters; + +export interface ContainerListBlobHierarchySegmentHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +/** This is the wrapper object for the parameter `include` with explode set to false and style set to form. */ +export interface ContainerListBlobHierarchySegmentIncludeQueryParam { + /** Value of the parameter */ + value: ListBlobsIncludeItem[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +export interface ContainerListBlobHierarchySegmentQueryParamProperties { + /** When the request includes this parameter, the operation returns a BlobPrefix element in the response body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string. */ + delimiter: string; + /** Filters the results to return only containers whose name begins with the specified prefix. */ + prefix?: string; + /** A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client. */ + marker?: string; + /** Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. */ + maxresults?: number; + /** Include this parameter to specify one or more datasets to include in the response. */ + include?: ListBlobsIncludeItem[] | ContainerListBlobHierarchySegmentIncludeQueryParam; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerListBlobHierarchySegmentQueryParam { + queryParameters: ContainerListBlobHierarchySegmentQueryParamProperties; +} + +export interface ContainerListBlobHierarchySegmentHeaderParam { + headers: RawHttpHeadersInput & ContainerListBlobHierarchySegmentHeaders; +} + +export interface ContainerListBlobHierarchySegmentMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerListBlobHierarchySegmentParameters = + ContainerListBlobHierarchySegmentQueryParam & + ContainerListBlobHierarchySegmentHeaderParam & + ContainerListBlobHierarchySegmentMediaTypesParam & + RequestParameters; + +export interface ContainerGetAccountInfoHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerGetAccountInfoQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerGetAccountInfoQueryParam { + queryParameters?: ContainerGetAccountInfoQueryParamProperties; +} + +export interface ContainerGetAccountInfoHeaderParam { + headers: RawHttpHeadersInput & ContainerGetAccountInfoHeaders; +} + +export interface ContainerGetAccountInfoMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerGetAccountInfoParameters = ContainerGetAccountInfoQueryParam & + ContainerGetAccountInfoHeaderParam & + ContainerGetAccountInfoMediaTypesParam & + RequestParameters; + +export interface ContainerBlobDownloadHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; + /** Return only the bytes of the blob in the specified range. */ + "x-ms-range"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** When set to true and specified together with the Range, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size. */ + "x-ms-range-get-content-md5"?: boolean; + /** Optional. When this header is set to true and specified together with the Range header, the service returns the CRC64 hash for the range, as long as the range is less than or equal to 4 MB in size. */ + "x-ms-range-get-content-crc64"?: boolean; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Required if the request body is a structured message. Specifies the message schema version and properties. */ + "x-ms-structured-body"?: string; +} + +export interface ContainerBlobDownloadQueryParamProperties { + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */ + versionid?: string; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobDownloadQueryParam { + queryParameters?: ContainerBlobDownloadQueryParamProperties; +} + +export interface ContainerBlobDownloadHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobDownloadHeaders; +} + +export type ContainerBlobDownloadParameters = ContainerBlobDownloadQueryParam & + ContainerBlobDownloadHeaderParam & + RequestParameters; + +export interface ContainerBlobGetPropertiesHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobGetPropertiesQueryParamProperties { + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */ + versionid?: string; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobGetPropertiesQueryParam { + queryParameters?: ContainerBlobGetPropertiesQueryParamProperties; +} + +export interface ContainerBlobGetPropertiesHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobGetPropertiesHeaders; +} + +export interface ContainerBlobGetPropertiesMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type ContainerBlobGetPropertiesParameters = ContainerBlobGetPropertiesQueryParam & + ContainerBlobGetPropertiesHeaderParam & + ContainerBlobGetPropertiesMediaTypesParam & + RequestParameters; + +export interface ContainerBlobDeleteHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** + * Required if the blob has associated snapshots. Specify one of the following two options: include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob itself + * + * Possible values: "only", "include" + */ + "x-ms-delete-snapshots"?: DeleteSnapshotsOptionType; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobDeleteQueryParamProperties { + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */ + versionid?: string; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** + * Optional. Only possible value is 'permanent', which specifies to permanently delete a blob if blob soft delete is enabled. + * + * Possible values: "Permanent" + */ + deletetype?: BlobDeleteType; +} + +export interface ContainerBlobDeleteQueryParam { + queryParameters?: ContainerBlobDeleteQueryParamProperties; +} + +export interface ContainerBlobDeleteHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobDeleteHeaders; +} + +export interface ContainerBlobDeleteMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobDeleteParameters = ContainerBlobDeleteQueryParam & + ContainerBlobDeleteHeaderParam & + ContainerBlobDeleteMediaTypesParam & + RequestParameters; + +export interface ContainerBlobUndeleteHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobUndeleteQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobUndeleteQueryParam { + queryParameters?: ContainerBlobUndeleteQueryParamProperties; +} + +export interface ContainerBlobUndeleteHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobUndeleteHeaders; +} + +export interface ContainerBlobUndeleteMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobUndeleteParameters = ContainerBlobUndeleteQueryParam & + ContainerBlobUndeleteHeaderParam & + ContainerBlobUndeleteMediaTypesParam & + RequestParameters; + +export interface ContainerBlobSetExpiryHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** + * Required. Indicates mode of the expiry time + * + * Possible values: "NeverExpire", "RelativeToCreation", "RelativeToNow", "Absolute" + */ + "x-ms-expiry-option": BlobExpiryOptions; + /** The time this blob will expire. */ + "x-ms-expiry-time"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobSetExpiryQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobSetExpiryQueryParam { + queryParameters?: ContainerBlobSetExpiryQueryParamProperties; +} + +export interface ContainerBlobSetExpiryHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobSetExpiryHeaders; +} + +export interface ContainerBlobSetExpiryMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobSetExpiryParameters = ContainerBlobSetExpiryQueryParam & + ContainerBlobSetExpiryHeaderParam & + ContainerBlobSetExpiryMediaTypesParam & + RequestParameters; + +export interface ContainerBlobSetHttpHeadersHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-cache-control"?: string; + /** Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-type"?: string; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "x-ms-blob-content-md5"?: string; + /** Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-encoding"?: string; + /** Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-language"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Sets the blob's content disposition. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-disposition"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobSetHttpHeadersQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobSetHttpHeadersQueryParam { + queryParameters?: ContainerBlobSetHttpHeadersQueryParamProperties; +} + +export interface ContainerBlobSetHttpHeadersHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobSetHttpHeadersHeaders; +} + +export interface ContainerBlobSetHttpHeadersMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobSetHttpHeadersParameters = ContainerBlobSetHttpHeadersQueryParam & + ContainerBlobSetHttpHeadersHeaderParam & + ContainerBlobSetHttpHeadersMediaTypesParam & + RequestParameters; + +export interface ContainerBlobSetImmutabilityPolicyHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. */ + "If-Unmodified-Since"?: string; + /** Specifies the date time when the blobs immutability policy is set to expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** + * Specifies the immutability policy mode to set on the blob. + * + * Possible values: "Mutable", "Locked", "Unlocked" + */ + "x-ms-immutability-policy-mode"?: BlobImmutabilityPolicyMode; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobSetImmutabilityPolicyQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */ + versionid?: string; +} + +export interface ContainerBlobSetImmutabilityPolicyQueryParam { + queryParameters?: ContainerBlobSetImmutabilityPolicyQueryParamProperties; +} + +export interface ContainerBlobSetImmutabilityPolicyHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobSetImmutabilityPolicyHeaders; +} + +export interface ContainerBlobSetImmutabilityPolicyMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobSetImmutabilityPolicyParameters = + ContainerBlobSetImmutabilityPolicyQueryParam & + ContainerBlobSetImmutabilityPolicyHeaderParam & + ContainerBlobSetImmutabilityPolicyMediaTypesParam & + RequestParameters; + +export interface ContainerBlobDeleteImmutabilityPolicyHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobDeleteImmutabilityPolicyQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */ + versionid?: string; +} + +export interface ContainerBlobDeleteImmutabilityPolicyQueryParam { + queryParameters?: ContainerBlobDeleteImmutabilityPolicyQueryParamProperties; +} + +export interface ContainerBlobDeleteImmutabilityPolicyHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobDeleteImmutabilityPolicyHeaders; +} + +export interface ContainerBlobDeleteImmutabilityPolicyMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobDeleteImmutabilityPolicyParameters = + ContainerBlobDeleteImmutabilityPolicyQueryParam & + ContainerBlobDeleteImmutabilityPolicyHeaderParam & + ContainerBlobDeleteImmutabilityPolicyMediaTypesParam & + RequestParameters; + +export interface ContainerBlobSetLegalHoldHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Required. Specifies the legal hold status to set on the blob. */ + "x-ms-legal-hold": boolean; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobSetLegalHoldQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */ + versionid?: string; +} + +export interface ContainerBlobSetLegalHoldQueryParam { + queryParameters?: ContainerBlobSetLegalHoldQueryParamProperties; +} + +export interface ContainerBlobSetLegalHoldHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobSetLegalHoldHeaders; +} + +export interface ContainerBlobSetLegalHoldMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobSetLegalHoldParameters = ContainerBlobSetLegalHoldQueryParam & + ContainerBlobSetLegalHoldHeaderParam & + ContainerBlobSetLegalHoldMediaTypesParam & + RequestParameters; + +export interface ContainerBlobSetMetadataHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobSetMetadataQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobSetMetadataQueryParam { + queryParameters?: ContainerBlobSetMetadataQueryParamProperties; +} + +export interface ContainerBlobSetMetadataHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobSetMetadataHeaders; +} + +export interface ContainerBlobSetMetadataMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobSetMetadataParameters = ContainerBlobSetMetadataQueryParam & + ContainerBlobSetMetadataHeaderParam & + ContainerBlobSetMetadataMediaTypesParam & + RequestParameters; + +export interface ContainerBlobAcquireLeaseHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** + * Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. + * + * Possible values: "infinite", "fixed" + */ + "x-ms-lease-duration"?: LeaseDuration; + /** Optional. The proposed lease ID for the container. */ + "x-ms-proposed-lease-id"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobAcquireLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobAcquireLeaseQueryParam { + queryParameters?: ContainerBlobAcquireLeaseQueryParamProperties; +} + +export interface ContainerBlobAcquireLeaseHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobAcquireLeaseHeaders; +} + +export interface ContainerBlobAcquireLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobAcquireLeaseParameters = ContainerBlobAcquireLeaseQueryParam & + ContainerBlobAcquireLeaseHeaderParam & + ContainerBlobAcquireLeaseMediaTypesParam & + RequestParameters; + +export interface ContainerBlobReleaseLeaseHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Required. A lease ID for the source path. If specified, the source path must have an active lease and the lease ID must match. */ + "x-ms-lease-id": string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobReleaseLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobReleaseLeaseQueryParam { + queryParameters?: ContainerBlobReleaseLeaseQueryParamProperties; +} + +export interface ContainerBlobReleaseLeaseHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobReleaseLeaseHeaders; +} + +export interface ContainerBlobReleaseLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobReleaseLeaseParameters = ContainerBlobReleaseLeaseQueryParam & + ContainerBlobReleaseLeaseHeaderParam & + ContainerBlobReleaseLeaseMediaTypesParam & + RequestParameters; + +export interface ContainerBlobRenewLeaseHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Required. A lease ID for the source path. If specified, the source path must have an active lease and the lease ID must match. */ + "x-ms-lease-id": string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobRenewLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobRenewLeaseQueryParam { + queryParameters?: ContainerBlobRenewLeaseQueryParamProperties; +} + +export interface ContainerBlobRenewLeaseHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobRenewLeaseHeaders; +} + +export interface ContainerBlobRenewLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobRenewLeaseParameters = ContainerBlobRenewLeaseQueryParam & + ContainerBlobRenewLeaseHeaderParam & + ContainerBlobRenewLeaseMediaTypesParam & + RequestParameters; + +export interface ContainerBlobChangeLeaseHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Required. A lease ID for the source path. If specified, the source path must have an active lease and the lease ID must match. */ + "x-ms-lease-id": string; + /** Required. The proposed lease ID for the container. */ + "x-ms-proposed-lease-id": string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobChangeLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobChangeLeaseQueryParam { + queryParameters?: ContainerBlobChangeLeaseQueryParamProperties; +} + +export interface ContainerBlobChangeLeaseHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobChangeLeaseHeaders; +} + +export interface ContainerBlobChangeLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobChangeLeaseParameters = ContainerBlobChangeLeaseQueryParam & + ContainerBlobChangeLeaseHeaderParam & + ContainerBlobChangeLeaseMediaTypesParam & + RequestParameters; + +export interface ContainerBlobBreakLeaseHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** For a break operation, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately. */ + "x-ms-lease-break-period"?: number; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobBreakLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobBreakLeaseQueryParam { + queryParameters?: ContainerBlobBreakLeaseQueryParamProperties; +} + +export interface ContainerBlobBreakLeaseHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobBreakLeaseHeaders; +} + +export interface ContainerBlobBreakLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobBreakLeaseParameters = ContainerBlobBreakLeaseQueryParam & + ContainerBlobBreakLeaseHeaderParam & + ContainerBlobBreakLeaseMediaTypesParam & + RequestParameters; + +export interface ContainerBlobCreateSnapshotHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobCreateSnapshotQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobCreateSnapshotQueryParam { + queryParameters?: ContainerBlobCreateSnapshotQueryParamProperties; +} + +export interface ContainerBlobCreateSnapshotHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobCreateSnapshotHeaders; +} + +export interface ContainerBlobCreateSnapshotMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobCreateSnapshotParameters = ContainerBlobCreateSnapshotQueryParam & + ContainerBlobCreateSnapshotHeaderParam & + ContainerBlobCreateSnapshotMediaTypesParam & + RequestParameters; + +export interface ContainerBlobStartCopyFromUrlHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** + * The tier to be set on the blob. + * + * Possible values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold" + */ + "x-ms-access-tier"?: AccessTier; + /** + * If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard. + * + * Possible values: "High", "Standard" + */ + "x-ms-rehydrate-priority"?: RehydratePriority; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-modified-since"?: string; + /** Specify this header value to operate only on a blob if it has not been modified since the specified date/time. */ + "x-ms-source-if-unmodified-since"?: string; + /** Specify an ETag value to operate only on blobs with a matching value. */ + "x-ms-source-if-match"?: string; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-none-match"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-source-if-tags"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature. */ + "x-ms-copy-source": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Used to set blob tags in various blob operations. */ + "x-ms-tags"?: string; + /** Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. */ + "x-ms-seal-blob"?: boolean; + /** Specifies the date time when the blobs immutability policy is set to expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** + * Specifies the immutability policy mode to set on the blob. + * + * Possible values: "Mutable", "Locked", "Unlocked" + */ + "x-ms-immutability-policy-mode"?: BlobImmutabilityPolicyMode; + /** Specified if a legal hold should be set on the blob. */ + "x-ms-legal-hold"?: boolean; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobStartCopyFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobStartCopyFromUrlQueryParam { + queryParameters?: ContainerBlobStartCopyFromUrlQueryParamProperties; +} + +export interface ContainerBlobStartCopyFromUrlHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobStartCopyFromUrlHeaders; +} + +export interface ContainerBlobStartCopyFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobStartCopyFromUrlParameters = ContainerBlobStartCopyFromUrlQueryParam & + ContainerBlobStartCopyFromUrlHeaderParam & + ContainerBlobStartCopyFromUrlMediaTypesParam & + RequestParameters; + +export interface ContainerBlobCopyFromUrlHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** + * The tier to be set on the blob. + * + * Possible values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold" + */ + "x-ms-access-tier"?: AccessTier; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-modified-since"?: string; + /** Specify this header value to operate only on a blob if it has not been modified since the specified date/time. */ + "x-ms-source-if-unmodified-since"?: string; + /** Specify an ETag value to operate only on blobs with a matching value. */ + "x-ms-source-if-match"?: string; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-none-match"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature. */ + "x-ms-copy-source": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Specify the md5 calculated for the range of bytes that must be read from the copy source. */ + "x-ms-source-content-md5"?: string; + /** Optional. Used to set blob tags in various blob operations. */ + "x-ms-tags"?: string; + /** Specifies the date time when the blobs immutability policy is set to expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** + * Specifies the immutability policy mode to set on the blob. + * + * Possible values: "Mutable", "Locked", "Unlocked" + */ + "x-ms-immutability-policy-mode"?: BlobImmutabilityPolicyMode; + /** Specified if a legal hold should be set on the blob. */ + "x-ms-legal-hold"?: boolean; + /** Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source. */ + "x-ms-copy-source-authorization"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** Optional, default 'replace'. Indicates if source tags should be copied or replaced with the tags specified by x-ms-tags. */ + "x-ms-copy-source-tag-option"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobCopyFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobCopyFromUrlQueryParam { + queryParameters?: ContainerBlobCopyFromUrlQueryParamProperties; +} + +export interface ContainerBlobCopyFromUrlHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobCopyFromUrlHeaders; +} + +export interface ContainerBlobCopyFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobCopyFromUrlParameters = ContainerBlobCopyFromUrlQueryParam & + ContainerBlobCopyFromUrlHeaderParam & + ContainerBlobCopyFromUrlMediaTypesParam & + RequestParameters; + +export interface ContainerBlobAbortCopyFromUrlHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobAbortCopyFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. */ + copyid: string; +} + +export interface ContainerBlobAbortCopyFromUrlQueryParam { + queryParameters: ContainerBlobAbortCopyFromUrlQueryParamProperties; +} + +export interface ContainerBlobAbortCopyFromUrlHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobAbortCopyFromUrlHeaders; +} + +export interface ContainerBlobAbortCopyFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobAbortCopyFromUrlParameters = ContainerBlobAbortCopyFromUrlQueryParam & + ContainerBlobAbortCopyFromUrlHeaderParam & + ContainerBlobAbortCopyFromUrlMediaTypesParam & + RequestParameters; + +export interface ContainerBlobSetTierHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** + * Indicates the tier to be set on the blob. + * + * Possible values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold" + */ + "x-ms-access-tier": AccessTier; + /** + * If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard. + * + * Possible values: "High", "Standard" + */ + "x-ms-rehydrate-priority"?: RehydratePriority; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobSetTierQueryParamProperties { + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */ + versionid?: string; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobSetTierQueryParam { + queryParameters?: ContainerBlobSetTierQueryParamProperties; +} + +export interface ContainerBlobSetTierHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobSetTierHeaders; +} + +export interface ContainerBlobSetTierMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobSetTierParameters = ContainerBlobSetTierQueryParam & + ContainerBlobSetTierHeaderParam & + ContainerBlobSetTierMediaTypesParam & + RequestParameters; + +export interface ContainerBlobGetAccountInfoHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobGetAccountInfoQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobGetAccountInfoQueryParam { + queryParameters?: ContainerBlobGetAccountInfoQueryParamProperties; +} + +export interface ContainerBlobGetAccountInfoHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobGetAccountInfoHeaders; +} + +export interface ContainerBlobGetAccountInfoMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobGetAccountInfoParameters = ContainerBlobGetAccountInfoQueryParam & + ContainerBlobGetAccountInfoHeaderParam & + ContainerBlobGetAccountInfoMediaTypesParam & + RequestParameters; + +export interface ContainerBlobGetTagsHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobGetTagsQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */ + versionid?: string; +} + +export interface ContainerBlobGetTagsQueryParam { + queryParameters?: ContainerBlobGetTagsQueryParamProperties; +} + +export interface ContainerBlobGetTagsHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobGetTagsHeaders; +} + +export interface ContainerBlobGetTagsMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobGetTagsParameters = ContainerBlobGetTagsQueryParam & + ContainerBlobGetTagsHeaderParam & + ContainerBlobGetTagsMediaTypesParam & + RequestParameters; + +export interface ContainerBlobSetTagsHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "Content-MD5"?: string; + /** Specify the transactional crc64 for the body, to be validated by the service. */ + "x-ms-content-crc64"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobSetTagsBodyParam { + /** The blob tags. */ + body: BlobTags; +} + +export interface ContainerBlobSetTagsQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */ + versionid?: string; +} + +export interface ContainerBlobSetTagsQueryParam { + queryParameters?: ContainerBlobSetTagsQueryParamProperties; +} + +export interface ContainerBlobSetTagsHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobSetTagsHeaders; +} + +export interface ContainerBlobSetTagsMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobSetTagsParameters = ContainerBlobSetTagsQueryParam & + ContainerBlobSetTagsHeaderParam & + ContainerBlobSetTagsMediaTypesParam & + ContainerBlobSetTagsBodyParam & + RequestParameters; + +export interface ContainerBlobPageBlobCreateHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** The length of the request. */ + "Content-Length": number; + /** + * Optional. Indicates the tier to be set on the page blob. + * + * Possible values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80" + */ + "x-ms-access-tier"?: PremiumPageBlobAccessTier; + /** Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-type"?: string; + /** Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-encoding"?: string; + /** Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-language"?: string; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "x-ms-blob-content-md5"?: string; + /** Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-cache-control"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Sets the blob's content disposition. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-disposition"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary. */ + "x-ms-blob-content-length": number; + /** Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. */ + "x-ms-blob-sequence-number"?: number; + /** Optional. Used to set blob tags in various blob operations. */ + "x-ms-tags"?: string; + /** Specifies the date time when the blobs immutability policy is set to expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** + * Specifies the immutability policy mode to set on the blob. + * + * Possible values: "Mutable", "Locked", "Unlocked" + */ + "x-ms-immutability-policy-mode"?: BlobImmutabilityPolicyMode; + /** Specified if a legal hold should be set on the blob. */ + "x-ms-legal-hold"?: boolean; + /** The type of the blob. */ + "x-ms-blob-type": "PageBlob"; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobPageBlobCreateQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobPageBlobCreateQueryParam { + queryParameters?: ContainerBlobPageBlobCreateQueryParamProperties; +} + +export interface ContainerBlobPageBlobCreateHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobPageBlobCreateHeaders; +} + +export interface ContainerBlobPageBlobCreateMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type ContainerBlobPageBlobCreateParameters = ContainerBlobPageBlobCreateQueryParam & + ContainerBlobPageBlobCreateHeaderParam & + ContainerBlobPageBlobCreateMediaTypesParam & + RequestParameters; + +export interface ContainerBlobPageBlobUploadPagesHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The length of the request. */ + "Content-Length": number; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "Content-MD5"?: string; + /** Specify the transactional crc64 for the body, to be validated by the service. */ + "x-ms-content-crc64"?: string; + /** Return only the bytes of the blob in the specified range. */ + "x-ms-range"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified. */ + "x-ms-if-sequence-number-le"?: number; + /** Specify this header value to operate only on a blob if it has a sequence number less than the specified. */ + "x-ms-if-sequence-number-lt"?: number; + /** Specify this header value to operate only on a blob if it has the specified sequence number. */ + "x-ms-if-sequence-number-eq"?: number; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Required if the request body is a structured message. Specifies the message schema version and properties. */ + "x-ms-structured-body"?: string; + /** Required if the request body is a structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller than Content-Length. */ + "x-ms-structured-content-length"?: number; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobPageBlobUploadPagesBodyParam { + /** + * The body of the request. + * + * Value may contain any sequence of octets + */ + body: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; +} + +export interface ContainerBlobPageBlobUploadPagesQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobPageBlobUploadPagesQueryParam { + queryParameters?: ContainerBlobPageBlobUploadPagesQueryParamProperties; +} + +export interface ContainerBlobPageBlobUploadPagesHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobPageBlobUploadPagesHeaders; +} + +export interface ContainerBlobPageBlobUploadPagesMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type ContainerBlobPageBlobUploadPagesParameters = + ContainerBlobPageBlobUploadPagesQueryParam & + ContainerBlobPageBlobUploadPagesHeaderParam & + ContainerBlobPageBlobUploadPagesMediaTypesParam & + ContainerBlobPageBlobUploadPagesBodyParam & + RequestParameters; + +export interface ContainerBlobPageBlobClearPagesHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The length of the request. */ + "Content-Length": number; + /** Return only the bytes of the blob in the specified range. */ + "x-ms-range"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified. */ + "x-ms-if-sequence-number-le"?: number; + /** Specify this header value to operate only on a blob if it has a sequence number less than the specified. */ + "x-ms-if-sequence-number-lt"?: number; + /** Specify this header value to operate only on a blob if it has the specified sequence number. */ + "x-ms-if-sequence-number-eq"?: number; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobPageBlobClearPagesQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobPageBlobClearPagesQueryParam { + queryParameters?: ContainerBlobPageBlobClearPagesQueryParamProperties; +} + +export interface ContainerBlobPageBlobClearPagesHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobPageBlobClearPagesHeaders; +} + +export interface ContainerBlobPageBlobClearPagesMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type ContainerBlobPageBlobClearPagesParameters = ContainerBlobPageBlobClearPagesQueryParam & + ContainerBlobPageBlobClearPagesHeaderParam & + ContainerBlobPageBlobClearPagesMediaTypesParam & + RequestParameters; + +export interface ContainerBlobPageBlobUploadPagesFromUrlHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Specify a URL to the copy source. */ + "x-ms-copy-source": string; + /** Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header. */ + "x-ms-source-range": string; + /** Specify the md5 calculated for the range of bytes that must be read from the copy source. */ + "x-ms-source-content-md5"?: string; + /** Specify the crc64 calculated for the range of bytes that must be read from the copy source. */ + "x-ms-source-content-crc64"?: string; + /** The length of the request. */ + "Content-Length": number; + /** Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header. */ + "x-ms-range": string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified. */ + "x-ms-if-sequence-number-le"?: number; + /** Specify this header value to operate only on a blob if it has a sequence number less than the specified. */ + "x-ms-if-sequence-number-lt"?: number; + /** Specify this header value to operate only on a blob if it has the specified sequence number. */ + "x-ms-if-sequence-number-eq"?: number; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-modified-since"?: string; + /** Specify this header value to operate only on a blob if it has not been modified since the specified date/time. */ + "x-ms-source-if-unmodified-since"?: string; + /** Specify an ETag value to operate only on blobs with a matching value. */ + "x-ms-source-if-match"?: string; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-none-match"?: string; + /** Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source. */ + "x-ms-copy-source-authorization"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobPageBlobUploadPagesFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobPageBlobUploadPagesFromUrlQueryParam { + queryParameters?: ContainerBlobPageBlobUploadPagesFromUrlQueryParamProperties; +} + +export interface ContainerBlobPageBlobUploadPagesFromUrlHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobPageBlobUploadPagesFromUrlHeaders; +} + +export interface ContainerBlobPageBlobUploadPagesFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type ContainerBlobPageBlobUploadPagesFromUrlParameters = + ContainerBlobPageBlobUploadPagesFromUrlQueryParam & + ContainerBlobPageBlobUploadPagesFromUrlHeaderParam & + ContainerBlobPageBlobUploadPagesFromUrlMediaTypesParam & + RequestParameters; + +export interface ContainerBlobPageBlobGetPageRangesHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Return only the bytes of the blob in the specified range. */ + "x-ms-range"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobPageBlobGetPageRangesQueryParamProperties { + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client. */ + marker?: string; + /** Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. */ + maxresults?: number; +} + +export interface ContainerBlobPageBlobGetPageRangesQueryParam { + queryParameters?: ContainerBlobPageBlobGetPageRangesQueryParamProperties; +} + +export interface ContainerBlobPageBlobGetPageRangesHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobPageBlobGetPageRangesHeaders; +} + +export interface ContainerBlobPageBlobGetPageRangesMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobPageBlobGetPageRangesParameters = + ContainerBlobPageBlobGetPageRangesQueryParam & + ContainerBlobPageBlobGetPageRangesHeaderParam & + ContainerBlobPageBlobGetPageRangesMediaTypesParam & + RequestParameters; + +export interface ContainerBlobPageBlobGetPageRangesDiffHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Optional. This header is only supported in service versions 2019-04-19 and after and specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were changed between the target blob and its previous snapshot. */ + "x-ms-previous-snapshot-url"?: string; + /** Return only the bytes of the blob in the specified range. */ + "x-ms-range"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobPageBlobGetPageRangesDiffQueryParamProperties { + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; + /** Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that specifies that the response will contain only pages that were changed between target blob and previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only for blobs created on or after January 1, 2016. */ + prevsnapshot?: string; + /** A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client. */ + marker?: string; + /** Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. */ + maxresults?: number; +} + +export interface ContainerBlobPageBlobGetPageRangesDiffQueryParam { + queryParameters?: ContainerBlobPageBlobGetPageRangesDiffQueryParamProperties; +} + +export interface ContainerBlobPageBlobGetPageRangesDiffHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobPageBlobGetPageRangesDiffHeaders; +} + +export interface ContainerBlobPageBlobGetPageRangesDiffMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobPageBlobGetPageRangesDiffParameters = + ContainerBlobPageBlobGetPageRangesDiffQueryParam & + ContainerBlobPageBlobGetPageRangesDiffHeaderParam & + ContainerBlobPageBlobGetPageRangesDiffMediaTypesParam & + RequestParameters; + +export interface ContainerBlobPageBlobResizeHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary. */ + "x-ms-blob-content-length": number; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobPageBlobResizeQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobPageBlobResizeQueryParam { + queryParameters?: ContainerBlobPageBlobResizeQueryParamProperties; +} + +export interface ContainerBlobPageBlobResizeHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobPageBlobResizeHeaders; +} + +export interface ContainerBlobPageBlobResizeMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobPageBlobResizeParameters = ContainerBlobPageBlobResizeQueryParam & + ContainerBlobPageBlobResizeHeaderParam & + ContainerBlobPageBlobResizeMediaTypesParam & + RequestParameters; + +export interface ContainerBlobPageBlobUpdateSequenceNumberHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** + * Required if the x-ms-blob-sequence-number header is set for the request. This property applies to page blobs only. This property indicates how the service should modify the blob's sequence number + * + * Possible values: "increment", "max", "update" + */ + "x-ms-sequence-number-action": SequenceNumberActionType; + /** Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. */ + "x-ms-blob-sequence-number"?: number; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobPageBlobUpdateSequenceNumberQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobPageBlobUpdateSequenceNumberQueryParam { + queryParameters?: ContainerBlobPageBlobUpdateSequenceNumberQueryParamProperties; +} + +export interface ContainerBlobPageBlobUpdateSequenceNumberHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobPageBlobUpdateSequenceNumberHeaders; +} + +export interface ContainerBlobPageBlobUpdateSequenceNumberMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobPageBlobUpdateSequenceNumberParameters = + ContainerBlobPageBlobUpdateSequenceNumberQueryParam & + ContainerBlobPageBlobUpdateSequenceNumberHeaderParam & + ContainerBlobPageBlobUpdateSequenceNumberMediaTypesParam & + RequestParameters; + +export interface ContainerBlobPageBlobCopyIncrementalHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature. */ + "x-ms-copy-source": string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobPageBlobCopyIncrementalQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobPageBlobCopyIncrementalQueryParam { + queryParameters?: ContainerBlobPageBlobCopyIncrementalQueryParamProperties; +} + +export interface ContainerBlobPageBlobCopyIncrementalHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobPageBlobCopyIncrementalHeaders; +} + +export interface ContainerBlobPageBlobCopyIncrementalMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobPageBlobCopyIncrementalParameters = + ContainerBlobPageBlobCopyIncrementalQueryParam & + ContainerBlobPageBlobCopyIncrementalHeaderParam & + ContainerBlobPageBlobCopyIncrementalMediaTypesParam & + RequestParameters; + +export interface ContainerBlobAppendBlobCreateHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** The length of the request. */ + "Content-Length": number; + /** Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-type"?: string; + /** Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-encoding"?: string; + /** Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-language"?: string; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "x-ms-blob-content-md5"?: string; + /** Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-cache-control"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Sets the blob's content disposition. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-disposition"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Optional. Used to set blob tags in various blob operations. */ + "x-ms-tags"?: string; + /** Specifies the date time when the blobs immutability policy is set to expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** + * Specifies the immutability policy mode to set on the blob. + * + * Possible values: "Mutable", "Locked", "Unlocked" + */ + "x-ms-immutability-policy-mode"?: BlobImmutabilityPolicyMode; + /** Specified if a legal hold should be set on the blob. */ + "x-ms-legal-hold"?: boolean; + /** The type of the blob. */ + "x-ms-blob-type": "AppendBlob"; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobAppendBlobCreateQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobAppendBlobCreateQueryParam { + queryParameters?: ContainerBlobAppendBlobCreateQueryParamProperties; +} + +export interface ContainerBlobAppendBlobCreateHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobAppendBlobCreateHeaders; +} + +export interface ContainerBlobAppendBlobCreateMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type ContainerBlobAppendBlobCreateParameters = ContainerBlobAppendBlobCreateQueryParam & + ContainerBlobAppendBlobCreateHeaderParam & + ContainerBlobAppendBlobCreateMediaTypesParam & + RequestParameters; + +export interface ContainerBlobAppendBlobAppendBlockHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The length of the request. */ + "Content-Length": number; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "Content-MD5"?: string; + /** Specify the transactional crc64 for the body, to be validated by the service. */ + "x-ms-content-crc64"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional conditional header. The max length in bytes permitted for the append blob. If the Append Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed). */ + "x-ms-blob-condition-maxsize"?: number; + /** Optional conditional header, used only for the Append Block operation. A number indicating the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition Failed). */ + "x-ms-blob-condition-appendpos"?: number; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Required if the request body is a structured message. Specifies the message schema version and properties. */ + "x-ms-structured-body"?: string; + /** Required if the request body is a structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller than Content-Length. */ + "x-ms-structured-content-length"?: number; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobAppendBlobAppendBlockBodyParam { + /** + * The body of the request. + * + * Value may contain any sequence of octets + */ + body: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; +} + +export interface ContainerBlobAppendBlobAppendBlockQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobAppendBlobAppendBlockQueryParam { + queryParameters?: ContainerBlobAppendBlobAppendBlockQueryParamProperties; +} + +export interface ContainerBlobAppendBlobAppendBlockHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobAppendBlobAppendBlockHeaders; +} + +export interface ContainerBlobAppendBlobAppendBlockMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type ContainerBlobAppendBlobAppendBlockParameters = + ContainerBlobAppendBlobAppendBlockQueryParam & + ContainerBlobAppendBlobAppendBlockHeaderParam & + ContainerBlobAppendBlobAppendBlockMediaTypesParam & + ContainerBlobAppendBlobAppendBlockBodyParam & + RequestParameters; + +export interface ContainerBlobAppendBlobAppendBlockFromUrlHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Specify a URL to the copy source. */ + "x-ms-copy-source": string; + /** Bytes of source data in the specified range. */ + "x-ms-source-range"?: string; + /** Specify the md5 calculated for the range of bytes that must be read from the copy source. */ + "x-ms-source-content-md5"?: string; + /** Specify the crc64 calculated for the range of bytes that must be read from the copy source. */ + "x-ms-source-content-crc64"?: string; + /** The length of the request. */ + "Content-Length": number; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "Content-MD5"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional conditional header. The max length in bytes permitted for the append blob. If the Append Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed). */ + "x-ms-blob-condition-maxsize"?: number; + /** Optional conditional header, used only for the Append Block operation. A number indicating the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition Failed). */ + "x-ms-blob-condition-appendpos"?: number; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-modified-since"?: string; + /** Specify this header value to operate only on a blob if it has not been modified since the specified date/time. */ + "x-ms-source-if-unmodified-since"?: string; + /** Specify an ETag value to operate only on blobs with a matching value. */ + "x-ms-source-if-match"?: string; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-none-match"?: string; + /** Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source. */ + "x-ms-copy-source-authorization"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobAppendBlobAppendBlockFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobAppendBlobAppendBlockFromUrlQueryParam { + queryParameters?: ContainerBlobAppendBlobAppendBlockFromUrlQueryParamProperties; +} + +export interface ContainerBlobAppendBlobAppendBlockFromUrlHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobAppendBlobAppendBlockFromUrlHeaders; +} + +export interface ContainerBlobAppendBlobAppendBlockFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobAppendBlobAppendBlockFromUrlParameters = + ContainerBlobAppendBlobAppendBlockFromUrlQueryParam & + ContainerBlobAppendBlobAppendBlockFromUrlHeaderParam & + ContainerBlobAppendBlobAppendBlockFromUrlMediaTypesParam & + RequestParameters; + +export interface ContainerBlobAppendBlobSealHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Optional conditional header, used only for the Append Block operation. A number indicating the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition Failed). */ + "x-ms-blob-condition-appendpos"?: number; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobAppendBlobSealQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobAppendBlobSealQueryParam { + queryParameters?: ContainerBlobAppendBlobSealQueryParamProperties; +} + +export interface ContainerBlobAppendBlobSealHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobAppendBlobSealHeaders; +} + +export interface ContainerBlobAppendBlobSealMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobAppendBlobSealParameters = ContainerBlobAppendBlobSealQueryParam & + ContainerBlobAppendBlobSealHeaderParam & + ContainerBlobAppendBlobSealMediaTypesParam & + RequestParameters; + +export interface ContainerBlobBlockBlobUploadHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "Content-MD5"?: string; + /** The length of the request. */ + "Content-Length": number; + /** Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-type"?: string; + /** Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-encoding"?: string; + /** Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-language"?: string; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "x-ms-blob-content-md5"?: string; + /** Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-cache-control"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Sets the blob's content disposition. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-disposition"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** + * The tier to be set on the blob. + * + * Possible values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold" + */ + "x-ms-access-tier"?: AccessTier; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Optional. Used to set blob tags in various blob operations. */ + "x-ms-tags"?: string; + /** Specifies the date time when the blobs immutability policy is set to expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** + * Specifies the immutability policy mode to set on the blob. + * + * Possible values: "Mutable", "Locked", "Unlocked" + */ + "x-ms-immutability-policy-mode"?: BlobImmutabilityPolicyMode; + /** Specified if a legal hold should be set on the blob. */ + "x-ms-legal-hold"?: boolean; + /** Specify the transactional crc64 for the body, to be validated by the service. */ + "x-ms-content-crc64"?: string; + /** The type of the blob. */ + "x-ms-blob-type": "BlockBlob"; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobBlockBlobUploadBodyParam { + /** + * The body of the request. + * + * Value may contain any sequence of octets + */ + body: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; +} + +export interface ContainerBlobBlockBlobUploadQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobBlockBlobUploadQueryParam { + queryParameters?: ContainerBlobBlockBlobUploadQueryParamProperties; +} + +export interface ContainerBlobBlockBlobUploadHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobBlockBlobUploadHeaders; +} + +export interface ContainerBlobBlockBlobUploadMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type ContainerBlobBlockBlobUploadParameters = ContainerBlobBlockBlobUploadQueryParam & + ContainerBlobBlockBlobUploadHeaderParam & + ContainerBlobBlockBlobUploadMediaTypesParam & + ContainerBlobBlockBlobUploadBodyParam & + RequestParameters; + +export interface ContainerBlobBlockBlobPutBlobFromUrlHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "Content-MD5"?: string; + /** The length of the request. */ + "Content-Length": number; + /** Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-type"?: string; + /** Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-encoding"?: string; + /** Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-language"?: string; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "x-ms-blob-content-md5"?: string; + /** Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-cache-control"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Sets the blob's content disposition. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-disposition"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** + * The tier to be set on the blob. + * + * Possible values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold" + */ + "x-ms-access-tier"?: AccessTier; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-modified-since"?: string; + /** Specify this header value to operate only on a blob if it has not been modified since the specified date/time. */ + "x-ms-source-if-unmodified-since"?: string; + /** Specify an ETag value to operate only on blobs with a matching value. */ + "x-ms-source-if-match"?: string; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-none-match"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-source-if-tags"?: string; + /** Specify the md5 calculated for the range of bytes that must be read from the copy source. */ + "x-ms-source-content-md5"?: string; + /** Optional. Used to set blob tags in various blob operations. */ + "x-ms-tags"?: string; + /** Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature. */ + "x-ms-copy-source": string; + /** Optional, default is true. Indicates if properties from the source blob should be copied. */ + "x-ms-copy-source-blob-properties"?: boolean; + /** Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source. */ + "x-ms-copy-source-authorization"?: string; + /** Optional, default 'replace'. Indicates if source tags should be copied or replaced with the tags specified by x-ms-tags. */ + "x-ms-copy-source-tag-option"?: string; + /** The type of the blob. */ + "x-ms-blob-type": "BlockBlob"; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobBlockBlobPutBlobFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobBlockBlobPutBlobFromUrlQueryParam { + queryParameters?: ContainerBlobBlockBlobPutBlobFromUrlQueryParamProperties; +} + +export interface ContainerBlobBlockBlobPutBlobFromUrlHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobBlockBlobPutBlobFromUrlHeaders; +} + +export interface ContainerBlobBlockBlobPutBlobFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type ContainerBlobBlockBlobPutBlobFromUrlParameters = + ContainerBlobBlockBlobPutBlobFromUrlQueryParam & + ContainerBlobBlockBlobPutBlobFromUrlHeaderParam & + ContainerBlobBlockBlobPutBlobFromUrlMediaTypesParam & + RequestParameters; + +export interface ContainerBlobBlockBlobStageBlockHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The length of the request. */ + "Content-Length": number; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "Content-MD5"?: string; + /** Specify the transactional crc64 for the body, to be validated by the service. */ + "x-ms-content-crc64"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobBlockBlobStageBlockBodyParam { + /** + * The body of the request. + * + * Value may contain any sequence of octets + */ + body: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; +} + +export interface ContainerBlobBlockBlobStageBlockQueryParamProperties { + /** A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter must be the same size for each block. */ + blockid: string; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobBlockBlobStageBlockQueryParam { + queryParameters: ContainerBlobBlockBlobStageBlockQueryParamProperties; +} + +export interface ContainerBlobBlockBlobStageBlockHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobBlockBlobStageBlockHeaders; +} + +export interface ContainerBlobBlockBlobStageBlockMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type ContainerBlobBlockBlobStageBlockParameters = + ContainerBlobBlockBlobStageBlockQueryParam & + ContainerBlobBlockBlobStageBlockHeaderParam & + ContainerBlobBlockBlobStageBlockMediaTypesParam & + ContainerBlobBlockBlobStageBlockBodyParam & + RequestParameters; + +export interface ContainerBlobBlockBlobStageBlockFromUrlHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** The length of the request. */ + "Content-Length": number; + /** Specify a URL to the copy source. */ + "x-ms-copy-source": string; + /** Bytes of source data in the specified range. */ + "x-ms-source-range"?: string; + /** Specify the md5 calculated for the range of bytes that must be read from the copy source. */ + "x-ms-source-content-md5"?: string; + /** Specify the crc64 calculated for the range of bytes that must be read from the copy source. */ + "x-ms-source-content-crc64"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-modified-since"?: string; + /** Specify this header value to operate only on a blob if it has not been modified since the specified date/time. */ + "x-ms-source-if-unmodified-since"?: string; + /** Specify an ETag value to operate only on blobs with a matching value. */ + "x-ms-source-if-match"?: string; + /** Specify this header value to operate only on a blob if it has been modified since the specified date/time. */ + "x-ms-source-if-none-match"?: string; + /** Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source. */ + "x-ms-copy-source-authorization"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobBlockBlobStageBlockFromUrlQueryParamProperties { + /** A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter must be the same size for each block. */ + blockid: string; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobBlockBlobStageBlockFromUrlQueryParam { + queryParameters: ContainerBlobBlockBlobStageBlockFromUrlQueryParamProperties; +} + +export interface ContainerBlobBlockBlobStageBlockFromUrlHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobBlockBlobStageBlockFromUrlHeaders; +} + +export interface ContainerBlobBlockBlobStageBlockFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobBlockBlobStageBlockFromUrlParameters = + ContainerBlobBlockBlobStageBlockFromUrlQueryParam & + ContainerBlobBlockBlobStageBlockFromUrlHeaderParam & + ContainerBlobBlockBlobStageBlockFromUrlMediaTypesParam & + RequestParameters; + +export interface ContainerBlobBlockBlobCommitBlockListHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-cache-control"?: string; + /** Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-type"?: string; + /** Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-encoding"?: string; + /** Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-language"?: string; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "x-ms-blob-content-md5"?: string; + /** Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. */ + "Content-MD5"?: string; + /** Specify the transactional crc64 for the body, to be validated by the service. */ + "x-ms-content-crc64"?: string; + /** The metadata headers. */ + "x-ms-meta"?: string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Sets the blob's content disposition. If specified, this property is stored with the blob and returned with a read request. */ + "x-ms-blob-content-disposition"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-scope"?: string; + /** + * The tier to be set on the blob. + * + * Possible values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold" + */ + "x-ms-access-tier"?: AccessTier; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** Optional. Used to set blob tags in various blob operations. */ + "x-ms-tags"?: string; + /** Specifies the date time when the blobs immutability policy is set to expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** + * Specifies the immutability policy mode to set on the blob. + * + * Possible values: "Mutable", "Locked", "Unlocked" + */ + "x-ms-immutability-policy-mode"?: BlobImmutabilityPolicyMode; + /** Specified if a legal hold should be set on the blob. */ + "x-ms-legal-hold"?: boolean; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobBlockBlobCommitBlockListBodyParam { + /** Blob Blocks. */ + body: BlockLookupList; +} + +export interface ContainerBlobBlockBlobCommitBlockListQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobBlockBlobCommitBlockListQueryParam { + queryParameters?: ContainerBlobBlockBlobCommitBlockListQueryParamProperties; +} + +export interface ContainerBlobBlockBlobCommitBlockListHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobBlockBlobCommitBlockListHeaders; +} + +export interface ContainerBlobBlockBlobCommitBlockListMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobBlockBlobCommitBlockListParameters = + ContainerBlobBlockBlobCommitBlockListQueryParam & + ContainerBlobBlockBlobCommitBlockListHeaderParam & + ContainerBlobBlockBlobCommitBlockListMediaTypesParam & + ContainerBlobBlockBlobCommitBlockListBodyParam & + RequestParameters; + +export interface ContainerBlobBlockBlobGetBlockListHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobBlockBlobGetBlockListQueryParamProperties { + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** + * Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together. + * + * Possible values: "committed", "uncommitted", "all" + */ + blocklisttype: BlockListType; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobBlockBlobGetBlockListQueryParam { + queryParameters: ContainerBlobBlockBlobGetBlockListQueryParamProperties; +} + +export interface ContainerBlobBlockBlobGetBlockListHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobBlockBlobGetBlockListHeaders; +} + +export interface ContainerBlobBlockBlobGetBlockListMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobBlockBlobGetBlockListParameters = + ContainerBlobBlockBlobGetBlockListQueryParam & + ContainerBlobBlockBlobGetBlockListHeaderParam & + ContainerBlobBlockBlobGetBlockListMediaTypesParam & + RequestParameters; + +export interface ContainerBlobBlockBlobQueryHeaders { + /** Specifies the version of the operation to use for this request. */ + "x-ms-version": string; + /** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */ + "x-ms-lease-id"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, the request will be encrypted with the root account key. */ + "x-ms-encryption-key"?: string; + /** Optional. Version 2019-07-07 and later. Specifies the SHA256 hash of the encryption key used to encrypt the data provided in the request. This header is only used for encryption with a customer-provided key. If the request is authenticated with a client token, this header should be specified using the SHA256 hash of the encryption key. */ + "x-ms-encryption-key-sha256"?: string; + /** + * Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is AES256. + * + * Possible values: "AES256" + */ + "x-ms-encryption-algorithm"?: EncryptionAlgorithmType; + /** The request should only proceed if an entity matches this string. */ + "If-Match"?: string; + /** The request should only proceed if no entity matches this string. */ + "If-None-Match"?: string; + /** The request should only proceed if the entity was not modified after this time. */ + "If-Unmodified-Since"?: string; + /** The request should only proceed if the entity was modified after this time. */ + "If-Modified-Since"?: string; + /** Specify a SQL where clause on blob tags to operate only on blobs with a matching value. */ + "x-ms-if-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface ContainerBlobBlockBlobQueryBodyParam { + /** The query request */ + body: QueryRequest; +} + +export interface ContainerBlobBlockBlobQueryQueryParamProperties { + /** The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see Creating a Snapshot of a Blob. */ + snapshot?: string; + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ContainerBlobBlockBlobQueryQueryParam { + queryParameters?: ContainerBlobBlockBlobQueryQueryParamProperties; +} + +export interface ContainerBlobBlockBlobQueryHeaderParam { + headers: RawHttpHeadersInput & ContainerBlobBlockBlobQueryHeaders; +} + +export interface ContainerBlobBlockBlobQueryMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ContainerBlobBlockBlobQueryParameters = ContainerBlobBlockBlobQueryQueryParam & + ContainerBlobBlockBlobQueryHeaderParam & + ContainerBlobBlockBlobQueryMediaTypesParam & + ContainerBlobBlockBlobQueryBodyParam & + RequestParameters; diff --git a/sdk/storage/azure-storage-blob-rest/src/responses.ts b/sdk/storage/azure-storage-blob-rest/src/responses.ts new file mode 100644 index 000000000000..940df79f6515 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/responses.ts @@ -0,0 +1,1881 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { RawHttpHeaders } from "@azure/core-rest-pipeline"; +import type { HttpResponse } from "@azure-rest/core-client"; +import type { + StorageErrorOutput, + StorageServicePropertiesOutput, + StorageServiceStatsOutput, + ListContainersSegmentResponseOutput, + UserDelegationKeyOutput, + SkuNameOutput, + AccountKindOutput, + FilterBlobSegmentOutput, + LeaseDurationOutput, + LeaseStateOutput, + LeaseStatusOutput, + PublicAccessTypeOutput, + SignedIdentifierOutput, + ListBlobsFlatSegmentResponseOutput, + ListBlobsHierarchySegmentResponseOutput, + BlobTypeOutput, + CopyStatusOutput, + BlobImmutabilityPolicyModeOutput, + AccessTierOutput, + ArchiveStatusOutput, + RehydratePriorityOutput, + BlobTagsOutput, + PageListOutput, + BlockListOutput, +} from "./outputModels.js"; + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface SetProperties202Response extends HttpResponse { + status: "202"; +} + +export interface SetPropertiesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface GetProperties200Headers { + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface GetProperties200Response extends HttpResponse { + status: "200"; + body: StorageServicePropertiesOutput; + headers: RawHttpHeaders & GetProperties200Headers; +} + +export interface GetPropertiesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface GetStatistics200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface GetStatistics200Response extends HttpResponse { + status: "200"; + body: StorageServiceStatsOutput; + headers: RawHttpHeaders & GetStatistics200Headers; +} + +export interface GetStatisticsDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ListContainersSegment200Headers { + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ListContainersSegment200Response extends HttpResponse { + status: "200"; + body: ListContainersSegmentResponseOutput; + headers: RawHttpHeaders & ListContainersSegment200Headers; +} + +export interface ListContainersSegmentDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface GetUserDelegationKey200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface GetUserDelegationKey200Response extends HttpResponse { + status: "200"; + body: UserDelegationKeyOutput; + headers: RawHttpHeaders & GetUserDelegationKey200Headers; +} + +export interface GetUserDelegationKeyDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface GetAccountInfo200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Identifies the sku name of the account */ + "x-ms-sku-name"?: SkuNameOutput; + /** Identifies the account kind */ + "x-ms-account-kind"?: AccountKindOutput; + /** Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. */ + "x-ms-is-hns-enabled"?: boolean; +} + +/** The request has succeeded. */ +export interface GetAccountInfo200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & GetAccountInfo200Headers; +} + +export interface GetAccountInfoDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface SubmitBatch200Headers { + /** An opaque, globally-unique, server-generated string identifier for the request. */ + "x-ms-request-id"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; + /** The media type of the body of the response. For batch requests, this is multipart/mixed; boundary=batchresponse_GUID */ + "content-type": "multipart/mixed"; +} + +/** The request has succeeded. */ +export interface SubmitBatch200Response extends HttpResponse { + status: "200"; + body: { name: string; body: string }; + headers: RawHttpHeaders & SubmitBatch200Headers; +} + +export interface SubmitBatchDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface FilterBlobs200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface FilterBlobs200Response extends HttpResponse { + status: "200"; + body: FilterBlobSegmentOutput; + headers: RawHttpHeaders & FilterBlobs200Headers; +} + +export interface FilterBlobsDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerCreate201Response extends HttpResponse { + status: "201"; +} + +export interface ContainerCreateDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerGetProperties200Headers { + /** The metadata headers. */ + "x-ms-meta"?: string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. */ + "x-ms-lease-duration"?: LeaseDurationOutput; + /** Lease state of the blob. */ + "x-ms-lease-state"?: LeaseStateOutput; + /** The lease status of the blob. */ + "x-ms-lease-status"?: LeaseStatusOutput; + /** The public access setting for the container. */ + "x-ms-blob-public-access"?: PublicAccessTypeOutput; + /** Indicates whether the container has an immutability policy set on it. */ + "x-ms-has-immutability-policy"?: boolean; + /** Indicates whether the container has a legal hold. */ + "x-ms-has-legal-hold"?: boolean; + /** The default encryption scope for the container. */ + "x-ms-default-encryption-scope"?: string; + /** If a blob has a lease and the lease is of infinite duration then the value of this header is set to true, otherwise it is set to false. */ + "x-ms-deny-encryption-scope-override"?: boolean; + /** Indicates whether version level worm is enabled on a container */ + "x-ms-immutable-storage-with-versioning-enabled"?: boolean; +} + +/** The request has succeeded. */ +export interface ContainerGetProperties200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerGetProperties200Headers; +} + +export interface ContainerGetPropertiesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface ContainerDelete202Response extends HttpResponse { + status: "202"; +} + +export interface ContainerDeleteDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +/** The request has succeeded. */ +export interface ContainerSetMetadata200Response extends HttpResponse { + status: "200"; +} + +export interface ContainerSetMetadataDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerGetAccessPolicy200Headers { + /** The public access setting for the container. */ + "x-ms-blob-public-access"?: PublicAccessTypeOutput; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ContainerGetAccessPolicy200Response extends HttpResponse { + status: "200"; + body: Array; + headers: RawHttpHeaders & ContainerGetAccessPolicy200Headers; +} + +export interface ContainerGetAccessPolicyDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerSetAccessPolicy200Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerSetAccessPolicy200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerSetAccessPolicy200Headers; +} + +export interface ContainerSetAccessPolicyDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerRestore201Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerRestore201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerRestore201Headers; +} + +export interface ContainerRestoreDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerRename200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerRename200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerRename200Headers; +} + +export interface ContainerRenameDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerSubmitBatch202Headers { + /** An opaque, globally-unique, server-generated string identifier for the request. */ + "x-ms-request-id"?: string; + /** Required. The value of this header must be multipart/mixed with a batch boundary. Example header value: multipart/mixed; boundary=batch_ */ + "content-type": "multipart/mixed"; +} + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface ContainerSubmitBatch202Response extends HttpResponse { + status: "202"; + body: { name: string; body: string }; + headers: RawHttpHeaders & ContainerSubmitBatch202Headers; +} + +export interface ContainerSubmitBatchDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerFilterBlobs200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ContainerFilterBlobs200Response extends HttpResponse { + status: "200"; + body: FilterBlobSegmentOutput; + headers: RawHttpHeaders & ContainerFilterBlobs200Headers; +} + +export interface ContainerFilterBlobsDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerAcquireLease201Headers { + /** Uniquely identifies a blobs' lease */ + "x-ms-lease-id"?: string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerAcquireLease201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerAcquireLease201Headers; +} + +export interface ContainerAcquireLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerReleaseLease200Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerReleaseLease200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerReleaseLease200Headers; +} + +export interface ContainerReleaseLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerRenewLease200Headers { + /** Uniquely identifies a blobs' lease */ + "x-ms-lease-id"?: string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerRenewLease200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerRenewLease200Headers; +} + +export interface ContainerRenewLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBreakLease202Headers { + /** Approximate time remaining in the lease period, in seconds. */ + "x-ms-lease-time"?: number; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** Uniquely identifies a blobs' lease */ + "x-ms-lease-id"?: string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface ContainerBreakLease202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & ContainerBreakLease202Headers; +} + +export interface ContainerBreakLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerChangeLease200Headers { + /** Uniquely identifies a blobs' lease */ + "x-ms-lease-id"?: string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerChangeLease200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerChangeLease200Headers; +} + +export interface ContainerChangeLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerListBlobFlatSegment200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ContainerListBlobFlatSegment200Response extends HttpResponse { + status: "200"; + body: ListBlobsFlatSegmentResponseOutput; + headers: RawHttpHeaders & ContainerListBlobFlatSegment200Headers; +} + +export interface ContainerListBlobFlatSegmentDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerListBlobHierarchySegment200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ContainerListBlobHierarchySegment200Response extends HttpResponse { + status: "200"; + body: ListBlobsHierarchySegmentResponseOutput; + headers: RawHttpHeaders & ContainerListBlobHierarchySegment200Headers; +} + +export interface ContainerListBlobHierarchySegmentDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerGetAccountInfo200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Identifies the sku name of the account */ + "x-ms-sku-name"?: SkuNameOutput; + /** Identifies the account kind */ + "x-ms-account-kind"?: AccountKindOutput; + /** Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. */ + "x-ms-is-hns-enabled"?: boolean; +} + +/** The request has succeeded. */ +export interface ContainerGetAccountInfo200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerGetAccountInfo200Headers; +} + +export interface ContainerGetAccountInfoDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobDownload200Headers { + /** The metadata headers. */ + "x-ms-meta"?: string; + /** Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed). */ + "x-ms-or"?: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** Returns the date and time the blob was created. */ + "x-ms-creation-time": string; + /** Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication. */ + "x-ms-or-policy-id"?: string; + /** The number of bytes present in the response body. */ + "content-length": number; + /** Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header. */ + "content-range": string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This header returns the value that was specified for the Content-Encoding request header */ + "content-encoding": string; + /** This header is returned if it was previously specified for the blob. */ + "cache-control": string; + /** This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified. */ + "content-disposition": string; + /** This header returns the value that was specified for the Content-Language request header. */ + "content-language": string; + /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs. */ + "x-ms-blob-sequence-number": number; + /** The type of the blob. */ + "x-ms-blob-type"?: BlobTypeOutput; + /** Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */ + "x-ms-copy-completion-time"?: string; + /** Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */ + "x-ms-copy-status-description"?: string; + /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */ + "x-ms-copy-id"?: string; + /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */ + "x-ms-copy-progress"?: string; + /** State of the copy operation identified by x-ms-copy-id. */ + "x-ms-copy-status": CopyStatusOutput; + /** URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */ + "x-ms-copy-source"?: string; + /** Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. */ + "x-ms-lease-duration"?: LeaseDurationOutput; + /** Lease state of the blob. */ + "x-ms-lease-state"?: LeaseStateOutput; + /** The lease status of the blob. */ + "x-ms-lease-status"?: LeaseStatusOutput; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header. */ + "x-ms-is-current-version"?: boolean; + /** The number of committed blocks present in the blob. This header is returned only for append blobs. */ + "x-ms-blob-committed-block-count"?: number; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-blob-content-md5"?: string; + /** The number of tags associated with the blob */ + "x-ms-tag-count"?: number; + /** If this blob has been sealed */ + "x-ms-blob-sealed"?: boolean; + /** UTC date/time value generated by the service that indicates the time at which the blob was last read or written to */ + "x-ms-last-access-time"?: string; + /** UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** Indicates the immutability policy mode of the blob. */ + "x-ms-immutability-policy-mode": BlobImmutabilityPolicyModeOutput; + /** Specifies the legal hold status to set on the blob. */ + "x-ms-legal-hold": boolean; + /** The media type of the body of the response. */ + "content-type": "application/octet-stream"; +} + +/** The request has succeeded. */ +export interface ContainerBlobDownload200Response extends HttpResponse { + status: "200"; + /** Value may contain any sequence of octets */ + body: Uint8Array; + headers: RawHttpHeaders & ContainerBlobDownload200Headers; +} + +export interface ContainerBlobDownload206Headers { + /** The metadata headers. */ + "x-ms-meta"?: string; + /** Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed). */ + "x-ms-or"?: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** Returns the date and time the blob was created. */ + "x-ms-creation-time": string; + /** Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication. */ + "x-ms-or-policy-id"?: string; + /** The number of bytes present in the response body. */ + "content-length": number; + /** Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header. */ + "content-range": string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This header returns the value that was specified for the Content-Encoding request header */ + "content-encoding": string; + /** This header is returned if it was previously specified for the blob. */ + "cache-control": string; + /** This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified. */ + "content-disposition": string; + /** This header returns the value that was specified for the Content-Language request header. */ + "content-language": string; + /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs. */ + "x-ms-blob-sequence-number": number; + /** The type of the blob. */ + "x-ms-blob-type"?: BlobTypeOutput; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */ + "x-ms-copy-completion-time"?: string; + /** Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */ + "x-ms-copy-status-description"?: string; + /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */ + "x-ms-copy-id"?: string; + /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */ + "x-ms-copy-progress"?: string; + /** State of the copy operation identified by x-ms-copy-id. */ + "x-ms-copy-status": CopyStatusOutput; + /** URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */ + "x-ms-copy-source"?: string; + /** Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. */ + "x-ms-lease-duration"?: LeaseDurationOutput; + /** Lease state of the blob. */ + "x-ms-lease-state"?: LeaseStateOutput; + /** The lease status of the blob. */ + "x-ms-lease-status"?: LeaseStatusOutput; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header. */ + "x-ms-is-current-version"?: boolean; + /** Indicates that the service supports requests for partial blob content. */ + "accept-ranges"?: string; + /** The number of committed blocks present in the blob. This header is returned only for append blobs. */ + "x-ms-blob-committed-block-count"?: number; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-blob-content-md5"?: string; + /** The number of tags associated with the blob */ + "x-ms-tag-count"?: number; + /** If this blob has been sealed */ + "x-ms-blob-sealed"?: boolean; + /** UTC date/time value generated by the service that indicates the time at which the blob was last read or written to */ + "x-ms-last-access-time"?: string; + /** UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** Indicates the immutability policy mode of the blob. */ + "x-ms-immutability-policy-mode": BlobImmutabilityPolicyModeOutput; + /** Specifies the legal hold status to set on the blob. */ + "x-ms-legal-hold": boolean; + /** The media type of the body of the response. */ + "content-type": "application/octet-stream"; +} + +/** Successful */ +export interface ContainerBlobDownload206Response extends HttpResponse { + status: "206"; + /** Value may contain any sequence of octets */ + body: Uint8Array; + headers: RawHttpHeaders & ContainerBlobDownload206Headers; +} + +export interface ContainerBlobDownloadDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobGetProperties200Headers { + /** The metadata headers. */ + "x-ms-meta"?: string; + /** Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of the replication. When retrieving this header, it will return the header with the policy id and rule id (e.g. x-ms-or-policyid_ruleid), and the value will be the status of the replication (e.g. complete, failed). */ + "x-ms-or"?: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** Returns the date and time the blob was created. */ + "x-ms-creation-time": string; + /** Optional. Only valid when Object Replication is enabled for the storage container and on the destination blob of the replication. */ + "x-ms-or-policy-id"?: string; + /** The type of the blob. */ + "x-ms-blob-type"?: BlobTypeOutput; + /** Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */ + "x-ms-copy-completion-time"?: string; + /** Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */ + "x-ms-copy-status-description"?: string; + /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */ + "x-ms-copy-id"?: string; + /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */ + "x-ms-copy-progress"?: string; + /** State of the copy operation identified by x-ms-copy-id. */ + "x-ms-copy-status": CopyStatusOutput; + /** URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */ + "x-ms-copy-source"?: string; + /** Included if the blob is incremental copy blob. */ + "x-ms-incremental-copy"?: boolean; + /** Included if the blob is incremental copy blob or incremental copy snapshot, if x-ms-copy-status is success. Snapshot time of the last successful incremental copy snapshot for this blob. */ + "x-ms-copy-destination-snapshot"?: string; + /** Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. */ + "x-ms-lease-duration"?: LeaseDurationOutput; + /** Lease state of the blob. */ + "x-ms-lease-state"?: LeaseStateOutput; + /** The lease status of the blob. */ + "x-ms-lease-status"?: LeaseStatusOutput; + /** The number of bytes present in the response body. */ + "content-length": number; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This header returns the value that was specified for the Content-Encoding request header */ + "content-encoding": string; + /** This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified. */ + "content-disposition": string; + /** This header returns the value that was specified for the Content-Language request header. */ + "content-language": string; + /** This header is returned if it was previously specified for the blob. */ + "cache-control": string; + /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs. */ + "x-ms-blob-sequence-number": number; + /** The number of committed blocks present in the blob. This header is returned only for append blobs. */ + "x-ms-blob-committed-block-count"?: number; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; + /** The tier to be set on the blob. */ + "x-ms-access-tier"?: AccessTierOutput; + /** For page blobs on a premium storage account only. If the access tier is not explicitly set on the blob, the tier is inferred based on its content length and this header will be returned with true value. */ + "x-ms-access-tier-inferred"?: boolean; + /** For blob storage LRS accounts, valid values are rehydrate-pending-to-hot/rehydrate-pending-to-cool. If the blob is being rehydrated and is not complete then this header is returned indicating that rehydrate is pending and also tells the destination tier. */ + "x-ms-archive-status"?: ArchiveStatusOutput; + /** The time the tier was changed on the object. This is only returned if the tier on the block blob was ever set. */ + "x-ms-access-tier-change-time"?: string; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** The value of this header indicates whether version of this blob is a current version, see also x-ms-version-id header. */ + "x-ms-is-current-version"?: boolean; + /** The number of tags associated with the blob */ + "x-ms-tag-count"?: number; + /** The time this blob will expire. */ + "x-ms-expiry-time"?: string; + /** If this blob has been sealed */ + "x-ms-blob-sealed"?: boolean; + /** If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard. */ + "x-ms-rehydrate-priority"?: RehydratePriorityOutput; + /** UTC date/time value generated by the service that indicates the time at which the blob was last read or written to */ + "x-ms-last-access-time"?: string; + /** UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** Indicates the immutability policy mode of the blob. */ + "x-ms-immutability-policy-mode": BlobImmutabilityPolicyModeOutput; + /** Specifies the legal hold status to set on the blob. */ + "x-ms-legal-hold": boolean; +} + +/** The request has succeeded. */ +export interface ContainerBlobGetProperties200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobGetProperties200Headers; +} + +export interface ContainerBlobGetPropertiesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface ContainerBlobDelete202Response extends HttpResponse { + status: "202"; +} + +export interface ContainerBlobDeleteDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobUndelete200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerBlobUndelete200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobUndelete200Headers; +} + +export interface ContainerBlobUndeleteDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobSetExpiry200Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerBlobSetExpiry200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobSetExpiry200Headers; +} + +export interface ContainerBlobSetExpiryDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +/** The request has succeeded. */ +export interface ContainerBlobSetHttpHeaders200Response extends HttpResponse { + status: "200"; +} + +export interface ContainerBlobSetHttpHeadersDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobSetImmutabilityPolicy200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. */ + "x-ms-immutability-policy-until-date"?: string; + /** Indicates the immutability policy mode of the blob. */ + "x-ms-immutability-policy-mode": BlobImmutabilityPolicyModeOutput; +} + +/** The request has succeeded. */ +export interface ContainerBlobSetImmutabilityPolicy200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobSetImmutabilityPolicy200Headers; +} + +export interface ContainerBlobSetImmutabilityPolicyDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobDeleteImmutabilityPolicy200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerBlobDeleteImmutabilityPolicy200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobDeleteImmutabilityPolicy200Headers; +} + +export interface ContainerBlobDeleteImmutabilityPolicyDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobSetLegalHold200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Specifies the legal hold status to set on the blob. */ + "x-ms-legal-hold": boolean; +} + +/** The request has succeeded. */ +export interface ContainerBlobSetLegalHold200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobSetLegalHold200Headers; +} + +export interface ContainerBlobSetLegalHoldDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +/** The request has succeeded. */ +export interface ContainerBlobSetMetadata200Response extends HttpResponse { + status: "200"; +} + +export interface ContainerBlobSetMetadataDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobAcquireLease201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Uniquely identifies a blobs' lease */ + "x-ms-lease-id"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobAcquireLease201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobAcquireLease201Headers; +} + +export interface ContainerBlobAcquireLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobReleaseLease200Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerBlobReleaseLease200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobReleaseLease200Headers; +} + +export interface ContainerBlobReleaseLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobRenewLease200Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Uniquely identifies a blobs' lease */ + "x-ms-lease-id"?: string; +} + +/** The request has succeeded. */ +export interface ContainerBlobRenewLease200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobRenewLease200Headers; +} + +export interface ContainerBlobRenewLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobChangeLease200Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Uniquely identifies a blobs' lease */ + "x-ms-lease-id"?: string; +} + +/** The request has succeeded. */ +export interface ContainerBlobChangeLease200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobChangeLease200Headers; +} + +export interface ContainerBlobChangeLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobBreakLease202Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Approximate time remaining in the lease period, in seconds. */ + "x-ms-lease-time"?: number; +} + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface ContainerBlobBreakLease202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & ContainerBlobBreakLease202Headers; +} + +export interface ContainerBlobBreakLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobCreateSnapshot201Headers { + /** Uniquely identifies the snapshot and indicates the snapshot version. It may be used in subsequent requests to access the snapshot. */ + "x-ms-snapshot"?: string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobCreateSnapshot201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobCreateSnapshot201Headers; +} + +export interface ContainerBlobCreateSnapshotDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobStartCopyFromUrl202Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */ + "x-ms-copy-id"?: string; + /** State of the copy operation identified by x-ms-copy-id. */ + "x-ms-copy-status": CopyStatusOutput; +} + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface ContainerBlobStartCopyFromUrl202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & ContainerBlobStartCopyFromUrl202Headers; +} + +export interface ContainerBlobStartCopyFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobCopyFromUrl202Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */ + "x-ms-copy-id"?: string; + /** State of the copy operation identified by x-ms-copy-id. */ + "x-ms-copy-status": CopyStatusOutput; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; +} + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface ContainerBlobCopyFromUrl202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & ContainerBlobCopyFromUrl202Headers; +} + +export interface ContainerBlobCopyFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobAbortCopyFromUrl204Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface ContainerBlobAbortCopyFromUrl204Response extends HttpResponse { + status: "204"; + headers: RawHttpHeaders & ContainerBlobAbortCopyFromUrl204Headers; +} + +export interface ContainerBlobAbortCopyFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +/** The request has succeeded. */ +export interface ContainerBlobSetTier200Response extends HttpResponse { + status: "200"; +} + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface ContainerBlobSetTier202Response extends HttpResponse { + status: "202"; +} + +export interface ContainerBlobSetTierDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobGetAccountInfo200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Identifies the account kind */ + "x-ms-account-kind"?: AccountKindOutput; + /** Identifies the sku name of the account */ + "x-ms-sku-name"?: SkuNameOutput; + /** Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. */ + "x-ms-is-hns-enabled"?: boolean; +} + +/** The request has succeeded. */ +export interface ContainerBlobGetAccountInfo200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobGetAccountInfo200Headers; +} + +export interface ContainerBlobGetAccountInfoDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobGetTags200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ContainerBlobGetTags200Response extends HttpResponse { + status: "200"; + body: BlobTagsOutput; + headers: RawHttpHeaders & ContainerBlobGetTags200Headers; +} + +export interface ContainerBlobGetTagsDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobSetTags204Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface ContainerBlobSetTags204Response extends HttpResponse { + status: "204"; + headers: RawHttpHeaders & ContainerBlobSetTags204Headers; +} + +export interface ContainerBlobSetTagsDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobPageBlobCreate201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobPageBlobCreate201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobPageBlobCreate201Headers; +} + +export interface ContainerBlobPageBlobCreateDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobPageBlobUploadPages201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs. */ + "x-ms-blob-sequence-number": number; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; + /** Indicates the response body contains a structured message and specifies the message schema version and properties. */ + "x-ms-structured-body"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobPageBlobUploadPages201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobPageBlobUploadPages201Headers; +} + +export interface ContainerBlobPageBlobUploadPagesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobPageBlobClearPages201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs. */ + "x-ms-blob-sequence-number": number; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobPageBlobClearPages201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobPageBlobClearPages201Headers; +} + +export interface ContainerBlobPageBlobClearPagesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobPageBlobUploadPagesFromUrl201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs. */ + "x-ms-blob-sequence-number": number; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobPageBlobUploadPagesFromUrl201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobPageBlobUploadPagesFromUrl201Headers; +} + +export interface ContainerBlobPageBlobUploadPagesFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobPageBlobGetPageRanges200Headers { + /** The date/time that the container was last modified. */ + "last-modified": string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary. */ + "x-ms-blob-content-length": number; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ContainerBlobPageBlobGetPageRanges200Response extends HttpResponse { + status: "200"; + body: PageListOutput; + headers: RawHttpHeaders & ContainerBlobPageBlobGetPageRanges200Headers; +} + +export interface ContainerBlobPageBlobGetPageRangesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobPageBlobGetPageRangesDiff200Headers { + /** The date/time that the container was last modified. */ + "last-modified": string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary. */ + "x-ms-blob-content-length": number; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ContainerBlobPageBlobGetPageRangesDiff200Response extends HttpResponse { + status: "200"; + body: PageListOutput; + headers: RawHttpHeaders & ContainerBlobPageBlobGetPageRangesDiff200Headers; +} + +export interface ContainerBlobPageBlobGetPageRangesDiffDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobPageBlobResize200Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs. */ + "x-ms-blob-sequence-number": number; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerBlobPageBlobResize200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobPageBlobResize200Headers; +} + +export interface ContainerBlobPageBlobResizeDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobPageBlobUpdateSequenceNumber200Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs. */ + "x-ms-blob-sequence-number": number; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; +} + +/** The request has succeeded. */ +export interface ContainerBlobPageBlobUpdateSequenceNumber200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobPageBlobUpdateSequenceNumber200Headers; +} + +export interface ContainerBlobPageBlobUpdateSequenceNumberDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobPageBlobCopyIncremental202Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */ + "x-ms-copy-id"?: string; + /** State of the copy operation identified by x-ms-copy-id. */ + "x-ms-copy-status": CopyStatusOutput; +} + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface ContainerBlobPageBlobCopyIncremental202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & ContainerBlobPageBlobCopyIncremental202Headers; +} + +export interface ContainerBlobPageBlobCopyIncrementalDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobAppendBlobCreate201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobAppendBlobCreate201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobAppendBlobCreate201Headers; +} + +export interface ContainerBlobAppendBlobCreateDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobAppendBlobAppendBlock201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** This response header is returned only for append operations. It returns the offset at which the block was committed, in bytes. */ + "x-ms-blob-append-offset"?: string; + /** The number of committed blocks present in the blob. This header is returned only for append blobs. */ + "x-ms-blob-committed-block-count"?: number; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; + /** Indicates the response body contains a structured message and specifies the message schema version and properties. */ + "x-ms-structured-body"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobAppendBlobAppendBlock201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobAppendBlobAppendBlock201Headers; +} + +export interface ContainerBlobAppendBlobAppendBlockDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobAppendBlobAppendBlockFromUrl201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** This response header is returned only for append operations. It returns the offset at which the block was committed, in bytes. */ + "x-ms-blob-append-offset"?: string; + /** The number of committed blocks present in the blob. This header is returned only for append blobs. */ + "x-ms-blob-committed-block-count"?: number; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobAppendBlobAppendBlockFromUrl201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobAppendBlobAppendBlockFromUrl201Headers; +} + +export interface ContainerBlobAppendBlobAppendBlockFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobAppendBlobSeal200Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** If this blob has been sealed */ + "x-ms-blob-sealed"?: boolean; +} + +/** The request has succeeded. */ +export interface ContainerBlobAppendBlobSeal200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerBlobAppendBlobSeal200Headers; +} + +export interface ContainerBlobAppendBlobSealDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobBlockBlobUpload201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobBlockBlobUpload201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobBlockBlobUpload201Headers; +} + +export interface ContainerBlobBlockBlobUploadDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobBlockBlobPutBlobFromUrl201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobBlockBlobPutBlobFromUrl201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobBlockBlobPutBlobFromUrl201Headers; +} + +export interface ContainerBlobBlockBlobPutBlobFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobBlockBlobStageBlock201Headers { + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobBlockBlobStageBlock201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobBlockBlobStageBlock201Headers; +} + +export interface ContainerBlobBlockBlobStageBlockDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobBlockBlobStageBlockFromUrl201Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobBlockBlobStageBlockFromUrl201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobBlockBlobStageBlockFromUrl201Headers; +} + +export interface ContainerBlobBlockBlobStageBlockFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobBlockBlobCommitBlockList201Headers { + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob version, and may be used in subsequent requests to access this version of the blob. */ + "x-ms-version-id": string; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface ContainerBlobBlockBlobCommitBlockList201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerBlobBlockBlobCommitBlockList201Headers; +} + +export interface ContainerBlobBlockBlobCommitBlockListDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobBlockBlobGetBlockList200Headers { + /** The date/time that the container was last modified. */ + "last-modified": string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary. */ + "x-ms-blob-content-length": number; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ContainerBlobBlockBlobGetBlockList200Response extends HttpResponse { + status: "200"; + body: BlockListOutput; + headers: RawHttpHeaders & ContainerBlobBlockBlobGetBlockList200Headers; +} + +export interface ContainerBlobBlockBlobGetBlockListDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerBlobBlockBlobQuery200Headers { + /** The metadata headers. */ + "x-ms-meta"?: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** The number of bytes present in the response body. */ + "content-length": number; + /** Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header. */ + "content-range": string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This header returns the value that was specified for the Content-Encoding request header */ + "content-encoding": string; + /** This header is returned if it was previously specified for the blob. */ + "cache-control": string; + /** This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified. */ + "content-disposition": string; + /** This header returns the value that was specified for the Content-Language request header. */ + "content-language": string; + /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs. */ + "x-ms-blob-sequence-number": number; + /** The type of the blob. */ + "x-ms-blob-type"?: BlobTypeOutput; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */ + "x-ms-copy-completion-time"?: string; + /** Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */ + "x-ms-copy-status-description"?: string; + /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */ + "x-ms-copy-id"?: string; + /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */ + "x-ms-copy-progress"?: string; + /** URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */ + "x-ms-copy-source"?: string; + /** State of the copy operation identified by x-ms-copy-id. */ + "x-ms-copy-status": CopyStatusOutput; + /** Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. */ + "x-ms-lease-duration"?: LeaseDurationOutput; + /** Lease state of the blob. */ + "x-ms-lease-state"?: LeaseStateOutput; + /** The lease status of the blob. */ + "x-ms-lease-status"?: LeaseStatusOutput; + /** Indicates that the service supports requests for partial blob content. */ + "accept-ranges"?: string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** The number of committed blocks present in the blob. This header is returned only for append blobs. */ + "x-ms-blob-committed-block-count"?: number; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-blob-content-md5"?: string; + /** Content-Type header */ + "content-type": "application/octet-stream"; +} + +/** The request has succeeded. */ +export interface ContainerBlobBlockBlobQuery200Response extends HttpResponse { + status: "200"; + /** Value may contain any sequence of octets */ + body: Uint8Array; + headers: RawHttpHeaders & ContainerBlobBlockBlobQuery200Headers; +} + +export interface ContainerBlobBlockBlobQuery206Headers { + /** The metadata headers. */ + "x-ms-meta"?: string; + /** The date/time that the container was last modified. */ + "last-modified": string; + /** The number of bytes present in the response body. */ + "content-length": number; + /** Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting the 'Range' request header. */ + "content-range": string; + /** The ETag contains a value that you can use to perform operations conditionally. */ + etag: string; + /** If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so that the client can check for message content integrity. */ + "content-md5": string; + /** This header returns the value that was specified for the Content-Encoding request header */ + "content-encoding": string; + /** This header is returned if it was previously specified for the blob. */ + "cache-control": string; + /** This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified. */ + "content-disposition": string; + /** This header returns the value that was specified for the Content-Language request header. */ + "content-language": string; + /** The current sequence number for a page blob. This header is not returned for block blobs or append blobs. */ + "x-ms-blob-sequence-number": number; + /** The type of the blob. */ + "x-ms-blob-type"?: BlobTypeOutput; + /** This response header is returned so that the client can check for the integrity of the copied content. */ + "x-ms-content-crc64": string; + /** Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. This header does not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */ + "x-ms-copy-completion-time"?: string; + /** Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal copy operation failure. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */ + "x-ms-copy-status-description"?: string; + /** String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy operation, or pass to Abort Copy Blob to abort a pending copy. */ + "x-ms-copy-id"?: string; + /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List */ + "x-ms-copy-progress"?: string; + /** URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operation where this blob was the destination blob. This header does not appear if this blob has never been the destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. */ + "x-ms-copy-source"?: string; + /** State of the copy operation identified by x-ms-copy-id. */ + "x-ms-copy-status": CopyStatusOutput; + /** Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. */ + "x-ms-lease-duration"?: LeaseDurationOutput; + /** Lease state of the blob. */ + "x-ms-lease-state"?: LeaseStateOutput; + /** The lease status of the blob. */ + "x-ms-lease-status"?: LeaseStatusOutput; + /** Indicates that the service supports requests for partial blob content. */ + "accept-ranges"?: string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** The number of committed blocks present in the blob. This header is returned only for append blobs. */ + "x-ms-blob-committed-block-count"?: number; + /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */ + "x-ms-request-server-encrypted"?: boolean; + /** The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted with a customer-provided key. */ + "x-ms-encryption-key-sha256"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-encryption-scope"?: string; + /** If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole blob's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range */ + "x-ms-blob-content-md5"?: string; + /** Content-Type header */ + "content-type": "application/octet-stream"; +} + +/** Successful */ +export interface ContainerBlobBlockBlobQuery206Response extends HttpResponse { + status: "206"; + /** Value may contain any sequence of octets */ + body: Uint8Array; + headers: RawHttpHeaders & ContainerBlobBlockBlobQuery206Headers; +} + +export interface ContainerBlobBlockBlobQueryDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} diff --git a/sdk/storage/azure-storage-blob-rest/test/public/sampleTest.spec.ts b/sdk/storage/azure-storage-blob-rest/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..e4591bbad342 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/test/public/sampleTest.spec.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async () => { + // recorder = await createRecorder(this); + }); + + afterEach(async () => { + // await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/storage/azure-storage-blob-rest/test/public/utils/recordedClient.ts b/sdk/storage/azure-storage-blob-rest/test/public/utils/recordedClient.ts new file mode 100644 index 000000000000..14dcd9fa397c --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/test/public/utils/recordedClient.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; + +const replaceableVariables: Record = { + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderEnvSetup: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export async function createRecorder(context: VitestTestContext): Promise { + const recorder = new Recorder(context); + await recorder.start(recorderEnvSetup); + return recorder; +} diff --git a/sdk/storage/azure-storage-blob-rest/test/snippets.spec.ts b/sdk/storage/azure-storage-blob-rest/test/snippets.spec.ts new file mode 100644 index 000000000000..5d6136453264 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/test/snippets.spec.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { setLogLevel } from "@azure/logger"; +import { describe, it } from "vitest"; + +describe("snippets", () => { + it("SetLogLevel", async () => { + setLogLevel("info"); + }); +}); diff --git a/sdk/storage/azure-storage-blob-rest/tsconfig.browser.config.json b/sdk/storage/azure-storage-blob-rest/tsconfig.browser.config.json new file mode 100644 index 000000000000..75871518e3a0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/tsconfig.browser.config.json @@ -0,0 +1,3 @@ +{ + "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] +} diff --git a/sdk/storage/azure-storage-blob-rest/tsconfig.json b/sdk/storage/azure-storage-blob-rest/tsconfig.json new file mode 100644 index 000000000000..59ea83c046bf --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/tsconfig.json @@ -0,0 +1,10 @@ +{ + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.test.json" + } + ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob-rest/tsconfig.samples.json b/sdk/storage/azure-storage-blob-rest/tsconfig.samples.json new file mode 100644 index 000000000000..be7c94791b87 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/tsconfig.samples.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure-rest/azure-storage-blob-rest": ["./dist/esm"] + } + } +} diff --git a/sdk/storage/azure-storage-blob-rest/tsconfig.src.json b/sdk/storage/azure-storage-blob-rest/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/storage/azure-storage-blob-rest/tsconfig.test.json b/sdk/storage/azure-storage-blob-rest/tsconfig.test.json new file mode 100644 index 000000000000..290ca214aebc --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/tsconfig.test.json @@ -0,0 +1,3 @@ +{ + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] +} diff --git a/sdk/storage/azure-storage-blob-rest/tsp-location.yaml b/sdk/storage/azure-storage-blob-rest/tsp-location.yaml new file mode 100644 index 000000000000..fd3d1b1e7a87 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/storage/Microsoft.BlobStorage +commit: b16b2def24ae2df26b33fbca54109012d44531c6 +repo: /mnt/vss/_work/1/s/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/storage/azure-storage-blob-rest/vitest.browser.config.ts b/sdk/storage/azure-storage-blob-rest/vitest.browser.config.ts new file mode 100644 index 000000000000..182729ab5ce9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: ["dist-test/browser/test/**/*.spec.js",], + testTimeout: 1200000, + hookTimeout: 1200000, + }, + }), +); diff --git a/sdk/storage/azure-storage-blob-rest/vitest.config.ts b/sdk/storage/azure-storage-blob-rest/vitest.config.ts new file mode 100644 index 000000000000..40e031385dd8 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/vitest.config.ts @@ -0,0 +1,16 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + testTimeout: 1200000, + hookTimeout: 1200000, + }, + }), +); diff --git a/sdk/storage/azure-storage-blob-rest/vitest.esm.config.ts b/sdk/storage/azure-storage-blob-rest/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index fc356b2141c5..9c567e334903 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -39,7 +39,7 @@ extends: - name: azure-storage-blob safeName: azurestorageblob triggeringPaths: - - /sdk/identity/ + - /sdk/identity/ - name: azure-storage-file-share safeName: azurestoragefileshare - name: azure-storage-file-datalake @@ -48,3 +48,5 @@ extends: safeName: azurestoragequeue - name: azure-storage-blob-changefeed safeName: azurestorageblobchangefeed + - name: azure-rest-azure-storage-blob-rest + safeName: azurerestazurestorageblobrest