From 947e361b13352c7321430f799f43e2882b4a85e8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 18 Feb 2025 23:54:29 +0000 Subject: [PATCH] CodeGen from PR 32687 in Azure/azure-rest-api-specs Merge 72c793f73dc8b8f52b67b58b7fa2e810885002a7 into 308f6b4a214ac879c6b67fa62653046100d5d1ef --- sdk/storage/azure-storage-blob-rest/LICENSE | 21 + sdk/storage/azure-storage-blob-rest/README.md | 55 + .../api-extractor.json | 18 + .../azure-storage-blob-rest/eslint.config.mjs | 16 + .../azure-storage-blob-rest/package.json | 87 + .../azure-storage-blob-rest/sample.env | 1 + .../azure-storage-blob-rest/src/blobClient.ts | 55 + .../src/clientDefinitions.ts | 1144 ++++++ .../azure-storage-blob-rest/src/index.ts | 14 + .../src/isUnexpected.ts | 796 ++++ .../azure-storage-blob-rest/src/logger.ts | 5 + .../azure-storage-blob-rest/src/models.ts | 246 ++ .../src/outputModels.ts | 541 +++ .../azure-storage-blob-rest/src/parameters.ts | 3545 +++++++++++++++++ .../azure-storage-blob-rest/src/responses.ts | 2274 +++++++++++ .../test/public/sampleTest.spec.ts | 21 + .../test/public/utils/recordedClient.ts | 29 + .../tsconfig.browser.config.json | 10 + .../azure-storage-blob-rest/tsconfig.json | 16 + .../azure-storage-blob-rest/tsp-location.yaml | 4 + .../vitest.browser.config.ts | 38 + .../azure-storage-blob-rest/vitest.config.ts | 34 + 22 files changed, 8970 insertions(+) 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/tsconfig.browser.config.json create mode 100644 sdk/storage/azure-storage-blob-rest/tsconfig.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 diff --git a/sdk/storage/azure-storage-blob-rest/LICENSE b/sdk/storage/azure-storage-blob-rest/LICENSE new file mode 100644 index 000000000000..2ad4de7b17f0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2025 Microsoft + +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..932d14633ef0 --- /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`: + +```javascript +const { setLogLevel } = require("@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..387d2c44896c --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$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": "./types/azure-storage-blob-rest.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} 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..ac1c3c967e61 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/eslint.config.mjs @@ -0,0 +1,16 @@ +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-apiextractor-json-types": "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-module": "off", + "@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..3790b70a200a --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/package.json @@ -0,0 +1,87 @@ +{ + "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 + }, + "type": "module", + "keywords": ["node", "azure", "cloud", "typescript", "browser", "isomorphic"], + "author": "Microsoft Corporation", + "license": "MIT", + "files": ["dist", "README.md", "LICENSE", "review/*", "CHANGELOG.md"], + "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.6.0", + "@azure/core-rest-pipeline": "^1.5.0", + "@azure/logger": "^1.0.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "dotenv": "^16.0.0", + "@microsoft/api-extractor": "^7.40.3", + "@types/node": "^18.0.0", + "eslint": "^9.9.0", + "typescript": "~5.6.2", + "@azure/identity": "^4.2.1", + "@vitest/browser": "^2.0.5", + "@vitest/coverage-istanbul": "^2.0.5", + "playwright": "^1.41.2", + "vitest": "^2.0.5", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0" + }, + "scripts": { + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api", + "pack": "npm pack 2>&1", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "build:samples": "echo skipped", + "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}\" ", + "execute:samples": "echo skipped", + "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", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", + "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", + "update-snippets": "echo skipped" + } +} 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..ff3a9ec241c4 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/blobClient.ts @@ -0,0 +1,55 @@ +// 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..1d9284dd9f05 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/clientDefinitions.ts @@ -0,0 +1,1144 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + ServiceSetPropertiesParameters, + ServiceGetPropertiesParameters, + ServiceGetStatisticsParameters, + ServiceListContainersSegmentParameters, + ServiceGetUserDelegationKeyParameters, + ServiceGetAccountInfoParameters, + ServiceSubmitBatchParameters, + ServiceFilterBlobsParameters, + ContainerCreateParameters, + ContainerGetPropertiesParameters, + ContainerDeleteParameters, + ContainerSetMetadataParameters, + ContainerGetAccessPolicyParameters, + ContainerSetAccessPolicyParameters, + ContainerRestoreParameters, + ContainerRenameParameters, + ContainerSubmitBatchParameters, + ContainerFilterBlobsParameters, + ContainerAcquireLeaseParameters, + ContainerReleaseLeaseParameters, + ContainerRenewLeaseParameters, + ContainerBreakLeaseParameters, + ContainerChangeLeaseParameters, + ContainerListBlobFlatSegmentParameters, + ContainerListBlobHierarchySegmentParameters, + ContainerGetAccountInfoParameters, + BlobDownloadParameters, + BlobGetPropertiesParameters, + BlobDeleteParameters, + BlobUndeleteParameters, + BlobSetExpiryParameters, + BlobSetHttpHeadersParameters, + BlobSetImmutabilityPolicyParameters, + BlobDeleteImmutabilityPolicyParameters, + BlobSetLegalHoldParameters, + BlobSetMetadataParameters, + BlobAcquireLeaseParameters, + BlobReleaseLeaseParameters, + BlobRenewLeaseParameters, + BlobChangeLeaseParameters, + BlobBreakLeaseParameters, + BlobCreateSnapshotParameters, + BlobStartCopyFromUrlParameters, + BlobCopyFromUrlParameters, + BlobAbortCopyFromUrlParameters, + BlobSetTierParameters, + BlobGetAccountInfoParameters, + BlobQueryParameters, + BlobGetTagsParameters, + BlobSetTagsParameters, + PageBlobCreateParameters, + PageBlobUploadPagesParameters, + PageBlobClearPagesParameters, + PageBlobUploadPagesFromUrlParameters, + PageBlobGetPageRangesParameters, + PageBlobGetPageRangesDiffParameters, + PageBlobResizeParameters, + PageBlobUpdateSequenceNumberParameters, + PageBlobCopyIncrementalParameters, + AppendBlobCreateParameters, + AppendBlobAppendBlockParameters, + AppendBlobAppendBlockFromUrlParameters, + AppendBlobSealParameters, + BlockBlobUploadParameters, + BlockBlobPutBlobFromUrlParameters, + BlockBlobStageBlockParameters, + BlockBlobStageBlockFromUrlParameters, + BlockBlobCommitBlockListParameters, + BlockBlobGetBlockListParameters, +} from "./parameters.js"; +import type { + ServiceSetProperties202Response, + ServiceSetPropertiesDefaultResponse, + ServiceGetProperties200Response, + ServiceGetPropertiesDefaultResponse, + ServiceGetStatistics200Response, + ServiceGetStatisticsDefaultResponse, + ServiceListContainersSegment200Response, + ServiceListContainersSegmentDefaultResponse, + ServiceGetUserDelegationKey200Response, + ServiceGetUserDelegationKeyDefaultResponse, + ServiceGetAccountInfo200Response, + ServiceGetAccountInfoDefaultResponse, + ServiceSubmitBatch200Response, + ServiceSubmitBatchDefaultResponse, + ServiceFilterBlobs200Response, + ServiceFilterBlobsDefaultResponse, + 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, + BlobDownload200Response, + BlobDownload206Response, + BlobDownloadDefaultResponse, + BlobGetProperties200Response, + BlobGetPropertiesDefaultResponse, + BlobDelete202Response, + BlobDeleteDefaultResponse, + BlobUndelete200Response, + BlobUndeleteDefaultResponse, + BlobSetExpiry200Response, + BlobSetExpiryDefaultResponse, + BlobSetHttpHeaders200Response, + BlobSetHttpHeadersDefaultResponse, + BlobSetImmutabilityPolicy200Response, + BlobSetImmutabilityPolicyDefaultResponse, + BlobDeleteImmutabilityPolicy200Response, + BlobDeleteImmutabilityPolicyDefaultResponse, + BlobSetLegalHold200Response, + BlobSetLegalHoldDefaultResponse, + BlobSetMetadata200Response, + BlobSetMetadataDefaultResponse, + BlobAcquireLease201Response, + BlobAcquireLeaseDefaultResponse, + BlobReleaseLease200Response, + BlobReleaseLeaseDefaultResponse, + BlobRenewLease200Response, + BlobRenewLeaseDefaultResponse, + BlobChangeLease200Response, + BlobChangeLeaseDefaultResponse, + BlobBreakLease202Response, + BlobBreakLeaseDefaultResponse, + BlobCreateSnapshot201Response, + BlobCreateSnapshotDefaultResponse, + BlobStartCopyFromUrl202Response, + BlobStartCopyFromUrlDefaultResponse, + BlobCopyFromUrl202Response, + BlobCopyFromUrlDefaultResponse, + BlobAbortCopyFromUrl204Response, + BlobAbortCopyFromUrlDefaultResponse, + BlobSetTier200Response, + BlobSetTier202Response, + BlobSetTierDefaultResponse, + BlobGetAccountInfo200Response, + BlobGetAccountInfoDefaultResponse, + BlobQuery200Response, + BlobQuery206Response, + BlobQueryDefaultResponse, + BlobGetTags200Response, + BlobGetTagsDefaultResponse, + BlobSetTags204Response, + BlobSetTagsDefaultResponse, + PageBlobCreate201Response, + PageBlobCreateDefaultResponse, + PageBlobUploadPages201Response, + PageBlobUploadPagesDefaultResponse, + PageBlobClearPages201Response, + PageBlobClearPagesDefaultResponse, + PageBlobUploadPagesFromUrl201Response, + PageBlobUploadPagesFromUrlDefaultResponse, + PageBlobGetPageRanges200Response, + PageBlobGetPageRangesDefaultResponse, + PageBlobGetPageRangesDiff200Response, + PageBlobGetPageRangesDiffDefaultResponse, + PageBlobResize200Response, + PageBlobResizeDefaultResponse, + PageBlobUpdateSequenceNumber200Response, + PageBlobUpdateSequenceNumberDefaultResponse, + PageBlobCopyIncremental202Response, + PageBlobCopyIncrementalDefaultResponse, + AppendBlobCreate201Response, + AppendBlobCreateDefaultResponse, + AppendBlobAppendBlock201Response, + AppendBlobAppendBlockDefaultResponse, + AppendBlobAppendBlockFromUrl201Response, + AppendBlobAppendBlockFromUrlDefaultResponse, + AppendBlobSeal200Response, + AppendBlobSealDefaultResponse, + BlockBlobUpload201Response, + BlockBlobUploadDefaultResponse, + BlockBlobPutBlobFromUrl201Response, + BlockBlobPutBlobFromUrlDefaultResponse, + BlockBlobStageBlock201Response, + BlockBlobStageBlockDefaultResponse, + BlockBlobStageBlockFromUrl201Response, + BlockBlobStageBlockFromUrlDefaultResponse, + BlockBlobCommitBlockList201Response, + BlockBlobCommitBlockListDefaultResponse, + BlockBlobGetBlockList200Response, + BlockBlobGetBlockListDefaultResponse, +} from "./responses.js"; +import type { Client, StreamableMethod } from "@azure-rest/core-client"; + +export interface ServiceSetProperties { + /** Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules */ + put( + options: ServiceSetPropertiesParameters, + ): StreamableMethod< + ServiceSetProperties202Response | ServiceSetPropertiesDefaultResponse + >; + /** Retrieves properties of a storage account's Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ + get( + options: ServiceGetPropertiesParameters, + ): StreamableMethod< + ServiceGetProperties200Response | ServiceGetPropertiesDefaultResponse + >; +} + +export interface ServiceGetStatistics { + /** 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: ServiceGetStatisticsParameters, + ): StreamableMethod< + ServiceGetStatistics200Response | ServiceGetStatisticsDefaultResponse + >; +} + +export interface ServiceListContainersSegment { + /** The List Containers Segment operation returns a list of the containers under the specified account */ + get( + options: ServiceListContainersSegmentParameters, + ): StreamableMethod< + | ServiceListContainersSegment200Response + | ServiceListContainersSegmentDefaultResponse + >; +} + +export interface ServiceGetUserDelegationKey { + /** Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token authentication. */ + post( + options: ServiceGetUserDelegationKeyParameters, + ): StreamableMethod< + | ServiceGetUserDelegationKey200Response + | ServiceGetUserDelegationKeyDefaultResponse + >; +} + +export interface ServiceGetAccountInfo { + /** Returns the sku name and account kind. */ + get( + options: ServiceGetAccountInfoParameters, + ): StreamableMethod< + ServiceGetAccountInfo200Response | ServiceGetAccountInfoDefaultResponse + >; +} + +export interface ServiceSubmitBatch { + /** The Batch operation allows multiple API calls to be embedded into a single HTTP request. */ + post( + options: ServiceSubmitBatchParameters, + ): StreamableMethod< + ServiceSubmitBatch200Response | ServiceSubmitBatchDefaultResponse + >; +} + +export interface ServiceFilterBlobs { + /** The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search expression. */ + get( + options: ServiceFilterBlobsParameters, + ): StreamableMethod< + ServiceFilterBlobs200Response | ServiceFilterBlobsDefaultResponse + >; +} + +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< + ContainerCreate201Response | ContainerCreateDefaultResponse + >; + /** 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< + ContainerGetProperties200Response | ContainerGetPropertiesDefaultResponse + >; + /** 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< + ContainerDelete202Response | ContainerDeleteDefaultResponse + >; +} + +export interface ContainerSetMetadata { + /** operation sets one or more user-defined name-value pairs for the specified container. */ + put( + options: ContainerSetMetadataParameters, + ): StreamableMethod< + ContainerSetMetadata200Response | ContainerSetMetadataDefaultResponse + >; +} + +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< + ContainerRestore201Response | ContainerRestoreDefaultResponse + >; +} + +export interface ContainerRename { + /** Renames an existing container. */ + put( + options: ContainerRenameParameters, + ): StreamableMethod< + ContainerRename200Response | ContainerRenameDefaultResponse + >; +} + +export interface ContainerSubmitBatch { + /** The Batch operation allows multiple API calls to be embedded into a single HTTP request. */ + post( + options: ContainerSubmitBatchParameters, + ): StreamableMethod< + ContainerSubmitBatch202Response | ContainerSubmitBatchDefaultResponse + >; +} + +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< + ContainerFilterBlobs200Response | ContainerFilterBlobsDefaultResponse + >; +} + +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< + ContainerAcquireLease201Response | ContainerAcquireLeaseDefaultResponse + >; +} + +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< + ContainerReleaseLease200Response | ContainerReleaseLeaseDefaultResponse + >; +} + +export interface ContainerRenewLease { + /** The Renew Lease operation renews an existing lease. */ + put( + options: ContainerRenewLeaseParameters, + ): StreamableMethod< + ContainerRenewLease200Response | ContainerRenewLeaseDefaultResponse + >; +} + +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< + ContainerBreakLease202Response | ContainerBreakLeaseDefaultResponse + >; +} + +export interface ContainerChangeLease { + /** The Change Lease operation is used to change the ID of an existing lease. */ + put( + options: ContainerChangeLeaseParameters, + ): StreamableMethod< + ContainerChangeLease200Response | ContainerChangeLeaseDefaultResponse + >; +} + +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< + ContainerGetAccountInfo200Response | ContainerGetAccountInfoDefaultResponse + >; +} + +export interface BlobDownload { + /** 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: BlobDownloadParameters, + ): StreamableMethod< + | BlobDownload200Response + | BlobDownload206Response + | BlobDownloadDefaultResponse + >; + /** 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: BlobGetPropertiesParameters, + ): StreamableMethod< + BlobGetProperties200Response | BlobGetPropertiesDefaultResponse + >; + /** 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: BlobDeleteParameters, + ): StreamableMethod; +} + +export interface BlobUndelete { + /** Undelete a blob that was previously soft deleted */ + put( + options: BlobUndeleteParameters, + ): StreamableMethod; +} + +export interface BlobSetExpiry { + /** Set the expiration time of a blob */ + put( + options: BlobSetExpiryParameters, + ): StreamableMethod; +} + +export interface BlobSetHttpHeaders { + /** The Set HTTP Headers operation sets system properties on the blob. */ + put( + options: BlobSetHttpHeadersParameters, + ): StreamableMethod< + BlobSetHttpHeaders200Response | BlobSetHttpHeadersDefaultResponse + >; +} + +export interface BlobSetImmutabilityPolicy { + /** Set the immutability policy of a blob */ + put( + options: BlobSetImmutabilityPolicyParameters, + ): StreamableMethod< + | BlobSetImmutabilityPolicy200Response + | BlobSetImmutabilityPolicyDefaultResponse + >; + /** The Delete Immutability Policy operation deletes the immutability policy on the blob. */ + delete( + options: BlobDeleteImmutabilityPolicyParameters, + ): StreamableMethod< + | BlobDeleteImmutabilityPolicy200Response + | BlobDeleteImmutabilityPolicyDefaultResponse + >; +} + +export interface BlobSetLegalHold { + /** The Set Legal Hold operation sets a legal hold on the blob. */ + put( + options: BlobSetLegalHoldParameters, + ): StreamableMethod< + BlobSetLegalHold200Response | BlobSetLegalHoldDefaultResponse + >; +} + +export interface BlobSetMetadata { + /** The Set Metadata operation sets user-defined metadata for the specified blob as one or more name-value pairs. */ + put( + options: BlobSetMetadataParameters, + ): StreamableMethod< + BlobSetMetadata200Response | BlobSetMetadataDefaultResponse + >; +} + +export interface BlobAcquireLease { + /** 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: BlobAcquireLeaseParameters, + ): StreamableMethod< + BlobAcquireLease201Response | BlobAcquireLeaseDefaultResponse + >; +} + +export interface BlobReleaseLease { + /** 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: BlobReleaseLeaseParameters, + ): StreamableMethod< + BlobReleaseLease200Response | BlobReleaseLeaseDefaultResponse + >; +} + +export interface BlobRenewLease { + /** The Renew Lease operation renews an existing lease. */ + put( + options: BlobRenewLeaseParameters, + ): StreamableMethod< + BlobRenewLease200Response | BlobRenewLeaseDefaultResponse + >; +} + +export interface BlobChangeLease { + /** The Change Lease operation is used to change the ID of an existing lease. */ + put( + options: BlobChangeLeaseParameters, + ): StreamableMethod< + BlobChangeLease200Response | BlobChangeLeaseDefaultResponse + >; +} + +export interface BlobBreakLease { + /** 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: BlobBreakLeaseParameters, + ): StreamableMethod< + BlobBreakLease202Response | BlobBreakLeaseDefaultResponse + >; +} + +export interface BlobCreateSnapshot { + /** The Create Snapshot operation creates a read-only snapshot of a blob */ + put( + options: BlobCreateSnapshotParameters, + ): StreamableMethod< + BlobCreateSnapshot201Response | BlobCreateSnapshotDefaultResponse + >; +} + +export interface BlobStartCopyFromUrl { + /** The Start Copy From URL operation copies a blob or an internet resource to a new blob. */ + put( + options: BlobStartCopyFromUrlParameters, + ): StreamableMethod< + BlobStartCopyFromUrl202Response | BlobStartCopyFromUrlDefaultResponse + >; +} + +export interface BlobCopyFromUrl { + /** 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: BlobCopyFromUrlParameters, + ): StreamableMethod< + BlobCopyFromUrl202Response | BlobCopyFromUrlDefaultResponse + >; +} + +export interface BlobAbortCopyFromUrl { + /** 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: BlobAbortCopyFromUrlParameters, + ): StreamableMethod< + BlobAbortCopyFromUrl204Response | BlobAbortCopyFromUrlDefaultResponse + >; +} + +export interface BlobSetTier { + /** 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: BlobSetTierParameters, + ): StreamableMethod< + BlobSetTier200Response | BlobSetTier202Response | BlobSetTierDefaultResponse + >; +} + +export interface BlobGetAccountInfo { + /** Returns the sku name and account kind */ + get( + options: BlobGetAccountInfoParameters, + ): StreamableMethod< + BlobGetAccountInfo200Response | BlobGetAccountInfoDefaultResponse + >; +} + +export interface BlobQuery { + /** The Query operation enables users to select/project on blob data by providing simple query expressions. */ + post( + options: BlobQueryParameters, + ): StreamableMethod< + BlobQuery200Response | BlobQuery206Response | BlobQueryDefaultResponse + >; +} + +export interface BlobGetTags { + /** The Get Blob Tags operation enables users to get tags on a blob. */ + get( + options: BlobGetTagsParameters, + ): StreamableMethod; + /** The Set Tags operation enables users to set tags on a blob. */ + put( + options: BlobSetTagsParameters, + ): StreamableMethod; +} + +export interface PageBlobCreate { + /** The Create operation creates a new page blob. */ + put( + options: PageBlobCreateParameters, + ): StreamableMethod< + PageBlobCreate201Response | PageBlobCreateDefaultResponse + >; +} + +export interface PageBlobUploadPages { + /** The Upload Pages operation writes a range of pages to a page blob */ + put( + options: PageBlobUploadPagesParameters, + ): StreamableMethod< + PageBlobUploadPages201Response | PageBlobUploadPagesDefaultResponse + >; +} + +export interface PageBlobClearPages { + /** The Clear Pages operation clears a range of pages from a page blob */ + put( + options: PageBlobClearPagesParameters, + ): StreamableMethod< + PageBlobClearPages201Response | PageBlobClearPagesDefaultResponse + >; +} + +export interface PageBlobUploadPagesFromUrl { + /** The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. */ + put( + options: PageBlobUploadPagesFromUrlParameters, + ): StreamableMethod< + | PageBlobUploadPagesFromUrl201Response + | PageBlobUploadPagesFromUrlDefaultResponse + >; +} + +export interface PageBlobGetPageRanges { + /** The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a page blob. */ + get( + options: PageBlobGetPageRangesParameters, + ): StreamableMethod< + PageBlobGetPageRanges200Response | PageBlobGetPageRangesDefaultResponse + >; +} + +export interface PageBlobGetPageRangesDiff { + /** 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: PageBlobGetPageRangesDiffParameters, + ): StreamableMethod< + | PageBlobGetPageRangesDiff200Response + | PageBlobGetPageRangesDiffDefaultResponse + >; +} + +export interface PageBlobResize { + /** The Resize operation increases the size of the page blob to the specified size. */ + put( + options: PageBlobResizeParameters, + ): StreamableMethod< + PageBlobResize200Response | PageBlobResizeDefaultResponse + >; +} + +export interface PageBlobUpdateSequenceNumber { + /** 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: PageBlobUpdateSequenceNumberParameters, + ): StreamableMethod< + | PageBlobUpdateSequenceNumber200Response + | PageBlobUpdateSequenceNumberDefaultResponse + >; +} + +export interface PageBlobCopyIncremental { + /** 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: PageBlobCopyIncrementalParameters, + ): StreamableMethod< + PageBlobCopyIncremental202Response | PageBlobCopyIncrementalDefaultResponse + >; +} + +export interface AppendBlobCreate { + /** The Create operation creates a new append blob. */ + put( + options: AppendBlobCreateParameters, + ): StreamableMethod< + AppendBlobCreate201Response | AppendBlobCreateDefaultResponse + >; +} + +export interface AppendBlobAppendBlock { + /** The Append Block operation commits a new block of data to the end of an append blob. */ + put( + options: AppendBlobAppendBlockParameters, + ): StreamableMethod< + AppendBlobAppendBlock201Response | AppendBlobAppendBlockDefaultResponse + >; +} + +export interface AppendBlobAppendBlockFromUrl { + /** 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: AppendBlobAppendBlockFromUrlParameters, + ): StreamableMethod< + | AppendBlobAppendBlockFromUrl201Response + | AppendBlobAppendBlockFromUrlDefaultResponse + >; +} + +export interface AppendBlobSeal { + /** 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: AppendBlobSealParameters, + ): StreamableMethod< + AppendBlobSeal200Response | AppendBlobSealDefaultResponse + >; +} + +export interface BlockBlobUpload { + /** 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: BlockBlobUploadParameters, + ): StreamableMethod< + BlockBlobUpload201Response | BlockBlobUploadDefaultResponse + >; +} + +export interface BlockBlobPutBlobFromUrl { + /** 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: BlockBlobPutBlobFromUrlParameters, + ): StreamableMethod< + BlockBlobPutBlobFromUrl201Response | BlockBlobPutBlobFromUrlDefaultResponse + >; +} + +export interface BlockBlobStageBlock { + /** The Stage Block operation creates a new block to be committed as part of a blob */ + put( + options: BlockBlobStageBlockParameters, + ): StreamableMethod< + BlockBlobStageBlock201Response | BlockBlobStageBlockDefaultResponse + >; +} + +export interface BlockBlobStageBlockFromUrl { + /** 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: BlockBlobStageBlockFromUrlParameters, + ): StreamableMethod< + | BlockBlobStageBlockFromUrl201Response + | BlockBlobStageBlockFromUrlDefaultResponse + >; +} + +export interface BlockBlobCommitBlockList { + /** 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: BlockBlobCommitBlockListParameters, + ): StreamableMethod< + | BlockBlobCommitBlockList201Response + | BlockBlobCommitBlockListDefaultResponse + >; + /** The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. */ + get( + options: BlockBlobGetBlockListParameters, + ): StreamableMethod< + BlockBlobGetBlockList200Response | BlockBlobGetBlockListDefaultResponse + >; +} + +export interface Routes { + /** Resource for '/?restype=service&comp=properties' has methods for the following verbs: put, get */ + (path: "/?restype=service&comp=properties"): ServiceSetProperties; + /** Resource for '/?restype=service&comp=stats' has methods for the following verbs: get */ + (path: "/?restype=service&comp=stats"): ServiceGetStatistics; + /** Resource for '/?comp=list' has methods for the following verbs: get */ + (path: "/?comp=list"): ServiceListContainersSegment; + /** Resource for '/?restype=service&comp=userdelegationkey' has methods for the following verbs: post */ + ( + path: "/?restype=service&comp=userdelegationkey", + ): ServiceGetUserDelegationKey; + /** Resource for '/?restype=account&comp=properties' has methods for the following verbs: get */ + (path: "/?restype=account&comp=properties"): ServiceGetAccountInfo; + /** Resource for '/?comp=batch' has methods for the following verbs: post */ + (path: "/?comp=batch"): ServiceSubmitBatch; + /** Resource for '/?comp=blobs' has methods for the following verbs: get */ + (path: "/?comp=blobs"): ServiceFilterBlobs; + /** 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\}/\{blob\}' has methods for the following verbs: get, head, delete */ + ( + path: "/{containerName}/{blob}", + containerName: string, + blob: string, + ): BlobDownload; + /** Resource for '/\{containerName\}/\{blob\}?comp=undelete' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=undelete", + containerName: string, + blob: string, + ): BlobUndelete; + /** Resource for '/\{containerName\}/\{blob\}?comp=expiry' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=expiry", + containerName: string, + blob: string, + ): BlobSetExpiry; + /** Resource for '/\{containerName\}/\{blob\}?comp=properties&SetHTTPHeaders' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=properties&SetHTTPHeaders", + containerName: string, + blob: string, + ): BlobSetHttpHeaders; + /** Resource for '/\{containerName\}/\{blob\}?comp=immutabilityPolicies' has methods for the following verbs: put, delete */ + ( + path: "/{containerName}/{blob}?comp=immutabilityPolicies", + containerName: string, + blob: string, + ): BlobSetImmutabilityPolicy; + /** Resource for '/\{containerName\}/\{blob\}?comp=legalhold' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=legalhold", + containerName: string, + blob: string, + ): BlobSetLegalHold; + /** Resource for '/\{containerName\}/\{blob\}?comp=metadata' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=metadata", + containerName: string, + blob: string, + ): BlobSetMetadata; + /** Resource for '/\{containerName\}/\{blob\}?comp=lease&acquire' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=lease&acquire", + containerName: string, + blob: string, + ): BlobAcquireLease; + /** Resource for '/\{containerName\}/\{blob\}?comp=lease&release' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=lease&release", + containerName: string, + blob: string, + ): BlobReleaseLease; + /** Resource for '/\{containerName\}/\{blob\}?comp=lease&renew' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=lease&renew", + containerName: string, + blob: string, + ): BlobRenewLease; + /** Resource for '/\{containerName\}/\{blob\}?comp=lease&change' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=lease&change", + containerName: string, + blob: string, + ): BlobChangeLease; + /** Resource for '/\{containerName\}/\{blob\}?comp=lease&break' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=lease&break", + containerName: string, + blob: string, + ): BlobBreakLease; + /** Resource for '/\{containerName\}/\{blob\}?comp=snapshot' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=snapshot", + containerName: string, + blob: string, + ): BlobCreateSnapshot; + /** Resource for '/\{containerName\}/\{blob\}?comp=copy' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=copy", + containerName: string, + blob: string, + ): BlobStartCopyFromUrl; + /** Resource for '/\{containerName\}/\{blob\}?comp=copy&sync' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=copy&sync", + containerName: string, + blob: string, + ): BlobCopyFromUrl; + /** Resource for '/\{containerName\}/\{blob\}?comp=copy©id' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=copy©id", + containerName: string, + blob: string, + ): BlobAbortCopyFromUrl; + /** Resource for '/\{containerName\}/\{blob\}?comp=tier' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=tier", + containerName: string, + blob: string, + ): BlobSetTier; + /** Resource for '/\{containerName\}/\{blob\}?restype=account&comp=properties&blob' has methods for the following verbs: get */ + ( + path: "/{containerName}/{blob}?restype=account&comp=properties&blob", + containerName: string, + blob: string, + ): BlobGetAccountInfo; + /** Resource for '/\{containerName\}/\{blob\}?comp=query' has methods for the following verbs: post */ + ( + path: "/{containerName}/{blob}?comp=query", + containerName: string, + blob: string, + ): BlobQuery; + /** Resource for '/\{containerName\}/\{blob\}?comp=tags' has methods for the following verbs: get, put */ + ( + path: "/{containerName}/{blob}?comp=tags", + containerName: string, + blob: string, + ): BlobGetTags; + /** Resource for '/\{containerName\}/\{blob\}?PageBlob' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?PageBlob", + containerName: string, + blob: string, + ): PageBlobCreate; + /** Resource for '/\{containerName\}/\{blob\}?comp=page&update' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=page&update", + containerName: string, + blob: string, + ): PageBlobUploadPages; + /** Resource for '/\{containerName\}/\{blob\}?comp=page&clear' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=page&clear", + containerName: string, + blob: string, + ): PageBlobClearPages; + /** Resource for '/\{containerName\}/\{blob\}?comp=page&update&fromUrl' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=page&update&fromUrl", + containerName: string, + blob: string, + ): PageBlobUploadPagesFromUrl; + /** Resource for '/\{containerName\}/\{blob\}?comp=pagelist' has methods for the following verbs: get */ + ( + path: "/{containerName}/{blob}?comp=pagelist", + containerName: string, + blob: string, + ): PageBlobGetPageRanges; + /** Resource for '/\{containerName\}/\{blob\}?comp=pagelist&diff' has methods for the following verbs: get */ + ( + path: "/{containerName}/{blob}?comp=pagelist&diff", + containerName: string, + blob: string, + ): PageBlobGetPageRangesDiff; + /** Resource for '/\{containerName\}/\{blob\}?comp=properties&Resize' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=properties&Resize", + containerName: string, + blob: string, + ): PageBlobResize; + /** Resource for '/\{containerName\}/\{blob\}?comp=properties&UpdateSequenceNumber' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=properties&UpdateSequenceNumber", + containerName: string, + blob: string, + ): PageBlobUpdateSequenceNumber; + /** Resource for '/\{containerName\}/\{blob\}?comp=incrementalcopy' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=incrementalcopy", + containerName: string, + blob: string, + ): PageBlobCopyIncremental; + /** Resource for '/\{containerName\}/\{blob\}?AppendBlob' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?AppendBlob", + containerName: string, + blob: string, + ): AppendBlobCreate; + /** Resource for '/\{containerName\}/\{blob\}?comp=appendblock' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=appendblock", + containerName: string, + blob: string, + ): AppendBlobAppendBlock; + /** Resource for '/\{containerName\}/\{blob\}?comp=appendblock&fromUrl' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=appendblock&fromUrl", + containerName: string, + blob: string, + ): AppendBlobAppendBlockFromUrl; + /** Resource for '/\{containerName\}/\{blob\}?comp=seal' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=seal", + containerName: string, + blob: string, + ): AppendBlobSeal; + /** Resource for '/\{containerName\}/\{blob\}?BlockBlob' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?BlockBlob", + containerName: string, + blob: string, + ): BlockBlobUpload; + /** Resource for '/\{containerName\}/\{blob\}?BlockBlob&fromUrl' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?BlockBlob&fromUrl", + containerName: string, + blob: string, + ): BlockBlobPutBlobFromUrl; + /** Resource for '/\{containerName\}/\{blob\}?comp=block' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=block", + containerName: string, + blob: string, + ): BlockBlobStageBlock; + /** Resource for '/\{containerName\}/\{blob\}?comp=block&fromURL' has methods for the following verbs: put */ + ( + path: "/{containerName}/{blob}?comp=block&fromURL", + containerName: string, + blob: string, + ): BlockBlobStageBlockFromUrl; + /** Resource for '/\{containerName\}/\{blob\}?comp=blocklist' has methods for the following verbs: put, get */ + ( + path: "/{containerName}/{blob}?comp=blocklist", + containerName: string, + blob: string, + ): BlockBlobCommitBlockList; +} + +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..ed4f52cb5be7 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/isUnexpected.ts @@ -0,0 +1,796 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { + ServiceSetProperties202Response, + ServiceSetPropertiesDefaultResponse, + ServiceGetProperties200Response, + ServiceGetPropertiesDefaultResponse, + ServiceGetStatistics200Response, + ServiceGetStatisticsDefaultResponse, + ServiceListContainersSegment200Response, + ServiceListContainersSegmentDefaultResponse, + ServiceGetUserDelegationKey200Response, + ServiceGetUserDelegationKeyDefaultResponse, + ServiceGetAccountInfo200Response, + ServiceGetAccountInfoDefaultResponse, + ServiceSubmitBatch200Response, + ServiceSubmitBatchDefaultResponse, + ServiceFilterBlobs200Response, + ServiceFilterBlobsDefaultResponse, + 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, + BlobDownload200Response, + BlobDownload206Response, + BlobDownloadDefaultResponse, + BlobGetProperties200Response, + BlobGetPropertiesDefaultResponse, + BlobDelete202Response, + BlobDeleteDefaultResponse, + BlobUndelete200Response, + BlobUndeleteDefaultResponse, + BlobSetExpiry200Response, + BlobSetExpiryDefaultResponse, + BlobSetHttpHeaders200Response, + BlobSetHttpHeadersDefaultResponse, + BlobSetImmutabilityPolicy200Response, + BlobSetImmutabilityPolicyDefaultResponse, + BlobDeleteImmutabilityPolicy200Response, + BlobDeleteImmutabilityPolicyDefaultResponse, + BlobSetLegalHold200Response, + BlobSetLegalHoldDefaultResponse, + BlobSetMetadata200Response, + BlobSetMetadataDefaultResponse, + BlobAcquireLease201Response, + BlobAcquireLeaseDefaultResponse, + BlobReleaseLease200Response, + BlobReleaseLeaseDefaultResponse, + BlobRenewLease200Response, + BlobRenewLeaseDefaultResponse, + BlobChangeLease200Response, + BlobChangeLeaseDefaultResponse, + BlobBreakLease202Response, + BlobBreakLeaseDefaultResponse, + BlobCreateSnapshot201Response, + BlobCreateSnapshotDefaultResponse, + BlobStartCopyFromUrl202Response, + BlobStartCopyFromUrlDefaultResponse, + BlobCopyFromUrl202Response, + BlobCopyFromUrlDefaultResponse, + BlobAbortCopyFromUrl204Response, + BlobAbortCopyFromUrlDefaultResponse, + BlobSetTier200Response, + BlobSetTier202Response, + BlobSetTierDefaultResponse, + BlobGetAccountInfo200Response, + BlobGetAccountInfoDefaultResponse, + BlobQuery200Response, + BlobQuery206Response, + BlobQueryDefaultResponse, + BlobGetTags200Response, + BlobGetTagsDefaultResponse, + BlobSetTags204Response, + BlobSetTagsDefaultResponse, + PageBlobCreate201Response, + PageBlobCreateDefaultResponse, + PageBlobUploadPages201Response, + PageBlobUploadPagesDefaultResponse, + PageBlobClearPages201Response, + PageBlobClearPagesDefaultResponse, + PageBlobUploadPagesFromUrl201Response, + PageBlobUploadPagesFromUrlDefaultResponse, + PageBlobGetPageRanges200Response, + PageBlobGetPageRangesDefaultResponse, + PageBlobGetPageRangesDiff200Response, + PageBlobGetPageRangesDiffDefaultResponse, + PageBlobResize200Response, + PageBlobResizeDefaultResponse, + PageBlobUpdateSequenceNumber200Response, + PageBlobUpdateSequenceNumberDefaultResponse, + PageBlobCopyIncremental202Response, + PageBlobCopyIncrementalDefaultResponse, + AppendBlobCreate201Response, + AppendBlobCreateDefaultResponse, + AppendBlobAppendBlock201Response, + AppendBlobAppendBlockDefaultResponse, + AppendBlobAppendBlockFromUrl201Response, + AppendBlobAppendBlockFromUrlDefaultResponse, + AppendBlobSeal200Response, + AppendBlobSealDefaultResponse, + BlockBlobUpload201Response, + BlockBlobUploadDefaultResponse, + BlockBlobPutBlobFromUrl201Response, + BlockBlobPutBlobFromUrlDefaultResponse, + BlockBlobStageBlock201Response, + BlockBlobStageBlockDefaultResponse, + BlockBlobStageBlockFromUrl201Response, + BlockBlobStageBlockFromUrlDefaultResponse, + BlockBlobCommitBlockList201Response, + BlockBlobCommitBlockListDefaultResponse, + BlockBlobGetBlockList200Response, + BlockBlobGetBlockListDefaultResponse, +} 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}/{blob}": ["200", "206"], + "HEAD /{containerName}/{blob}": ["200"], + "DELETE /{containerName}/{blob}": ["202"], + "PUT /{containerName}/{blob}?comp=undelete": ["200"], + "PUT /{containerName}/{blob}?comp=expiry": ["200"], + "PUT /{containerName}/{blob}?comp=properties&SetHTTPHeaders": ["200"], + "PUT /{containerName}/{blob}?comp=immutabilityPolicies": ["200"], + "DELETE /{containerName}/{blob}?comp=immutabilityPolicies": ["200"], + "PUT /{containerName}/{blob}?comp=legalhold": ["200"], + "PUT /{containerName}/{blob}?comp=metadata": ["200"], + "PUT /{containerName}/{blob}?comp=lease&acquire": ["201"], + "PUT /{containerName}/{blob}?comp=lease&release": ["200"], + "PUT /{containerName}/{blob}?comp=lease&renew": ["200"], + "PUT /{containerName}/{blob}?comp=lease&change": ["200"], + "PUT /{containerName}/{blob}?comp=lease&break": ["202"], + "PUT /{containerName}/{blob}?comp=snapshot": ["201"], + "PUT /{containerName}/{blob}?comp=copy": ["202"], + "PUT /{containerName}/{blob}?comp=copy&sync": ["202"], + "PUT /{containerName}/{blob}?comp=copy©id": ["204"], + "PUT /{containerName}/{blob}?comp=tier": ["200", "202"], + "GET /{containerName}/{blob}?restype=account&comp=properties&blob": ["200"], + "POST /{containerName}/{blob}?comp=query": ["200", "206"], + "GET /{containerName}/{blob}?comp=tags": ["200"], + "PUT /{containerName}/{blob}?comp=tags": ["204"], + "PUT /{containerName}/{blob}?PageBlob": ["201"], + "PUT /{containerName}/{blob}?comp=page&update": ["201"], + "PUT /{containerName}/{blob}?comp=page&clear": ["201"], + "PUT /{containerName}/{blob}?comp=page&update&fromUrl": ["201"], + "GET /{containerName}/{blob}?comp=pagelist": ["200"], + "GET /{containerName}/{blob}?comp=pagelist&diff": ["200"], + "PUT /{containerName}/{blob}?comp=properties&Resize": ["200"], + "PUT /{containerName}/{blob}?comp=properties&UpdateSequenceNumber": ["200"], + "PUT /{containerName}/{blob}?comp=incrementalcopy": ["202"], + "PUT /{containerName}/{blob}?AppendBlob": ["201"], + "PUT /{containerName}/{blob}?comp=appendblock": ["201"], + "PUT /{containerName}/{blob}?comp=appendblock&fromUrl": ["201"], + "PUT /{containerName}/{blob}?comp=seal": ["200"], + "PUT /{containerName}/{blob}?BlockBlob": ["201"], + "PUT /{containerName}/{blob}?BlockBlob&fromUrl": ["201"], + "PUT /{containerName}/{blob}?comp=block": ["201"], + "PUT /{containerName}/{blob}?comp=block&fromURL": ["201"], + "PUT /{containerName}/{blob}?comp=blocklist": ["201"], + "GET /{containerName}/{blob}?comp=blocklist": ["200"], +}; + +export function isUnexpected( + response: + | ServiceSetProperties202Response + | ServiceSetPropertiesDefaultResponse, +): response is ServiceSetPropertiesDefaultResponse; +export function isUnexpected( + response: + | ServiceGetProperties200Response + | ServiceGetPropertiesDefaultResponse, +): response is ServiceGetPropertiesDefaultResponse; +export function isUnexpected( + response: + | ServiceGetStatistics200Response + | ServiceGetStatisticsDefaultResponse, +): response is ServiceGetStatisticsDefaultResponse; +export function isUnexpected( + response: + | ServiceListContainersSegment200Response + | ServiceListContainersSegmentDefaultResponse, +): response is ServiceListContainersSegmentDefaultResponse; +export function isUnexpected( + response: + | ServiceGetUserDelegationKey200Response + | ServiceGetUserDelegationKeyDefaultResponse, +): response is ServiceGetUserDelegationKeyDefaultResponse; +export function isUnexpected( + response: + | ServiceGetAccountInfo200Response + | ServiceGetAccountInfoDefaultResponse, +): response is ServiceGetAccountInfoDefaultResponse; +export function isUnexpected( + response: ServiceSubmitBatch200Response | ServiceSubmitBatchDefaultResponse, +): response is ServiceSubmitBatchDefaultResponse; +export function isUnexpected( + response: ServiceFilterBlobs200Response | ServiceFilterBlobsDefaultResponse, +): response is ServiceFilterBlobsDefaultResponse; +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: + | BlobDownload200Response + | BlobDownload206Response + | BlobDownloadDefaultResponse, +): response is BlobDownloadDefaultResponse; +export function isUnexpected( + response: BlobGetProperties200Response | BlobGetPropertiesDefaultResponse, +): response is BlobGetPropertiesDefaultResponse; +export function isUnexpected( + response: BlobDelete202Response | BlobDeleteDefaultResponse, +): response is BlobDeleteDefaultResponse; +export function isUnexpected( + response: BlobUndelete200Response | BlobUndeleteDefaultResponse, +): response is BlobUndeleteDefaultResponse; +export function isUnexpected( + response: BlobSetExpiry200Response | BlobSetExpiryDefaultResponse, +): response is BlobSetExpiryDefaultResponse; +export function isUnexpected( + response: BlobSetHttpHeaders200Response | BlobSetHttpHeadersDefaultResponse, +): response is BlobSetHttpHeadersDefaultResponse; +export function isUnexpected( + response: + | BlobSetImmutabilityPolicy200Response + | BlobSetImmutabilityPolicyDefaultResponse, +): response is BlobSetImmutabilityPolicyDefaultResponse; +export function isUnexpected( + response: + | BlobDeleteImmutabilityPolicy200Response + | BlobDeleteImmutabilityPolicyDefaultResponse, +): response is BlobDeleteImmutabilityPolicyDefaultResponse; +export function isUnexpected( + response: BlobSetLegalHold200Response | BlobSetLegalHoldDefaultResponse, +): response is BlobSetLegalHoldDefaultResponse; +export function isUnexpected( + response: BlobSetMetadata200Response | BlobSetMetadataDefaultResponse, +): response is BlobSetMetadataDefaultResponse; +export function isUnexpected( + response: BlobAcquireLease201Response | BlobAcquireLeaseDefaultResponse, +): response is BlobAcquireLeaseDefaultResponse; +export function isUnexpected( + response: BlobReleaseLease200Response | BlobReleaseLeaseDefaultResponse, +): response is BlobReleaseLeaseDefaultResponse; +export function isUnexpected( + response: BlobRenewLease200Response | BlobRenewLeaseDefaultResponse, +): response is BlobRenewLeaseDefaultResponse; +export function isUnexpected( + response: BlobChangeLease200Response | BlobChangeLeaseDefaultResponse, +): response is BlobChangeLeaseDefaultResponse; +export function isUnexpected( + response: BlobBreakLease202Response | BlobBreakLeaseDefaultResponse, +): response is BlobBreakLeaseDefaultResponse; +export function isUnexpected( + response: BlobCreateSnapshot201Response | BlobCreateSnapshotDefaultResponse, +): response is BlobCreateSnapshotDefaultResponse; +export function isUnexpected( + response: + | BlobStartCopyFromUrl202Response + | BlobStartCopyFromUrlDefaultResponse, +): response is BlobStartCopyFromUrlDefaultResponse; +export function isUnexpected( + response: BlobCopyFromUrl202Response | BlobCopyFromUrlDefaultResponse, +): response is BlobCopyFromUrlDefaultResponse; +export function isUnexpected( + response: + | BlobAbortCopyFromUrl204Response + | BlobAbortCopyFromUrlDefaultResponse, +): response is BlobAbortCopyFromUrlDefaultResponse; +export function isUnexpected( + response: + | BlobSetTier200Response + | BlobSetTier202Response + | BlobSetTierDefaultResponse, +): response is BlobSetTierDefaultResponse; +export function isUnexpected( + response: BlobGetAccountInfo200Response | BlobGetAccountInfoDefaultResponse, +): response is BlobGetAccountInfoDefaultResponse; +export function isUnexpected( + response: + | BlobQuery200Response + | BlobQuery206Response + | BlobQueryDefaultResponse, +): response is BlobQueryDefaultResponse; +export function isUnexpected( + response: BlobGetTags200Response | BlobGetTagsDefaultResponse, +): response is BlobGetTagsDefaultResponse; +export function isUnexpected( + response: BlobSetTags204Response | BlobSetTagsDefaultResponse, +): response is BlobSetTagsDefaultResponse; +export function isUnexpected( + response: PageBlobCreate201Response | PageBlobCreateDefaultResponse, +): response is PageBlobCreateDefaultResponse; +export function isUnexpected( + response: PageBlobUploadPages201Response | PageBlobUploadPagesDefaultResponse, +): response is PageBlobUploadPagesDefaultResponse; +export function isUnexpected( + response: PageBlobClearPages201Response | PageBlobClearPagesDefaultResponse, +): response is PageBlobClearPagesDefaultResponse; +export function isUnexpected( + response: + | PageBlobUploadPagesFromUrl201Response + | PageBlobUploadPagesFromUrlDefaultResponse, +): response is PageBlobUploadPagesFromUrlDefaultResponse; +export function isUnexpected( + response: + | PageBlobGetPageRanges200Response + | PageBlobGetPageRangesDefaultResponse, +): response is PageBlobGetPageRangesDefaultResponse; +export function isUnexpected( + response: + | PageBlobGetPageRangesDiff200Response + | PageBlobGetPageRangesDiffDefaultResponse, +): response is PageBlobGetPageRangesDiffDefaultResponse; +export function isUnexpected( + response: PageBlobResize200Response | PageBlobResizeDefaultResponse, +): response is PageBlobResizeDefaultResponse; +export function isUnexpected( + response: + | PageBlobUpdateSequenceNumber200Response + | PageBlobUpdateSequenceNumberDefaultResponse, +): response is PageBlobUpdateSequenceNumberDefaultResponse; +export function isUnexpected( + response: + | PageBlobCopyIncremental202Response + | PageBlobCopyIncrementalDefaultResponse, +): response is PageBlobCopyIncrementalDefaultResponse; +export function isUnexpected( + response: AppendBlobCreate201Response | AppendBlobCreateDefaultResponse, +): response is AppendBlobCreateDefaultResponse; +export function isUnexpected( + response: + | AppendBlobAppendBlock201Response + | AppendBlobAppendBlockDefaultResponse, +): response is AppendBlobAppendBlockDefaultResponse; +export function isUnexpected( + response: + | AppendBlobAppendBlockFromUrl201Response + | AppendBlobAppendBlockFromUrlDefaultResponse, +): response is AppendBlobAppendBlockFromUrlDefaultResponse; +export function isUnexpected( + response: AppendBlobSeal200Response | AppendBlobSealDefaultResponse, +): response is AppendBlobSealDefaultResponse; +export function isUnexpected( + response: BlockBlobUpload201Response | BlockBlobUploadDefaultResponse, +): response is BlockBlobUploadDefaultResponse; +export function isUnexpected( + response: + | BlockBlobPutBlobFromUrl201Response + | BlockBlobPutBlobFromUrlDefaultResponse, +): response is BlockBlobPutBlobFromUrlDefaultResponse; +export function isUnexpected( + response: BlockBlobStageBlock201Response | BlockBlobStageBlockDefaultResponse, +): response is BlockBlobStageBlockDefaultResponse; +export function isUnexpected( + response: + | BlockBlobStageBlockFromUrl201Response + | BlockBlobStageBlockFromUrlDefaultResponse, +): response is BlockBlobStageBlockFromUrlDefaultResponse; +export function isUnexpected( + response: + | BlockBlobCommitBlockList201Response + | BlockBlobCommitBlockListDefaultResponse, +): response is BlockBlobCommitBlockListDefaultResponse; +export function isUnexpected( + response: + | BlockBlobGetBlockList200Response + | BlockBlobGetBlockListDefaultResponse, +): response is BlockBlobGetBlockListDefaultResponse; +export function isUnexpected( + response: + | ServiceSetProperties202Response + | ServiceSetPropertiesDefaultResponse + | ServiceGetProperties200Response + | ServiceGetPropertiesDefaultResponse + | ServiceGetStatistics200Response + | ServiceGetStatisticsDefaultResponse + | ServiceListContainersSegment200Response + | ServiceListContainersSegmentDefaultResponse + | ServiceGetUserDelegationKey200Response + | ServiceGetUserDelegationKeyDefaultResponse + | ServiceGetAccountInfo200Response + | ServiceGetAccountInfoDefaultResponse + | ServiceSubmitBatch200Response + | ServiceSubmitBatchDefaultResponse + | ServiceFilterBlobs200Response + | ServiceFilterBlobsDefaultResponse + | 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 + | BlobDownload200Response + | BlobDownload206Response + | BlobDownloadDefaultResponse + | BlobGetProperties200Response + | BlobGetPropertiesDefaultResponse + | BlobDelete202Response + | BlobDeleteDefaultResponse + | BlobUndelete200Response + | BlobUndeleteDefaultResponse + | BlobSetExpiry200Response + | BlobSetExpiryDefaultResponse + | BlobSetHttpHeaders200Response + | BlobSetHttpHeadersDefaultResponse + | BlobSetImmutabilityPolicy200Response + | BlobSetImmutabilityPolicyDefaultResponse + | BlobDeleteImmutabilityPolicy200Response + | BlobDeleteImmutabilityPolicyDefaultResponse + | BlobSetLegalHold200Response + | BlobSetLegalHoldDefaultResponse + | BlobSetMetadata200Response + | BlobSetMetadataDefaultResponse + | BlobAcquireLease201Response + | BlobAcquireLeaseDefaultResponse + | BlobReleaseLease200Response + | BlobReleaseLeaseDefaultResponse + | BlobRenewLease200Response + | BlobRenewLeaseDefaultResponse + | BlobChangeLease200Response + | BlobChangeLeaseDefaultResponse + | BlobBreakLease202Response + | BlobBreakLeaseDefaultResponse + | BlobCreateSnapshot201Response + | BlobCreateSnapshotDefaultResponse + | BlobStartCopyFromUrl202Response + | BlobStartCopyFromUrlDefaultResponse + | BlobCopyFromUrl202Response + | BlobCopyFromUrlDefaultResponse + | BlobAbortCopyFromUrl204Response + | BlobAbortCopyFromUrlDefaultResponse + | BlobSetTier200Response + | BlobSetTier202Response + | BlobSetTierDefaultResponse + | BlobGetAccountInfo200Response + | BlobGetAccountInfoDefaultResponse + | BlobQuery200Response + | BlobQuery206Response + | BlobQueryDefaultResponse + | BlobGetTags200Response + | BlobGetTagsDefaultResponse + | BlobSetTags204Response + | BlobSetTagsDefaultResponse + | PageBlobCreate201Response + | PageBlobCreateDefaultResponse + | PageBlobUploadPages201Response + | PageBlobUploadPagesDefaultResponse + | PageBlobClearPages201Response + | PageBlobClearPagesDefaultResponse + | PageBlobUploadPagesFromUrl201Response + | PageBlobUploadPagesFromUrlDefaultResponse + | PageBlobGetPageRanges200Response + | PageBlobGetPageRangesDefaultResponse + | PageBlobGetPageRangesDiff200Response + | PageBlobGetPageRangesDiffDefaultResponse + | PageBlobResize200Response + | PageBlobResizeDefaultResponse + | PageBlobUpdateSequenceNumber200Response + | PageBlobUpdateSequenceNumberDefaultResponse + | PageBlobCopyIncremental202Response + | PageBlobCopyIncrementalDefaultResponse + | AppendBlobCreate201Response + | AppendBlobCreateDefaultResponse + | AppendBlobAppendBlock201Response + | AppendBlobAppendBlockDefaultResponse + | AppendBlobAppendBlockFromUrl201Response + | AppendBlobAppendBlockFromUrlDefaultResponse + | AppendBlobSeal200Response + | AppendBlobSealDefaultResponse + | BlockBlobUpload201Response + | BlockBlobUploadDefaultResponse + | BlockBlobPutBlobFromUrl201Response + | BlockBlobPutBlobFromUrlDefaultResponse + | BlockBlobStageBlock201Response + | BlockBlobStageBlockDefaultResponse + | BlockBlobStageBlockFromUrl201Response + | BlockBlobStageBlockFromUrlDefaultResponse + | BlockBlobCommitBlockList201Response + | BlockBlobCommitBlockListDefaultResponse + | BlockBlobGetBlockList200Response + | BlockBlobGetBlockListDefaultResponse, +): response is + | ServiceSetPropertiesDefaultResponse + | ServiceGetPropertiesDefaultResponse + | ServiceGetStatisticsDefaultResponse + | ServiceListContainersSegmentDefaultResponse + | ServiceGetUserDelegationKeyDefaultResponse + | ServiceGetAccountInfoDefaultResponse + | ServiceSubmitBatchDefaultResponse + | ServiceFilterBlobsDefaultResponse + | ContainerCreateDefaultResponse + | ContainerGetPropertiesDefaultResponse + | ContainerDeleteDefaultResponse + | ContainerSetMetadataDefaultResponse + | ContainerGetAccessPolicyDefaultResponse + | ContainerSetAccessPolicyDefaultResponse + | ContainerRestoreDefaultResponse + | ContainerRenameDefaultResponse + | ContainerSubmitBatchDefaultResponse + | ContainerFilterBlobsDefaultResponse + | ContainerAcquireLeaseDefaultResponse + | ContainerReleaseLeaseDefaultResponse + | ContainerRenewLeaseDefaultResponse + | ContainerBreakLeaseDefaultResponse + | ContainerChangeLeaseDefaultResponse + | ContainerListBlobFlatSegmentDefaultResponse + | ContainerListBlobHierarchySegmentDefaultResponse + | ContainerGetAccountInfoDefaultResponse + | BlobDownloadDefaultResponse + | BlobGetPropertiesDefaultResponse + | BlobDeleteDefaultResponse + | BlobUndeleteDefaultResponse + | BlobSetExpiryDefaultResponse + | BlobSetHttpHeadersDefaultResponse + | BlobSetImmutabilityPolicyDefaultResponse + | BlobDeleteImmutabilityPolicyDefaultResponse + | BlobSetLegalHoldDefaultResponse + | BlobSetMetadataDefaultResponse + | BlobAcquireLeaseDefaultResponse + | BlobReleaseLeaseDefaultResponse + | BlobRenewLeaseDefaultResponse + | BlobChangeLeaseDefaultResponse + | BlobBreakLeaseDefaultResponse + | BlobCreateSnapshotDefaultResponse + | BlobStartCopyFromUrlDefaultResponse + | BlobCopyFromUrlDefaultResponse + | BlobAbortCopyFromUrlDefaultResponse + | BlobSetTierDefaultResponse + | BlobGetAccountInfoDefaultResponse + | BlobQueryDefaultResponse + | BlobGetTagsDefaultResponse + | BlobSetTagsDefaultResponse + | PageBlobCreateDefaultResponse + | PageBlobUploadPagesDefaultResponse + | PageBlobClearPagesDefaultResponse + | PageBlobUploadPagesFromUrlDefaultResponse + | PageBlobGetPageRangesDefaultResponse + | PageBlobGetPageRangesDiffDefaultResponse + | PageBlobResizeDefaultResponse + | PageBlobUpdateSequenceNumberDefaultResponse + | PageBlobCopyIncrementalDefaultResponse + | AppendBlobCreateDefaultResponse + | AppendBlobAppendBlockDefaultResponse + | AppendBlobAppendBlockFromUrlDefaultResponse + | AppendBlobSealDefaultResponse + | BlockBlobUploadDefaultResponse + | BlockBlobPutBlobFromUrlDefaultResponse + | BlockBlobStageBlockDefaultResponse + | BlockBlobStageBlockFromUrlDefaultResponse + | BlockBlobCommitBlockListDefaultResponse + | BlockBlobGetBlockListDefaultResponse { + 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..16dcd516d125 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/models.ts @@ -0,0 +1,246 @@ +// 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; +} + +/** 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 {} + +/** The Block lookup list. */ +export interface BlockLookupList { + /** The committed blocks */ + committed?: string[]; + /** The uncommitted blocks */ + uncommitted?: string[]; + /** The latest blocks */ + latest?: string[]; +} + +/** Alias for ListContainersIncludeType */ +export type ListContainersIncludeType = 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 QueryRequestType */ +export type QueryRequestType = string; +/** Alias for QueryType */ +export type QueryType = string; +/** Alias for PremiumPageBlobAccessTier */ +export type PremiumPageBlobAccessTier = string; +/** Alias for SequenceNumberActionType */ +export type SequenceNumberActionType = string; +/** Alias for BlockListType */ +export type BlockListType = 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..6ff5a19976af --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/outputModels.ts @@ -0,0 +1,541 @@ +// 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; +} + +/** The Block lookup list. */ +export interface BlockLookupListOutput { + /** The committed blocks */ + committed?: string[]; + /** The uncommitted blocks */ + uncommitted?: string[]; + /** The latest blocks */ + latest?: string[]; +} + +/** 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..be5a6a0d60ab --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/parameters.ts @@ -0,0 +1,3545 @@ +// 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, + ListBlobsIncludeItem, + EncryptionAlgorithmType, + BlobDeleteType, + DeleteSnapshotsOptionType, + BlobExpiryOptions, + BlobImmutabilityPolicyMode, + AccessTier, + RehydratePriority, + QueryRequest, + BlobTags, + PremiumPageBlobAccessTier, + SequenceNumberActionType, + BlockLookupList, + BlockListType, +} from "./models.js"; + +export interface ServiceSetPropertiesHeaders { + /** 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 ServiceSetPropertiesBodyParam { + body: StorageServiceProperties; +} + +export interface ServiceSetPropertiesQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ServiceSetPropertiesQueryParam { + queryParameters?: ServiceSetPropertiesQueryParamProperties; +} + +export interface ServiceSetPropertiesHeaderParam { + headers: RawHttpHeadersInput & ServiceSetPropertiesHeaders; +} + +export interface ServiceSetPropertiesMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ServiceSetPropertiesParameters = ServiceSetPropertiesQueryParam & + ServiceSetPropertiesHeaderParam & + ServiceSetPropertiesMediaTypesParam & + ServiceSetPropertiesBodyParam & + RequestParameters; + +export interface ServiceGetPropertiesHeaders { + /** 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 ServiceGetPropertiesQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ServiceGetPropertiesQueryParam { + queryParameters?: ServiceGetPropertiesQueryParamProperties; +} + +export interface ServiceGetPropertiesHeaderParam { + headers: RawHttpHeadersInput & ServiceGetPropertiesHeaders; +} + +export interface ServiceGetPropertiesMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ServiceGetPropertiesParameters = ServiceGetPropertiesQueryParam & + ServiceGetPropertiesHeaderParam & + ServiceGetPropertiesMediaTypesParam & + RequestParameters; + +export interface ServiceGetStatisticsHeaders { + /** 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 ServiceGetStatisticsQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ServiceGetStatisticsQueryParam { + queryParameters?: ServiceGetStatisticsQueryParamProperties; +} + +export interface ServiceGetStatisticsHeaderParam { + headers: RawHttpHeadersInput & ServiceGetStatisticsHeaders; +} + +export interface ServiceGetStatisticsMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ServiceGetStatisticsParameters = ServiceGetStatisticsQueryParam & + ServiceGetStatisticsHeaderParam & + ServiceGetStatisticsMediaTypesParam & + RequestParameters; + +export interface ServiceListContainersSegmentHeaders { + /** 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 ServiceListContainersSegmentIncludeQueryParam { + /** Value of the parameter */ + value: ListContainersIncludeType[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +export interface ServiceListContainersSegmentQueryParamProperties { + /** 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[] + | ServiceListContainersSegmentIncludeQueryParam; +} + +export interface ServiceListContainersSegmentQueryParam { + queryParameters?: ServiceListContainersSegmentQueryParamProperties; +} + +export interface ServiceListContainersSegmentHeaderParam { + headers: RawHttpHeadersInput & ServiceListContainersSegmentHeaders; +} + +export interface ServiceListContainersSegmentMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ServiceListContainersSegmentParameters = + ServiceListContainersSegmentQueryParam & + ServiceListContainersSegmentHeaderParam & + ServiceListContainersSegmentMediaTypesParam & + RequestParameters; + +export interface ServiceGetUserDelegationKeyHeaders { + /** 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 ServiceGetUserDelegationKeyBodyParam { + body: KeyInfo; +} + +export interface ServiceGetUserDelegationKeyQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ServiceGetUserDelegationKeyQueryParam { + queryParameters?: ServiceGetUserDelegationKeyQueryParamProperties; +} + +export interface ServiceGetUserDelegationKeyHeaderParam { + headers: RawHttpHeadersInput & ServiceGetUserDelegationKeyHeaders; +} + +export interface ServiceGetUserDelegationKeyMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ServiceGetUserDelegationKeyParameters = + ServiceGetUserDelegationKeyQueryParam & + ServiceGetUserDelegationKeyHeaderParam & + ServiceGetUserDelegationKeyMediaTypesParam & + ServiceGetUserDelegationKeyBodyParam & + RequestParameters; + +export interface ServiceGetAccountInfoHeaders { + /** 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 ServiceGetAccountInfoQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ServiceGetAccountInfoQueryParam { + queryParameters?: ServiceGetAccountInfoQueryParamProperties; +} + +export interface ServiceGetAccountInfoHeaderParam { + headers: RawHttpHeadersInput & ServiceGetAccountInfoHeaders; +} + +export interface ServiceGetAccountInfoMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ServiceGetAccountInfoParameters = ServiceGetAccountInfoQueryParam & + ServiceGetAccountInfoHeaderParam & + ServiceGetAccountInfoMediaTypesParam & + RequestParameters; + +export interface ServiceSubmitBatchHeaders { + /** 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 ServiceSubmitBatchBodyParam { + /** The body of the request. */ + body: string; +} + +export interface ServiceSubmitBatchQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface ServiceSubmitBatchQueryParam { + queryParameters?: ServiceSubmitBatchQueryParamProperties; +} + +export interface ServiceSubmitBatchHeaderParam { + headers: RawHttpHeadersInput & ServiceSubmitBatchHeaders; +} + +export interface ServiceSubmitBatchMediaTypesParam { + /** 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 ServiceSubmitBatchParameters = ServiceSubmitBatchQueryParam & + ServiceSubmitBatchHeaderParam & + ServiceSubmitBatchMediaTypesParam & + ServiceSubmitBatchBodyParam & + RequestParameters; + +export interface ServiceFilterBlobsHeaders { + /** 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 ServiceFilterBlobsIncludeQueryParam { + /** Value of the parameter */ + value: FilterBlobsIncludeItem[]; + /** Should we explode the value? */ + explode: false; + /** Style of the value */ + style: "form"; +} + +export interface ServiceFilterBlobsQueryParamProperties { + /** 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[] | ServiceFilterBlobsIncludeQueryParam; +} + +export interface ServiceFilterBlobsQueryParam { + queryParameters?: ServiceFilterBlobsQueryParamProperties; +} + +export interface ServiceFilterBlobsHeaderParam { + headers: RawHttpHeadersInput & ServiceFilterBlobsHeaders; +} + +export interface ServiceFilterBlobsMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type ServiceFilterBlobsParameters = ServiceFilterBlobsQueryParam & + ServiceFilterBlobsHeaderParam & + ServiceFilterBlobsMediaTypesParam & + 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: 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. */ + "x-ms-lease-duration"?: number; + /** 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 BlobDownloadHeaders { + /** 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; + /** Specifies the response content should be returned as a structured message and specifies the message schema version and properties. */ + "x-ms-structured-body"?: 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; + /** 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; +} + +export interface BlobDownloadQueryParamProperties { + /** 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 BlobDownloadQueryParam { + queryParameters?: BlobDownloadQueryParamProperties; +} + +export interface BlobDownloadHeaderParam { + headers: RawHttpHeadersInput & BlobDownloadHeaders; +} + +export type BlobDownloadParameters = BlobDownloadQueryParam & + BlobDownloadHeaderParam & + RequestParameters; + +export interface BlobGetPropertiesHeaders { + /** 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 BlobGetPropertiesQueryParamProperties { + /** 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 BlobGetPropertiesQueryParam { + queryParameters?: BlobGetPropertiesQueryParamProperties; +} + +export interface BlobGetPropertiesHeaderParam { + headers: RawHttpHeadersInput & BlobGetPropertiesHeaders; +} + +export interface BlobGetPropertiesMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type BlobGetPropertiesParameters = BlobGetPropertiesQueryParam & + BlobGetPropertiesHeaderParam & + BlobGetPropertiesMediaTypesParam & + RequestParameters; + +export interface BlobDeleteHeaders { + /** 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 BlobDeleteQueryParamProperties { + /** 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 BlobDeleteQueryParam { + queryParameters?: BlobDeleteQueryParamProperties; +} + +export interface BlobDeleteHeaderParam { + headers: RawHttpHeadersInput & BlobDeleteHeaders; +} + +export interface BlobDeleteMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobDeleteParameters = BlobDeleteQueryParam & + BlobDeleteHeaderParam & + BlobDeleteMediaTypesParam & + RequestParameters; + +export interface BlobUndeleteHeaders { + /** 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 BlobUndeleteQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobUndeleteQueryParam { + queryParameters?: BlobUndeleteQueryParamProperties; +} + +export interface BlobUndeleteHeaderParam { + headers: RawHttpHeadersInput & BlobUndeleteHeaders; +} + +export interface BlobUndeleteMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobUndeleteParameters = BlobUndeleteQueryParam & + BlobUndeleteHeaderParam & + BlobUndeleteMediaTypesParam & + RequestParameters; + +export interface BlobSetExpiryHeaders { + /** 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 BlobSetExpiryQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobSetExpiryQueryParam { + queryParameters?: BlobSetExpiryQueryParamProperties; +} + +export interface BlobSetExpiryHeaderParam { + headers: RawHttpHeadersInput & BlobSetExpiryHeaders; +} + +export interface BlobSetExpiryMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobSetExpiryParameters = BlobSetExpiryQueryParam & + BlobSetExpiryHeaderParam & + BlobSetExpiryMediaTypesParam & + RequestParameters; + +export interface BlobSetHttpHeadersHeaders { + /** 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 BlobSetHttpHeadersQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobSetHttpHeadersQueryParam { + queryParameters?: BlobSetHttpHeadersQueryParamProperties; +} + +export interface BlobSetHttpHeadersHeaderParam { + headers: RawHttpHeadersInput & BlobSetHttpHeadersHeaders; +} + +export interface BlobSetHttpHeadersMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobSetHttpHeadersParameters = BlobSetHttpHeadersQueryParam & + BlobSetHttpHeadersHeaderParam & + BlobSetHttpHeadersMediaTypesParam & + RequestParameters; + +export interface BlobSetImmutabilityPolicyHeaders { + /** 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 BlobSetImmutabilityPolicyQueryParamProperties { + /** 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 BlobSetImmutabilityPolicyQueryParam { + queryParameters?: BlobSetImmutabilityPolicyQueryParamProperties; +} + +export interface BlobSetImmutabilityPolicyHeaderParam { + headers: RawHttpHeadersInput & BlobSetImmutabilityPolicyHeaders; +} + +export interface BlobSetImmutabilityPolicyMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobSetImmutabilityPolicyParameters = + BlobSetImmutabilityPolicyQueryParam & + BlobSetImmutabilityPolicyHeaderParam & + BlobSetImmutabilityPolicyMediaTypesParam & + RequestParameters; + +export interface BlobDeleteImmutabilityPolicyHeaders { + /** 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 BlobDeleteImmutabilityPolicyQueryParamProperties { + /** 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 BlobDeleteImmutabilityPolicyQueryParam { + queryParameters?: BlobDeleteImmutabilityPolicyQueryParamProperties; +} + +export interface BlobDeleteImmutabilityPolicyHeaderParam { + headers: RawHttpHeadersInput & BlobDeleteImmutabilityPolicyHeaders; +} + +export interface BlobDeleteImmutabilityPolicyMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobDeleteImmutabilityPolicyParameters = + BlobDeleteImmutabilityPolicyQueryParam & + BlobDeleteImmutabilityPolicyHeaderParam & + BlobDeleteImmutabilityPolicyMediaTypesParam & + RequestParameters; + +export interface BlobSetLegalHoldHeaders { + /** 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 BlobSetLegalHoldQueryParamProperties { + /** 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 BlobSetLegalHoldQueryParam { + queryParameters?: BlobSetLegalHoldQueryParamProperties; +} + +export interface BlobSetLegalHoldHeaderParam { + headers: RawHttpHeadersInput & BlobSetLegalHoldHeaders; +} + +export interface BlobSetLegalHoldMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobSetLegalHoldParameters = BlobSetLegalHoldQueryParam & + BlobSetLegalHoldHeaderParam & + BlobSetLegalHoldMediaTypesParam & + RequestParameters; + +export interface BlobSetMetadataHeaders { + /** 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 BlobSetMetadataQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobSetMetadataQueryParam { + queryParameters?: BlobSetMetadataQueryParamProperties; +} + +export interface BlobSetMetadataHeaderParam { + headers: RawHttpHeadersInput & BlobSetMetadataHeaders; +} + +export interface BlobSetMetadataMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobSetMetadataParameters = BlobSetMetadataQueryParam & + BlobSetMetadataHeaderParam & + BlobSetMetadataMediaTypesParam & + RequestParameters; + +export interface BlobAcquireLeaseHeaders { + /** 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. */ + "x-ms-lease-duration"?: number; + /** 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 BlobAcquireLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobAcquireLeaseQueryParam { + queryParameters?: BlobAcquireLeaseQueryParamProperties; +} + +export interface BlobAcquireLeaseHeaderParam { + headers: RawHttpHeadersInput & BlobAcquireLeaseHeaders; +} + +export interface BlobAcquireLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobAcquireLeaseParameters = BlobAcquireLeaseQueryParam & + BlobAcquireLeaseHeaderParam & + BlobAcquireLeaseMediaTypesParam & + RequestParameters; + +export interface BlobReleaseLeaseHeaders { + /** 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 BlobReleaseLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobReleaseLeaseQueryParam { + queryParameters?: BlobReleaseLeaseQueryParamProperties; +} + +export interface BlobReleaseLeaseHeaderParam { + headers: RawHttpHeadersInput & BlobReleaseLeaseHeaders; +} + +export interface BlobReleaseLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobReleaseLeaseParameters = BlobReleaseLeaseQueryParam & + BlobReleaseLeaseHeaderParam & + BlobReleaseLeaseMediaTypesParam & + RequestParameters; + +export interface BlobRenewLeaseHeaders { + /** 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 BlobRenewLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobRenewLeaseQueryParam { + queryParameters?: BlobRenewLeaseQueryParamProperties; +} + +export interface BlobRenewLeaseHeaderParam { + headers: RawHttpHeadersInput & BlobRenewLeaseHeaders; +} + +export interface BlobRenewLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobRenewLeaseParameters = BlobRenewLeaseQueryParam & + BlobRenewLeaseHeaderParam & + BlobRenewLeaseMediaTypesParam & + RequestParameters; + +export interface BlobChangeLeaseHeaders { + /** 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; + /** 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 BlobChangeLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobChangeLeaseQueryParam { + queryParameters?: BlobChangeLeaseQueryParamProperties; +} + +export interface BlobChangeLeaseHeaderParam { + headers: RawHttpHeadersInput & BlobChangeLeaseHeaders; +} + +export interface BlobChangeLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobChangeLeaseParameters = BlobChangeLeaseQueryParam & + BlobChangeLeaseHeaderParam & + BlobChangeLeaseMediaTypesParam & + RequestParameters; + +export interface BlobBreakLeaseHeaders { + /** 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 BlobBreakLeaseQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobBreakLeaseQueryParam { + queryParameters?: BlobBreakLeaseQueryParamProperties; +} + +export interface BlobBreakLeaseHeaderParam { + headers: RawHttpHeadersInput & BlobBreakLeaseHeaders; +} + +export interface BlobBreakLeaseMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobBreakLeaseParameters = BlobBreakLeaseQueryParam & + BlobBreakLeaseHeaderParam & + BlobBreakLeaseMediaTypesParam & + RequestParameters; + +export interface BlobCreateSnapshotHeaders { + /** 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 BlobCreateSnapshotQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobCreateSnapshotQueryParam { + queryParameters?: BlobCreateSnapshotQueryParamProperties; +} + +export interface BlobCreateSnapshotHeaderParam { + headers: RawHttpHeadersInput & BlobCreateSnapshotHeaders; +} + +export interface BlobCreateSnapshotMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobCreateSnapshotParameters = BlobCreateSnapshotQueryParam & + BlobCreateSnapshotHeaderParam & + BlobCreateSnapshotMediaTypesParam & + RequestParameters; + +export interface BlobStartCopyFromUrlHeaders { + /** 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 BlobStartCopyFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobStartCopyFromUrlQueryParam { + queryParameters?: BlobStartCopyFromUrlQueryParamProperties; +} + +export interface BlobStartCopyFromUrlHeaderParam { + headers: RawHttpHeadersInput & BlobStartCopyFromUrlHeaders; +} + +export interface BlobStartCopyFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobStartCopyFromUrlParameters = BlobStartCopyFromUrlQueryParam & + BlobStartCopyFromUrlHeaderParam & + BlobStartCopyFromUrlMediaTypesParam & + RequestParameters; + +export interface BlobCopyFromUrlHeaders { + /** 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-tags"?: string; + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "x-ms-client-request-id"?: string; +} + +export interface BlobCopyFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobCopyFromUrlQueryParam { + queryParameters?: BlobCopyFromUrlQueryParamProperties; +} + +export interface BlobCopyFromUrlHeaderParam { + headers: RawHttpHeadersInput & BlobCopyFromUrlHeaders; +} + +export interface BlobCopyFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobCopyFromUrlParameters = BlobCopyFromUrlQueryParam & + BlobCopyFromUrlHeaderParam & + BlobCopyFromUrlMediaTypesParam & + RequestParameters; + +export interface BlobAbortCopyFromUrlHeaders { + /** 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 BlobAbortCopyFromUrlQueryParamProperties { + /** 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 BlobAbortCopyFromUrlQueryParam { + queryParameters: BlobAbortCopyFromUrlQueryParamProperties; +} + +export interface BlobAbortCopyFromUrlHeaderParam { + headers: RawHttpHeadersInput & BlobAbortCopyFromUrlHeaders; +} + +export interface BlobAbortCopyFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobAbortCopyFromUrlParameters = BlobAbortCopyFromUrlQueryParam & + BlobAbortCopyFromUrlHeaderParam & + BlobAbortCopyFromUrlMediaTypesParam & + RequestParameters; + +export interface BlobSetTierHeaders { + /** 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 BlobSetTierQueryParamProperties { + /** 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 BlobSetTierQueryParam { + queryParameters?: BlobSetTierQueryParamProperties; +} + +export interface BlobSetTierHeaderParam { + headers: RawHttpHeadersInput & BlobSetTierHeaders; +} + +export interface BlobSetTierMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobSetTierParameters = BlobSetTierQueryParam & + BlobSetTierHeaderParam & + BlobSetTierMediaTypesParam & + RequestParameters; + +export interface BlobGetAccountInfoHeaders { + /** 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 BlobGetAccountInfoQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlobGetAccountInfoQueryParam { + queryParameters?: BlobGetAccountInfoQueryParamProperties; +} + +export interface BlobGetAccountInfoHeaderParam { + headers: RawHttpHeadersInput & BlobGetAccountInfoHeaders; +} + +export interface BlobGetAccountInfoMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobGetAccountInfoParameters = BlobGetAccountInfoQueryParam & + BlobGetAccountInfoHeaderParam & + BlobGetAccountInfoMediaTypesParam & + RequestParameters; + +export interface BlobQueryHeaders { + /** 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 BlobQueryBodyParam { + /** The query request */ + body: QueryRequest; +} + +export interface BlobQueryQueryParamProperties { + /** 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 BlobQueryQueryParam { + queryParameters?: BlobQueryQueryParamProperties; +} + +export interface BlobQueryHeaderParam { + headers: RawHttpHeadersInput & BlobQueryHeaders; +} + +export interface BlobQueryMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobQueryParameters = BlobQueryQueryParam & + BlobQueryHeaderParam & + BlobQueryMediaTypesParam & + BlobQueryBodyParam & + RequestParameters; + +export interface BlobGetTagsHeaders { + /** 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 BlobGetTagsQueryParamProperties { + /** 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 BlobGetTagsQueryParam { + queryParameters?: BlobGetTagsQueryParamProperties; +} + +export interface BlobGetTagsHeaderParam { + headers: RawHttpHeadersInput & BlobGetTagsHeaders; +} + +export interface BlobGetTagsMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobGetTagsParameters = BlobGetTagsQueryParam & + BlobGetTagsHeaderParam & + BlobGetTagsMediaTypesParam & + RequestParameters; + +export interface BlobSetTagsHeaders { + /** 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 BlobSetTagsBodyParam { + /** The blob tags. */ + body: BlobTags; +} + +export interface BlobSetTagsQueryParamProperties { + /** 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 BlobSetTagsQueryParam { + queryParameters?: BlobSetTagsQueryParamProperties; +} + +export interface BlobSetTagsHeaderParam { + headers: RawHttpHeadersInput & BlobSetTagsHeaders; +} + +export interface BlobSetTagsMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlobSetTagsParameters = BlobSetTagsQueryParam & + BlobSetTagsHeaderParam & + BlobSetTagsMediaTypesParam & + BlobSetTagsBodyParam & + RequestParameters; + +export interface PageBlobCreateHeaders { + /** 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; + /** Optional. The sequence number is a user-controlled property that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. The default value is 0. */ + "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 PageBlobCreateQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface PageBlobCreateQueryParam { + queryParameters?: PageBlobCreateQueryParamProperties; +} + +export interface PageBlobCreateHeaderParam { + headers: RawHttpHeadersInput & PageBlobCreateHeaders; +} + +export interface PageBlobCreateMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type PageBlobCreateParameters = PageBlobCreateQueryParam & + PageBlobCreateHeaderParam & + PageBlobCreateMediaTypesParam & + RequestParameters; + +export interface PageBlobUploadPagesHeaders { + /** 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 PageBlobUploadPagesBodyParam { + /** + * The body of the request. + * + * Value may contain any sequence of octets + */ + body: + | string + | Uint8Array + | ReadableStream + | NodeJS.ReadableStream; +} + +export interface PageBlobUploadPagesQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface PageBlobUploadPagesQueryParam { + queryParameters?: PageBlobUploadPagesQueryParamProperties; +} + +export interface PageBlobUploadPagesHeaderParam { + headers: RawHttpHeadersInput & PageBlobUploadPagesHeaders; +} + +export interface PageBlobUploadPagesMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type PageBlobUploadPagesParameters = PageBlobUploadPagesQueryParam & + PageBlobUploadPagesHeaderParam & + PageBlobUploadPagesMediaTypesParam & + PageBlobUploadPagesBodyParam & + RequestParameters; + +export interface PageBlobClearPagesHeaders { + /** 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 PageBlobClearPagesQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface PageBlobClearPagesQueryParam { + queryParameters?: PageBlobClearPagesQueryParamProperties; +} + +export interface PageBlobClearPagesHeaderParam { + headers: RawHttpHeadersInput & PageBlobClearPagesHeaders; +} + +export interface PageBlobClearPagesMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type PageBlobClearPagesParameters = PageBlobClearPagesQueryParam & + PageBlobClearPagesHeaderParam & + PageBlobClearPagesMediaTypesParam & + RequestParameters; + +export interface PageBlobUploadPagesFromUrlHeaders { + /** 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 PageBlobUploadPagesFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface PageBlobUploadPagesFromUrlQueryParam { + queryParameters?: PageBlobUploadPagesFromUrlQueryParamProperties; +} + +export interface PageBlobUploadPagesFromUrlHeaderParam { + headers: RawHttpHeadersInput & PageBlobUploadPagesFromUrlHeaders; +} + +export interface PageBlobUploadPagesFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type PageBlobUploadPagesFromUrlParameters = + PageBlobUploadPagesFromUrlQueryParam & + PageBlobUploadPagesFromUrlHeaderParam & + PageBlobUploadPagesFromUrlMediaTypesParam & + RequestParameters; + +export interface PageBlobGetPageRangesHeaders { + /** 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 PageBlobGetPageRangesQueryParamProperties { + /** 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 PageBlobGetPageRangesQueryParam { + queryParameters?: PageBlobGetPageRangesQueryParamProperties; +} + +export interface PageBlobGetPageRangesHeaderParam { + headers: RawHttpHeadersInput & PageBlobGetPageRangesHeaders; +} + +export interface PageBlobGetPageRangesMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type PageBlobGetPageRangesParameters = PageBlobGetPageRangesQueryParam & + PageBlobGetPageRangesHeaderParam & + PageBlobGetPageRangesMediaTypesParam & + RequestParameters; + +export interface PageBlobGetPageRangesDiffHeaders { + /** 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 PageBlobGetPageRangesDiffQueryParamProperties { + /** 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 PageBlobGetPageRangesDiffQueryParam { + queryParameters?: PageBlobGetPageRangesDiffQueryParamProperties; +} + +export interface PageBlobGetPageRangesDiffHeaderParam { + headers: RawHttpHeadersInput & PageBlobGetPageRangesDiffHeaders; +} + +export interface PageBlobGetPageRangesDiffMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type PageBlobGetPageRangesDiffParameters = + PageBlobGetPageRangesDiffQueryParam & + PageBlobGetPageRangesDiffHeaderParam & + PageBlobGetPageRangesDiffMediaTypesParam & + RequestParameters; + +export interface PageBlobResizeHeaders { + /** 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 PageBlobResizeQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface PageBlobResizeQueryParam { + queryParameters?: PageBlobResizeQueryParamProperties; +} + +export interface PageBlobResizeHeaderParam { + headers: RawHttpHeadersInput & PageBlobResizeHeaders; +} + +export interface PageBlobResizeMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type PageBlobResizeParameters = PageBlobResizeQueryParam & + PageBlobResizeHeaderParam & + PageBlobResizeMediaTypesParam & + RequestParameters; + +export interface PageBlobUpdateSequenceNumberHeaders { + /** 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 PageBlobUpdateSequenceNumberQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface PageBlobUpdateSequenceNumberQueryParam { + queryParameters?: PageBlobUpdateSequenceNumberQueryParamProperties; +} + +export interface PageBlobUpdateSequenceNumberHeaderParam { + headers: RawHttpHeadersInput & PageBlobUpdateSequenceNumberHeaders; +} + +export interface PageBlobUpdateSequenceNumberMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type PageBlobUpdateSequenceNumberParameters = + PageBlobUpdateSequenceNumberQueryParam & + PageBlobUpdateSequenceNumberHeaderParam & + PageBlobUpdateSequenceNumberMediaTypesParam & + RequestParameters; + +export interface PageBlobCopyIncrementalHeaders { + /** 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 PageBlobCopyIncrementalQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface PageBlobCopyIncrementalQueryParam { + queryParameters?: PageBlobCopyIncrementalQueryParamProperties; +} + +export interface PageBlobCopyIncrementalHeaderParam { + headers: RawHttpHeadersInput & PageBlobCopyIncrementalHeaders; +} + +export interface PageBlobCopyIncrementalMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type PageBlobCopyIncrementalParameters = + PageBlobCopyIncrementalQueryParam & + PageBlobCopyIncrementalHeaderParam & + PageBlobCopyIncrementalMediaTypesParam & + RequestParameters; + +export interface AppendBlobCreateHeaders { + /** 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 AppendBlobCreateQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface AppendBlobCreateQueryParam { + queryParameters?: AppendBlobCreateQueryParamProperties; +} + +export interface AppendBlobCreateHeaderParam { + headers: RawHttpHeadersInput & AppendBlobCreateHeaders; +} + +export interface AppendBlobCreateMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type AppendBlobCreateParameters = AppendBlobCreateQueryParam & + AppendBlobCreateHeaderParam & + AppendBlobCreateMediaTypesParam & + RequestParameters; + +export interface AppendBlobAppendBlockHeaders { + /** 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 AppendBlobAppendBlockBodyParam { + /** + * The body of the request. + * + * Value may contain any sequence of octets + */ + body: + | string + | Uint8Array + | ReadableStream + | NodeJS.ReadableStream; +} + +export interface AppendBlobAppendBlockQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface AppendBlobAppendBlockQueryParam { + queryParameters?: AppendBlobAppendBlockQueryParamProperties; +} + +export interface AppendBlobAppendBlockHeaderParam { + headers: RawHttpHeadersInput & AppendBlobAppendBlockHeaders; +} + +export interface AppendBlobAppendBlockMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type AppendBlobAppendBlockParameters = AppendBlobAppendBlockQueryParam & + AppendBlobAppendBlockHeaderParam & + AppendBlobAppendBlockMediaTypesParam & + AppendBlobAppendBlockBodyParam & + RequestParameters; + +export interface AppendBlobAppendBlockFromUrlHeaders { + /** 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 AppendBlobAppendBlockFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface AppendBlobAppendBlockFromUrlQueryParam { + queryParameters?: AppendBlobAppendBlockFromUrlQueryParamProperties; +} + +export interface AppendBlobAppendBlockFromUrlHeaderParam { + headers: RawHttpHeadersInput & AppendBlobAppendBlockFromUrlHeaders; +} + +export interface AppendBlobAppendBlockFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type AppendBlobAppendBlockFromUrlParameters = + AppendBlobAppendBlockFromUrlQueryParam & + AppendBlobAppendBlockFromUrlHeaderParam & + AppendBlobAppendBlockFromUrlMediaTypesParam & + RequestParameters; + +export interface AppendBlobSealHeaders { + /** 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 AppendBlobSealQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface AppendBlobSealQueryParam { + queryParameters?: AppendBlobSealQueryParamProperties; +} + +export interface AppendBlobSealHeaderParam { + headers: RawHttpHeadersInput & AppendBlobSealHeaders; +} + +export interface AppendBlobSealMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type AppendBlobSealParameters = AppendBlobSealQueryParam & + AppendBlobSealHeaderParam & + AppendBlobSealMediaTypesParam & + RequestParameters; + +export interface BlockBlobUploadHeaders { + /** 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; + /** 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; + /** 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 BlockBlobUploadBodyParam { + /** + * The body of the request. + * + * Value may contain any sequence of octets + */ + body: + | string + | Uint8Array + | ReadableStream + | NodeJS.ReadableStream; +} + +export interface BlockBlobUploadQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlockBlobUploadQueryParam { + queryParameters?: BlockBlobUploadQueryParamProperties; +} + +export interface BlockBlobUploadHeaderParam { + headers: RawHttpHeadersInput & BlockBlobUploadHeaders; +} + +export interface BlockBlobUploadMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type BlockBlobUploadParameters = BlockBlobUploadQueryParam & + BlockBlobUploadHeaderParam & + BlockBlobUploadMediaTypesParam & + BlockBlobUploadBodyParam & + RequestParameters; + +export interface BlockBlobPutBlobFromUrlHeaders { + /** 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-tags"?: 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 BlockBlobPutBlobFromUrlQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlockBlobPutBlobFromUrlQueryParam { + queryParameters?: BlockBlobPutBlobFromUrlQueryParamProperties; +} + +export interface BlockBlobPutBlobFromUrlHeaderParam { + headers: RawHttpHeadersInput & BlockBlobPutBlobFromUrlHeaders; +} + +export interface BlockBlobPutBlobFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type BlockBlobPutBlobFromUrlParameters = + BlockBlobPutBlobFromUrlQueryParam & + BlockBlobPutBlobFromUrlHeaderParam & + BlockBlobPutBlobFromUrlMediaTypesParam & + RequestParameters; + +export interface BlockBlobStageBlockHeaders { + /** 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; + /** 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 BlockBlobStageBlockBodyParam { + /** + * The body of the request. + * + * Value may contain any sequence of octets + */ + body: + | string + | Uint8Array + | ReadableStream + | NodeJS.ReadableStream; +} + +export interface BlockBlobStageBlockQueryParamProperties { + /** 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 BlockBlobStageBlockQueryParam { + queryParameters: BlockBlobStageBlockQueryParamProperties; +} + +export interface BlockBlobStageBlockHeaderParam { + headers: RawHttpHeadersInput & BlockBlobStageBlockHeaders; +} + +export interface BlockBlobStageBlockMediaTypesParam { + /** Content-Type header */ + contentType: "application/octet-stream"; +} + +export type BlockBlobStageBlockParameters = BlockBlobStageBlockQueryParam & + BlockBlobStageBlockHeaderParam & + BlockBlobStageBlockMediaTypesParam & + BlockBlobStageBlockBodyParam & + RequestParameters; + +export interface BlockBlobStageBlockFromUrlHeaders { + /** 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 BlockBlobStageBlockFromUrlQueryParamProperties { + /** 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 BlockBlobStageBlockFromUrlQueryParam { + queryParameters: BlockBlobStageBlockFromUrlQueryParamProperties; +} + +export interface BlockBlobStageBlockFromUrlHeaderParam { + headers: RawHttpHeadersInput & BlockBlobStageBlockFromUrlHeaders; +} + +export interface BlockBlobStageBlockFromUrlMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlockBlobStageBlockFromUrlParameters = + BlockBlobStageBlockFromUrlQueryParam & + BlockBlobStageBlockFromUrlHeaderParam & + BlockBlobStageBlockFromUrlMediaTypesParam & + RequestParameters; + +export interface BlockBlobCommitBlockListHeaders { + /** 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 BlockBlobCommitBlockListBodyParam { + /** Blob Blocks. */ + body: BlockLookupList; +} + +export interface BlockBlobCommitBlockListQueryParamProperties { + /** The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations. */ + timeout?: number; +} + +export interface BlockBlobCommitBlockListQueryParam { + queryParameters?: BlockBlobCommitBlockListQueryParamProperties; +} + +export interface BlockBlobCommitBlockListHeaderParam { + headers: RawHttpHeadersInput & BlockBlobCommitBlockListHeaders; +} + +export interface BlockBlobCommitBlockListMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlockBlobCommitBlockListParameters = + BlockBlobCommitBlockListQueryParam & + BlockBlobCommitBlockListHeaderParam & + BlockBlobCommitBlockListMediaTypesParam & + BlockBlobCommitBlockListBodyParam & + RequestParameters; + +export interface BlockBlobGetBlockListHeaders { + /** 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 BlockBlobGetBlockListQueryParamProperties { + /** 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 BlockBlobGetBlockListQueryParam { + queryParameters: BlockBlobGetBlockListQueryParamProperties; +} + +export interface BlockBlobGetBlockListHeaderParam { + headers: RawHttpHeadersInput & BlockBlobGetBlockListHeaders; +} + +export interface BlockBlobGetBlockListMediaTypesParam { + /** Content-Type header */ + contentType: "application/xml"; +} + +export type BlockBlobGetBlockListParameters = BlockBlobGetBlockListQueryParam & + BlockBlobGetBlockListHeaderParam & + BlockBlobGetBlockListMediaTypesParam & + 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..c3aa656639f9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/src/responses.ts @@ -0,0 +1,2274 @@ +// 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, + LeaseStateOutput, + LeaseStatusOutput, + PublicAccessTypeOutput, + SignedIdentifierOutput, + ListBlobsFlatSegmentResponseOutput, + ListBlobsHierarchySegmentResponseOutput, + BlobTypeOutput, + CopyStatusOutput, + BlobImmutabilityPolicyModeOutput, + AccessTierOutput, + ArchiveStatusOutput, + RehydratePriorityOutput, + BlobTagsOutput, + PageListOutput, + BlockLookupListOutput, +} from "./outputModels.js"; + +export interface ServiceSetProperties202Headers { + /** 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 request has been accepted for processing, but processing has not yet completed. */ +export interface ServiceSetProperties202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & ServiceSetProperties202Headers; +} + +export interface ServiceSetPropertiesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ServiceGetProperties200Headers { + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ServiceGetProperties200Response extends HttpResponse { + status: "200"; + body: StorageServicePropertiesOutput; + headers: RawHttpHeaders & ServiceGetProperties200Headers; +} + +export interface ServiceGetPropertiesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ServiceGetStatistics200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ServiceGetStatistics200Response extends HttpResponse { + status: "200"; + body: StorageServiceStatsOutput; + headers: RawHttpHeaders & ServiceGetStatistics200Headers; +} + +export interface ServiceGetStatisticsDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ServiceListContainersSegment200Headers { + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ServiceListContainersSegment200Response extends HttpResponse { + status: "200"; + body: ListContainersSegmentResponseOutput; + headers: RawHttpHeaders & ServiceListContainersSegment200Headers; +} + +export interface ServiceListContainersSegmentDefaultResponse + extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ServiceGetUserDelegationKey200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ServiceGetUserDelegationKey200Response extends HttpResponse { + status: "200"; + body: UserDelegationKeyOutput; + headers: RawHttpHeaders & ServiceGetUserDelegationKey200Headers; +} + +export interface ServiceGetUserDelegationKeyDefaultResponse + extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ServiceGetAccountInfo200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface ServiceGetAccountInfo200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ServiceGetAccountInfo200Headers; +} + +export interface ServiceGetAccountInfoDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ServiceSubmitBatch200Headers { + /** 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 ServiceSubmitBatch200Response extends HttpResponse { + status: "200"; + body: string; + headers: RawHttpHeaders & ServiceSubmitBatch200Headers; +} + +export interface ServiceSubmitBatchDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ServiceFilterBlobs200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface ServiceFilterBlobs200Response extends HttpResponse { + status: "200"; + body: FilterBlobSegmentOutput; + headers: RawHttpHeaders & ServiceFilterBlobs200Headers; +} + +export interface ServiceFilterBlobsDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerCreate201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface ContainerCreate201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & ContainerCreate201Headers; +} + +export interface ContainerCreateDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerGetProperties200Headers { + /** The metadata headers. */ + "x-ms-meta"?: Record; + /** 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; + /** 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"?: number; + /** 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; + /** 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 request has succeeded. */ +export interface ContainerGetProperties200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerGetProperties200Headers; +} + +export interface ContainerGetPropertiesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerDelete202Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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 request has been accepted for processing, but processing has not yet completed. */ +export interface ContainerDelete202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & ContainerDelete202Headers; +} + +export interface ContainerDeleteDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface ContainerSetMetadata200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface ContainerSetMetadata200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerSetMetadata200Headers; +} + +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; + /** 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; + /** 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; + /** 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 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; + /** 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 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; + /** 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 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: 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; + /** 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; + /** 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; + /** 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 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; + /** 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 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; + /** 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 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; + /** 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 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; + /** 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 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; + /** 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; + /** 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; + /** 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; + /** 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; + /** 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 request has succeeded. */ +export interface ContainerGetAccountInfo200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & ContainerGetAccountInfo200Headers; +} + +export interface ContainerGetAccountInfoDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobDownload200Headers { + /** 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 metadata headers. */ + "x-ms-meta"?: Record; + /** 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"?: Record; + /** 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"?: number; + /** 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; + /** 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; + /** 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; + /** Indicates the response body contains a structured message and specifies the message schema version and properties. */ + "x-ms-structured-body"?: string; + /** The length of the blob/file content inside the message body when the response body is returned as a structured message. Will always be smaller than Content-Length. */ + "x-ms-structured-content-length"?: number; + /** The media type of the body of the response. */ + "content-type": "application/octet-stream"; +} + +/** The request has succeeded. */ +export interface BlobDownload200Response extends HttpResponse { + status: "200"; + /** Value may contain any sequence of octets */ + body: Uint8Array; + headers: RawHttpHeaders & BlobDownload200Headers; +} + +export interface BlobDownload206Headers { + /** 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 metadata headers. */ + "x-ms-meta"?: Record; + /** 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"?: Record; + /** 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"?: number; + /** 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; + /** 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; + /** 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; + /** Indicates the response body contains a structured message and specifies the message schema version and properties. */ + "x-ms-structured-body"?: string; + /** The length of the blob/file content inside the message body when the response body is returned as a structured message. Will always be smaller than Content-Length. */ + "x-ms-structured-content-length"?: number; + /** The media type of the body of the response. */ + "content-type": "application/octet-stream"; +} + +/** Successful */ +export interface BlobDownload206Response extends HttpResponse { + status: "206"; + /** Value may contain any sequence of octets */ + body: Uint8Array; + headers: RawHttpHeaders & BlobDownload206Headers; +} + +export interface BlobDownloadDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobGetProperties200Headers { + /** The metadata headers. */ + "x-ms-meta"?: Record; + /** 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"?: Record; + /** 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"?: number; + /** 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; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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; + /** 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; + /** 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 request has succeeded. */ +export interface BlobGetProperties200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobGetProperties200Headers; +} + +export interface BlobGetPropertiesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobDelete202Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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 request has been accepted for processing, but processing has not yet completed. */ +export interface BlobDelete202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & BlobDelete202Headers; +} + +export interface BlobDeleteDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobUndelete200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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 request has succeeded. */ +export interface BlobUndelete200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobUndelete200Headers; +} + +export interface BlobUndeleteDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobSetExpiry200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface BlobSetExpiry200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobSetExpiry200Headers; +} + +export interface BlobSetExpiryDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobSetHttpHeaders200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface BlobSetHttpHeaders200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobSetHttpHeaders200Headers; +} + +export interface BlobSetHttpHeadersDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobSetImmutabilityPolicy200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** Indicates the time the 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; + /** 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 request has succeeded. */ +export interface BlobSetImmutabilityPolicy200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobSetImmutabilityPolicy200Headers; +} + +export interface BlobSetImmutabilityPolicyDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobDeleteImmutabilityPolicy200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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 request has succeeded. */ +export interface BlobDeleteImmutabilityPolicy200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobDeleteImmutabilityPolicy200Headers; +} + +export interface BlobDeleteImmutabilityPolicyDefaultResponse + extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobSetLegalHold200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface BlobSetLegalHold200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobSetLegalHold200Headers; +} + +export interface BlobSetLegalHoldDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobSetMetadata200Headers { + /** 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 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; + /** 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 request has succeeded. */ +export interface BlobSetMetadata200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobSetMetadata200Headers; +} + +export interface BlobSetMetadataDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobAcquireLease201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface BlobAcquireLease201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & BlobAcquireLease201Headers; +} + +export interface BlobAcquireLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobReleaseLease200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface BlobReleaseLease200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobReleaseLease200Headers; +} + +export interface BlobReleaseLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobRenewLease200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface BlobRenewLease200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobRenewLease200Headers; +} + +export interface BlobRenewLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobChangeLease200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface BlobChangeLease200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobChangeLease200Headers; +} + +export interface BlobChangeLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobBreakLease202Headers { + /** 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; + /** 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 request has been accepted for processing, but processing has not yet completed. */ +export interface BlobBreakLease202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & BlobBreakLease202Headers; +} + +export interface BlobBreakLeaseDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobCreateSnapshot201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface BlobCreateSnapshot201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & BlobCreateSnapshot201Headers; +} + +export interface BlobCreateSnapshotDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobStartCopyFromUrl202Headers { + /** 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; + /** 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 request has been accepted for processing, but processing has not yet completed. */ +export interface BlobStartCopyFromUrl202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & BlobStartCopyFromUrl202Headers; +} + +export interface BlobStartCopyFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobCopyFromUrl202Headers { + /** 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; + /** 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 request has been accepted for processing, but processing has not yet completed. */ +export interface BlobCopyFromUrl202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & BlobCopyFromUrl202Headers; +} + +export interface BlobCopyFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobAbortCopyFromUrl204Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface BlobAbortCopyFromUrl204Response extends HttpResponse { + status: "204"; + headers: RawHttpHeaders & BlobAbortCopyFromUrl204Headers; +} + +export interface BlobAbortCopyFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobSetTier200Headers { + /** 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 request has succeeded. */ +export interface BlobSetTier200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobSetTier200Headers; +} + +export interface BlobSetTier202Headers { + /** 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 request has been accepted for processing, but processing has not yet completed. */ +export interface BlobSetTier202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & BlobSetTier202Headers; +} + +export interface BlobSetTierDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobGetAccountInfo200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface BlobGetAccountInfo200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & BlobGetAccountInfo200Headers; +} + +export interface BlobGetAccountInfoDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobQuery200Headers { + /** The metadata headers. */ + "x-ms-meta"?: Record; + /** 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"?: number; + /** 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; + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface BlobQuery200Response extends HttpResponse { + status: "200"; + body: string; + headers: RawHttpHeaders & BlobQuery200Headers; +} + +export interface BlobQuery206Headers { + /** The metadata headers. */ + "x-ms-meta"?: Record; + /** 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"?: number; + /** 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; + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** Successful */ +export interface BlobQuery206Response extends HttpResponse { + status: "206"; + body: string; + headers: RawHttpHeaders & BlobQuery206Headers; +} + +export interface BlobQueryDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobGetTags200Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface BlobGetTags200Response extends HttpResponse { + status: "200"; + body: BlobTagsOutput; + headers: RawHttpHeaders & BlobGetTags200Headers; +} + +export interface BlobGetTagsDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlobSetTags204Headers { + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date: string; + /** 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; +} + +/** There is no content to send for this request, but the headers may be useful. */ +export interface BlobSetTags204Response extends HttpResponse { + status: "204"; + headers: RawHttpHeaders & BlobSetTags204Headers; +} + +export interface BlobSetTagsDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface PageBlobCreate201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface PageBlobCreate201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & PageBlobCreate201Headers; +} + +export interface PageBlobCreateDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface PageBlobUploadPages201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface PageBlobUploadPages201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & PageBlobUploadPages201Headers; +} + +export interface PageBlobUploadPagesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface PageBlobClearPages201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface PageBlobClearPages201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & PageBlobClearPages201Headers; +} + +export interface PageBlobClearPagesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface PageBlobUploadPagesFromUrl201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface PageBlobUploadPagesFromUrl201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & PageBlobUploadPagesFromUrl201Headers; +} + +export interface PageBlobUploadPagesFromUrlDefaultResponse + extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface PageBlobGetPageRanges200Headers { + /** 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; + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface PageBlobGetPageRanges200Response extends HttpResponse { + status: "200"; + body: PageListOutput; + headers: RawHttpHeaders & PageBlobGetPageRanges200Headers; +} + +export interface PageBlobGetPageRangesDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface PageBlobGetPageRangesDiff200Headers { + /** 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; + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface PageBlobGetPageRangesDiff200Response extends HttpResponse { + status: "200"; + body: PageListOutput; + headers: RawHttpHeaders & PageBlobGetPageRangesDiff200Headers; +} + +export interface PageBlobGetPageRangesDiffDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface PageBlobResize200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface PageBlobResize200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & PageBlobResize200Headers; +} + +export interface PageBlobResizeDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface PageBlobUpdateSequenceNumber200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface PageBlobUpdateSequenceNumber200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & PageBlobUpdateSequenceNumber200Headers; +} + +export interface PageBlobUpdateSequenceNumberDefaultResponse + extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface PageBlobCopyIncremental202Headers { + /** 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; + /** 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 request has been accepted for processing, but processing has not yet completed. */ +export interface PageBlobCopyIncremental202Response extends HttpResponse { + status: "202"; + headers: RawHttpHeaders & PageBlobCopyIncremental202Headers; +} + +export interface PageBlobCopyIncrementalDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface AppendBlobCreate201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface AppendBlobCreate201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & AppendBlobCreate201Headers; +} + +export interface AppendBlobCreateDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface AppendBlobAppendBlock201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface AppendBlobAppendBlock201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & AppendBlobAppendBlock201Headers; +} + +export interface AppendBlobAppendBlockDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface AppendBlobAppendBlockFromUrl201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface AppendBlobAppendBlockFromUrl201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & AppendBlobAppendBlockFromUrl201Headers; +} + +export interface AppendBlobAppendBlockFromUrlDefaultResponse + extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface AppendBlobSeal200Headers { + /** 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; + /** 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 request has succeeded. */ +export interface AppendBlobSeal200Response extends HttpResponse { + status: "200"; + headers: RawHttpHeaders & AppendBlobSeal200Headers; +} + +export interface AppendBlobSealDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlockBlobUpload201Headers { + /** 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; + /** Indicates the response body contains a structured message and specifies the message schema version and properties. */ + "x-ms-structured-body"?: string; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface BlockBlobUpload201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & BlockBlobUpload201Headers; +} + +export interface BlockBlobUploadDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlockBlobPutBlobFromUrl201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface BlockBlobPutBlobFromUrl201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & BlockBlobPutBlobFromUrl201Headers; +} + +export interface BlockBlobPutBlobFromUrlDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlockBlobStageBlock201Headers { + /** 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; + /** Indicates the response body contains a structured message and specifies the message schema version and properties. */ + "x-ms-structured-body"?: string; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface BlockBlobStageBlock201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & BlockBlobStageBlock201Headers; +} + +export interface BlockBlobStageBlockDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlockBlobStageBlockFromUrl201Headers { + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface BlockBlobStageBlockFromUrl201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & BlockBlobStageBlockFromUrl201Headers; +} + +export interface BlockBlobStageBlockFromUrlDefaultResponse + extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlockBlobCommitBlockList201Headers { + /** 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; + /** 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; + /** 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 request has succeeded and a new resource has been created as a result. */ +export interface BlockBlobCommitBlockList201Response extends HttpResponse { + status: "201"; + headers: RawHttpHeaders & BlockBlobCommitBlockList201Headers; +} + +export interface BlockBlobCommitBlockListDefaultResponse extends HttpResponse { + status: string; + body: StorageErrorOutput; +} + +export interface BlockBlobGetBlockList200Headers { + /** 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; + /** 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; + /** Content-Type header */ + "content-type": "application/xml"; +} + +/** The request has succeeded. */ +export interface BlockBlobGetBlockList200Response extends HttpResponse { + status: "200"; + body: BlockLookupListOutput; + headers: RawHttpHeaders & BlockBlobGetBlockList200Headers; +} + +export interface BlockBlobGetBlockListDefaultResponse 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..d4919ac91ac5 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/test/public/sampleTest.spec.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createRecorder } from "./utils/recordedClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async function () { + // recorder = await createRecorder(this); + }); + + afterEach(async function () { + // 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..6e425fdcfdf9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/test/public/utils/recordedClient.ts @@ -0,0 +1,29 @@ +// 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/tsconfig.browser.config.json b/sdk/storage/azure-storage-blob-rest/tsconfig.browser.config.json new file mode 100644 index 000000000000..091177fcb991 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/tsconfig.browser.config.json @@ -0,0 +1,10 @@ +{ + "extends": "./.tshy/build.json", + "include": ["src/**/*.ts", "src/**/*.mts", "test/**/*.spec.ts"], + "exclude": ["test/**/node/**/*.ts"], + "compilerOptions": { + "outDir": "./dist-test/browser", + "rootDir": ".", + "skipLibCheck": true + } +} 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..72266609583d --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig", + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "rootDir": ".", + "skipLibCheck": true + }, + "include": [ + "src/**/*.ts", + "src/**/*.mts", + "src/**/*.cts", + "test/**/*.ts", + "test/**/*.ts" + ] +} 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..a5b795d470c9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/storage/Microsoft.BlobStorage +commit: 1be932d792eeae60f18a40f6ce0ae07f070dec55 +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..da68c1d231aa --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/vitest.browser.config.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig } from "vitest/config"; +import { relativeRecordingsPath } from "@azure-tools/test-recorder"; + +process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); + +export default defineConfig({ + define: { + "process.env": process.env, + }, + test: { + reporters: ["basic", "junit"], + outputFile: { + junit: "test-results.browser.xml", + }, + browser: { + enabled: true, + headless: true, + name: "chromium", + provider: "playwright", + }, + fakeTimers: { + toFake: ["setTimeout", "Date"], + }, + watch: false, + include: ["dist-test/browser/**/*.spec.js"], + coverage: { + include: ["dist-test/browser/**/*.spec.js"], + provider: "istanbul", + reporter: ["text", "json", "html"], + reportsDirectory: "coverage-browser", + }, + 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..2cf5d0e02c2e --- /dev/null +++ b/sdk/storage/azure-storage-blob-rest/vitest.config.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig } from "vitest/config"; +import { relativeRecordingsPath } from "@azure-tools/test-recorder"; + +export default defineConfig({ + test: { + reporters: ["basic", "junit"], + outputFile: { + junit: "test-results.browser.xml", + }, + fakeTimers: { + toFake: ["setTimeout", "Date"], + }, + watch: false, + include: ["test/**/*.spec.ts"], + exclude: ["test/**/browser/*.spec.ts"], + coverage: { + include: ["src/**/*.ts"], + exclude: [ + "src/**/*-browser.mts", + "src/**/*-react-native.mts", + "vitest*.config.ts", + "samples-dev/**/*.ts", + ], + provider: "istanbul", + reporter: ["text", "json", "html"], + reportsDirectory: "coverage", + }, + testTimeout: 1200000, + hookTimeout: 1200000, + }, +});