diff --git a/sdk/core/core-http/lib/axiosHttpClient.ts b/sdk/core/core-http/lib/axiosHttpClient.ts index 32a121134889..067f55f8e73c 100644 --- a/sdk/core/core-http/lib/axiosHttpClient.ts +++ b/sdk/core/core-http/lib/axiosHttpClient.ts @@ -143,6 +143,15 @@ export class AxiosHttpClient implements HttpClient { config.httpAgent = agent.agent; } } + // This hack is still required with 0.19.0 version of axios since axios tries to merge the + // Content-Type header from it's config[""] where the method name is lower-case, + // into the request header. It could be possible that the Content-Type header is not present + // in the original request and this would create problems while creating the signature for + // storage data plane sdks. + axios.interceptors.request.use((config: AxiosRequestConfig) => ({ + ...config, + method: (config.method as Method) && (config.method as Method).toUpperCase() as Method + })); res = await axios.request(config); } catch (err) { diff --git a/sdk/core/core-http/lib/credentials/tokenCredential.ts b/sdk/core/core-http/lib/credentials/tokenCredential.ts index 6941dd2c8d05..252139d4a9ad 100644 --- a/sdk/core/core-http/lib/credentials/tokenCredential.ts +++ b/sdk/core/core-http/lib/credentials/tokenCredential.ts @@ -52,5 +52,5 @@ export interface AccessToken { * @param credential The assumed TokenCredential to be tested. */ export function isTokenCredential(credential: any): credential is TokenCredential { - return "getToken" in credential; + return credential && typeof credential.getToken === "function"; } diff --git a/sdk/core/core-http/test/mockHttp.ts b/sdk/core/core-http/test/mockHttp.ts index 0157787f0eed..56898b9d92c4 100644 --- a/sdk/core/core-http/test/mockHttp.ts +++ b/sdk/core/core-http/test/mockHttp.ts @@ -4,7 +4,7 @@ import xhrMock, { proxy } from "xhr-mock"; import MockAdapter from "axios-mock-adapter"; import { isNode, HttpMethods } from "../lib/coreHttp"; -import { AxiosRequestConfig, AxiosInstance } from "axios"; +import { AxiosRequestConfig, AxiosInstance, Method } from "axios"; export type UrlFilter = string | RegExp; @@ -41,6 +41,10 @@ class NodeHttpMock implements HttpMockFacade { throw new Error("Axios instance cannot be undefined"); } this._mockAdapter = new MockAdapter(axiosInstance); + axiosInstance.interceptors.request.use((config: AxiosRequestConfig) => ({ + ...config, + method: (config.method as Method) && (config.method as Method).toLowerCase() as Method + })); } setup(): void { diff --git a/sdk/storage/storage-blob/BreakingChanges.md b/sdk/storage/storage-blob/BreakingChanges.md index d91ae877d4f6..4b00d5cc590c 100644 --- a/sdk/storage/storage-blob/BreakingChanges.md +++ b/sdk/storage/storage-blob/BreakingChanges.md @@ -1,5 +1,8 @@ # Breaking Changes +2019.6 Version 11.0.0-preview.1 +* `TokenCredential` has been renamed to `RawTokenCredential` to make way for the new `@azure/identity` library's `TokenCredential` interface. + 2018.12 10.3.0 * Updated convenience layer methods enum type parameters into typescript union types, this will help reducing bundle footprint. @@ -21,4 +24,4 @@ * `String.prototype.startsWith` * `String.prototype.endsWith` * `String.prototype.repeat` - * `String.prototype.includes` \ No newline at end of file + * `String.prototype.includes` diff --git a/sdk/storage/storage-blob/package.json b/sdk/storage/storage-blob/package.json index 5e3e96e063e3..5c6adfa8dd94 100644 --- a/sdk/storage/storage-blob/package.json +++ b/sdk/storage/storage-blob/package.json @@ -77,12 +77,13 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js#readme", "sideEffects": false, "dependencies": { - "@azure/ms-rest-js": "^1.2.6", + "@azure/core-http": "^1.2.6", "@azure/core-paging": "^1.0.0", "events": "^3.0.0", "tslib": "^1.9.3" }, "devDependencies": { + "@azure/identity": "^0.1.0", "@microsoft/api-extractor": "^7.1.5", "@types/dotenv": "^6.1.0", "@types/fs-extra": "~7.0.0", diff --git a/sdk/storage/storage-blob/rollup.base.config.js b/sdk/storage/storage-blob/rollup.base.config.js index 0e523e25bfe2..c9b902ee1512 100644 --- a/sdk/storage/storage-blob/rollup.base.config.js +++ b/sdk/storage/storage-blob/rollup.base.config.js @@ -23,7 +23,7 @@ const depNames = Object.keys(pkg.dependencies); const production = process.env.NODE_ENV === "production"; export function nodeConfig(test = false) { - const externalNodeBuiltins = ["@azure/ms-rest-js", "crypto", "fs", "events", "os", "stream"]; + const externalNodeBuiltins = ["@azure/core-http", "crypto", "fs", "events", "os", "stream"]; const baseConfig = { input: "dist-esm/src/index.js", external: depNames.concat(externalNodeBuiltins), @@ -70,7 +70,6 @@ export function nodeConfig(test = false) { export function browserConfig(test = false, production = false) { const baseConfig = { input: "dist-esm/src/index.browser.js", - external: ["ms-rest-js"], output: { file: "browser/azure-storage-blob.js", banner: banner, diff --git a/sdk/storage/storage-blob/samples/README.md b/sdk/storage/storage-blob/samples/README.md index a44c910d4a86..2402e1d7947d 100644 --- a/sdk/storage/storage-blob/samples/README.md +++ b/sdk/storage/storage-blob/samples/README.md @@ -14,6 +14,10 @@ npm install @azure/storage-blob - Note down the "AccountName", "AccountKey" obtained at **Access keys** and "AccountSAS" from **Shared access signature** under **Settings** tab. Before running any of the samples, update with the credentials you have noted down above. +### Authenticating with Azure Active Directory + +If you have [registered an application](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app) with an Azure Active Directory tenant, you can [assign it to an RBAC role](https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad) in your Azure Storage account. This enables you to use the Azure.Identity library to authenticate with Azure Storage as shown in the [azureAdAuth.ts sample](./samples/azureAdAuth.ts). + ## Running Samples - Change `"../.."` to `"@azure/storage-blob"` in the samples in order to import the published package instead of using source code. diff --git a/sdk/storage/storage-blob/samples/javascript/azureAdAuth.js b/sdk/storage/storage-blob/samples/javascript/azureAdAuth.js new file mode 100644 index 000000000000..b5d4fb26f34b --- /dev/null +++ b/sdk/storage/storage-blob/samples/javascript/azureAdAuth.js @@ -0,0 +1,44 @@ +/* + Setup: Enter your Azure Active Directory credentials as described in main() +*/ + +const { BlobServiceClient } = require("../.."); // Change to "@azure/storage-blob" in your package +const { DefaultAzureCredential } = require("@azure/identity"); + +async function main() { + // Enter your storage account name + const account = ""; + + // DefaultAzureCredential will first look for Azure Active Directory (AAD) + // client secret credentials in the following environment variables: + // + // - AZURE_TENANT_ID: The ID of your AAD tenant + // - AZURE_CLIENT_ID: The ID of your AAD app registration (client) + // - AZURE_CLIENT_SECRET: The client secret for your AAD app registration + // + // If those environment variables aren't found and your application is deployed + // to an Azure VM or App Service instance, the managed service identity endpoint + // will be used as a fallback authentication source. + const defaultAzureCredential = new DefaultAzureCredential(); + + const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + defaultAzureCredential, + ); + + // Create a container + const containerName = `newcontainer${new Date().getTime()}`; + const createContainerResponse = await blobServiceClient + .createContainerClient(containerName) + .create(); + console.log(`Created container ${containerName} successfully`, createContainerResponse.requestId); +} + +// An async method returns a Promise object, which is compatible with then().catch() coding style. +main() + .then(() => { + console.log("Successfully executed the sample."); + }) + .catch((err) => { + console.log(err.message); + }); diff --git a/sdk/storage/storage-blob/samples/javascript/basic.js b/sdk/storage/storage-blob/samples/javascript/basic.js index 622adfdd903a..50f6c7928f04 100644 --- a/sdk/storage/storage-blob/samples/javascript/basic.js +++ b/sdk/storage/storage-blob/samples/javascript/basic.js @@ -7,7 +7,7 @@ const { newPipeline, SharedKeyCredential, AnonymousCredential, - TokenCredential + RawTokenCredential } = require("../.."); // Change to "@azure/storage-blob" in your package async function main() { @@ -18,8 +18,11 @@ async function main() { // Use SharedKeyCredential with storage account and account key const sharedKeyCredential = new SharedKeyCredential(account, accountKey); - // Use TokenCredential with OAuth token - const tokenCredential = new TokenCredential("token"); + // Use RawTokenCredential with OAuth token. You can find more + // TokenCredential implementations in the @azure/identity library + // to use client secrets, certificates, or managed identities for + // authentication. + const tokenCredential = new RawTokenCredential("token"); tokenCredential.token = "renewedToken"; // Renew the token by updating token field of token credential // Use AnonymousCredential when url already includes a SAS signature diff --git a/sdk/storage/storage-blob/samples/typescript/azureAdAuth.ts b/sdk/storage/storage-blob/samples/typescript/azureAdAuth.ts new file mode 100644 index 000000000000..b9d5eb92bd90 --- /dev/null +++ b/sdk/storage/storage-blob/samples/typescript/azureAdAuth.ts @@ -0,0 +1,44 @@ +/* + Setup: Enter your Azure Active Directory credentials as described in main() +*/ + +import { BlobServiceClient, SharedKeyCredential } from "../../src"; // Change to "@azure/storage-blob" in your package +import { DefaultAzureCredential } from "@azure/identity"; + +async function main() { + // Enter your storage account name + const account = ""; + + // DefaultAzureCredential will first look for Azure Active Directory (AAD) + // client secret credentials in the following environment variables: + // + // - AZURE_TENANT_ID: The ID of your AAD tenant + // - AZURE_CLIENT_ID: The ID of your AAD app registration (client) + // - AZURE_CLIENT_SECRET: The client secret for your AAD app registration + // + // If those environment variables aren't found and your application is deployed + // to an Azure VM or App Service instance, the managed service identity endpoint + // will be used as a fallback authentication source. + const defaultAzureCredential = new DefaultAzureCredential(); + + const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + defaultAzureCredential, + ); + + // Create a container + const containerName = `newcontainer${new Date().getTime()}`; + const createContainerResponse = await blobServiceClient + .createContainerClient(containerName) + .create(); + console.log(`Created container ${containerName} successfully`, createContainerResponse.requestId); +} + +// An async method returns a Promise object, which is compatible with then().catch() coding style. +main() + .then(() => { + console.log("Successfully executed the sample."); + }) + .catch((err) => { + console.log(err.message); + }); diff --git a/sdk/storage/storage-blob/samples/typescript/basic.ts b/sdk/storage/storage-blob/samples/typescript/basic.ts index 861e299cda6b..80abfc79814a 100644 --- a/sdk/storage/storage-blob/samples/typescript/basic.ts +++ b/sdk/storage/storage-blob/samples/typescript/basic.ts @@ -7,7 +7,7 @@ import { Models, SharedKeyCredential, newPipeline, - TokenCredential, + RawTokenCredential, } from "../../src"; // Change to "@azure/storage-blob" in your package async function main() { @@ -18,8 +18,11 @@ async function main() { // Use SharedKeyCredential with storage account and account key const sharedKeyCredential = new SharedKeyCredential(account, accountKey); - // Use TokenCredential with OAuth token - const tokenCredential = new TokenCredential("token"); + // Use RawTokenCredential with OAuth token. You can find more + // TokenCredential implementations in the @azure/identity library + // to use client secrets, certificates, or managed identities for + // authentication. + const tokenCredential = new RawTokenCredential("token"); tokenCredential.token = "renewedToken"; // Renew the token by updating token field of token credential // Use AnonymousCredential when url already includes a SAS signature diff --git a/sdk/storage/storage-blob/src/Aborter.ts b/sdk/storage/storage-blob/src/Aborter.ts index c63aa76ccf68..63710e3d9ed4 100644 --- a/sdk/storage/storage-blob/src/Aborter.ts +++ b/sdk/storage/storage-blob/src/Aborter.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { AbortSignalLike, isNode } from "@azure/ms-rest-js"; +import { AbortSignalLike, isNode } from "@azure/core-http"; /** * An aborter instance implements AbortSignal interface, can abort HTTP requests. diff --git a/sdk/storage/storage-blob/src/AppendBlobClient.ts b/sdk/storage/storage-blob/src/AppendBlobClient.ts index b17cecdde4ef..1e7b2a9dc459 100644 --- a/sdk/storage/storage-blob/src/AppendBlobClient.ts +++ b/sdk/storage/storage-blob/src/AppendBlobClient.ts @@ -1,7 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { HttpRequestBody, TransferProgressEvent } from "@azure/ms-rest-js"; +import { + HttpRequestBody, + TransferProgressEvent, + TokenCredential, + isTokenCredential +} from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; @@ -143,12 +148,13 @@ export class AppendBlobClient extends BlobClient { * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. * However, if a blob name includes ? or %, blob name must be encoded in the URL. * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, AnonymousCredential is used. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. If not specified, + * AnonymousCredential is used. * @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline. * @memberof AppendBlobClient */ - constructor(url: string, credential: Credential, options?: NewPipelineOptions); + constructor(url: string, credential: Credential | TokenCredential, options?: NewPipelineOptions); /** * Creates an instance of AppendBlobClient. * This method accepts an encoded URL or non-encoded URL pointing to an append blob. @@ -170,7 +176,7 @@ export class AppendBlobClient extends BlobClient { constructor(url: string, pipeline: Pipeline); constructor( urlOrConnectionString: string, - credentialOrPipelineOrContainerName: string | Credential | Pipeline, + credentialOrPipelineOrContainerName: string | Credential | TokenCredential | Pipeline, blobNameOrOptions?: string | NewPipelineOptions, options?: NewPipelineOptions ) { @@ -179,7 +185,10 @@ export class AppendBlobClient extends BlobClient { let pipeline: Pipeline; if (credentialOrPipelineOrContainerName instanceof Pipeline) { pipeline = credentialOrPipelineOrContainerName; - } else if (credentialOrPipelineOrContainerName instanceof Credential) { + } else if ( + credentialOrPipelineOrContainerName instanceof Credential || + isTokenCredential(credentialOrPipelineOrContainerName) + ) { options = blobNameOrOptions as NewPipelineOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if ( diff --git a/sdk/storage/storage-blob/src/BlobClient.ts b/sdk/storage/storage-blob/src/BlobClient.ts index e299df3b6156..b9c652b5e85e 100644 --- a/sdk/storage/storage-blob/src/BlobClient.ts +++ b/sdk/storage/storage-blob/src/BlobClient.ts @@ -1,7 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { isNode, TransferProgressEvent } from "@azure/ms-rest-js"; +import { + isNode, + TransferProgressEvent, + TokenCredential, + isTokenCredential +} from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; @@ -579,12 +584,13 @@ export class BlobClient extends StorageClient { * @param {string} url A Client string pointing to Azure Storage blob service, such as * "https://myaccount.blob.core.windows.net". You can append a SAS * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, AnonymousCredential is used. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. If not specified, + * AnonymousCredential is used. * @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline. * @memberof BlobClient */ - constructor(url: string, credential?: Credential, options?: NewPipelineOptions); + constructor(url: string, credential?: Credential | TokenCredential, options?: NewPipelineOptions); /** * Creates an instance of BlobClient. * This method accepts an encoded URL or non-encoded URL pointing to a blob. @@ -606,14 +612,17 @@ export class BlobClient extends StorageClient { constructor(url: string, pipeline: Pipeline); constructor( urlOrConnectionString: string, - credentialOrPipelineOrContainerName?: string | Credential | Pipeline, + credentialOrPipelineOrContainerName?: string | Credential | TokenCredential | Pipeline, blobNameOrOptions?: string | NewPipelineOptions, options?: NewPipelineOptions ) { let pipeline: Pipeline; if (credentialOrPipelineOrContainerName instanceof Pipeline) { pipeline = credentialOrPipelineOrContainerName; - } else if (credentialOrPipelineOrContainerName instanceof Credential) { + } else if ( + credentialOrPipelineOrContainerName instanceof Credential || + isTokenCredential(credentialOrPipelineOrContainerName) + ) { options = blobNameOrOptions as NewPipelineOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if ( diff --git a/sdk/storage/storage-blob/src/BlobDownloadResponse.ts b/sdk/storage/storage-blob/src/BlobDownloadResponse.ts index 3b329fb30eb4..017adbc0e9b7 100644 --- a/sdk/storage/storage-blob/src/BlobDownloadResponse.ts +++ b/sdk/storage/storage-blob/src/BlobDownloadResponse.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { HttpResponse, isNode } from "@azure/ms-rest-js"; +import { HttpResponse, isNode } from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Metadata } from "./models"; diff --git a/sdk/storage/storage-blob/src/BlobServiceClient.ts b/sdk/storage/storage-blob/src/BlobServiceClient.ts index 67fcd76d5d77..601a58f5a47f 100644 --- a/sdk/storage/storage-blob/src/BlobServiceClient.ts +++ b/sdk/storage/storage-blob/src/BlobServiceClient.ts @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import { + TokenCredential, + isTokenCredential +} from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; import { ListContainersIncludeType } from "./generated/lib/models/index"; @@ -200,12 +204,13 @@ export class BlobServiceClient extends StorageClient { * @param {string} url A Client string pointing to Azure Storage blob service, such as * "https://myaccount.blob.core.windows.net". You can append a SAS * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, AnonymousCredential is used. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. If not specified, + * AnonymousCredential is used. * @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline. * @memberof BlobServiceClient */ - constructor(url: string, credential?: Credential, options?: NewPipelineOptions); + constructor(url: string, credential?: Credential | TokenCredential, options?: NewPipelineOptions); /** * Creates an instance of BlobServiceClient. * @@ -219,13 +224,16 @@ export class BlobServiceClient extends StorageClient { constructor(url: string, pipeline: Pipeline); constructor( url: string, - credentialOrPipeline?: Credential | Pipeline, + credentialOrPipeline?: Credential | TokenCredential | Pipeline, options?: NewPipelineOptions ) { let pipeline: Pipeline; if (credentialOrPipeline instanceof Pipeline) { pipeline = credentialOrPipeline; - } else if (credentialOrPipeline instanceof Credential) { + } else if ( + credentialOrPipeline instanceof Credential || + isTokenCredential(credentialOrPipeline) + ) { pipeline = newPipeline(credentialOrPipeline, options); } else { // The second parameter is undefined. Use anonymous credential diff --git a/sdk/storage/storage-blob/src/BlockBlobClient.ts b/sdk/storage/storage-blob/src/BlockBlobClient.ts index 63367eed0f82..1055ce7391dd 100644 --- a/sdk/storage/storage-blob/src/BlockBlobClient.ts +++ b/sdk/storage/storage-blob/src/BlockBlobClient.ts @@ -7,8 +7,11 @@ import { generateUuid, HttpRequestBody, HttpResponse, - TransferProgressEvent -} from "@azure/ms-rest-js"; + TransferProgressEvent, + TokenCredential, + isTokenCredential +} from "@azure/core-http"; + import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; import { BlobClient } from "./internal"; @@ -423,11 +426,11 @@ export class BlockBlobClient extends BlobClient { * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. * However, if a blob name includes ? or %, blob name must be encoded in the URL. * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. * @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline. * @memberof BlockBlobClient */ - constructor(url: string, credential?: Credential, options?: NewPipelineOptions); + constructor(url: string, credential?: Credential | TokenCredential, options?: NewPipelineOptions); /** * Creates an instance of BlockBlobClient. * This method accepts an encoded URL or non-encoded URL pointing to a block blob. @@ -449,7 +452,7 @@ export class BlockBlobClient extends BlobClient { constructor(url: string, pipeline: Pipeline); constructor( urlOrConnectionString: string, - credentialOrPipelineOrContainerName?: string | Credential | Pipeline, + credentialOrPipelineOrContainerName?: string | Credential | TokenCredential | Pipeline, blobNameOrOptions?: string | NewPipelineOptions, options?: NewPipelineOptions ) { @@ -458,7 +461,10 @@ export class BlockBlobClient extends BlobClient { let pipeline: Pipeline; if (credentialOrPipelineOrContainerName instanceof Pipeline) { pipeline = credentialOrPipelineOrContainerName; - } else if (credentialOrPipelineOrContainerName instanceof Credential) { + } else if ( + credentialOrPipelineOrContainerName instanceof Credential || + isTokenCredential(credentialOrPipelineOrContainerName) + ) { options = blobNameOrOptions as NewPipelineOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if ( @@ -773,7 +779,7 @@ export class BlockBlobClient extends BlobClient { if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError( `The buffer's size is too big or the BlockSize is too small;` + - `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}` + `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}` ); } @@ -975,7 +981,7 @@ export class BlockBlobClient extends BlobClient { if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError( `The buffer's size is too big or the BlockSize is too small;` + - `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}` + `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}` ); } diff --git a/sdk/storage/storage-blob/src/BrowserPolicyFactory.ts b/sdk/storage/storage-blob/src/BrowserPolicyFactory.ts index 2038cf8deb5d..dd71e3befe57 100644 --- a/sdk/storage/storage-blob/src/BrowserPolicyFactory.ts +++ b/sdk/storage/storage-blob/src/BrowserPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { BrowserPolicy } from "./policies/BrowserPolicy"; /** diff --git a/sdk/storage/storage-blob/src/ContainerClient.ts b/sdk/storage/storage-blob/src/ContainerClient.ts index ca0cc3b66911..5efd847af151 100644 --- a/sdk/storage/storage-blob/src/ContainerClient.ts +++ b/sdk/storage/storage-blob/src/ContainerClient.ts @@ -1,7 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { HttpRequestBody, HttpResponse } from "@azure/ms-rest-js"; +import { + HttpRequestBody, + HttpResponse, + TokenCredential, + isTokenCredential +} from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; import { Container } from "./generated/lib/operations"; @@ -199,24 +204,24 @@ export interface SignedIdentifier { export declare type ContainerGetAccessPolicyResponse = { signedIdentifiers: SignedIdentifier[]; } & Models.ContainerGetAccessPolicyHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { /** - * The underlying HTTP response. + * The parsed HTTP response headers. */ - _response: HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: Models.ContainerGetAccessPolicyHeaders; - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Models.SignedIdentifier[]; - }; + parsedHeaders: Models.ContainerGetAccessPolicyHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Models.SignedIdentifier[]; }; +}; /** * Options to configure Container - Set Access Policy operation. @@ -475,12 +480,13 @@ export class ContainerClient extends StorageClient { * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. * However, if a blob name includes ? or %, blob name must be encoded in the URL. * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, AnonymousCredential is used. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. If not specified, + * AnonymousCredential is used. * @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline. * @memberof ContainerClient */ - constructor(url: string, credential?: Credential, options?: NewPipelineOptions); + constructor(url: string, credential?: Credential | TokenCredential, options?: NewPipelineOptions); /** * Creates an instance of PageBlobClient. * This method accepts an encoded URL or non-encoded URL pointing to a page blob. @@ -503,13 +509,16 @@ export class ContainerClient extends StorageClient { constructor(url: string, pipeline: Pipeline); constructor( urlOrConnectionString: string, - credentialOrPipelineOrContainerName?: string | Credential | Pipeline, + credentialOrPipelineOrContainerName?: string | Credential | TokenCredential | Pipeline, options?: NewPipelineOptions ) { let pipeline: Pipeline; if (credentialOrPipelineOrContainerName instanceof Pipeline) { pipeline = credentialOrPipelineOrContainerName; - } else if (credentialOrPipelineOrContainerName instanceof Credential) { + } else if ( + credentialOrPipelineOrContainerName instanceof Credential || + isTokenCredential(credentialOrPipelineOrContainerName) + ) { pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if ( !credentialOrPipelineOrContainerName && diff --git a/sdk/storage/storage-blob/src/LeaseClient.ts b/sdk/storage/storage-blob/src/LeaseClient.ts index d59274721e90..d000745681a6 100644 --- a/sdk/storage/storage-blob/src/LeaseClient.ts +++ b/sdk/storage/storage-blob/src/LeaseClient.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { HttpResponse, generateUuid } from "@azure/ms-rest-js"; +import { HttpResponse, generateUuid } from "@azure/core-http"; import * as Models from "../src/generated/lib/models"; import { Aborter } from "./Aborter"; import { ContainerClient } from "./ContainerClient"; diff --git a/sdk/storage/storage-blob/src/LoggingPolicyFactory.ts b/sdk/storage/storage-blob/src/LoggingPolicyFactory.ts index 9ab0d1f1b4ee..84f7cf38bcfa 100644 --- a/sdk/storage/storage-blob/src/LoggingPolicyFactory.ts +++ b/sdk/storage/storage-blob/src/LoggingPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { LoggingPolicy } from "./policies/LoggingPolicy"; diff --git a/sdk/storage/storage-blob/src/PageBlobClient.ts b/sdk/storage/storage-blob/src/PageBlobClient.ts index 481620f0b853..aecfe63b515f 100644 --- a/sdk/storage/storage-blob/src/PageBlobClient.ts +++ b/sdk/storage/storage-blob/src/PageBlobClient.ts @@ -1,7 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { HttpRequestBody, TransferProgressEvent } from "@azure/ms-rest-js"; +import { + HttpRequestBody, + TransferProgressEvent, + TokenCredential, + isTokenCredential +} from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; @@ -303,11 +308,12 @@ export class PageBlobClient extends BlobClient { * @param {string} url A Client string pointing to Azure Storage blob service, such as * "https://myaccount.blob.core.windows.net". You can append a SAS * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. * @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline. * @memberof PageBlobClient */ - constructor(url: string, credential: Credential, options?: NewPipelineOptions); + constructor(url: string, credential: Credential | TokenCredential, options?: NewPipelineOptions); /** * Creates an instance of PageBlobClient. * @@ -326,7 +332,7 @@ export class PageBlobClient extends BlobClient { constructor(url: string, pipeline: Pipeline); constructor( urlOrConnectionString: string, - credentialOrPipelineOrContainerName: string | Credential | Pipeline, + credentialOrPipelineOrContainerName: string | Credential | TokenCredential | Pipeline, blobNameOrOptions?: string | NewPipelineOptions, options?: NewPipelineOptions ) { @@ -335,7 +341,10 @@ export class PageBlobClient extends BlobClient { let pipeline: Pipeline; if (credentialOrPipelineOrContainerName instanceof Pipeline) { pipeline = credentialOrPipelineOrContainerName; - } else if (credentialOrPipelineOrContainerName instanceof Credential) { + } else if ( + credentialOrPipelineOrContainerName instanceof Credential || + isTokenCredential(credentialOrPipelineOrContainerName) + ) { options = blobNameOrOptions as NewPipelineOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if ( diff --git a/sdk/storage/storage-blob/src/Pipeline.ts b/sdk/storage/storage-blob/src/Pipeline.ts index e72f8d87313e..a2fcd5cb0daf 100644 --- a/sdk/storage/storage-blob/src/Pipeline.ts +++ b/sdk/storage/storage-blob/src/Pipeline.ts @@ -17,8 +17,11 @@ import { WebResource, proxyPolicy, getDefaultProxySettings, - isNode -} from "@azure/ms-rest-js"; + isNode, + TokenCredential, + isTokenCredential, + bearerTokenAuthenticationPolicy +} from "@azure/core-http"; import { BrowserPolicyFactory } from "./BrowserPolicyFactory"; import { Credential } from "./credentials/Credential"; @@ -184,12 +187,13 @@ export interface NewPipelineOptions { * Creates a new Pipeline object with Credential provided. * * @export - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. * @param {NewPipelineOptions} [pipelineOptions] Optional. Options. * @returns {Pipeline} A new Pipeline object. */ export function newPipeline( - credential: Credential, + credential: Credential | TokenCredential, pipelineOptions: NewPipelineOptions = {} ): Pipeline { // Order is important. Closer to the API at the top & closer to the network at the bottom. @@ -208,7 +212,10 @@ export function newPipeline( // ProxyPolicy is only avaiable in Node.js runtime, not in browsers factories.push(proxyPolicy(getDefaultProxySettings((pipelineOptions.proxy || {}).url))); } - factories.push(credential); + factories.push( + isTokenCredential(credential) + ? bearerTokenAuthenticationPolicy(credential, "https://storage.azure.com/.default") + : credential); return new Pipeline(factories, { HTTPClient: pipelineOptions.httpClient, diff --git a/sdk/storage/storage-blob/src/RetryPolicyFactory.ts b/sdk/storage/storage-blob/src/RetryPolicyFactory.ts index 2509f225e790..2e97cde403fb 100644 --- a/sdk/storage/storage-blob/src/RetryPolicyFactory.ts +++ b/sdk/storage/storage-blob/src/RetryPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { RetryPolicy, RetryPolicyType } from "./policies/RetryPolicy"; /** diff --git a/sdk/storage/storage-blob/src/TelemetryPolicyFactory.ts b/sdk/storage/storage-blob/src/TelemetryPolicyFactory.ts index b35d824d9434..da5a8f13a9ab 100644 --- a/sdk/storage/storage-blob/src/TelemetryPolicyFactory.ts +++ b/sdk/storage/storage-blob/src/TelemetryPolicyFactory.ts @@ -6,7 +6,7 @@ import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import * as os from "os"; import { TelemetryPolicy } from "./policies/TelemetryPolicy"; diff --git a/sdk/storage/storage-blob/src/UniqueRequestIDPolicyFactory.ts b/sdk/storage/storage-blob/src/UniqueRequestIDPolicyFactory.ts index 3128391507e0..caf56b5ac0c5 100644 --- a/sdk/storage/storage-blob/src/UniqueRequestIDPolicyFactory.ts +++ b/sdk/storage/storage-blob/src/UniqueRequestIDPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { UniqueRequestIDPolicy } from "./policies/UniqueRequestIDPolicy"; /** diff --git a/sdk/storage/storage-blob/src/credentials/AnonymousCredential.ts b/sdk/storage/storage-blob/src/credentials/AnonymousCredential.ts index 85f357b28d58..a13ff503bd52 100644 --- a/sdk/storage/storage-blob/src/credentials/AnonymousCredential.ts +++ b/sdk/storage/storage-blob/src/credentials/AnonymousCredential.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions } from "@azure/core-http"; import { AnonymousCredentialPolicy } from "../policies/AnonymousCredentialPolicy"; import { Credential } from "./Credential"; diff --git a/sdk/storage/storage-blob/src/credentials/Credential.ts b/sdk/storage/storage-blob/src/credentials/Credential.ts index 1150f504dc4d..7a201480194a 100644 --- a/sdk/storage/storage-blob/src/credentials/Credential.ts +++ b/sdk/storage/storage-blob/src/credentials/Credential.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { CredentialPolicy } from "../policies/CredentialPolicy"; /** diff --git a/sdk/storage/storage-queue/src/credentials/TokenCredential.ts b/sdk/storage/storage-blob/src/credentials/RawTokenCredential.ts similarity index 53% rename from sdk/storage/storage-queue/src/credentials/TokenCredential.ts rename to sdk/storage/storage-blob/src/credentials/RawTokenCredential.ts index 2930f7891806..52aeac1225b7 100644 --- a/sdk/storage/storage-queue/src/credentials/TokenCredential.ts +++ b/sdk/storage/storage-blob/src/credentials/RawTokenCredential.ts @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; - -import { Credential } from "../credentials/Credential"; -import { TokenCredentialPolicy } from "../policies/TokenCredentialPolicy"; +import { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-http"; /** - * TokenCredential is a Credential used to generate a TokenCredentialPolicy. - * Renew token by setting a new token string value to token property. + * RawTokenCredential is a TokenCredential that always returns the given token. + * Renew the token by setting a new token string value to token property. * * @example - * const tokenCredential = new TokenCredential("token"); + * const rawTokenCredential = new RawTokenCredential("token"); * const pipeline = newPipeline(tokenCredential); * * const queueServiceClient = new QueueServiceClient("https://mystorageaccount.queue.core.windows.net", pipeline); @@ -26,39 +23,37 @@ import { TokenCredentialPolicy } from "../policies/TokenCredentialPolicy"; * } * }, 60 * 60 * 1000); // Set an interval time before your token expired * @export - * @class TokenCredential - * @extends {Credential} + * @implements {TokenCredential} * */ -export class TokenCredential extends Credential { +export class RawTokenCredential implements TokenCredential { /** * Mutable token value. You can set a renewed token value to this property, * for example, when an OAuth token is expired. * * @type {string} - * @memberof TokenCredential */ public token: string; /** * Creates an instance of TokenCredential. * @param {string} token - * @memberof TokenCredential */ constructor(token: string) { - super(); this.token = token; } /** - * Creates a TokenCredentialPolicy object. - * - * @param {RequestPolicy} nextPolicy - * @param {RequestPolicyOptions} options - * @returns {TokenCredentialPolicy} - * @memberof TokenCredential + * Retrieves the token stored in this RawTokenCredential. + * + * @param _scopes Ignored since token is already known. + * @param _options Ignored since token is already known. + * @returns {AccessToken} The access token details. */ - public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): TokenCredentialPolicy { - return new TokenCredentialPolicy(nextPolicy, options, this); + async getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise { + return { + token: this.token, + expiresOnTimestamp: Date.now() + 2 * 60 * 1000 // 2 Minutes + }; } } diff --git a/sdk/storage/storage-blob/src/credentials/SharedKeyCredential.ts b/sdk/storage/storage-blob/src/credentials/SharedKeyCredential.ts index 52ff7dfd09ab..88f8739bea47 100644 --- a/sdk/storage/storage-blob/src/credentials/SharedKeyCredential.ts +++ b/sdk/storage/storage-blob/src/credentials/SharedKeyCredential.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as Crypto from "crypto"; -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions } from "@azure/core-http"; import { SharedKeyCredentialPolicy } from "../policies/SharedKeyCredentialPolicy"; import { Credential } from "./Credential"; diff --git a/sdk/storage/storage-blob/src/credentials/TokenCredential.ts b/sdk/storage/storage-blob/src/credentials/TokenCredential.ts deleted file mode 100644 index 72713bdf8f1b..000000000000 --- a/sdk/storage/storage-blob/src/credentials/TokenCredential.ts +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; - -import { Credential } from "../credentials/Credential"; -import { TokenCredentialPolicy } from "../policies/TokenCredentialPolicy"; - -/** - * TokenCredential is a Credential used to generate a TokenCredentialPolicy. - * Renew token by setting a new token string value to token property. - * - * @example - * const tokenCredential = new TokenCredential("token"); - * const pipeline = newPipeline(tokenCredential); - * - * // List containers - * const blobServiceClient = new BlobServiceClient("https://mystorageaccount.blob.core.windows.net", pipeline); - * - * // Set up a timer to refresh the token - * const timerID = setInterval(() => { - * // Update token by accessing to public tokenCredential.token - * tokenCredential.token = "updatedToken"; - * // WARNING: Timer must be manually stopped! It will forbid GC of tokenCredential - * if (shouldStop()) { - * clearInterval(timerID); - * } - * }, 60 * 60 * 1000); // Set an interval time before your token expired - * @export - * @class TokenCredential - * @extends {Credential} - * - */ -export class TokenCredential extends Credential { - /** - * Mutable token value. You can set a renewed token value to this property, - * for example, when an OAuth token is expired. - * - * @type {string} - * @memberof TokenCredential - */ - public token: string; - - /** - * Creates an instance of TokenCredential. - * @param {string} token - * @memberof TokenCredential - */ - constructor(token: string) { - super(); - this.token = token; - } - - /** - * Creates a TokenCredentialPolicy object. - * - * @param {RequestPolicy} nextPolicy - * @param {RequestPolicyOptions} options - * @returns {TokenCredentialPolicy} - * @memberof TokenCredential - */ - public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): TokenCredentialPolicy { - return new TokenCredentialPolicy(nextPolicy, options, this); - } -} diff --git a/sdk/storage/storage-blob/src/generated/lib/models/appendBlobMappers.ts b/sdk/storage/storage-blob/src/generated/lib/models/appendBlobMappers.ts index 9cc98a88cf51..70dd6c82a870 100644 --- a/sdk/storage/storage-blob/src/generated/lib/models/appendBlobMappers.ts +++ b/sdk/storage/storage-blob/src/generated/lib/models/appendBlobMappers.ts @@ -1,16 +1,13 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + AppendBlobAppendBlockHeaders, AppendBlobCreateHeaders, - StorageError, - AppendBlobAppendBlockHeaders + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-blob/src/generated/lib/models/blobMappers.ts b/sdk/storage/storage-blob/src/generated/lib/models/blobMappers.ts index 73447814474b..c6f30b0779ea 100644 --- a/sdk/storage/storage-blob/src/generated/lib/models/blobMappers.ts +++ b/sdk/storage/storage-blob/src/generated/lib/models/blobMappers.ts @@ -1,30 +1,27 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + BlobAbortCopyFromURLHeaders, + BlobAcquireLeaseHeaders, + BlobBreakLeaseHeaders, + BlobChangeLeaseHeaders, + BlobCreateSnapshotHeaders, + BlobDeleteHeaders, BlobDownloadHeaders, - StorageError, + BlobGetAccountInfoHeaders, BlobGetPropertiesHeaders, - BlobDeleteHeaders, - BlobUndeleteHeaders, - BlobSetHTTPHeadersHeaders, - BlobSetMetadataHeaders, - BlobAcquireLeaseHeaders, BlobReleaseLeaseHeaders, BlobRenewLeaseHeaders, - BlobChangeLeaseHeaders, - BlobBreakLeaseHeaders, - BlobCreateSnapshotHeaders, - BlobStartCopyFromURLHeaders, - BlobAbortCopyFromURLHeaders, + BlobSetHTTPHeadersHeaders, + BlobSetMetadataHeaders, BlobSetTierHeaders, - BlobGetAccountInfoHeaders + BlobStartCopyFromURLHeaders, + BlobUndeleteHeaders, + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-blob/src/generated/lib/models/blockBlobMappers.ts b/sdk/storage/storage-blob/src/generated/lib/models/blockBlobMappers.ts index aed447214d0c..b325840bd7a0 100644 --- a/sdk/storage/storage-blob/src/generated/lib/models/blockBlobMappers.ts +++ b/sdk/storage/storage-blob/src/generated/lib/models/blockBlobMappers.ts @@ -1,22 +1,19 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - BlockBlobUploadHeaders, - StorageError, - BlockBlobStageBlockHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockLookupList, + Block, BlockBlobCommitBlockListHeaders, + BlockBlobGetBlockListHeaders, + BlockBlobStageBlockFromURLHeaders, + BlockBlobStageBlockHeaders, + BlockBlobUploadHeaders, BlockList, - Block, - BlockBlobGetBlockListHeaders + BlockLookupList, + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-blob/src/generated/lib/models/containerMappers.ts b/sdk/storage/storage-blob/src/generated/lib/models/containerMappers.ts index ecfacb871672..22726a267131 100644 --- a/sdk/storage/storage-blob/src/generated/lib/models/containerMappers.ts +++ b/sdk/storage/storage-blob/src/generated/lib/models/containerMappers.ts @@ -1,37 +1,34 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + AccessPolicy, + BlobFlatListSegment, + BlobHierarchyListSegment, + BlobItem, + BlobPrefix, + BlobProperties, + ContainerAcquireLeaseHeaders, + ContainerBreakLeaseHeaders, + ContainerChangeLeaseHeaders, ContainerCreateHeaders, - StorageError, - ContainerGetPropertiesHeaders, ContainerDeleteHeaders, - ContainerSetMetadataHeaders, - SignedIdentifier, - AccessPolicy, ContainerGetAccessPolicyHeaders, - ContainerSetAccessPolicyHeaders, - ContainerAcquireLeaseHeaders, + ContainerGetAccountInfoHeaders, + ContainerGetPropertiesHeaders, + ContainerListBlobFlatSegmentHeaders, + ContainerListBlobHierarchySegmentHeaders, ContainerReleaseLeaseHeaders, ContainerRenewLeaseHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseHeaders, + ContainerSetAccessPolicyHeaders, + ContainerSetMetadataHeaders, ListBlobsFlatSegmentResponse, - BlobFlatListSegment, - BlobItem, - BlobProperties, - ContainerListBlobFlatSegmentHeaders, ListBlobsHierarchySegmentResponse, - BlobHierarchyListSegment, - BlobPrefix, - ContainerListBlobHierarchySegmentHeaders, - ContainerGetAccountInfoHeaders + SignedIdentifier, + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-blob/src/generated/lib/models/index.ts b/sdk/storage/storage-blob/src/generated/lib/models/index.ts index 670448b6e3d6..5c8c6200dbab 100644 --- a/sdk/storage/storage-blob/src/generated/lib/models/index.ts +++ b/sdk/storage/storage-blob/src/generated/lib/models/index.ts @@ -1,5280 +1,4003 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; /** - * @interface * An interface representing StorageError. */ export interface StorageError { - /** - * @member {string} [message] - */ message?: string; } /** - * @interface - * An interface representing AccessPolicy. * An Access policy - * */ export interface AccessPolicy { /** - * @member {string} start the date-time the policy is active - * **NOTE: This entity will be treated as a string instead of a Date because - * the API can potentially deal with a higher precision value than what is - * supported by JavaScript.** + * the date-time the policy is active + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** */ start: string; /** - * @member {string} expiry the date-time the policy expires - * **NOTE: This entity will be treated as a string instead of a Date because - * the API can potentially deal with a higher precision value than what is - * supported by JavaScript.** + * the date-time the policy expires + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** */ expiry: string; /** - * @member {string} permission the permissions for the acl policy + * the permissions for the acl policy */ permission: string; } /** - * @interface - * An interface representing BlobProperties. * Properties of a blob - * */ export interface BlobProperties { - /** - * @member {Date} [creationTime] - */ creationTime?: Date; - /** - * @member {Date} lastModified - */ lastModified: Date; - /** - * @member {string} etag - */ etag: string; /** - * @member {number} [contentLength] Size in bytes + * Size in bytes */ contentLength?: number; - /** - * @member {string} [contentType] - */ contentType?: string; - /** - * @member {string} [contentEncoding] - */ contentEncoding?: string; - /** - * @member {string} [contentLanguage] - */ contentLanguage?: string; - /** - * @member {Uint8Array} [contentMD5] - */ contentMD5?: Uint8Array; - /** - * @member {string} [contentDisposition] - */ contentDisposition?: string; - /** - * @member {string} [cacheControl] - */ cacheControl?: string; - /** - * @member {number} [blobSequenceNumber] - */ blobSequenceNumber?: number; /** - * @member {BlobType} [blobType] Possible values include: 'BlockBlob', - * 'PageBlob', 'AppendBlob' + * Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' */ blobType?: BlobType; /** - * @member {LeaseStatusType} [leaseStatus] Possible values include: 'locked', - * 'unlocked' + * Possible values include: 'locked', 'unlocked' */ leaseStatus?: LeaseStatusType; /** - * @member {LeaseStateType} [leaseState] Possible values include: - * 'available', 'leased', 'expired', 'breaking', 'broken' + * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken' */ leaseState?: LeaseStateType; /** - * @member {LeaseDurationType} [leaseDuration] Possible values include: - * 'infinite', 'fixed' + * Possible values include: 'infinite', 'fixed' */ leaseDuration?: LeaseDurationType; - /** - * @member {string} [copyId] - */ copyId?: string; /** - * @member {CopyStatusType} [copyStatus] Possible values include: 'pending', - * 'success', 'aborted', 'failed' + * Possible values include: 'pending', 'success', 'aborted', 'failed' */ copyStatus?: CopyStatusType; - /** - * @member {string} [copySource] - */ copySource?: string; - /** - * @member {string} [copyProgress] - */ copyProgress?: string; - /** - * @member {Date} [copyCompletionTime] - */ copyCompletionTime?: Date; - /** - * @member {string} [copyStatusDescription] - */ copyStatusDescription?: string; - /** - * @member {boolean} [serverEncrypted] - */ serverEncrypted?: boolean; - /** - * @member {boolean} [incrementalCopy] - */ incrementalCopy?: boolean; - /** - * @member {string} [destinationSnapshot] - */ destinationSnapshot?: string; - /** - * @member {Date} [deletedTime] - */ deletedTime?: Date; - /** - * @member {number} [remainingRetentionDays] - */ remainingRetentionDays?: number; /** - * @member {AccessTier} [accessTier] Possible values include: 'P4', 'P6', - * 'P10', 'P20', 'P30', 'P40', 'P50', 'Hot', 'Cool', 'Archive' + * Possible values include: 'P4', 'P6', 'P10', 'P20', 'P30', 'P40', 'P50', 'Hot', 'Cool', + * 'Archive' */ accessTier?: AccessTier; - /** - * @member {boolean} [accessTierInferred] - */ accessTierInferred?: boolean; /** - * @member {ArchiveStatus} [archiveStatus] Possible values include: - * 'rehydrate-pending-to-hot', 'rehydrate-pending-to-cool' + * Possible values include: 'rehydrate-pending-to-hot', 'rehydrate-pending-to-cool' */ archiveStatus?: ArchiveStatus; - /** - * @member {Date} [accessTierChangeTime] - */ accessTierChangeTime?: Date; } /** - * @interface - * An interface representing BlobItem. * An Azure Storage blob - * */ export interface BlobItem { - /** - * @member {string} name - */ name: string; - /** - * @member {boolean} deleted - */ deleted: boolean; - /** - * @member {string} snapshot - */ snapshot: string; - /** - * @member {BlobProperties} properties - */ properties: BlobProperties; - /** - * @member {{ [propertyName: string]: string }} [metadata] - */ metadata?: { [propertyName: string]: string }; } /** - * @interface * An interface representing BlobFlatListSegment. */ export interface BlobFlatListSegment { - /** - * @member {BlobItem[]} blobItems - */ blobItems: BlobItem[]; } /** - * @interface - * An interface representing ListBlobsFlatSegmentResponse. * An enumeration of blobs - * */ export interface ListBlobsFlatSegmentResponse { - /** - * @member {string} serviceEndpoint - */ serviceEndpoint: string; - /** - * @member {string} containerName - */ containerName: string; - /** - * @member {string} prefix - */ prefix: string; - /** - * @member {string} marker - */ marker: string; - /** - * @member {number} maxResults - */ maxResults: number; - /** - * @member {string} delimiter - */ delimiter: string; - /** - * @member {BlobFlatListSegment} segment - */ segment: BlobFlatListSegment; - /** - * @member {string} nextMarker - */ nextMarker: string; } /** - * @interface * An interface representing BlobPrefix. */ export interface BlobPrefix { - /** - * @member {string} name - */ name: string; } /** - * @interface * An interface representing BlobHierarchyListSegment. */ export interface BlobHierarchyListSegment { - /** - * @member {BlobPrefix[]} [blobPrefixes] - */ blobPrefixes?: BlobPrefix[]; - /** - * @member {BlobItem[]} blobItems - */ blobItems: BlobItem[]; } /** - * @interface - * An interface representing ListBlobsHierarchySegmentResponse. * An enumeration of blobs - * */ export interface ListBlobsHierarchySegmentResponse { - /** - * @member {string} serviceEndpoint - */ serviceEndpoint: string; - /** - * @member {string} containerName - */ containerName: string; - /** - * @member {string} prefix - */ prefix: string; - /** - * @member {string} marker - */ marker: string; - /** - * @member {number} maxResults - */ maxResults: number; - /** - * @member {string} delimiter - */ delimiter: string; - /** - * @member {BlobHierarchyListSegment} segment - */ segment: BlobHierarchyListSegment; - /** - * @member {string} nextMarker - */ nextMarker: string; } /** - * @interface - * An interface representing Block. - * Represents a single block in a block blob. It describes the block's ID and - * size. - * + * Represents a single block in a block blob. It describes the block's ID and size. */ export interface Block { /** - * @member {string} name The base64 encoded block ID. + * The base64 encoded block ID. */ name: string; /** - * @member {number} size The block size in bytes. + * The block size in bytes. */ size: number; } /** - * @interface * An interface representing BlockList. */ export interface BlockList { - /** - * @member {Block[]} [committedBlocks] - */ committedBlocks?: Block[]; - /** - * @member {Block[]} [uncommittedBlocks] - */ uncommittedBlocks?: Block[]; } /** - * @interface * An interface representing BlockLookupList. */ export interface BlockLookupList { - /** - * @member {string[]} [committed] - */ committed?: string[]; - /** - * @member {string[]} [uncommitted] - */ uncommitted?: string[]; - /** - * @member {string[]} [latest] - */ latest?: string[]; } /** - * @interface - * An interface representing ContainerProperties. * Properties of a container - * */ export interface ContainerProperties { - /** - * @member {Date} lastModified - */ lastModified: Date; - /** - * @member {string} etag - */ etag: string; /** - * @member {LeaseStatusType} [leaseStatus] Possible values include: 'locked', - * 'unlocked' + * Possible values include: 'locked', 'unlocked' */ leaseStatus?: LeaseStatusType; /** - * @member {LeaseStateType} [leaseState] Possible values include: - * 'available', 'leased', 'expired', 'breaking', 'broken' + * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken' */ leaseState?: LeaseStateType; /** - * @member {LeaseDurationType} [leaseDuration] Possible values include: - * 'infinite', 'fixed' + * Possible values include: 'infinite', 'fixed' */ leaseDuration?: LeaseDurationType; /** - * @member {PublicAccessType} [publicAccess] Possible values include: - * 'container', 'blob' + * Possible values include: 'container', 'blob' */ publicAccess?: PublicAccessType; - /** - * @member {boolean} [hasImmutabilityPolicy] - */ hasImmutabilityPolicy?: boolean; - /** - * @member {boolean} [hasLegalHold] - */ hasLegalHold?: boolean; } /** - * @interface - * An interface representing ContainerItem. * An Azure Storage container - * */ export interface ContainerItem { - /** - * @member {string} name - */ name: string; - /** - * @member {ContainerProperties} properties - */ properties: ContainerProperties; - /** - * @member {{ [propertyName: string]: string }} [metadata] - */ metadata?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing ListContainersSegmentResponse. * An enumeration of containers - * */ export interface ListContainersSegmentResponse { - /** - * @member {string} serviceEndpoint - */ serviceEndpoint: string; - /** - * @member {string} prefix - */ prefix: string; - /** - * @member {string} [marker] - */ marker?: string; - /** - * @member {number} maxResults - */ maxResults: number; - /** - * @member {ContainerItem[]} containerItems - */ containerItems: ContainerItem[]; - /** - * @member {string} nextMarker - */ nextMarker: string; } /** - * @interface - * An interface representing CorsRule. - * 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 - * + * 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 { /** - * @member {string} allowedOrigins The origin domains that are permitted to - * make a request against the storage service via CORS. The origin domain is - * the domain from which the request originates. Note that the origin must be - * an exact case-sensitive match with the origin that the user age sends to - * the service. You can also use the wildcard character '*' to allow all - * origin domains to make requests via CORS. + * The origin domains that are permitted to make a request against the storage service via CORS. + * The origin domain is the domain from which the request originates. Note that the origin must + * be an exact case-sensitive match with the origin that the user age sends to the service. You + * can also use the wildcard character '*' to allow all origin domains to make requests via CORS. */ allowedOrigins: string; /** - * @member {string} allowedMethods The methods (HTTP request verbs) that the - * origin domain may use for a CORS request. (comma separated) + * The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma + * separated) */ allowedMethods: string; /** - * @member {string} allowedHeaders the request headers that the origin domain - * may specify on the CORS request. + * the request headers that the origin domain may specify on the CORS request. */ allowedHeaders: string; /** - * @member {string} exposedHeaders The response headers that may be sent in - * the response to the CORS request and exposed by the browser to the request - * issuer + * The response headers that may be sent in the response to the CORS request and exposed by the + * browser to the request issuer */ exposedHeaders: string; /** - * @member {number} maxAgeInSeconds The maximum amount time that a browser - * should cache the preflight OPTIONS request. + * The maximum amount time that a browser should cache the preflight OPTIONS request. */ maxAgeInSeconds: number; } /** - * @interface - * An interface representing GeoReplication. * Geo-Replication information for the Secondary Storage Service - * */ export interface GeoReplication { /** - * @member {GeoReplicationStatusType} status The status of the secondary - * location. Possible values include: 'live', 'bootstrap', 'unavailable' + * The status of the secondary location. Possible values include: 'live', 'bootstrap', + * 'unavailable' */ status: GeoReplicationStatusType; /** - * @member {Date} lastSyncTime 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 + * 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: Date; } /** - * @interface - * An interface representing RetentionPolicy. - * the retention policy which determines how long the associated data should - * persist - * + * the retention policy which determines how long the associated data should persist */ export interface RetentionPolicy { /** - * @member {boolean} enabled Indicates whether a retention policy is enabled - * for the storage service + * Indicates whether a retention policy is enabled for the storage service */ enabled: boolean; /** - * @member {number} [days] Indicates the number of days that metrics or - * logging or soft-deleted data should be retained. All data older than this - * value will be deleted + * Indicates the number of days that metrics or logging or soft-deleted data should be retained. + * All data older than this value will be deleted */ days?: number; } /** - * @interface - * An interface representing Logging. * Azure Analytics Logging settings. - * */ export interface Logging { /** - * @member {string} version The version of Storage Analytics to configure. + * The version of Storage Analytics to configure. */ version: string; /** - * @member {boolean} deleteProperty Indicates whether all delete requests - * should be logged. + * Indicates whether all delete requests should be logged. */ deleteProperty: boolean; /** - * @member {boolean} read Indicates whether all read requests should be - * logged. + * Indicates whether all read requests should be logged. */ read: boolean; /** - * @member {boolean} write Indicates whether all write requests should be - * logged. + * Indicates whether all write requests should be logged. */ write: boolean; - /** - * @member {RetentionPolicy} retentionPolicy - */ retentionPolicy: RetentionPolicy; } /** - * @interface - * An interface representing Metrics. - * a summary of request statistics grouped by API in hour or minute aggregates - * for blobs - * + * a summary of request statistics grouped by API in hour or minute aggregates for blobs */ export interface Metrics { /** - * @member {string} [version] The version of Storage Analytics to configure. + * The version of Storage Analytics to configure. */ version?: string; /** - * @member {boolean} enabled Indicates whether metrics are enabled for the - * Blob service. + * Indicates whether metrics are enabled for the Blob service. */ enabled: boolean; /** - * @member {boolean} [includeAPIs] Indicates whether metrics should generate - * summary statistics for called API operations. + * Indicates whether metrics should generate summary statistics for called API operations. */ includeAPIs?: boolean; - /** - * @member {RetentionPolicy} [retentionPolicy] - */ retentionPolicy?: RetentionPolicy; } /** - * @interface * An interface representing PageRange. */ export interface PageRange { - /** - * @member {number} start - */ start: number; - /** - * @member {number} end - */ end: number; } /** - * @interface * An interface representing ClearRange. */ export interface ClearRange { - /** - * @member {number} start - */ start: number; - /** - * @member {number} end - */ end: number; } /** - * @interface - * An interface representing PageList. * the list of pages - * */ export interface PageList { - /** - * @member {PageRange[]} [pageRange] - */ pageRange?: PageRange[]; - /** - * @member {ClearRange[]} [clearRange] - */ clearRange?: ClearRange[]; } /** - * @interface - * An interface representing SignedIdentifier. * signed identifier - * */ export interface SignedIdentifier { /** - * @member {string} id a unique id + * a unique id */ id: string; - /** - * @member {AccessPolicy} accessPolicy - */ accessPolicy: AccessPolicy; } /** - * @interface - * An interface representing StaticWebsite. * The properties that enable an account to host a static website - * */ export interface StaticWebsite { /** - * @member {boolean} enabled Indicates whether this account is hosting a - * static website + * Indicates whether this account is hosting a static website */ enabled: boolean; /** - * @member {string} [indexDocument] The default name of the index page under - * each directory + * The default name of the index page under each directory */ indexDocument?: string; /** - * @member {string} [errorDocument404Path] The absolute path of the custom - * 404 page + * The absolute path of the custom 404 page */ errorDocument404Path?: string; } /** - * @interface - * An interface representing StorageServiceProperties. * Storage Service Properties. - * */ export interface StorageServiceProperties { - /** - * @member {Logging} [logging] - */ logging?: Logging; - /** - * @member {Metrics} [hourMetrics] - */ hourMetrics?: Metrics; - /** - * @member {Metrics} [minuteMetrics] - */ minuteMetrics?: Metrics; /** - * @member {CorsRule[]} [cors] The set of CORS rules. + * The set of CORS rules. */ cors?: CorsRule[]; /** - * @member {string} [defaultServiceVersion] The default version to use for - * requests to the Blob service if an incoming request's version is not - * specified. Possible values include version 2008-10-27 and all more recent - * versions + * The default version to use for requests to the Blob service if an incoming request's version + * is not specified. Possible values include version 2008-10-27 and all more recent versions */ defaultServiceVersion?: string; - /** - * @member {RetentionPolicy} [deleteRetentionPolicy] - */ deleteRetentionPolicy?: RetentionPolicy; - /** - * @member {StaticWebsite} [staticWebsite] - */ staticWebsite?: StaticWebsite; } /** - * @interface - * An interface representing StorageServiceStats. * Stats for the storage service. - * */ export interface StorageServiceStats { - /** - * @member {GeoReplication} [geoReplication] - */ geoReplication?: GeoReplication; } /** - * @interface - * An interface representing LeaseAccessConditions. * Additional parameters for a set of operations. - * */ export interface LeaseAccessConditions { /** - * @member {string} [leaseId] If specified, the operation only succeeds if - * the resource's lease is active and matches this ID. + * If specified, the operation only succeeds if the resource's lease is active and matches this + * ID. */ leaseId?: string; } /** - * @interface - * An interface representing ModifiedAccessConditions. * Additional parameters for a set of operations. - * */ export interface ModifiedAccessConditions { /** - * @member {Date} [ifModifiedSince] Specify this header value to operate only - * on a blob if it has been modified since the specified date/time. + * Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. */ ifModifiedSince?: Date; /** - * @member {Date} [ifUnmodifiedSince] Specify this header value to operate - * only on a blob if it has not been modified since the specified date/time. + * Specify this header value to operate only on a blob if it has not been modified since the + * specified date/time. */ ifUnmodifiedSince?: Date; /** - * @member {string} [ifMatch] Specify an ETag value to operate only on blobs - * with a matching value. + * Specify an ETag value to operate only on blobs with a matching value. */ ifMatch?: string; /** - * @member {string} [ifNoneMatch] Specify an ETag value to operate only on - * blobs without a matching value. + * Specify an ETag value to operate only on blobs without a matching value. */ ifNoneMatch?: string; } /** - * @interface - * An interface representing BlobHTTPHeaders. * Additional parameters for a set of operations. - * */ export interface BlobHTTPHeaders { /** - * @member {string} [blobCacheControl] Optional. Sets the blob's cache - * control. If specified, this property is stored with the blob and returned - * with a read request. + * Optional. Sets the blob's cache control. If specified, this property is stored with the blob + * and returned with a read request. */ blobCacheControl?: string; /** - * @member {string} [blobContentType] Optional. Sets the blob's content type. - * If specified, this property is stored with the blob and returned with a - * read request. + * Optional. Sets the blob's content type. If specified, this property is stored with the blob + * and returned with a read request. */ blobContentType?: string; /** - * @member {Uint8Array} [blobContentMD5] 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. + * 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. */ blobContentMD5?: Uint8Array; /** - * @member {string} [blobContentEncoding] Optional. Sets the blob's content - * encoding. If specified, this property is stored with the blob and returned - * with a read request. + * Optional. Sets the blob's content encoding. If specified, this property is stored with the + * blob and returned with a read request. */ blobContentEncoding?: string; /** - * @member {string} [blobContentLanguage] Optional. Set the blob's content - * language. If specified, this property is stored with the blob and returned - * with a read request. + * Optional. Set the blob's content language. If specified, this property is stored with the blob + * and returned with a read request. */ blobContentLanguage?: string; /** - * @member {string} [blobContentDisposition] Optional. Sets the blob's - * Content-Disposition header. + * Optional. Sets the blob's Content-Disposition header. */ blobContentDisposition?: string; } /** - * @interface - * An interface representing SourceModifiedAccessConditions. * Additional parameters for startCopyFromURL operation. - * */ export interface SourceModifiedAccessConditions { /** - * @member {Date} [sourceIfModifiedSince] Specify this header value to - * operate only on a blob if it has been modified since the specified - * date/time. + * Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. */ sourceIfModifiedSince?: Date; /** - * @member {Date} [sourceIfUnmodifiedSince] Specify this header value to - * operate only on a blob if it has not been modified since the specified - * date/time. + * Specify this header value to operate only on a blob if it has not been modified since the + * specified date/time. */ sourceIfUnmodifiedSince?: Date; /** - * @member {string} [sourceIfMatch] Specify an ETag value to operate only on - * blobs with a matching value. + * Specify an ETag value to operate only on blobs with a matching value. */ sourceIfMatch?: string; /** - * @member {string} [sourceIfNoneMatch] Specify an ETag value to operate only - * on blobs without a matching value. + * Specify an ETag value to operate only on blobs without a matching value. */ sourceIfNoneMatch?: string; } /** - * @interface - * An interface representing SequenceNumberAccessConditions. - * Additional parameters for a set of operations, such as: - * PageBlob_uploadPages, PageBlob_clearPages. - * + * Additional parameters for a set of operations, such as: PageBlob_uploadPages, + * PageBlob_clearPages. */ export interface SequenceNumberAccessConditions { /** - * @member {number} [ifSequenceNumberLessThanOrEqualTo] Specify this header - * value to operate only on a blob if it has a sequence number less than or + * Specify this header value to operate only on a blob if it has a sequence number less than or * equal to the specified. */ ifSequenceNumberLessThanOrEqualTo?: number; /** - * @member {number} [ifSequenceNumberLessThan] Specify this header value to - * operate only on a blob if it has a sequence number less than the + * Specify this header value to operate only on a blob if it has a sequence number less than the * specified. */ ifSequenceNumberLessThan?: number; /** - * @member {number} [ifSequenceNumberEqualTo] Specify this header value to - * operate only on a blob if it has the specified sequence number. + * Specify this header value to operate only on a blob if it has the specified sequence number. */ ifSequenceNumberEqualTo?: number; } /** - * @interface - * An interface representing AppendPositionAccessConditions. * Additional parameters for appendBlock operation. - * */ export interface AppendPositionAccessConditions { /** - * @member {number} [maxSize] 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). + * 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). */ maxSize?: number; /** - * @member {number} [appendPosition] 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). + * 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). */ appendPosition?: number; } /** - * @interface - * An interface representing ServiceSetPropertiesOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ServiceSetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface ServiceSetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing ServiceGetPropertiesOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ServiceGetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface ServiceGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing ServiceGetStatisticsOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ServiceGetStatisticsOptionalParams extends msRest.RequestOptionsBase { +export interface ServiceGetStatisticsOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing ServiceListContainersSegmentOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ServiceListContainersSegmentOptionalParams extends msRest.RequestOptionsBase { +export interface ServiceListContainersSegmentOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {string} [prefix] Filters the results to return only containers - * whose name begins with the specified prefix. + * Filters the results to return only containers whose name begins with the specified prefix. */ prefix?: string; /** - * @member {string} [marker] 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. + * 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; /** - * @member {number} [maxresults] 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. Note - * that if the listing operation crosses a partition boundary, then the - * service will return a continuation token for retrieving the remainder of - * the results. For this reason, it is possible that the service will return - * fewer results than specified by maxresults, or than the default of 5000. + * 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. + * Note that if the listing operation crosses a partition boundary, then the service will return + * a continuation token for retrieving the remainder of the results. For this reason, it is + * possible that the service will return fewer results than specified by maxresults, or than the + * default of 5000. */ maxresults?: number; /** - * @member {ListContainersIncludeType} [include] Include this parameter to - * specify that the container's metadata be returned as part of the response - * body. Possible values include: 'metadata' + * Include this parameter to specify that the container's metadata be returned as part of the + * response body. Possible values include: 'metadata' */ include?: ListContainersIncludeType; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing ContainerCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerCreateOptionalParams extends msRest.RequestOptionsBase { +export interface ServiceListContainersSegmentNextOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {{ [propertyName: string]: string }} [metadata] Optional. - * Specifies a user-defined name-value pair associated with the blob. If no - * name-value pairs are specified, the operation will copy the metadata from - * the source blob or file to the destination blob. If one or more name-value - * pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note - * that beginning with version 2009-09-19, metadata names must adhere to the - * naming rules for C# identifiers. See Naming and Referencing Containers, - * Blobs, and Metadata for more information. + * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the + * destination blob. If one or more name-value pairs are specified, the destination blob is + * created with the specified metadata, and metadata is not copied from the source blob or file. + * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules + * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more + * information. */ metadata?: { [propertyName: string]: string }; /** - * @member {PublicAccessType} [access] Specifies whether data in the - * container may be accessed publicly and the level of access. Possible - * values include: 'container', 'blob' + * Specifies whether data in the container may be accessed publicly and the level of access. + * Possible values include: 'container', 'blob' */ access?: PublicAccessType; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing ContainerGetPropertiesOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerGetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; } /** - * @interface - * An interface representing ContainerDeleteMethodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerDeleteMethodOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing ContainerSetMetadataOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerSetMetadataOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerSetMetadataOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {{ [propertyName: string]: string }} [metadata] Optional. - * Specifies a user-defined name-value pair associated with the blob. If no - * name-value pairs are specified, the operation will copy the metadata from - * the source blob or file to the destination blob. If one or more name-value - * pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note - * that beginning with version 2009-09-19, metadata names must adhere to the - * naming rules for C# identifiers. See Naming and Referencing Containers, - * Blobs, and Metadata for more information. + * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the + * destination blob. If one or more name-value pairs are specified, the destination blob is + * created with the specified metadata, and metadata is not copied from the source blob or file. + * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules + * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more + * information. */ metadata?: { [propertyName: string]: string }; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing ContainerGetAccessPolicyOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerGetAccessPolicyOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerGetAccessPolicyOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; } /** - * @interface - * An interface representing ContainerSetAccessPolicyOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerSetAccessPolicyOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerSetAccessPolicyOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {SignedIdentifier[]} [containerAcl] the acls for the container + * the acls for the container */ containerAcl?: SignedIdentifier[]; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {PublicAccessType} [access] Specifies whether data in the - * container may be accessed publicly and the level of access. Possible - * values include: 'container', 'blob' + * Specifies whether data in the container may be accessed publicly and the level of access. + * Possible values include: 'container', 'blob' */ access?: PublicAccessType; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing ContainerAcquireLeaseOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerAcquireLeaseOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerAcquireLeaseOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {number} [duration] 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. + * 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. */ duration?: number; /** - * @member {string} [proposedLeaseId] Proposed lease ID, in a GUID string - * format. The Blob service returns 400 (Invalid request) if the proposed - * lease ID is not in the correct format. See Guid Constructor (String) for a - * list of valid GUID string formats. + * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if + * the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list + * of valid GUID string formats. */ proposedLeaseId?: string; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing ContainerReleaseLeaseOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerReleaseLeaseOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerReleaseLeaseOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing ContainerRenewLeaseOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerRenewLeaseOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerRenewLeaseOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing ContainerBreakLeaseOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerBreakLeaseOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerBreakLeaseOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {number} [breakPeriod] 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. + * 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. */ breakPeriod?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing ContainerChangeLeaseOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerChangeLeaseOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerChangeLeaseOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing ContainerListBlobFlatSegmentOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerListBlobFlatSegmentOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerListBlobFlatSegmentOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {string} [prefix] Filters the results to return only containers - * whose name begins with the specified prefix. + * Filters the results to return only containers whose name begins with the specified prefix. */ prefix?: string; /** - * @member {string} [marker] 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. + * 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; /** - * @member {number} [maxresults] 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. Note - * that if the listing operation crosses a partition boundary, then the - * service will return a continuation token for retrieving the remainder of - * the results. For this reason, it is possible that the service will return - * fewer results than specified by maxresults, or than the default of 5000. + * 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. + * Note that if the listing operation crosses a partition boundary, then the service will return + * a continuation token for retrieving the remainder of the results. For this reason, it is + * possible that the service will return fewer results than specified by maxresults, or than the + * default of 5000. */ maxresults?: number; /** - * @member {ListBlobsIncludeItem[]} [include] Include this parameter to - * specify one or more datasets to include in the response. + * Include this parameter to specify one or more datasets to include in the response. */ include?: ListBlobsIncludeItem[]; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing ContainerListBlobHierarchySegmentOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ContainerListBlobHierarchySegmentOptionalParams extends msRest.RequestOptionsBase { +export interface ContainerListBlobHierarchySegmentOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {string} [prefix] Filters the results to return only containers - * whose name begins with the specified prefix. + * Filters the results to return only containers whose name begins with the specified prefix. */ prefix?: string; /** - * @member {string} [marker] 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. + * 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; /** - * @member {number} [maxresults] 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. Note - * that if the listing operation crosses a partition boundary, then the - * service will return a continuation token for retrieving the remainder of - * the results. For this reason, it is possible that the service will return - * fewer results than specified by maxresults, or than the default of 5000. + * 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. + * Note that if the listing operation crosses a partition boundary, then the service will return + * a continuation token for retrieving the remainder of the results. For this reason, it is + * possible that the service will return fewer results than specified by maxresults, or than the + * default of 5000. */ maxresults?: number; /** - * @member {ListBlobsIncludeItem[]} [include] Include this parameter to - * specify one or more datasets to include in the response. + * Include this parameter to specify one or more datasets to include in the response. */ include?: ListBlobsIncludeItem[]; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; +} + +/** + * Optional Parameters. + */ +export interface ContainerListBlobFlatSegmentNextOptionalParams extends coreHttp.RequestOptionsBase { + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; +} + +/** + * Optional Parameters. + */ +export interface ContainerListBlobHierarchySegmentNextOptionalParams extends coreHttp.RequestOptionsBase { + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing BlobDownloadOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobDownloadOptionalParams extends msRest.RequestOptionsBase { +export interface BlobDownloadOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {string} [snapshot] 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; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [range] Return only the bytes of the blob in the - * specified range. + * Return only the bytes of the blob in the specified range. */ range?: string; /** - * @member {boolean} [rangeGetContentMD5] 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. + * 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. */ rangeGetContentMD5?: boolean; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlobGetPropertiesOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobGetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface BlobGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {string} [snapshot] 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; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlobDeleteMethodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobDeleteMethodOptionalParams extends msRest.RequestOptionsBase { +export interface BlobDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {string} [snapshot] 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; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {DeleteSnapshotsOptionType} [deleteSnapshots] 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 include: - * 'include', 'only' + * 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 include: 'include', 'only' */ deleteSnapshots?: DeleteSnapshotsOptionType; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlobUndeleteOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobUndeleteOptionalParams extends msRest.RequestOptionsBase { +export interface BlobUndeleteOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing BlobSetHTTPHeadersOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobSetHTTPHeadersOptionalParams extends msRest.RequestOptionsBase { +export interface BlobSetHTTPHeadersOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {BlobHTTPHeaders} [blobHTTPHeaders] Additional parameters for the - * operation + * Additional parameters for the operation */ blobHTTPHeaders?: BlobHTTPHeaders; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlobSetMetadataOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobSetMetadataOptionalParams extends msRest.RequestOptionsBase { +export interface BlobSetMetadataOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {{ [propertyName: string]: string }} [metadata] Optional. - * Specifies a user-defined name-value pair associated with the blob. If no - * name-value pairs are specified, the operation will copy the metadata from - * the source blob or file to the destination blob. If one or more name-value - * pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note - * that beginning with version 2009-09-19, metadata names must adhere to the - * naming rules for C# identifiers. See Naming and Referencing Containers, - * Blobs, and Metadata for more information. + * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the + * destination blob. If one or more name-value pairs are specified, the destination blob is + * created with the specified metadata, and metadata is not copied from the source blob or file. + * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules + * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more + * information. */ metadata?: { [propertyName: string]: string }; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlobAcquireLeaseOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobAcquireLeaseOptionalParams extends msRest.RequestOptionsBase { +export interface BlobAcquireLeaseOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {number} [duration] 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. + * 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. */ duration?: number; /** - * @member {string} [proposedLeaseId] Proposed lease ID, in a GUID string - * format. The Blob service returns 400 (Invalid request) if the proposed - * lease ID is not in the correct format. See Guid Constructor (String) for a - * list of valid GUID string formats. + * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if + * the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list + * of valid GUID string formats. */ proposedLeaseId?: string; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlobReleaseLeaseOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobReleaseLeaseOptionalParams extends msRest.RequestOptionsBase { +export interface BlobReleaseLeaseOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlobRenewLeaseOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobRenewLeaseOptionalParams extends msRest.RequestOptionsBase { +export interface BlobRenewLeaseOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlobChangeLeaseOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobChangeLeaseOptionalParams extends msRest.RequestOptionsBase { +export interface BlobChangeLeaseOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlobBreakLeaseOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobBreakLeaseOptionalParams extends msRest.RequestOptionsBase { +export interface BlobBreakLeaseOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {number} [breakPeriod] 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. + * 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. */ breakPeriod?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlobCreateSnapshotOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobCreateSnapshotOptionalParams extends msRest.RequestOptionsBase { +export interface BlobCreateSnapshotOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {{ [propertyName: string]: string }} [metadata] Optional. - * Specifies a user-defined name-value pair associated with the blob. If no - * name-value pairs are specified, the operation will copy the metadata from - * the source blob or file to the destination blob. If one or more name-value - * pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note - * that beginning with version 2009-09-19, metadata names must adhere to the - * naming rules for C# identifiers. See Naming and Referencing Containers, - * Blobs, and Metadata for more information. + * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the + * destination blob. If one or more name-value pairs are specified, the destination blob is + * created with the specified metadata, and metadata is not copied from the source blob or file. + * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules + * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more + * information. */ metadata?: { [propertyName: string]: string }; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; } /** - * @interface - * An interface representing BlobStartCopyFromURLOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobStartCopyFromURLOptionalParams extends msRest.RequestOptionsBase { +export interface BlobStartCopyFromURLOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {{ [propertyName: string]: string }} [metadata] Optional. - * Specifies a user-defined name-value pair associated with the blob. If no - * name-value pairs are specified, the operation will copy the metadata from - * the source blob or file to the destination blob. If one or more name-value - * pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note - * that beginning with version 2009-09-19, metadata names must adhere to the - * naming rules for C# identifiers. See Naming and Referencing Containers, - * Blobs, and Metadata for more information. + * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the + * destination blob. If one or more name-value pairs are specified, the destination blob is + * created with the specified metadata, and metadata is not copied from the source blob or file. + * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules + * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more + * information. */ metadata?: { [propertyName: string]: string }; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {SourceModifiedAccessConditions} [sourceModifiedAccessConditions] * Additional parameters for the operation */ sourceModifiedAccessConditions?: SourceModifiedAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; } /** - * @interface - * An interface representing BlobAbortCopyFromURLOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobAbortCopyFromURLOptionalParams extends msRest.RequestOptionsBase { +export interface BlobAbortCopyFromURLOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; } /** - * @interface - * An interface representing BlobSetTierOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlobSetTierOptionalParams extends msRest.RequestOptionsBase { +export interface BlobSetTierOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; } /** - * @interface - * An interface representing PageBlobCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface PageBlobCreateOptionalParams extends msRest.RequestOptionsBase { +export interface PageBlobCreateOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {{ [propertyName: string]: string }} [metadata] Optional. - * Specifies a user-defined name-value pair associated with the blob. If no - * name-value pairs are specified, the operation will copy the metadata from - * the source blob or file to the destination blob. If one or more name-value - * pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note - * that beginning with version 2009-09-19, metadata names must adhere to the - * naming rules for C# identifiers. See Naming and Referencing Containers, - * Blobs, and Metadata for more information. + * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the + * destination blob. If one or more name-value pairs are specified, the destination blob is + * created with the specified metadata, and metadata is not copied from the source blob or file. + * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules + * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more + * information. */ metadata?: { [propertyName: string]: string }; /** - * @member {number} [blobSequenceNumber] 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. - * Default value: 0 . + * 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. Default + * value: 0. */ blobSequenceNumber?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {BlobHTTPHeaders} [blobHTTPHeaders] Additional parameters for the - * operation + * Additional parameters for the operation */ blobHTTPHeaders?: BlobHTTPHeaders; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing PageBlobUploadPagesOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface PageBlobUploadPagesOptionalParams extends msRest.RequestOptionsBase { +export interface PageBlobUploadPagesOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {Uint8Array} [transactionalContentMD5] Specify the transactional - * md5 for the body, to be validated by the service. + * Specify the transactional md5 for the body, to be validated by the service. */ transactionalContentMD5?: Uint8Array; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [range] Return only the bytes of the blob in the - * specified range. + * Return only the bytes of the blob in the specified range. */ range?: string; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {SequenceNumberAccessConditions} [sequenceNumberAccessConditions] * Additional parameters for the operation */ sequenceNumberAccessConditions?: SequenceNumberAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing PageBlobClearPagesOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface PageBlobClearPagesOptionalParams extends msRest.RequestOptionsBase { +export interface PageBlobClearPagesOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [range] Return only the bytes of the blob in the - * specified range. + * Return only the bytes of the blob in the specified range. */ range?: string; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {SequenceNumberAccessConditions} [sequenceNumberAccessConditions] * Additional parameters for the operation */ sequenceNumberAccessConditions?: SequenceNumberAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing PageBlobGetPageRangesOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface PageBlobGetPageRangesOptionalParams extends msRest.RequestOptionsBase { +export interface PageBlobGetPageRangesOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {string} [snapshot] 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; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [range] Return only the bytes of the blob in the - * specified range. + * Return only the bytes of the blob in the specified range. */ range?: string; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing PageBlobGetPageRangesDiffOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface PageBlobGetPageRangesDiffOptionalParams extends msRest.RequestOptionsBase { +export interface PageBlobGetPageRangesDiffOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {string} [snapshot] 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; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [prevsnapshot] 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. + * 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; /** - * @member {string} [range] Return only the bytes of the blob in the - * specified range. + * Return only the bytes of the blob in the specified range. */ range?: string; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing PageBlobResizeOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface PageBlobResizeOptionalParams extends msRest.RequestOptionsBase { +export interface PageBlobResizeOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing PageBlobUpdateSequenceNumberOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface PageBlobUpdateSequenceNumberOptionalParams extends msRest.RequestOptionsBase { +export interface PageBlobUpdateSequenceNumberOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {number} [blobSequenceNumber] 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. - * Default value: 0 . + * 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. Default + * value: 0. */ blobSequenceNumber?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing PageBlobCopyIncrementalOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface PageBlobCopyIncrementalOptionalParams extends msRest.RequestOptionsBase { +export interface PageBlobCopyIncrementalOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing AppendBlobCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface AppendBlobCreateOptionalParams extends msRest.RequestOptionsBase { +export interface AppendBlobCreateOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {{ [propertyName: string]: string }} [metadata] Optional. - * Specifies a user-defined name-value pair associated with the blob. If no - * name-value pairs are specified, the operation will copy the metadata from - * the source blob or file to the destination blob. If one or more name-value - * pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note - * that beginning with version 2009-09-19, metadata names must adhere to the - * naming rules for C# identifiers. See Naming and Referencing Containers, - * Blobs, and Metadata for more information. + * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the + * destination blob. If one or more name-value pairs are specified, the destination blob is + * created with the specified metadata, and metadata is not copied from the source blob or file. + * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules + * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more + * information. */ metadata?: { [propertyName: string]: string }; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {BlobHTTPHeaders} [blobHTTPHeaders] Additional parameters for the - * operation + * Additional parameters for the operation */ blobHTTPHeaders?: BlobHTTPHeaders; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing AppendBlobAppendBlockOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface AppendBlobAppendBlockOptionalParams extends msRest.RequestOptionsBase { +export interface AppendBlobAppendBlockOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {Uint8Array} [transactionalContentMD5] Specify the transactional - * md5 for the body, to be validated by the service. + * Specify the transactional md5 for the body, to be validated by the service. */ transactionalContentMD5?: Uint8Array; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {AppendPositionAccessConditions} [appendPositionAccessConditions] * Additional parameters for the operation */ appendPositionAccessConditions?: AppendPositionAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlockBlobUploadOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlockBlobUploadOptionalParams extends msRest.RequestOptionsBase { +export interface BlockBlobUploadOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {{ [propertyName: string]: string }} [metadata] Optional. - * Specifies a user-defined name-value pair associated with the blob. If no - * name-value pairs are specified, the operation will copy the metadata from - * the source blob or file to the destination blob. If one or more name-value - * pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note - * that beginning with version 2009-09-19, metadata names must adhere to the - * naming rules for C# identifiers. See Naming and Referencing Containers, - * Blobs, and Metadata for more information. + * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the + * destination blob. If one or more name-value pairs are specified, the destination blob is + * created with the specified metadata, and metadata is not copied from the source blob or file. + * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules + * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more + * information. */ metadata?: { [propertyName: string]: string }; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {BlobHTTPHeaders} [blobHTTPHeaders] Additional parameters for the - * operation + * Additional parameters for the operation */ blobHTTPHeaders?: BlobHTTPHeaders; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlockBlobStageBlockOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlockBlobStageBlockOptionalParams extends msRest.RequestOptionsBase { +export interface BlockBlobStageBlockOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {Uint8Array} [transactionalContentMD5] Specify the transactional - * md5 for the body, to be validated by the service. + * Specify the transactional md5 for the body, to be validated by the service. */ transactionalContentMD5?: Uint8Array; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; } /** - * @interface - * An interface representing BlockBlobStageBlockFromURLOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlockBlobStageBlockFromURLOptionalParams extends msRest.RequestOptionsBase { +export interface BlockBlobStageBlockFromURLOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {string} [sourceRange] Bytes of source data in the specified - * range. + * Bytes of source data in the specified range. */ sourceRange?: string; /** - * @member {Uint8Array} [sourceContentMD5] Specify the md5 calculated for the - * range of bytes that must be read from the copy source. + * Specify the md5 calculated for the range of bytes that must be read from the copy source. */ sourceContentMD5?: Uint8Array; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; } /** - * @interface - * An interface representing BlockBlobCommitBlockListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlockBlobCommitBlockListOptionalParams extends msRest.RequestOptionsBase { +export interface BlockBlobCommitBlockListOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {{ [propertyName: string]: string }} [metadata] Optional. - * Specifies a user-defined name-value pair associated with the blob. If no - * name-value pairs are specified, the operation will copy the metadata from - * the source blob or file to the destination blob. If one or more name-value - * pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note - * that beginning with version 2009-09-19, metadata names must adhere to the - * naming rules for C# identifiers. See Naming and Referencing Containers, - * Blobs, and Metadata for more information. + * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the + * destination blob. If one or more name-value pairs are specified, the destination blob is + * created with the specified metadata, and metadata is not copied from the source blob or file. + * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules + * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more + * information. */ metadata?: { [propertyName: string]: string }; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {BlobHTTPHeaders} [blobHTTPHeaders] Additional parameters for the - * operation + * Additional parameters for the operation */ blobHTTPHeaders?: BlobHTTPHeaders; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; /** - * @member {ModifiedAccessConditions} [modifiedAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ modifiedAccessConditions?: ModifiedAccessConditions; } /** - * @interface - * An interface representing BlockBlobGetBlockListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface BlockBlobGetBlockListOptionalParams extends msRest.RequestOptionsBase { +export interface BlockBlobGetBlockListOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {string} [snapshot] 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; /** - * @member {number} [timeoutParameter] The timeout parameter is expressed in - * seconds. For more information, see Setting * Timeouts for Blob Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; /** - * @member {LeaseAccessConditions} [leaseAccessConditions] Additional - * parameters for the operation + * Additional parameters for the operation */ leaseAccessConditions?: LeaseAccessConditions; } /** - * @interface - * An interface representing ServiceSetPropertiesHeaders. * Defines headers for SetProperties operation. - * */ export interface ServiceSetPropertiesHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ServiceGetPropertiesHeaders. * Defines headers for GetProperties operation. - * */ export interface ServiceGetPropertiesHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ServiceGetStatisticsHeaders. * Defines headers for GetStatistics operation. - * */ export interface ServiceGetStatisticsHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ServiceListContainersSegmentHeaders. * Defines headers for ListContainersSegment operation. - * */ export interface ServiceListContainersSegmentHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ServiceGetAccountInfoHeaders. * Defines headers for GetAccountInfo operation. - * */ export interface ServiceGetAccountInfoHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {SkuName} [skuName] Identifies the sku name of the account. - * Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', - * 'Standard_ZRS', 'Premium_LRS' + * Identifies the sku name of the account. Possible values include: 'Standard_LRS', + * 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS' */ skuName?: SkuName; /** - * @member {AccountKind} [accountKind] Identifies the account kind. Possible - * values include: 'Storage', 'BlobStorage', 'StorageV2' + * Identifies the account kind. Possible values include: 'Storage', 'BlobStorage', 'StorageV2' */ accountKind?: AccountKind; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerCreateHeaders. * Defines headers for Create operation. - * */ export interface ContainerCreateHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerGetPropertiesHeaders. * Defines headers for GetProperties operation. - * */ export interface ContainerGetPropertiesHeaders { - /** - * @member {{ [propertyName: string]: string }} [metadata] - */ metadata?: { [propertyName: string]: string }; /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {LeaseDurationType} [leaseDuration] When a blob is leased, - * specifies whether the lease is of infinite or fixed duration. Possible + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible * values include: 'infinite', 'fixed' */ leaseDuration?: LeaseDurationType; /** - * @member {LeaseStateType} [leaseState] Lease state of the blob. Possible - * values include: 'available', 'leased', 'expired', 'breaking', 'broken' + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' */ leaseState?: LeaseStateType; /** - * @member {LeaseStatusType} [leaseStatus] The current lease status of the - * blob. Possible values include: 'locked', 'unlocked' + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' */ leaseStatus?: LeaseStatusType; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {PublicAccessType} [blobPublicAccess] Indicated whether data in - * the container may be accessed publicly and the level of access. Possible - * values include: 'container', 'blob' + * Indicated whether data in the container may be accessed publicly and the level of access. + * Possible values include: 'container', 'blob' */ blobPublicAccess?: PublicAccessType; /** - * @member {boolean} [hasImmutabilityPolicy] Indicates whether the container - * has an immutability policy set on it. + * Indicates whether the container has an immutability policy set on it. */ hasImmutabilityPolicy?: boolean; /** - * @member {boolean} [hasLegalHold] Indicates whether the container has a - * legal hold. + * Indicates whether the container has a legal hold. */ hasLegalHold?: boolean; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerDeleteHeaders. * Defines headers for Delete operation. - * */ export interface ContainerDeleteHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerSetMetadataHeaders. * Defines headers for SetMetadata operation. - * */ export interface ContainerSetMetadataHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerGetAccessPolicyHeaders. * Defines headers for GetAccessPolicy operation. - * */ export interface ContainerGetAccessPolicyHeaders { /** - * @member {PublicAccessType} [blobPublicAccess] Indicated whether data in - * the container may be accessed publicly and the level of access. Possible - * values include: 'container', 'blob' + * Indicated whether data in the container may be accessed publicly and the level of access. + * Possible values include: 'container', 'blob' */ blobPublicAccess?: PublicAccessType; /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerSetAccessPolicyHeaders. * Defines headers for SetAccessPolicy operation. - * */ export interface ContainerSetAccessPolicyHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerAcquireLeaseHeaders. * Defines headers for AcquireLease operation. - * */ export interface ContainerAcquireLeaseHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [leaseId] Uniquely identifies a container's lease + * Uniquely identifies a container's lease */ leaseId?: string; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerReleaseLeaseHeaders. * Defines headers for ReleaseLease operation. - * */ export interface ContainerReleaseLeaseHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerRenewLeaseHeaders. * Defines headers for RenewLease operation. - * */ export interface ContainerRenewLeaseHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [leaseId] Uniquely identifies a container's lease + * Uniquely identifies a container's lease */ leaseId?: string; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerBreakLeaseHeaders. * Defines headers for BreakLease operation. - * */ export interface ContainerBreakLeaseHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {number} [leaseTime] Approximate time remaining in the lease - * period, in seconds. + * Approximate time remaining in the lease period, in seconds. */ leaseTime?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerChangeLeaseHeaders. * Defines headers for ChangeLease operation. - * */ export interface ContainerChangeLeaseHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [leaseId] Uniquely identifies a container's lease + * Uniquely identifies a container's lease */ leaseId?: string; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerListBlobFlatSegmentHeaders. * Defines headers for ListBlobFlatSegment operation. - * */ export interface ContainerListBlobFlatSegmentHeaders { /** - * @member {string} [contentType] The media type of the body of the response. - * For List Blobs this is 'application/xml' + * The media type of the body of the response. For List Blobs this is 'application/xml' */ contentType?: string; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerListBlobHierarchySegmentHeaders. * Defines headers for ListBlobHierarchySegment operation. - * */ export interface ContainerListBlobHierarchySegmentHeaders { /** - * @member {string} [contentType] The media type of the body of the response. - * For List Blobs this is 'application/xml' + * The media type of the body of the response. For List Blobs this is 'application/xml' */ contentType?: string; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ContainerGetAccountInfoHeaders. * Defines headers for GetAccountInfo operation. - * */ export interface ContainerGetAccountInfoHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {SkuName} [skuName] Identifies the sku name of the account. - * Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', - * 'Standard_ZRS', 'Premium_LRS' + * Identifies the sku name of the account. Possible values include: 'Standard_LRS', + * 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS' */ skuName?: SkuName; /** - * @member {AccountKind} [accountKind] Identifies the account kind. Possible - * values include: 'Storage', 'BlobStorage', 'StorageV2' + * Identifies the account kind. Possible values include: 'Storage', 'BlobStorage', 'StorageV2' */ accountKind?: AccountKind; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobDownloadHeaders. * Defines headers for Download operation. - * */ export interface BlobDownloadHeaders { /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; - /** - * @member {{ [propertyName: string]: string }} [metadata] - */ metadata?: { [propertyName: string]: string }; /** - * @member {number} [contentLength] The number of bytes present in the - * response body. + * The number of bytes present in the response body. */ contentLength?: number; /** - * @member {string} [contentType] The media type of the body of the response. - * For Download Blob this is 'application/octet-stream' + * The media type of the body of the response. For Download Blob this is + * 'application/octet-stream' */ contentType?: string; /** - * @member {string} [contentRange] Indicates the range of bytes returned in - * the event that the client requested a subset of the blob by setting the - * 'Range' request header. + * Indicates the range of bytes returned in the event that the client requested a subset of the + * blob by setting the 'Range' request header. */ contentRange?: string; /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {string} [contentEncoding] This header returns the value that was - * specified for the Content-Encoding request header + * This header returns the value that was specified for the Content-Encoding request header */ contentEncoding?: string; /** - * @member {string} [cacheControl] This header is returned if it was - * previously specified for the blob. + * This header is returned if it was previously specified for the blob. */ cacheControl?: string; /** - * @member {string} [contentDisposition] 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. + * 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. */ contentDisposition?: string; /** - * @member {string} [contentLanguage] This header returns the value that was - * specified for the Content-Language request header. + * This header returns the value that was specified for the Content-Language request header. */ contentLanguage?: string; /** - * @member {number} [blobSequenceNumber] The current sequence number for a - * page blob. This header is not returned for block blobs or append blobs + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs */ blobSequenceNumber?: number; /** - * @member {BlobType} [blobType] The blob's type. Possible values include: - * 'BlockBlob', 'PageBlob', 'AppendBlob' + * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' */ blobType?: BlobType; /** - * @member {Date} [copyCompletionTime] 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. + * 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. */ copyCompletionTime?: Date; /** - * @member {string} [copyStatusDescription] 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 + * 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 */ copyStatusDescription?: string; /** - * @member {string} [copyId] 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. + * 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. */ copyId?: string; /** - * @member {string} [copyProgress] 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 + * 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 */ copyProgress?: string; /** - * @member {string} [copySource] 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. + * 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. */ copySource?: string; /** - * @member {CopyStatusType} [copyStatus] State of the copy operation - * identified by x-ms-copy-id. Possible values include: 'pending', 'success', - * 'aborted', 'failed' + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' */ copyStatus?: CopyStatusType; /** - * @member {LeaseDurationType} [leaseDuration] When a blob is leased, - * specifies whether the lease is of infinite or fixed duration. Possible + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible * values include: 'infinite', 'fixed' */ leaseDuration?: LeaseDurationType; /** - * @member {LeaseStateType} [leaseState] Lease state of the blob. Possible - * values include: 'available', 'leased', 'expired', 'breaking', 'broken' + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' */ leaseState?: LeaseStateType; /** - * @member {LeaseStatusType} [leaseStatus] The current lease status of the - * blob. Possible values include: 'locked', 'unlocked' + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' */ leaseStatus?: LeaseStatusType; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {string} [acceptRanges] Indicates that the service supports - * requests for partial blob content. + * Indicates that the service supports requests for partial blob content. */ acceptRanges?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {number} [blobCommittedBlockCount] The number of committed blocks - * present in the blob. This header is returned only for append blobs. + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. */ blobCommittedBlockCount?: number; /** - * @member {boolean} [isServerEncrypted] The value of this header is set to - * true if the blob data and application metadata are completely encrypted - * using the specified algorithm. Otherwise, the value is set to false (when - * the blob is unencrypted, or if only parts of the blob/application metadata - * are encrypted). + * The value of this header is set to true if the blob data and application metadata are + * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when + * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). */ isServerEncrypted?: boolean; /** - * @member {Uint8Array} [blobContentMD5] 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 + * 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 */ blobContentMD5?: Uint8Array; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobGetPropertiesHeaders. * Defines headers for GetProperties operation. - * */ export interface BlobGetPropertiesHeaders { /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {Date} [creationTime] Returns the date and time the blob was - * created. + * Returns the date and time the blob was created. */ creationTime?: Date; - /** - * @member {{ [propertyName: string]: string }} [metadata] - */ metadata?: { [propertyName: string]: string }; /** - * @member {BlobType} [blobType] The blob's type. Possible values include: - * 'BlockBlob', 'PageBlob', 'AppendBlob' + * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' */ blobType?: BlobType; /** - * @member {Date} [copyCompletionTime] 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. + * 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. */ copyCompletionTime?: Date; /** - * @member {string} [copyStatusDescription] 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 + * 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 */ copyStatusDescription?: string; /** - * @member {string} [copyId] 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. + * 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. */ copyId?: string; /** - * @member {string} [copyProgress] 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 + * 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 */ copyProgress?: string; /** - * @member {string} [copySource] 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. + * 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. */ copySource?: string; /** - * @member {CopyStatusType} [copyStatus] State of the copy operation - * identified by x-ms-copy-id. Possible values include: 'pending', 'success', - * 'aborted', 'failed' + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' */ copyStatus?: CopyStatusType; /** - * @member {boolean} [isIncrementalCopy] Included if the blob is incremental - * copy blob. + * Included if the blob is incremental copy blob. */ isIncrementalCopy?: boolean; /** - * @member {string} [destinationSnapshot] 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. + * 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. */ destinationSnapshot?: string; /** - * @member {LeaseDurationType} [leaseDuration] When a blob is leased, - * specifies whether the lease is of infinite or fixed duration. Possible + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible * values include: 'infinite', 'fixed' */ leaseDuration?: LeaseDurationType; /** - * @member {LeaseStateType} [leaseState] Lease state of the blob. Possible - * values include: 'available', 'leased', 'expired', 'breaking', 'broken' + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' */ leaseState?: LeaseStateType; /** - * @member {LeaseStatusType} [leaseStatus] The current lease status of the - * blob. Possible values include: 'locked', 'unlocked' + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' */ leaseStatus?: LeaseStatusType; /** - * @member {number} [contentLength] The number of bytes present in the - * response body. + * The number of bytes present in the response body. */ contentLength?: number; /** - * @member {string} [contentType] The content type specified for the blob. - * The default content type is 'application/octet-stream' + * The content type specified for the blob. The default content type is + * 'application/octet-stream' */ contentType?: string; /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {string} [contentEncoding] This header returns the value that was - * specified for the Content-Encoding request header + * This header returns the value that was specified for the Content-Encoding request header */ contentEncoding?: string; /** - * @member {string} [contentDisposition] 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. + * 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. */ contentDisposition?: string; /** - * @member {string} [contentLanguage] This header returns the value that was - * specified for the Content-Language request header. + * This header returns the value that was specified for the Content-Language request header. */ contentLanguage?: string; /** - * @member {string} [cacheControl] This header is returned if it was - * previously specified for the blob. + * This header is returned if it was previously specified for the blob. */ cacheControl?: string; /** - * @member {number} [blobSequenceNumber] The current sequence number for a - * page blob. This header is not returned for block blobs or append blobs + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs */ blobSequenceNumber?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {string} [acceptRanges] Indicates that the service supports - * requests for partial blob content. + * Indicates that the service supports requests for partial blob content. */ acceptRanges?: string; /** - * @member {number} [blobCommittedBlockCount] The number of committed blocks - * present in the blob. This header is returned only for append blobs. + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. */ blobCommittedBlockCount?: number; /** - * @member {boolean} [isServerEncrypted] The value of this header is set to - * true if the blob data and application metadata are completely encrypted - * using the specified algorithm. Otherwise, the value is set to false (when - * the blob is unencrypted, or if only parts of the blob/application metadata - * are encrypted). + * The value of this header is set to true if the blob data and application metadata are + * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when + * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). */ isServerEncrypted?: boolean; /** - * @member {string} [accessTier] The tier of page blob on a premium storage - * account or tier of block blob on blob storage LRS accounts. For a list of - * allowed premium page blob tiers, see - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage#features. - * For blob storage LRS accounts, valid values are Hot/Cool/Archive. + * The tier of page blob on a premium storage account or tier of block blob on blob storage LRS + * accounts. For a list of allowed premium page blob tiers, see + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage#features. For + * blob storage LRS accounts, valid values are Hot/Cool/Archive. */ accessTier?: string; /** - * @member {boolean} [accessTierInferred] 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. + * 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. */ accessTierInferred?: boolean; /** - * @member {string} [archiveStatus] 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. + * 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. */ archiveStatus?: string; /** - * @member {Date} [accessTierChangeTime] The time the tier was changed on the - * object. This is only returned if the tier on the block blob was ever set. + * The time the tier was changed on the object. This is only returned if the tier on the block + * blob was ever set. */ accessTierChangeTime?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobDeleteHeaders. * Defines headers for Delete operation. - * */ export interface BlobDeleteHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing PageBlobCreateHeaders. * Defines headers for Create operation. - * */ export interface PageBlobCreateHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {boolean} [isServerEncrypted] 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. + * 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. */ isServerEncrypted?: boolean; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing AppendBlobCreateHeaders. * Defines headers for Create operation. - * */ export interface AppendBlobCreateHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {boolean} [isServerEncrypted] 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. + * 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. */ isServerEncrypted?: boolean; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlockBlobUploadHeaders. * Defines headers for Upload operation. - * */ export interface BlockBlobUploadHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {boolean} [isServerEncrypted] 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. + * 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. */ isServerEncrypted?: boolean; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobUndeleteHeaders. * Defines headers for Undelete operation. - * */ export interface BlobUndeleteHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated. + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated. */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobSetHTTPHeadersHeaders. * Defines headers for SetHTTPHeaders operation. - * */ export interface BlobSetHTTPHeadersHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {number} [blobSequenceNumber] The current sequence number for a - * page blob. This header is not returned for block blobs or append blobs + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs */ blobSequenceNumber?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobSetMetadataHeaders. * Defines headers for SetMetadata operation. - * */ export interface BlobSetMetadataHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {boolean} [isServerEncrypted] 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. + * 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. */ isServerEncrypted?: boolean; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobAcquireLeaseHeaders. * Defines headers for AcquireLease operation. - * */ export interface BlobAcquireLeaseHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the blob was last - * modified. Any operation that modifies the blob, including an update of the - * blob's metadata or properties, changes the last-modified time of the blob. + * Returns the date and time the blob was last modified. Any operation that modifies the blob, + * including an update of the blob's metadata or properties, changes the last-modified time of + * the blob. */ lastModified?: Date; /** - * @member {string} [leaseId] Uniquely identifies a blobs's lease + * Uniquely identifies a blobs's lease */ leaseId?: string; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobReleaseLeaseHeaders. * Defines headers for ReleaseLease operation. - * */ export interface BlobReleaseLeaseHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the blob was last - * modified. Any operation that modifies the blob, including an update of the - * blob's metadata or properties, changes the last-modified time of the blob. + * Returns the date and time the blob was last modified. Any operation that modifies the blob, + * including an update of the blob's metadata or properties, changes the last-modified time of + * the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobRenewLeaseHeaders. * Defines headers for RenewLease operation. - * */ export interface BlobRenewLeaseHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the blob was last - * modified. Any operation that modifies the blob, including an update of the - * blob's metadata or properties, changes the last-modified time of the blob. + * Returns the date and time the blob was last modified. Any operation that modifies the blob, + * including an update of the blob's metadata or properties, changes the last-modified time of + * the blob. */ lastModified?: Date; /** - * @member {string} [leaseId] Uniquely identifies a blobs's lease + * Uniquely identifies a blobs's lease */ leaseId?: string; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobChangeLeaseHeaders. * Defines headers for ChangeLease operation. - * */ export interface BlobChangeLeaseHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the blob was last - * modified. Any operation that modifies the blob, including an update of the - * blob's metadata or properties, changes the last-modified time of the blob. + * Returns the date and time the blob was last modified. Any operation that modifies the blob, + * including an update of the blob's metadata or properties, changes the last-modified time of + * the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [leaseId] Uniquely identifies a blobs's lease + * Uniquely identifies a blobs's lease */ leaseId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobBreakLeaseHeaders. * Defines headers for BreakLease operation. - * */ export interface BlobBreakLeaseHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the blob was last - * modified. Any operation that modifies the blob, including an update of the - * blob's metadata or properties, changes the last-modified time of the blob. + * Returns the date and time the blob was last modified. Any operation that modifies the blob, + * including an update of the blob's metadata or properties, changes the last-modified time of + * the blob. */ lastModified?: Date; /** - * @member {number} [leaseTime] Approximate time remaining in the lease - * period, in seconds. + * Approximate time remaining in the lease period, in seconds. */ leaseTime?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobCreateSnapshotHeaders. * Defines headers for CreateSnapshot operation. - * */ export interface BlobCreateSnapshotHeaders { /** - * @member {string} [snapshot] Uniquely identifies the snapshot and indicates - * the snapshot version. It may be used in subsequent requests to access the - * snapshot + * Uniquely identifies the snapshot and indicates the snapshot version. It may be used in + * subsequent requests to access the snapshot */ snapshot?: string; /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobStartCopyFromURLHeaders. * Defines headers for StartCopyFromURL operation. - * */ export interface BlobStartCopyFromURLHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {string} [copyId] 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. + * 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. */ copyId?: string; /** - * @member {CopyStatusType} [copyStatus] State of the copy operation - * identified by x-ms-copy-id. Possible values include: 'pending', 'success', - * 'aborted', 'failed' + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' */ copyStatus?: CopyStatusType; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobAbortCopyFromURLHeaders. * Defines headers for AbortCopyFromURL operation. - * */ export interface BlobAbortCopyFromURLHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobSetTierHeaders. * Defines headers for SetTier operation. - * */ export interface BlobSetTierHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and newer. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and newer. */ version?: string; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlobGetAccountInfoHeaders. * Defines headers for GetAccountInfo operation. - * */ export interface BlobGetAccountInfoHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {SkuName} [skuName] Identifies the sku name of the account. - * Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', - * 'Standard_ZRS', 'Premium_LRS' + * Identifies the sku name of the account. Possible values include: 'Standard_LRS', + * 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS' */ skuName?: SkuName; /** - * @member {AccountKind} [accountKind] Identifies the account kind. Possible - * values include: 'Storage', 'BlobStorage', 'StorageV2' + * Identifies the account kind. Possible values include: 'Storage', 'BlobStorage', 'StorageV2' */ accountKind?: AccountKind; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlockBlobStageBlockHeaders. * Defines headers for StageBlock operation. - * */ export interface BlockBlobStageBlockHeaders { /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {boolean} [isServerEncrypted] 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. + * 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. */ isServerEncrypted?: boolean; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlockBlobStageBlockFromURLHeaders. * Defines headers for StageBlockFromURL operation. - * */ export interface BlockBlobStageBlockFromURLHeaders { /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {boolean} [isServerEncrypted] 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. + * 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. */ isServerEncrypted?: boolean; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlockBlobCommitBlockListHeaders. * Defines headers for CommitBlockList operation. - * */ export interface BlockBlobCommitBlockListHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {boolean} [isServerEncrypted] 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. + * 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. */ isServerEncrypted?: boolean; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing BlockBlobGetBlockListHeaders. * Defines headers for GetBlockList operation. - * */ export interface BlockBlobGetBlockListHeaders { /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {string} [contentType] The media type of the body of the response. - * For Get Block List this is 'application/xml' + * The media type of the body of the response. For Get Block List this is 'application/xml' */ contentType?: string; /** - * @member {number} [blobContentLength] The size of the blob in bytes. + * The size of the blob in bytes. */ blobContentLength?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing PageBlobUploadPagesHeaders. * Defines headers for UploadPages operation. - * */ export interface PageBlobUploadPagesHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {number} [blobSequenceNumber] The current sequence number for the - * page blob. + * The current sequence number for the page blob. */ blobSequenceNumber?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {boolean} [isServerEncrypted] 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. + * 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. */ isServerEncrypted?: boolean; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing PageBlobClearPagesHeaders. * Defines headers for ClearPages operation. - * */ export interface PageBlobClearPagesHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {number} [blobSequenceNumber] The current sequence number for the - * page blob. + * The current sequence number for the page blob. */ blobSequenceNumber?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing PageBlobGetPageRangesHeaders. * Defines headers for GetPageRanges operation. - * */ export interface PageBlobGetPageRangesHeaders { /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {number} [blobContentLength] The size of the blob in bytes. + * The size of the blob in bytes. */ blobContentLength?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing PageBlobGetPageRangesDiffHeaders. * Defines headers for GetPageRangesDiff operation. - * */ export interface PageBlobGetPageRangesDiffHeaders { /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {number} [blobContentLength] The size of the blob in bytes. + * The size of the blob in bytes. */ blobContentLength?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing PageBlobResizeHeaders. * Defines headers for Resize operation. - * */ export interface PageBlobResizeHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {number} [blobSequenceNumber] The current sequence number for a - * page blob. This header is not returned for block blobs or append blobs + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs */ blobSequenceNumber?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing PageBlobUpdateSequenceNumberHeaders. * Defines headers for UpdateSequenceNumber operation. - * */ export interface PageBlobUpdateSequenceNumberHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {number} [blobSequenceNumber] The current sequence number for a - * page blob. This header is not returned for block blobs or append blobs + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs */ blobSequenceNumber?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing PageBlobCopyIncrementalHeaders. * Defines headers for CopyIncremental operation. - * */ export interface PageBlobCopyIncrementalHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {string} [copyId] 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. + * 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. */ copyId?: string; /** - * @member {CopyStatusType} [copyStatus] State of the copy operation - * identified by x-ms-copy-id. Possible values include: 'pending', 'success', - * 'aborted', 'failed' + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' */ copyStatus?: CopyStatusType; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing AppendBlobAppendBlockHeaders. * Defines headers for AppendBlock operation. - * */ export interface AppendBlobAppendBlockHeaders { /** - * @member {string} [eTag] The ETag contains a value that you can use to - * perform operations conditionally. If the request version is 2011-08-18 or - * newer, the ETag value will be in quotes. + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. */ eTag?: string; /** - * @member {Date} [lastModified] Returns the date and time the container was - * last modified. Any operation that modifies the blob, including an update - * of the blob's metadata or properties, changes the last-modified time of - * the blob. + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. */ lastModified?: Date; /** - * @member {Uint8Array} [contentMD5] 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. + * 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. */ contentMD5?: Uint8Array; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Blob service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {string} [blobAppendOffset] This response header is returned only - * for append operations. It returns the offset at which the block was - * committed, in bytes. + * This response header is returned only for append operations. It returns the offset at which + * the block was committed, in bytes. */ blobAppendOffset?: string; /** - * @member {number} [blobCommittedBlockCount] The number of committed blocks - * present in the blob. This header is returned only for append blobs. + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. */ blobCommittedBlockCount?: number; - /** - * @member {string} [errorCode] - */ errorCode?: string; } @@ -5345,14 +4068,14 @@ export type BlobType = 'BlockBlob' | 'PageBlob' | 'AppendBlob'; /** * Defines values for StorageErrorCode. * Possible values include: 'AccountAlreadyExists', 'AccountBeingCreated', 'AccountIsDisabled', - * 'AuthenticationFailed', 'ConditionHeadersNotSupported', 'ConditionNotMet', 'EmptyMetadataKey', - * 'InsufficientAccountPermissions', 'InternalError', 'InvalidAuthenticationInfo', - * 'InvalidHeaderValue', 'InvalidHttpVerb', 'InvalidInput', 'InvalidMd5', 'InvalidMetadata', - * 'InvalidQueryParameterValue', 'InvalidRange', 'InvalidResourceName', 'InvalidUri', - * 'InvalidXmlDocument', 'InvalidXmlNodeValue', 'Md5Mismatch', 'MetadataTooLarge', - * 'MissingContentLengthHeader', 'MissingRequiredQueryParameter', 'MissingRequiredHeader', - * 'MissingRequiredXmlNode', 'MultipleConditionHeadersNotSupported', 'OperationTimedOut', - * 'OutOfRangeInput', 'OutOfRangeQueryParameterValue', 'RequestBodyTooLarge', + * 'AuthenticationFailed', 'AuthorizationFailure', 'ConditionHeadersNotSupported', + * 'ConditionNotMet', 'EmptyMetadataKey', 'InsufficientAccountPermissions', 'InternalError', + * 'InvalidAuthenticationInfo', 'InvalidHeaderValue', 'InvalidHttpVerb', 'InvalidInput', + * 'InvalidMd5', 'InvalidMetadata', 'InvalidQueryParameterValue', 'InvalidRange', + * 'InvalidResourceName', 'InvalidUri', 'InvalidXmlDocument', 'InvalidXmlNodeValue', 'Md5Mismatch', + * 'MetadataTooLarge', 'MissingContentLengthHeader', 'MissingRequiredQueryParameter', + * 'MissingRequiredHeader', 'MissingRequiredXmlNode', 'MultipleConditionHeadersNotSupported', + * 'OperationTimedOut', 'OutOfRangeInput', 'OutOfRangeQueryParameterValue', 'RequestBodyTooLarge', * 'ResourceTypeMismatch', 'RequestUrlFailedToParse', 'ResourceAlreadyExists', 'ResourceNotFound', * 'ServerBusy', 'UnsupportedHeader', 'UnsupportedXmlNode', 'UnsupportedQueryParameter', * 'UnsupportedHttpVerb', 'AppendPositionConditionNotMet', 'BlobAlreadyExists', 'BlobNotFound', @@ -5380,7 +4103,7 @@ export type BlobType = 'BlockBlob' | 'PageBlob' | 'AppendBlob'; * @readonly * @enum {string} */ -export type StorageErrorCode = 'AccountAlreadyExists' | 'AccountBeingCreated' | 'AccountIsDisabled' | 'AuthenticationFailed' | 'ConditionHeadersNotSupported' | 'ConditionNotMet' | 'EmptyMetadataKey' | 'InsufficientAccountPermissions' | 'InternalError' | 'InvalidAuthenticationInfo' | 'InvalidHeaderValue' | 'InvalidHttpVerb' | 'InvalidInput' | 'InvalidMd5' | 'InvalidMetadata' | 'InvalidQueryParameterValue' | 'InvalidRange' | 'InvalidResourceName' | 'InvalidUri' | 'InvalidXmlDocument' | 'InvalidXmlNodeValue' | 'Md5Mismatch' | 'MetadataTooLarge' | 'MissingContentLengthHeader' | 'MissingRequiredQueryParameter' | 'MissingRequiredHeader' | 'MissingRequiredXmlNode' | 'MultipleConditionHeadersNotSupported' | 'OperationTimedOut' | 'OutOfRangeInput' | 'OutOfRangeQueryParameterValue' | 'RequestBodyTooLarge' | 'ResourceTypeMismatch' | 'RequestUrlFailedToParse' | 'ResourceAlreadyExists' | 'ResourceNotFound' | 'ServerBusy' | 'UnsupportedHeader' | 'UnsupportedXmlNode' | 'UnsupportedQueryParameter' | 'UnsupportedHttpVerb' | 'AppendPositionConditionNotMet' | 'BlobAlreadyExists' | 'BlobNotFound' | 'BlobOverwritten' | 'BlobTierInadequateForContentLength' | 'BlockCountExceedsLimit' | 'BlockListTooLong' | 'CannotChangeToLowerTier' | 'CannotVerifyCopySource' | 'ContainerAlreadyExists' | 'ContainerBeingDeleted' | 'ContainerDisabled' | 'ContainerNotFound' | 'ContentLengthLargerThanTierLimit' | 'CopyAcrossAccountsNotSupported' | 'CopyIdMismatch' | 'FeatureVersionMismatch' | 'IncrementalCopyBlobMismatch' | 'IncrementalCopyOfEralierVersionSnapshotNotAllowed' | 'IncrementalCopySourceMustBeSnapshot' | 'InfiniteLeaseDurationRequired' | 'InvalidBlobOrBlock' | 'InvalidBlobTier' | 'InvalidBlobType' | 'InvalidBlockId' | 'InvalidBlockList' | 'InvalidOperation' | 'InvalidPageRange' | 'InvalidSourceBlobType' | 'InvalidSourceBlobUrl' | 'InvalidVersionForPageBlobOperation' | 'LeaseAlreadyPresent' | 'LeaseAlreadyBroken' | 'LeaseIdMismatchWithBlobOperation' | 'LeaseIdMismatchWithContainerOperation' | 'LeaseIdMismatchWithLeaseOperation' | 'LeaseIdMissing' | 'LeaseIsBreakingAndCannotBeAcquired' | 'LeaseIsBreakingAndCannotBeChanged' | 'LeaseIsBrokenAndCannotBeRenewed' | 'LeaseLost' | 'LeaseNotPresentWithBlobOperation' | 'LeaseNotPresentWithContainerOperation' | 'LeaseNotPresentWithLeaseOperation' | 'MaxBlobSizeConditionNotMet' | 'NoPendingCopyOperation' | 'OperationNotAllowedOnIncrementalCopyBlob' | 'PendingCopyOperation' | 'PreviousSnapshotCannotBeNewer' | 'PreviousSnapshotNotFound' | 'PreviousSnapshotOperationNotSupported' | 'SequenceNumberConditionNotMet' | 'SequenceNumberIncrementTooLarge' | 'SnapshotCountExceeded' | 'SnaphotOperationRateExceeded' | 'SnapshotsPresent' | 'SourceConditionNotMet' | 'SystemInUse' | 'TargetConditionNotMet' | 'UnauthorizedBlobOverwrite' | 'BlobBeingRehydrated' | 'BlobArchived' | 'BlobNotArchived'; +export type StorageErrorCode = 'AccountAlreadyExists' | 'AccountBeingCreated' | 'AccountIsDisabled' | 'AuthenticationFailed' | 'AuthorizationFailure' | 'ConditionHeadersNotSupported' | 'ConditionNotMet' | 'EmptyMetadataKey' | 'InsufficientAccountPermissions' | 'InternalError' | 'InvalidAuthenticationInfo' | 'InvalidHeaderValue' | 'InvalidHttpVerb' | 'InvalidInput' | 'InvalidMd5' | 'InvalidMetadata' | 'InvalidQueryParameterValue' | 'InvalidRange' | 'InvalidResourceName' | 'InvalidUri' | 'InvalidXmlDocument' | 'InvalidXmlNodeValue' | 'Md5Mismatch' | 'MetadataTooLarge' | 'MissingContentLengthHeader' | 'MissingRequiredQueryParameter' | 'MissingRequiredHeader' | 'MissingRequiredXmlNode' | 'MultipleConditionHeadersNotSupported' | 'OperationTimedOut' | 'OutOfRangeInput' | 'OutOfRangeQueryParameterValue' | 'RequestBodyTooLarge' | 'ResourceTypeMismatch' | 'RequestUrlFailedToParse' | 'ResourceAlreadyExists' | 'ResourceNotFound' | 'ServerBusy' | 'UnsupportedHeader' | 'UnsupportedXmlNode' | 'UnsupportedQueryParameter' | 'UnsupportedHttpVerb' | 'AppendPositionConditionNotMet' | 'BlobAlreadyExists' | 'BlobNotFound' | 'BlobOverwritten' | 'BlobTierInadequateForContentLength' | 'BlockCountExceedsLimit' | 'BlockListTooLong' | 'CannotChangeToLowerTier' | 'CannotVerifyCopySource' | 'ContainerAlreadyExists' | 'ContainerBeingDeleted' | 'ContainerDisabled' | 'ContainerNotFound' | 'ContentLengthLargerThanTierLimit' | 'CopyAcrossAccountsNotSupported' | 'CopyIdMismatch' | 'FeatureVersionMismatch' | 'IncrementalCopyBlobMismatch' | 'IncrementalCopyOfEralierVersionSnapshotNotAllowed' | 'IncrementalCopySourceMustBeSnapshot' | 'InfiniteLeaseDurationRequired' | 'InvalidBlobOrBlock' | 'InvalidBlobTier' | 'InvalidBlobType' | 'InvalidBlockId' | 'InvalidBlockList' | 'InvalidOperation' | 'InvalidPageRange' | 'InvalidSourceBlobType' | 'InvalidSourceBlobUrl' | 'InvalidVersionForPageBlobOperation' | 'LeaseAlreadyPresent' | 'LeaseAlreadyBroken' | 'LeaseIdMismatchWithBlobOperation' | 'LeaseIdMismatchWithContainerOperation' | 'LeaseIdMismatchWithLeaseOperation' | 'LeaseIdMissing' | 'LeaseIsBreakingAndCannotBeAcquired' | 'LeaseIsBreakingAndCannotBeChanged' | 'LeaseIsBrokenAndCannotBeRenewed' | 'LeaseLost' | 'LeaseNotPresentWithBlobOperation' | 'LeaseNotPresentWithContainerOperation' | 'LeaseNotPresentWithLeaseOperation' | 'MaxBlobSizeConditionNotMet' | 'NoPendingCopyOperation' | 'OperationNotAllowedOnIncrementalCopyBlob' | 'PendingCopyOperation' | 'PreviousSnapshotCannotBeNewer' | 'PreviousSnapshotNotFound' | 'PreviousSnapshotOperationNotSupported' | 'SequenceNumberConditionNotMet' | 'SequenceNumberIncrementTooLarge' | 'SnapshotCountExceeded' | 'SnaphotOperationRateExceeded' | 'SnapshotsPresent' | 'SourceConditionNotMet' | 'SystemInUse' | 'TargetConditionNotMet' | 'UnauthorizedBlobOverwrite' | 'BlobBeingRehydrated' | 'BlobArchived' | 'BlobNotArchived'; /** * Defines values for GeoReplicationStatusType. @@ -5454,7 +4177,7 @@ export type ServiceSetPropertiesResponse = ServiceSetPropertiesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5469,15 +4192,17 @@ export type ServiceGetPropertiesResponse = StorageServiceProperties & ServiceGet /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: ServiceGetPropertiesHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -5492,15 +4217,17 @@ export type ServiceGetStatisticsResponse = StorageServiceStats & ServiceGetStati /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: ServiceGetStatisticsHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -5515,15 +4242,17 @@ export type ServiceListContainersSegmentResponse = ListContainersSegmentResponse /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: ServiceListContainersSegmentHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -5538,7 +4267,7 @@ export type ServiceGetAccountInfoResponse = ServiceGetAccountInfoHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5553,7 +4282,7 @@ export type ContainerCreateResponse = ContainerCreateHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5568,7 +4297,7 @@ export type ContainerGetPropertiesResponse = ContainerGetPropertiesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5583,7 +4312,7 @@ export type ContainerDeleteResponse = ContainerDeleteHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5598,7 +4327,7 @@ export type ContainerSetMetadataResponse = ContainerSetMetadataHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5613,15 +4342,17 @@ export type ContainerGetAccessPolicyResponse = Array & Contain /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: ContainerGetAccessPolicyHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -5636,7 +4367,7 @@ export type ContainerSetAccessPolicyResponse = ContainerSetAccessPolicyHeaders & /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5651,7 +4382,7 @@ export type ContainerAcquireLeaseResponse = ContainerAcquireLeaseHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5666,7 +4397,7 @@ export type ContainerReleaseLeaseResponse = ContainerReleaseLeaseHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5681,7 +4412,7 @@ export type ContainerRenewLeaseResponse = ContainerRenewLeaseHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5696,7 +4427,7 @@ export type ContainerBreakLeaseResponse = ContainerBreakLeaseHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5711,7 +4442,7 @@ export type ContainerChangeLeaseResponse = ContainerChangeLeaseHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5726,15 +4457,17 @@ export type ContainerListBlobFlatSegmentResponse = ListBlobsFlatSegmentResponse /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: ContainerListBlobFlatSegmentHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -5749,15 +4482,17 @@ export type ContainerListBlobHierarchySegmentResponse = ListBlobsHierarchySegmen /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: ContainerListBlobHierarchySegmentHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -5772,7 +4507,7 @@ export type ContainerGetAccountInfoResponse = ContainerGetAccountInfoHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5791,6 +4526,7 @@ export type BlobDownloadResponse = BlobDownloadHeaders & { * Always undefined in node.js. */ blobBody?: Promise; + /** * NODEJS ONLY * @@ -5798,10 +4534,11 @@ export type BlobDownloadResponse = BlobDownloadHeaders & { * Always undefined in the browser. */ readableStreamBody?: NodeJS.ReadableStream; + /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5816,7 +4553,7 @@ export type BlobGetPropertiesResponse = BlobGetPropertiesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5831,7 +4568,7 @@ export type BlobDeleteResponse = BlobDeleteHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5846,7 +4583,7 @@ export type BlobUndeleteResponse = BlobUndeleteHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5861,7 +4598,7 @@ export type BlobSetHTTPHeadersResponse = BlobSetHTTPHeadersHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5876,7 +4613,7 @@ export type BlobSetMetadataResponse = BlobSetMetadataHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5891,7 +4628,7 @@ export type BlobAcquireLeaseResponse = BlobAcquireLeaseHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5906,7 +4643,7 @@ export type BlobReleaseLeaseResponse = BlobReleaseLeaseHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5921,7 +4658,7 @@ export type BlobRenewLeaseResponse = BlobRenewLeaseHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5936,7 +4673,7 @@ export type BlobChangeLeaseResponse = BlobChangeLeaseHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5951,7 +4688,7 @@ export type BlobBreakLeaseResponse = BlobBreakLeaseHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5966,7 +4703,7 @@ export type BlobCreateSnapshotResponse = BlobCreateSnapshotHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5981,7 +4718,7 @@ export type BlobStartCopyFromURLResponse = BlobStartCopyFromURLHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -5996,7 +4733,7 @@ export type BlobAbortCopyFromURLResponse = BlobAbortCopyFromURLHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6011,7 +4748,7 @@ export type BlobSetTierResponse = BlobSetTierHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6026,7 +4763,7 @@ export type BlobGetAccountInfoResponse = BlobGetAccountInfoHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6041,7 +4778,7 @@ export type PageBlobCreateResponse = PageBlobCreateHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6056,7 +4793,7 @@ export type PageBlobUploadPagesResponse = PageBlobUploadPagesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6071,7 +4808,7 @@ export type PageBlobClearPagesResponse = PageBlobClearPagesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6086,15 +4823,17 @@ export type PageBlobGetPageRangesResponse = PageList & PageBlobGetPageRangesHead /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: PageBlobGetPageRangesHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -6109,15 +4848,17 @@ export type PageBlobGetPageRangesDiffResponse = PageList & PageBlobGetPageRanges /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: PageBlobGetPageRangesDiffHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -6132,7 +4873,7 @@ export type PageBlobResizeResponse = PageBlobResizeHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6147,7 +4888,7 @@ export type PageBlobUpdateSequenceNumberResponse = PageBlobUpdateSequenceNumberH /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6162,7 +4903,7 @@ export type PageBlobCopyIncrementalResponse = PageBlobCopyIncrementalHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6177,7 +4918,7 @@ export type AppendBlobCreateResponse = AppendBlobCreateHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6192,7 +4933,7 @@ export type AppendBlobAppendBlockResponse = AppendBlobAppendBlockHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6207,7 +4948,7 @@ export type BlockBlobUploadResponse = BlockBlobUploadHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6222,7 +4963,7 @@ export type BlockBlobStageBlockResponse = BlockBlobStageBlockHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6237,7 +4978,7 @@ export type BlockBlobStageBlockFromURLResponse = BlockBlobStageBlockFromURLHeade /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6252,7 +4993,7 @@ export type BlockBlobCommitBlockListResponse = BlockBlobCommitBlockListHeaders & /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -6267,15 +5008,17 @@ export type BlockBlobGetBlockListResponse = BlockList & BlockBlobGetBlockListHea /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: BlockBlobGetBlockListHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/storage/storage-blob/src/generated/lib/models/mappers.ts b/sdk/storage/storage-blob/src/generated/lib/models/mappers.ts index 7cafd6cb6dee..7b151469717a 100644 --- a/sdk/storage/storage-blob/src/generated/lib/models/mappers.ts +++ b/sdk/storage/storage-blob/src/generated/lib/models/mappers.ts @@ -1,17 +1,15 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; -export const StorageError: msRest.CompositeMapper = { +export const StorageError: coreHttp.CompositeMapper = { serializedName: "StorageError", type: { name: "Composite", @@ -28,7 +26,7 @@ export const StorageError: msRest.CompositeMapper = { } }; -export const AccessPolicy: msRest.CompositeMapper = { +export const AccessPolicy: coreHttp.CompositeMapper = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -62,7 +60,7 @@ export const AccessPolicy: msRest.CompositeMapper = { } }; -export const BlobProperties: msRest.CompositeMapper = { +export const BlobProperties: coreHttp.CompositeMapper = { xmlName: "Properties", serializedName: "BlobProperties", type: { @@ -311,7 +309,7 @@ export const BlobProperties: msRest.CompositeMapper = { } }; -export const BlobItem: msRest.CompositeMapper = { +export const BlobItem: coreHttp.CompositeMapper = { xmlName: "Blob", serializedName: "BlobItem", type: { @@ -367,7 +365,7 @@ export const BlobItem: msRest.CompositeMapper = { } }; -export const BlobFlatListSegment: msRest.CompositeMapper = { +export const BlobFlatListSegment: coreHttp.CompositeMapper = { xmlName: "Blobs", serializedName: "BlobFlatListSegment", type: { @@ -393,7 +391,7 @@ export const BlobFlatListSegment: msRest.CompositeMapper = { } }; -export const ListBlobsFlatSegmentResponse: msRest.CompositeMapper = { +export const ListBlobsFlatSegmentResponse: coreHttp.CompositeMapper = { xmlName: "EnumerationResults", serializedName: "ListBlobsFlatSegmentResponse", type: { @@ -471,7 +469,7 @@ export const ListBlobsFlatSegmentResponse: msRest.CompositeMapper = { } }; -export const BlobPrefix: msRest.CompositeMapper = { +export const BlobPrefix: coreHttp.CompositeMapper = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -489,7 +487,7 @@ export const BlobPrefix: msRest.CompositeMapper = { } }; -export const BlobHierarchyListSegment: msRest.CompositeMapper = { +export const BlobHierarchyListSegment: coreHttp.CompositeMapper = { xmlName: "Blobs", serializedName: "BlobHierarchyListSegment", type: { @@ -529,7 +527,7 @@ export const BlobHierarchyListSegment: msRest.CompositeMapper = { } }; -export const ListBlobsHierarchySegmentResponse: msRest.CompositeMapper = { +export const ListBlobsHierarchySegmentResponse: coreHttp.CompositeMapper = { xmlName: "EnumerationResults", serializedName: "ListBlobsHierarchySegmentResponse", type: { @@ -607,7 +605,7 @@ export const ListBlobsHierarchySegmentResponse: msRest.CompositeMapper = { } }; -export const Block: msRest.CompositeMapper = { +export const Block: coreHttp.CompositeMapper = { serializedName: "Block", type: { name: "Composite", @@ -633,7 +631,7 @@ export const Block: msRest.CompositeMapper = { } }; -export const BlockList: msRest.CompositeMapper = { +export const BlockList: coreHttp.CompositeMapper = { serializedName: "BlockList", type: { name: "Composite", @@ -673,7 +671,7 @@ export const BlockList: msRest.CompositeMapper = { } }; -export const BlockLookupList: msRest.CompositeMapper = { +export const BlockLookupList: coreHttp.CompositeMapper = { xmlName: "BlockList", serializedName: "BlockLookupList", type: { @@ -723,7 +721,7 @@ export const BlockLookupList: msRest.CompositeMapper = { } }; -export const ContainerProperties: msRest.CompositeMapper = { +export const ContainerProperties: coreHttp.CompositeMapper = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -806,7 +804,7 @@ export const ContainerProperties: msRest.CompositeMapper = { } }; -export const ContainerItem: msRest.CompositeMapper = { +export const ContainerItem: coreHttp.CompositeMapper = { xmlName: "Container", serializedName: "ContainerItem", type: { @@ -846,7 +844,7 @@ export const ContainerItem: msRest.CompositeMapper = { } }; -export const ListContainersSegmentResponse: msRest.CompositeMapper = { +export const ListContainersSegmentResponse: coreHttp.CompositeMapper = { xmlName: "EnumerationResults", serializedName: "ListContainersSegmentResponse", type: { @@ -913,7 +911,7 @@ export const ListContainersSegmentResponse: msRest.CompositeMapper = { } }; -export const CorsRule: msRest.CompositeMapper = { +export const CorsRule: coreHttp.CompositeMapper = { serializedName: "CorsRule", type: { name: "Composite", @@ -966,7 +964,7 @@ export const CorsRule: msRest.CompositeMapper = { } }; -export const GeoReplication: msRest.CompositeMapper = { +export const GeoReplication: coreHttp.CompositeMapper = { serializedName: "GeoReplication", type: { name: "Composite", @@ -992,7 +990,7 @@ export const GeoReplication: msRest.CompositeMapper = { } }; -export const RetentionPolicy: msRest.CompositeMapper = { +export const RetentionPolicy: coreHttp.CompositeMapper = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -1020,7 +1018,7 @@ export const RetentionPolicy: msRest.CompositeMapper = { } }; -export const Logging: msRest.CompositeMapper = { +export const Logging: coreHttp.CompositeMapper = { serializedName: "Logging", type: { name: "Composite", @@ -1071,7 +1069,7 @@ export const Logging: msRest.CompositeMapper = { } }; -export const Metrics: msRest.CompositeMapper = { +export const Metrics: coreHttp.CompositeMapper = { serializedName: "Metrics", type: { name: "Composite", @@ -1111,7 +1109,7 @@ export const Metrics: msRest.CompositeMapper = { } }; -export const PageRange: msRest.CompositeMapper = { +export const PageRange: coreHttp.CompositeMapper = { serializedName: "PageRange", type: { name: "Composite", @@ -1137,7 +1135,7 @@ export const PageRange: msRest.CompositeMapper = { } }; -export const ClearRange: msRest.CompositeMapper = { +export const ClearRange: coreHttp.CompositeMapper = { serializedName: "ClearRange", type: { name: "Composite", @@ -1163,7 +1161,7 @@ export const ClearRange: msRest.CompositeMapper = { } }; -export const PageList: msRest.CompositeMapper = { +export const PageList: coreHttp.CompositeMapper = { serializedName: "PageList", type: { name: "Composite", @@ -1201,7 +1199,7 @@ export const PageList: msRest.CompositeMapper = { } }; -export const SignedIdentifier: msRest.CompositeMapper = { +export const SignedIdentifier: coreHttp.CompositeMapper = { serializedName: "SignedIdentifier", type: { name: "Composite", @@ -1228,7 +1226,7 @@ export const SignedIdentifier: msRest.CompositeMapper = { } }; -export const StaticWebsite: msRest.CompositeMapper = { +export const StaticWebsite: coreHttp.CompositeMapper = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -1260,7 +1258,7 @@ export const StaticWebsite: msRest.CompositeMapper = { } }; -export const StorageServiceProperties: msRest.CompositeMapper = { +export const StorageServiceProperties: coreHttp.CompositeMapper = { serializedName: "StorageServiceProperties", type: { name: "Composite", @@ -1332,7 +1330,7 @@ export const StorageServiceProperties: msRest.CompositeMapper = { } }; -export const StorageServiceStats: msRest.CompositeMapper = { +export const StorageServiceStats: coreHttp.CompositeMapper = { serializedName: "StorageServiceStats", type: { name: "Composite", @@ -1350,7 +1348,7 @@ export const StorageServiceStats: msRest.CompositeMapper = { } }; -export const LeaseAccessConditions: msRest.CompositeMapper = { +export const LeaseAccessConditions: coreHttp.CompositeMapper = { xmlName: "lease-access-conditions", type: { name: "Composite", @@ -1366,7 +1364,7 @@ export const LeaseAccessConditions: msRest.CompositeMapper = { } }; -export const ModifiedAccessConditions: msRest.CompositeMapper = { +export const ModifiedAccessConditions: coreHttp.CompositeMapper = { xmlName: "modified-access-conditions", type: { name: "Composite", @@ -1400,7 +1398,7 @@ export const ModifiedAccessConditions: msRest.CompositeMapper = { } }; -export const BlobHTTPHeaders: msRest.CompositeMapper = { +export const BlobHTTPHeaders: coreHttp.CompositeMapper = { xmlName: "blob-HTTP-headers", type: { name: "Composite", @@ -1446,7 +1444,7 @@ export const BlobHTTPHeaders: msRest.CompositeMapper = { } }; -export const SourceModifiedAccessConditions: msRest.CompositeMapper = { +export const SourceModifiedAccessConditions: coreHttp.CompositeMapper = { xmlName: "source-modified-access-conditions", type: { name: "Composite", @@ -1480,7 +1478,7 @@ export const SourceModifiedAccessConditions: msRest.CompositeMapper = { } }; -export const SequenceNumberAccessConditions: msRest.CompositeMapper = { +export const SequenceNumberAccessConditions: coreHttp.CompositeMapper = { xmlName: "sequence-number-access-conditions", type: { name: "Composite", @@ -1508,7 +1506,7 @@ export const SequenceNumberAccessConditions: msRest.CompositeMapper = { } }; -export const AppendPositionAccessConditions: msRest.CompositeMapper = { +export const AppendPositionAccessConditions: coreHttp.CompositeMapper = { xmlName: "append-position-access-conditions", type: { name: "Composite", @@ -1530,7 +1528,7 @@ export const AppendPositionAccessConditions: msRest.CompositeMapper = { } }; -export const ServiceSetPropertiesHeaders: msRest.CompositeMapper = { +export const ServiceSetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "service-setproperties-headers", type: { name: "Composite", @@ -1558,7 +1556,7 @@ export const ServiceSetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const ServiceGetPropertiesHeaders: msRest.CompositeMapper = { +export const ServiceGetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "service-getproperties-headers", type: { name: "Composite", @@ -1586,7 +1584,7 @@ export const ServiceGetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const ServiceGetStatisticsHeaders: msRest.CompositeMapper = { +export const ServiceGetStatisticsHeaders: coreHttp.CompositeMapper = { serializedName: "service-getstatistics-headers", type: { name: "Composite", @@ -1620,7 +1618,7 @@ export const ServiceGetStatisticsHeaders: msRest.CompositeMapper = { } }; -export const ServiceListContainersSegmentHeaders: msRest.CompositeMapper = { +export const ServiceListContainersSegmentHeaders: coreHttp.CompositeMapper = { serializedName: "service-listcontainerssegment-headers", type: { name: "Composite", @@ -1648,7 +1646,7 @@ export const ServiceListContainersSegmentHeaders: msRest.CompositeMapper = { } }; -export const ServiceGetAccountInfoHeaders: msRest.CompositeMapper = { +export const ServiceGetAccountInfoHeaders: coreHttp.CompositeMapper = { serializedName: "service-getaccountinfo-headers", type: { name: "Composite", @@ -1706,7 +1704,7 @@ export const ServiceGetAccountInfoHeaders: msRest.CompositeMapper = { } }; -export const ContainerCreateHeaders: msRest.CompositeMapper = { +export const ContainerCreateHeaders: coreHttp.CompositeMapper = { serializedName: "container-create-headers", type: { name: "Composite", @@ -1752,7 +1750,7 @@ export const ContainerCreateHeaders: msRest.CompositeMapper = { } }; -export const ContainerGetPropertiesHeaders: msRest.CompositeMapper = { +export const ContainerGetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "container-getproperties-headers", type: { name: "Composite", @@ -1861,7 +1859,7 @@ export const ContainerGetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const ContainerDeleteHeaders: msRest.CompositeMapper = { +export const ContainerDeleteHeaders: coreHttp.CompositeMapper = { serializedName: "container-delete-headers", type: { name: "Composite", @@ -1895,7 +1893,7 @@ export const ContainerDeleteHeaders: msRest.CompositeMapper = { } }; -export const ContainerSetMetadataHeaders: msRest.CompositeMapper = { +export const ContainerSetMetadataHeaders: coreHttp.CompositeMapper = { serializedName: "container-setmetadata-headers", type: { name: "Composite", @@ -1941,7 +1939,7 @@ export const ContainerSetMetadataHeaders: msRest.CompositeMapper = { } }; -export const ContainerGetAccessPolicyHeaders: msRest.CompositeMapper = { +export const ContainerGetAccessPolicyHeaders: coreHttp.CompositeMapper = { serializedName: "container-getaccesspolicy-headers", type: { name: "Composite", @@ -1993,7 +1991,7 @@ export const ContainerGetAccessPolicyHeaders: msRest.CompositeMapper = { } }; -export const ContainerSetAccessPolicyHeaders: msRest.CompositeMapper = { +export const ContainerSetAccessPolicyHeaders: coreHttp.CompositeMapper = { serializedName: "container-setaccesspolicy-headers", type: { name: "Composite", @@ -2039,7 +2037,7 @@ export const ContainerSetAccessPolicyHeaders: msRest.CompositeMapper = { } }; -export const ContainerAcquireLeaseHeaders: msRest.CompositeMapper = { +export const ContainerAcquireLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "container-acquirelease-headers", type: { name: "Composite", @@ -2091,7 +2089,7 @@ export const ContainerAcquireLeaseHeaders: msRest.CompositeMapper = { } }; -export const ContainerReleaseLeaseHeaders: msRest.CompositeMapper = { +export const ContainerReleaseLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "container-releaselease-headers", type: { name: "Composite", @@ -2137,7 +2135,7 @@ export const ContainerReleaseLeaseHeaders: msRest.CompositeMapper = { } }; -export const ContainerRenewLeaseHeaders: msRest.CompositeMapper = { +export const ContainerRenewLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "container-renewlease-headers", type: { name: "Composite", @@ -2189,7 +2187,7 @@ export const ContainerRenewLeaseHeaders: msRest.CompositeMapper = { } }; -export const ContainerBreakLeaseHeaders: msRest.CompositeMapper = { +export const ContainerBreakLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "container-breaklease-headers", type: { name: "Composite", @@ -2241,7 +2239,7 @@ export const ContainerBreakLeaseHeaders: msRest.CompositeMapper = { } }; -export const ContainerChangeLeaseHeaders: msRest.CompositeMapper = { +export const ContainerChangeLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "container-changelease-headers", type: { name: "Composite", @@ -2293,7 +2291,7 @@ export const ContainerChangeLeaseHeaders: msRest.CompositeMapper = { } }; -export const ContainerListBlobFlatSegmentHeaders: msRest.CompositeMapper = { +export const ContainerListBlobFlatSegmentHeaders: coreHttp.CompositeMapper = { serializedName: "container-listblobflatsegment-headers", type: { name: "Composite", @@ -2333,7 +2331,7 @@ export const ContainerListBlobFlatSegmentHeaders: msRest.CompositeMapper = { } }; -export const ContainerListBlobHierarchySegmentHeaders: msRest.CompositeMapper = { +export const ContainerListBlobHierarchySegmentHeaders: coreHttp.CompositeMapper = { serializedName: "container-listblobhierarchysegment-headers", type: { name: "Composite", @@ -2373,7 +2371,7 @@ export const ContainerListBlobHierarchySegmentHeaders: msRest.CompositeMapper = } }; -export const ContainerGetAccountInfoHeaders: msRest.CompositeMapper = { +export const ContainerGetAccountInfoHeaders: coreHttp.CompositeMapper = { serializedName: "container-getaccountinfo-headers", type: { name: "Composite", @@ -2431,7 +2429,7 @@ export const ContainerGetAccountInfoHeaders: msRest.CompositeMapper = { } }; -export const BlobDownloadHeaders: msRest.CompositeMapper = { +export const BlobDownloadHeaders: coreHttp.CompositeMapper = { serializedName: "blob-download-headers", type: { name: "Composite", @@ -2653,7 +2651,7 @@ export const BlobDownloadHeaders: msRest.CompositeMapper = { } }; -export const BlobGetPropertiesHeaders: msRest.CompositeMapper = { +export const BlobGetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "blob-getproperties-headers", type: { name: "Composite", @@ -2905,7 +2903,7 @@ export const BlobGetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const BlobDeleteHeaders: msRest.CompositeMapper = { +export const BlobDeleteHeaders: coreHttp.CompositeMapper = { serializedName: "blob-delete-headers", type: { name: "Composite", @@ -2939,7 +2937,7 @@ export const BlobDeleteHeaders: msRest.CompositeMapper = { } }; -export const PageBlobCreateHeaders: msRest.CompositeMapper = { +export const PageBlobCreateHeaders: coreHttp.CompositeMapper = { serializedName: "pageblob-create-headers", type: { name: "Composite", @@ -2997,7 +2995,7 @@ export const PageBlobCreateHeaders: msRest.CompositeMapper = { } }; -export const AppendBlobCreateHeaders: msRest.CompositeMapper = { +export const AppendBlobCreateHeaders: coreHttp.CompositeMapper = { serializedName: "appendblob-create-headers", type: { name: "Composite", @@ -3055,7 +3053,7 @@ export const AppendBlobCreateHeaders: msRest.CompositeMapper = { } }; -export const BlockBlobUploadHeaders: msRest.CompositeMapper = { +export const BlockBlobUploadHeaders: coreHttp.CompositeMapper = { serializedName: "blockblob-upload-headers", type: { name: "Composite", @@ -3113,7 +3111,7 @@ export const BlockBlobUploadHeaders: msRest.CompositeMapper = { } }; -export const BlobUndeleteHeaders: msRest.CompositeMapper = { +export const BlobUndeleteHeaders: coreHttp.CompositeMapper = { serializedName: "blob-undelete-headers", type: { name: "Composite", @@ -3147,7 +3145,7 @@ export const BlobUndeleteHeaders: msRest.CompositeMapper = { } }; -export const BlobSetHTTPHeadersHeaders: msRest.CompositeMapper = { +export const BlobSetHTTPHeadersHeaders: coreHttp.CompositeMapper = { serializedName: "blob-sethttpheaders-headers", type: { name: "Composite", @@ -3199,7 +3197,7 @@ export const BlobSetHTTPHeadersHeaders: msRest.CompositeMapper = { } }; -export const BlobSetMetadataHeaders: msRest.CompositeMapper = { +export const BlobSetMetadataHeaders: coreHttp.CompositeMapper = { serializedName: "blob-setmetadata-headers", type: { name: "Composite", @@ -3251,7 +3249,7 @@ export const BlobSetMetadataHeaders: msRest.CompositeMapper = { } }; -export const BlobAcquireLeaseHeaders: msRest.CompositeMapper = { +export const BlobAcquireLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "blob-acquirelease-headers", type: { name: "Composite", @@ -3303,7 +3301,7 @@ export const BlobAcquireLeaseHeaders: msRest.CompositeMapper = { } }; -export const BlobReleaseLeaseHeaders: msRest.CompositeMapper = { +export const BlobReleaseLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "blob-releaselease-headers", type: { name: "Composite", @@ -3349,7 +3347,7 @@ export const BlobReleaseLeaseHeaders: msRest.CompositeMapper = { } }; -export const BlobRenewLeaseHeaders: msRest.CompositeMapper = { +export const BlobRenewLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "blob-renewlease-headers", type: { name: "Composite", @@ -3401,7 +3399,7 @@ export const BlobRenewLeaseHeaders: msRest.CompositeMapper = { } }; -export const BlobChangeLeaseHeaders: msRest.CompositeMapper = { +export const BlobChangeLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "blob-changelease-headers", type: { name: "Composite", @@ -3453,7 +3451,7 @@ export const BlobChangeLeaseHeaders: msRest.CompositeMapper = { } }; -export const BlobBreakLeaseHeaders: msRest.CompositeMapper = { +export const BlobBreakLeaseHeaders: coreHttp.CompositeMapper = { serializedName: "blob-breaklease-headers", type: { name: "Composite", @@ -3505,7 +3503,7 @@ export const BlobBreakLeaseHeaders: msRest.CompositeMapper = { } }; -export const BlobCreateSnapshotHeaders: msRest.CompositeMapper = { +export const BlobCreateSnapshotHeaders: coreHttp.CompositeMapper = { serializedName: "blob-createsnapshot-headers", type: { name: "Composite", @@ -3557,7 +3555,7 @@ export const BlobCreateSnapshotHeaders: msRest.CompositeMapper = { } }; -export const BlobStartCopyFromURLHeaders: msRest.CompositeMapper = { +export const BlobStartCopyFromURLHeaders: coreHttp.CompositeMapper = { serializedName: "blob-startcopyfromurl-headers", type: { name: "Composite", @@ -3621,7 +3619,7 @@ export const BlobStartCopyFromURLHeaders: msRest.CompositeMapper = { } }; -export const BlobAbortCopyFromURLHeaders: msRest.CompositeMapper = { +export const BlobAbortCopyFromURLHeaders: coreHttp.CompositeMapper = { serializedName: "blob-abortcopyfromurl-headers", type: { name: "Composite", @@ -3655,7 +3653,7 @@ export const BlobAbortCopyFromURLHeaders: msRest.CompositeMapper = { } }; -export const BlobSetTierHeaders: msRest.CompositeMapper = { +export const BlobSetTierHeaders: coreHttp.CompositeMapper = { serializedName: "blob-settier-headers", type: { name: "Composite", @@ -3683,7 +3681,7 @@ export const BlobSetTierHeaders: msRest.CompositeMapper = { } }; -export const BlobGetAccountInfoHeaders: msRest.CompositeMapper = { +export const BlobGetAccountInfoHeaders: coreHttp.CompositeMapper = { serializedName: "blob-getaccountinfo-headers", type: { name: "Composite", @@ -3741,7 +3739,7 @@ export const BlobGetAccountInfoHeaders: msRest.CompositeMapper = { } }; -export const BlockBlobStageBlockHeaders: msRest.CompositeMapper = { +export const BlockBlobStageBlockHeaders: coreHttp.CompositeMapper = { serializedName: "blockblob-stageblock-headers", type: { name: "Composite", @@ -3787,7 +3785,7 @@ export const BlockBlobStageBlockHeaders: msRest.CompositeMapper = { } }; -export const BlockBlobStageBlockFromURLHeaders: msRest.CompositeMapper = { +export const BlockBlobStageBlockFromURLHeaders: coreHttp.CompositeMapper = { serializedName: "blockblob-stageblockfromurl-headers", type: { name: "Composite", @@ -3833,7 +3831,7 @@ export const BlockBlobStageBlockFromURLHeaders: msRest.CompositeMapper = { } }; -export const BlockBlobCommitBlockListHeaders: msRest.CompositeMapper = { +export const BlockBlobCommitBlockListHeaders: coreHttp.CompositeMapper = { serializedName: "blockblob-commitblocklist-headers", type: { name: "Composite", @@ -3891,7 +3889,7 @@ export const BlockBlobCommitBlockListHeaders: msRest.CompositeMapper = { } }; -export const BlockBlobGetBlockListHeaders: msRest.CompositeMapper = { +export const BlockBlobGetBlockListHeaders: coreHttp.CompositeMapper = { serializedName: "blockblob-getblocklist-headers", type: { name: "Composite", @@ -3949,7 +3947,7 @@ export const BlockBlobGetBlockListHeaders: msRest.CompositeMapper = { } }; -export const PageBlobUploadPagesHeaders: msRest.CompositeMapper = { +export const PageBlobUploadPagesHeaders: coreHttp.CompositeMapper = { serializedName: "pageblob-uploadpages-headers", type: { name: "Composite", @@ -4013,7 +4011,7 @@ export const PageBlobUploadPagesHeaders: msRest.CompositeMapper = { } }; -export const PageBlobClearPagesHeaders: msRest.CompositeMapper = { +export const PageBlobClearPagesHeaders: coreHttp.CompositeMapper = { serializedName: "pageblob-clearpages-headers", type: { name: "Composite", @@ -4071,7 +4069,7 @@ export const PageBlobClearPagesHeaders: msRest.CompositeMapper = { } }; -export const PageBlobGetPageRangesHeaders: msRest.CompositeMapper = { +export const PageBlobGetPageRangesHeaders: coreHttp.CompositeMapper = { serializedName: "pageblob-getpageranges-headers", type: { name: "Composite", @@ -4123,7 +4121,7 @@ export const PageBlobGetPageRangesHeaders: msRest.CompositeMapper = { } }; -export const PageBlobGetPageRangesDiffHeaders: msRest.CompositeMapper = { +export const PageBlobGetPageRangesDiffHeaders: coreHttp.CompositeMapper = { serializedName: "pageblob-getpagerangesdiff-headers", type: { name: "Composite", @@ -4175,7 +4173,7 @@ export const PageBlobGetPageRangesDiffHeaders: msRest.CompositeMapper = { } }; -export const PageBlobResizeHeaders: msRest.CompositeMapper = { +export const PageBlobResizeHeaders: coreHttp.CompositeMapper = { serializedName: "pageblob-resize-headers", type: { name: "Composite", @@ -4227,7 +4225,7 @@ export const PageBlobResizeHeaders: msRest.CompositeMapper = { } }; -export const PageBlobUpdateSequenceNumberHeaders: msRest.CompositeMapper = { +export const PageBlobUpdateSequenceNumberHeaders: coreHttp.CompositeMapper = { serializedName: "pageblob-updatesequencenumber-headers", type: { name: "Composite", @@ -4279,7 +4277,7 @@ export const PageBlobUpdateSequenceNumberHeaders: msRest.CompositeMapper = { } }; -export const PageBlobCopyIncrementalHeaders: msRest.CompositeMapper = { +export const PageBlobCopyIncrementalHeaders: coreHttp.CompositeMapper = { serializedName: "pageblob-copyincremental-headers", type: { name: "Composite", @@ -4343,7 +4341,7 @@ export const PageBlobCopyIncrementalHeaders: msRest.CompositeMapper = { } }; -export const AppendBlobAppendBlockHeaders: msRest.CompositeMapper = { +export const AppendBlobAppendBlockHeaders: coreHttp.CompositeMapper = { serializedName: "appendblob-appendblock-headers", type: { name: "Composite", diff --git a/sdk/storage/storage-blob/src/generated/lib/models/pageBlobMappers.ts b/sdk/storage/storage-blob/src/generated/lib/models/pageBlobMappers.ts index 3db4b8ef95f6..1366453967eb 100644 --- a/sdk/storage/storage-blob/src/generated/lib/models/pageBlobMappers.ts +++ b/sdk/storage/storage-blob/src/generated/lib/models/pageBlobMappers.ts @@ -1,25 +1,22 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - PageBlobCreateHeaders, - StorageError, - PageBlobUploadPagesHeaders, - PageBlobClearPagesHeaders, - PageList, - PageRange, ClearRange, - PageBlobGetPageRangesHeaders, + PageBlobClearPagesHeaders, + PageBlobCopyIncrementalHeaders, + PageBlobCreateHeaders, PageBlobGetPageRangesDiffHeaders, + PageBlobGetPageRangesHeaders, PageBlobResizeHeaders, PageBlobUpdateSequenceNumberHeaders, - PageBlobCopyIncrementalHeaders + PageBlobUploadPagesHeaders, + PageList, + PageRange, + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-blob/src/generated/lib/models/parameters.ts b/sdk/storage/storage-blob/src/generated/lib/models/parameters.ts index e615c7281c56..92b69285a745 100644 --- a/sdk/storage/storage-blob/src/generated/lib/models/parameters.ts +++ b/sdk/storage/storage-blob/src/generated/lib/models/parameters.ts @@ -8,9 +8,9 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; -export const access: msRest.OperationParameter = { +export const access: coreHttp.OperationParameter = { parameterPath: [ "options", "access" @@ -22,7 +22,7 @@ export const access: msRest.OperationParameter = { } } }; -export const action0: msRest.OperationParameter = { +export const action0: coreHttp.OperationParameter = { parameterPath: "action", mapper: { required: true, @@ -34,7 +34,7 @@ export const action0: msRest.OperationParameter = { } } }; -export const action1: msRest.OperationParameter = { +export const action1: coreHttp.OperationParameter = { parameterPath: "action", mapper: { required: true, @@ -46,7 +46,7 @@ export const action1: msRest.OperationParameter = { } } }; -export const action2: msRest.OperationParameter = { +export const action2: coreHttp.OperationParameter = { parameterPath: "action", mapper: { required: true, @@ -58,7 +58,7 @@ export const action2: msRest.OperationParameter = { } } }; -export const action3: msRest.OperationParameter = { +export const action3: coreHttp.OperationParameter = { parameterPath: "action", mapper: { required: true, @@ -70,7 +70,7 @@ export const action3: msRest.OperationParameter = { } } }; -export const action4: msRest.OperationParameter = { +export const action4: coreHttp.OperationParameter = { parameterPath: "action", mapper: { required: true, @@ -82,7 +82,7 @@ export const action4: msRest.OperationParameter = { } } }; -export const appendPosition: msRest.OperationParameter = { +export const appendPosition: coreHttp.OperationParameter = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -95,7 +95,7 @@ export const appendPosition: msRest.OperationParameter = { } } }; -export const blobCacheControl: msRest.OperationParameter = { +export const blobCacheControl: coreHttp.OperationParameter = { parameterPath: [ "options", "blobHTTPHeaders", @@ -108,7 +108,7 @@ export const blobCacheControl: msRest.OperationParameter = { } } }; -export const blobContentDisposition: msRest.OperationParameter = { +export const blobContentDisposition: coreHttp.OperationParameter = { parameterPath: [ "options", "blobHTTPHeaders", @@ -121,7 +121,7 @@ export const blobContentDisposition: msRest.OperationParameter = { } } }; -export const blobContentEncoding: msRest.OperationParameter = { +export const blobContentEncoding: coreHttp.OperationParameter = { parameterPath: [ "options", "blobHTTPHeaders", @@ -134,7 +134,7 @@ export const blobContentEncoding: msRest.OperationParameter = { } } }; -export const blobContentLanguage: msRest.OperationParameter = { +export const blobContentLanguage: coreHttp.OperationParameter = { parameterPath: [ "options", "blobHTTPHeaders", @@ -147,7 +147,7 @@ export const blobContentLanguage: msRest.OperationParameter = { } } }; -export const blobContentLength: msRest.OperationParameter = { +export const blobContentLength: coreHttp.OperationParameter = { parameterPath: "blobContentLength", mapper: { required: true, @@ -157,7 +157,7 @@ export const blobContentLength: msRest.OperationParameter = { } } }; -export const blobContentMD5: msRest.OperationParameter = { +export const blobContentMD5: coreHttp.OperationParameter = { parameterPath: [ "options", "blobHTTPHeaders", @@ -170,7 +170,7 @@ export const blobContentMD5: msRest.OperationParameter = { } } }; -export const blobContentType: msRest.OperationParameter = { +export const blobContentType: coreHttp.OperationParameter = { parameterPath: [ "options", "blobHTTPHeaders", @@ -183,7 +183,7 @@ export const blobContentType: msRest.OperationParameter = { } } }; -export const blobSequenceNumber: msRest.OperationParameter = { +export const blobSequenceNumber: coreHttp.OperationParameter = { parameterPath: [ "options", "blobSequenceNumber" @@ -196,7 +196,7 @@ export const blobSequenceNumber: msRest.OperationParameter = { } } }; -export const blobType0: msRest.OperationParameter = { +export const blobType0: coreHttp.OperationParameter = { parameterPath: "blobType", mapper: { required: true, @@ -208,7 +208,7 @@ export const blobType0: msRest.OperationParameter = { } } }; -export const blobType1: msRest.OperationParameter = { +export const blobType1: coreHttp.OperationParameter = { parameterPath: "blobType", mapper: { required: true, @@ -220,7 +220,7 @@ export const blobType1: msRest.OperationParameter = { } } }; -export const blobType2: msRest.OperationParameter = { +export const blobType2: coreHttp.OperationParameter = { parameterPath: "blobType", mapper: { required: true, @@ -232,7 +232,7 @@ export const blobType2: msRest.OperationParameter = { } } }; -export const blockId: msRest.OperationQueryParameter = { +export const blockId: coreHttp.OperationQueryParameter = { parameterPath: "blockId", mapper: { required: true, @@ -242,7 +242,7 @@ export const blockId: msRest.OperationQueryParameter = { } } }; -export const breakPeriod: msRest.OperationParameter = { +export const breakPeriod: coreHttp.OperationParameter = { parameterPath: [ "options", "breakPeriod" @@ -254,7 +254,7 @@ export const breakPeriod: msRest.OperationParameter = { } } }; -export const comp0: msRest.OperationQueryParameter = { +export const comp0: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -266,7 +266,7 @@ export const comp0: msRest.OperationQueryParameter = { } } }; -export const comp1: msRest.OperationQueryParameter = { +export const comp1: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -278,7 +278,7 @@ export const comp1: msRest.OperationQueryParameter = { } } }; -export const comp10: msRest.OperationQueryParameter = { +export const comp10: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -290,7 +290,7 @@ export const comp10: msRest.OperationQueryParameter = { } } }; -export const comp11: msRest.OperationQueryParameter = { +export const comp11: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -302,7 +302,7 @@ export const comp11: msRest.OperationQueryParameter = { } } }; -export const comp12: msRest.OperationQueryParameter = { +export const comp12: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -314,7 +314,7 @@ export const comp12: msRest.OperationQueryParameter = { } } }; -export const comp13: msRest.OperationQueryParameter = { +export const comp13: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -326,7 +326,7 @@ export const comp13: msRest.OperationQueryParameter = { } } }; -export const comp14: msRest.OperationQueryParameter = { +export const comp14: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -338,7 +338,7 @@ export const comp14: msRest.OperationQueryParameter = { } } }; -export const comp15: msRest.OperationQueryParameter = { +export const comp15: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -350,7 +350,7 @@ export const comp15: msRest.OperationQueryParameter = { } } }; -export const comp2: msRest.OperationQueryParameter = { +export const comp2: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -362,7 +362,7 @@ export const comp2: msRest.OperationQueryParameter = { } } }; -export const comp3: msRest.OperationQueryParameter = { +export const comp3: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -374,7 +374,7 @@ export const comp3: msRest.OperationQueryParameter = { } } }; -export const comp4: msRest.OperationQueryParameter = { +export const comp4: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -386,7 +386,7 @@ export const comp4: msRest.OperationQueryParameter = { } } }; -export const comp5: msRest.OperationQueryParameter = { +export const comp5: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -398,7 +398,7 @@ export const comp5: msRest.OperationQueryParameter = { } } }; -export const comp6: msRest.OperationQueryParameter = { +export const comp6: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -410,7 +410,7 @@ export const comp6: msRest.OperationQueryParameter = { } } }; -export const comp7: msRest.OperationQueryParameter = { +export const comp7: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -422,7 +422,7 @@ export const comp7: msRest.OperationQueryParameter = { } } }; -export const comp8: msRest.OperationQueryParameter = { +export const comp8: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -434,7 +434,7 @@ export const comp8: msRest.OperationQueryParameter = { } } }; -export const comp9: msRest.OperationQueryParameter = { +export const comp9: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -446,7 +446,7 @@ export const comp9: msRest.OperationQueryParameter = { } } }; -export const contentLength: msRest.OperationParameter = { +export const contentLength: coreHttp.OperationParameter = { parameterPath: "contentLength", mapper: { required: true, @@ -456,7 +456,7 @@ export const contentLength: msRest.OperationParameter = { } } }; -export const copyActionAbortConstant: msRest.OperationParameter = { +export const copyActionAbortConstant: coreHttp.OperationParameter = { parameterPath: "copyActionAbortConstant", mapper: { required: true, @@ -468,7 +468,7 @@ export const copyActionAbortConstant: msRest.OperationParameter = { } } }; -export const copyId: msRest.OperationQueryParameter = { +export const copyId: coreHttp.OperationQueryParameter = { parameterPath: "copyId", mapper: { required: true, @@ -478,7 +478,7 @@ export const copyId: msRest.OperationQueryParameter = { } } }; -export const copySource: msRest.OperationParameter = { +export const copySource: coreHttp.OperationParameter = { parameterPath: "copySource", mapper: { required: true, @@ -488,7 +488,7 @@ export const copySource: msRest.OperationParameter = { } } }; -export const deleteSnapshots: msRest.OperationParameter = { +export const deleteSnapshots: coreHttp.OperationParameter = { parameterPath: [ "options", "deleteSnapshots" @@ -504,7 +504,7 @@ export const deleteSnapshots: msRest.OperationParameter = { } } }; -export const delimiter: msRest.OperationQueryParameter = { +export const delimiter: coreHttp.OperationQueryParameter = { parameterPath: "delimiter", mapper: { required: true, @@ -514,7 +514,7 @@ export const delimiter: msRest.OperationQueryParameter = { } } }; -export const duration: msRest.OperationParameter = { +export const duration: coreHttp.OperationParameter = { parameterPath: [ "options", "duration" @@ -526,7 +526,7 @@ export const duration: msRest.OperationParameter = { } } }; -export const ifMatch: msRest.OperationParameter = { +export const ifMatch: coreHttp.OperationParameter = { parameterPath: [ "options", "modifiedAccessConditions", @@ -539,7 +539,7 @@ export const ifMatch: msRest.OperationParameter = { } } }; -export const ifModifiedSince: msRest.OperationParameter = { +export const ifModifiedSince: coreHttp.OperationParameter = { parameterPath: [ "options", "modifiedAccessConditions", @@ -552,7 +552,7 @@ export const ifModifiedSince: msRest.OperationParameter = { } } }; -export const ifNoneMatch: msRest.OperationParameter = { +export const ifNoneMatch: coreHttp.OperationParameter = { parameterPath: [ "options", "modifiedAccessConditions", @@ -565,7 +565,7 @@ export const ifNoneMatch: msRest.OperationParameter = { } } }; -export const ifSequenceNumberEqualTo: msRest.OperationParameter = { +export const ifSequenceNumberEqualTo: coreHttp.OperationParameter = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -578,7 +578,7 @@ export const ifSequenceNumberEqualTo: msRest.OperationParameter = { } } }; -export const ifSequenceNumberLessThan: msRest.OperationParameter = { +export const ifSequenceNumberLessThan: coreHttp.OperationParameter = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -591,7 +591,7 @@ export const ifSequenceNumberLessThan: msRest.OperationParameter = { } } }; -export const ifSequenceNumberLessThanOrEqualTo: msRest.OperationParameter = { +export const ifSequenceNumberLessThanOrEqualTo: coreHttp.OperationParameter = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -604,7 +604,7 @@ export const ifSequenceNumberLessThanOrEqualTo: msRest.OperationParameter = { } } }; -export const ifUnmodifiedSince: msRest.OperationParameter = { +export const ifUnmodifiedSince: coreHttp.OperationParameter = { parameterPath: [ "options", "modifiedAccessConditions", @@ -617,7 +617,7 @@ export const ifUnmodifiedSince: msRest.OperationParameter = { } } }; -export const include0: msRest.OperationQueryParameter = { +export const include0: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "include" @@ -632,7 +632,7 @@ export const include0: msRest.OperationQueryParameter = { } } }; -export const include1: msRest.OperationQueryParameter = { +export const include1: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "include" @@ -655,9 +655,9 @@ export const include1: msRest.OperationQueryParameter = { } } }, - collectionFormat: msRest.QueryCollectionFormat.Csv + collectionFormat: coreHttp.QueryCollectionFormat.Csv }; -export const leaseId0: msRest.OperationParameter = { +export const leaseId0: coreHttp.OperationParameter = { parameterPath: [ "options", "leaseAccessConditions", @@ -670,7 +670,7 @@ export const leaseId0: msRest.OperationParameter = { } } }; -export const leaseId1: msRest.OperationParameter = { +export const leaseId1: coreHttp.OperationParameter = { parameterPath: "leaseId", mapper: { required: true, @@ -680,7 +680,7 @@ export const leaseId1: msRest.OperationParameter = { } } }; -export const listType: msRest.OperationQueryParameter = { +export const listType: coreHttp.OperationQueryParameter = { parameterPath: "listType", mapper: { required: true, @@ -696,7 +696,7 @@ export const listType: msRest.OperationQueryParameter = { } } }; -export const marker: msRest.OperationQueryParameter = { +export const marker: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "marker" @@ -708,7 +708,7 @@ export const marker: msRest.OperationQueryParameter = { } } }; -export const maxresults: msRest.OperationQueryParameter = { +export const maxresults: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "maxresults" @@ -723,7 +723,7 @@ export const maxresults: msRest.OperationQueryParameter = { } } }; -export const maxSize: msRest.OperationParameter = { +export const maxSize: coreHttp.OperationParameter = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -736,7 +736,7 @@ export const maxSize: msRest.OperationParameter = { } } }; -export const metadata: msRest.OperationParameter = { +export const metadata: coreHttp.OperationParameter = { parameterPath: [ "options", "metadata" @@ -754,7 +754,18 @@ export const metadata: msRest.OperationParameter = { headerCollectionPrefix: "x-ms-meta-" } }; -export const pageWrite0: msRest.OperationParameter = { +export const nextPageLink: coreHttp.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const pageWrite0: coreHttp.OperationParameter = { parameterPath: "pageWrite", mapper: { required: true, @@ -766,7 +777,7 @@ export const pageWrite0: msRest.OperationParameter = { } } }; -export const pageWrite1: msRest.OperationParameter = { +export const pageWrite1: coreHttp.OperationParameter = { parameterPath: "pageWrite", mapper: { required: true, @@ -778,7 +789,7 @@ export const pageWrite1: msRest.OperationParameter = { } } }; -export const prefix: msRest.OperationQueryParameter = { +export const prefix: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "prefix" @@ -790,7 +801,7 @@ export const prefix: msRest.OperationQueryParameter = { } } }; -export const prevsnapshot: msRest.OperationQueryParameter = { +export const prevsnapshot: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "prevsnapshot" @@ -802,7 +813,7 @@ export const prevsnapshot: msRest.OperationQueryParameter = { } } }; -export const proposedLeaseId0: msRest.OperationParameter = { +export const proposedLeaseId0: coreHttp.OperationParameter = { parameterPath: [ "options", "proposedLeaseId" @@ -814,7 +825,7 @@ export const proposedLeaseId0: msRest.OperationParameter = { } } }; -export const proposedLeaseId1: msRest.OperationParameter = { +export const proposedLeaseId1: coreHttp.OperationParameter = { parameterPath: "proposedLeaseId", mapper: { required: true, @@ -824,7 +835,7 @@ export const proposedLeaseId1: msRest.OperationParameter = { } } }; -export const range: msRest.OperationParameter = { +export const range: coreHttp.OperationParameter = { parameterPath: [ "options", "range" @@ -836,7 +847,7 @@ export const range: msRest.OperationParameter = { } } }; -export const rangeGetContentMD5: msRest.OperationParameter = { +export const rangeGetContentMD5: coreHttp.OperationParameter = { parameterPath: [ "options", "rangeGetContentMD5" @@ -848,7 +859,7 @@ export const rangeGetContentMD5: msRest.OperationParameter = { } } }; -export const requestId: msRest.OperationParameter = { +export const requestId: coreHttp.OperationParameter = { parameterPath: [ "options", "requestId" @@ -860,7 +871,7 @@ export const requestId: msRest.OperationParameter = { } } }; -export const restype0: msRest.OperationQueryParameter = { +export const restype0: coreHttp.OperationQueryParameter = { parameterPath: "restype", mapper: { required: true, @@ -872,7 +883,7 @@ export const restype0: msRest.OperationQueryParameter = { } } }; -export const restype1: msRest.OperationQueryParameter = { +export const restype1: coreHttp.OperationQueryParameter = { parameterPath: "restype", mapper: { required: true, @@ -884,7 +895,7 @@ export const restype1: msRest.OperationQueryParameter = { } } }; -export const restype2: msRest.OperationQueryParameter = { +export const restype2: coreHttp.OperationQueryParameter = { parameterPath: "restype", mapper: { required: true, @@ -896,7 +907,7 @@ export const restype2: msRest.OperationQueryParameter = { } } }; -export const sequenceNumberAction: msRest.OperationParameter = { +export const sequenceNumberAction: coreHttp.OperationParameter = { parameterPath: "sequenceNumberAction", mapper: { required: true, @@ -911,7 +922,7 @@ export const sequenceNumberAction: msRest.OperationParameter = { } } }; -export const snapshot: msRest.OperationQueryParameter = { +export const snapshot: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "snapshot" @@ -923,7 +934,7 @@ export const snapshot: msRest.OperationQueryParameter = { } } }; -export const sourceContentMD5: msRest.OperationParameter = { +export const sourceContentMD5: coreHttp.OperationParameter = { parameterPath: [ "options", "sourceContentMD5" @@ -935,7 +946,7 @@ export const sourceContentMD5: msRest.OperationParameter = { } } }; -export const sourceIfMatch: msRest.OperationParameter = { +export const sourceIfMatch: coreHttp.OperationParameter = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -948,7 +959,7 @@ export const sourceIfMatch: msRest.OperationParameter = { } } }; -export const sourceIfModifiedSince: msRest.OperationParameter = { +export const sourceIfModifiedSince: coreHttp.OperationParameter = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -961,7 +972,7 @@ export const sourceIfModifiedSince: msRest.OperationParameter = { } } }; -export const sourceIfNoneMatch: msRest.OperationParameter = { +export const sourceIfNoneMatch: coreHttp.OperationParameter = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -974,7 +985,7 @@ export const sourceIfNoneMatch: msRest.OperationParameter = { } } }; -export const sourceIfUnmodifiedSince: msRest.OperationParameter = { +export const sourceIfUnmodifiedSince: coreHttp.OperationParameter = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -987,7 +998,7 @@ export const sourceIfUnmodifiedSince: msRest.OperationParameter = { } } }; -export const sourceRange: msRest.OperationParameter = { +export const sourceRange: coreHttp.OperationParameter = { parameterPath: [ "options", "sourceRange" @@ -999,7 +1010,7 @@ export const sourceRange: msRest.OperationParameter = { } } }; -export const sourceUrl: msRest.OperationParameter = { +export const sourceUrl: coreHttp.OperationParameter = { parameterPath: "sourceUrl", mapper: { required: true, @@ -1009,7 +1020,7 @@ export const sourceUrl: msRest.OperationParameter = { } } }; -export const tier: msRest.OperationParameter = { +export const tier: coreHttp.OperationParameter = { parameterPath: "tier", mapper: { required: true, @@ -1019,7 +1030,7 @@ export const tier: msRest.OperationParameter = { } } }; -export const timeout: msRest.OperationQueryParameter = { +export const timeout: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "timeout" @@ -1034,7 +1045,7 @@ export const timeout: msRest.OperationQueryParameter = { } } }; -export const transactionalContentMD5: msRest.OperationParameter = { +export const transactionalContentMD5: coreHttp.OperationParameter = { parameterPath: [ "options", "transactionalContentMD5" @@ -1046,7 +1057,7 @@ export const transactionalContentMD5: msRest.OperationParameter = { } } }; -export const url: msRest.OperationURLParameter = { +export const url: coreHttp.OperationURLParameter = { parameterPath: "url", mapper: { required: true, @@ -1058,7 +1069,7 @@ export const url: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const version: msRest.OperationParameter = { +export const version: coreHttp.OperationParameter = { parameterPath: "version", mapper: { required: true, diff --git a/sdk/storage/storage-blob/src/generated/lib/models/serviceMappers.ts b/sdk/storage/storage-blob/src/generated/lib/models/serviceMappers.ts index 65b582e5def0..5a09f6689a33 100644 --- a/sdk/storage/storage-blob/src/generated/lib/models/serviceMappers.ts +++ b/sdk/storage/storage-blob/src/generated/lib/models/serviceMappers.ts @@ -1,30 +1,27 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - StorageServiceProperties, + ContainerItem, + ContainerProperties, + CorsRule, + GeoReplication, + ListContainersSegmentResponse, Logging, - RetentionPolicy, Metrics, - CorsRule, - StaticWebsite, - ServiceSetPropertiesHeaders, - StorageError, + RetentionPolicy, + ServiceGetAccountInfoHeaders, ServiceGetPropertiesHeaders, - StorageServiceStats, - GeoReplication, ServiceGetStatisticsHeaders, - ListContainersSegmentResponse, - ContainerItem, - ContainerProperties, ServiceListContainersSegmentHeaders, - ServiceGetAccountInfoHeaders + ServiceSetPropertiesHeaders, + StaticWebsite, + StorageError, + StorageServiceProperties, + StorageServiceStats } from "../models/mappers"; - diff --git a/sdk/storage/storage-blob/src/generated/lib/operations/appendBlob.ts b/sdk/storage/storage-blob/src/generated/lib/operations/appendBlob.ts index 6168e6be1799..c33089846b1b 100644 --- a/sdk/storage/storage-blob/src/generated/lib/operations/appendBlob.ts +++ b/sdk/storage/storage-blob/src/generated/lib/operations/appendBlob.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/appendBlobMappers"; import * as Parameters from "../models/parameters"; @@ -37,14 +37,14 @@ export class AppendBlob { * @param contentLength The length of the request. * @param callback The callback */ - create(contentLength: number, callback: msRest.ServiceCallback): void; + create(contentLength: number, callback: coreHttp.ServiceCallback): void; /** * @param contentLength The length of the request. * @param options The optional parameters * @param callback The callback */ - create(contentLength: number, options: Models.AppendBlobCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(contentLength: number, options?: Models.AppendBlobCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(contentLength: number, options: Models.AppendBlobCreateOptionalParams, callback: coreHttp.ServiceCallback): void; + create(contentLength: number, options?: Models.AppendBlobCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { contentLength, @@ -63,21 +63,21 @@ export class AppendBlob { * @param [options] The optional parameters * @returns Promise */ - appendBlock(body: msRest.HttpRequestBody, contentLength: number, options?: Models.AppendBlobAppendBlockOptionalParams): Promise; + appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.AppendBlobAppendBlockOptionalParams): Promise; /** * @param body Initial data * @param contentLength The length of the request. * @param callback The callback */ - appendBlock(body: msRest.HttpRequestBody, contentLength: number, callback: msRest.ServiceCallback): void; + appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, callback: coreHttp.ServiceCallback): void; /** * @param body Initial data * @param contentLength The length of the request. * @param options The optional parameters * @param callback The callback */ - appendBlock(body: msRest.HttpRequestBody, contentLength: number, options: Models.AppendBlobAppendBlockOptionalParams, callback: msRest.ServiceCallback): void; - appendBlock(body: msRest.HttpRequestBody, contentLength: number, options?: Models.AppendBlobAppendBlockOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, options: Models.AppendBlobAppendBlockOptionalParams, callback: coreHttp.ServiceCallback): void; + appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.AppendBlobAppendBlockOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { body, @@ -90,8 +90,8 @@ export class AppendBlob { } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const createOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const createOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -130,7 +130,7 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const appendBlockOperationSpec: msRest.OperationSpec = { +const appendBlockOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -163,7 +163,7 @@ const appendBlockOperationSpec: msRest.OperationSpec = { } } }, - contentType: "application/xml; charset=utf-8", + contentType: "application/octet-stream", responses: { 201: { headersMapper: Mappers.AppendBlobAppendBlockHeaders diff --git a/sdk/storage/storage-blob/src/generated/lib/operations/blob.ts b/sdk/storage/storage-blob/src/generated/lib/operations/blob.ts index d7abf951326e..9ef3d45a2b01 100644 --- a/sdk/storage/storage-blob/src/generated/lib/operations/blob.ts +++ b/sdk/storage/storage-blob/src/generated/lib/operations/blob.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/blobMappers"; import * as Parameters from "../models/parameters"; @@ -36,13 +36,13 @@ export class Blob { /** * @param callback The callback */ - download(callback: msRest.ServiceCallback): void; + download(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - download(options: Models.BlobDownloadOptionalParams, callback: msRest.ServiceCallback): void; - download(options?: Models.BlobDownloadOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + download(options: Models.BlobDownloadOptionalParams, callback: coreHttp.ServiceCallback): void; + download(options?: Models.BlobDownloadOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -61,13 +61,13 @@ export class Blob { /** * @param callback The callback */ - getProperties(callback: msRest.ServiceCallback): void; + getProperties(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getProperties(options: Models.BlobGetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - getProperties(options?: Models.BlobGetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProperties(options: Models.BlobGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + getProperties(options?: Models.BlobGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -96,13 +96,13 @@ export class Blob { /** * @param callback The callback */ - deleteMethod(callback: msRest.ServiceCallback): void; + deleteMethod(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - deleteMethod(options: Models.BlobDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; - deleteMethod(options?: Models.BlobDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(options: Models.BlobDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void; + deleteMethod(options?: Models.BlobDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -120,13 +120,13 @@ export class Blob { /** * @param callback The callback */ - undelete(callback: msRest.ServiceCallback): void; + undelete(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - undelete(options: Models.BlobUndeleteOptionalParams, callback: msRest.ServiceCallback): void; - undelete(options?: Models.BlobUndeleteOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + undelete(options: Models.BlobUndeleteOptionalParams, callback: coreHttp.ServiceCallback): void; + undelete(options?: Models.BlobUndeleteOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -144,13 +144,13 @@ export class Blob { /** * @param callback The callback */ - setHTTPHeaders(callback: msRest.ServiceCallback): void; + setHTTPHeaders(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setHTTPHeaders(options: Models.BlobSetHTTPHeadersOptionalParams, callback: msRest.ServiceCallback): void; - setHTTPHeaders(options?: Models.BlobSetHTTPHeadersOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setHTTPHeaders(options: Models.BlobSetHTTPHeadersOptionalParams, callback: coreHttp.ServiceCallback): void; + setHTTPHeaders(options?: Models.BlobSetHTTPHeadersOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -169,13 +169,13 @@ export class Blob { /** * @param callback The callback */ - setMetadata(callback: msRest.ServiceCallback): void; + setMetadata(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setMetadata(options: Models.BlobSetMetadataOptionalParams, callback: msRest.ServiceCallback): void; - setMetadata(options?: Models.BlobSetMetadataOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setMetadata(options: Models.BlobSetMetadataOptionalParams, callback: coreHttp.ServiceCallback): void; + setMetadata(options?: Models.BlobSetMetadataOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -194,13 +194,13 @@ export class Blob { /** * @param callback The callback */ - acquireLease(callback: msRest.ServiceCallback): void; + acquireLease(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - acquireLease(options: Models.BlobAcquireLeaseOptionalParams, callback: msRest.ServiceCallback): void; - acquireLease(options?: Models.BlobAcquireLeaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + acquireLease(options: Models.BlobAcquireLeaseOptionalParams, callback: coreHttp.ServiceCallback): void; + acquireLease(options?: Models.BlobAcquireLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -221,14 +221,14 @@ export class Blob { * @param leaseId Specifies the current lease ID on the resource. * @param callback The callback */ - releaseLease(leaseId: string, callback: msRest.ServiceCallback): void; + releaseLease(leaseId: string, callback: coreHttp.ServiceCallback): void; /** * @param leaseId Specifies the current lease ID on the resource. * @param options The optional parameters * @param callback The callback */ - releaseLease(leaseId: string, options: Models.BlobReleaseLeaseOptionalParams, callback: msRest.ServiceCallback): void; - releaseLease(leaseId: string, options?: Models.BlobReleaseLeaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + releaseLease(leaseId: string, options: Models.BlobReleaseLeaseOptionalParams, callback: coreHttp.ServiceCallback): void; + releaseLease(leaseId: string, options?: Models.BlobReleaseLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { leaseId, @@ -250,14 +250,14 @@ export class Blob { * @param leaseId Specifies the current lease ID on the resource. * @param callback The callback */ - renewLease(leaseId: string, callback: msRest.ServiceCallback): void; + renewLease(leaseId: string, callback: coreHttp.ServiceCallback): void; /** * @param leaseId Specifies the current lease ID on the resource. * @param options The optional parameters * @param callback The callback */ - renewLease(leaseId: string, options: Models.BlobRenewLeaseOptionalParams, callback: msRest.ServiceCallback): void; - renewLease(leaseId: string, options?: Models.BlobRenewLeaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + renewLease(leaseId: string, options: Models.BlobRenewLeaseOptionalParams, callback: coreHttp.ServiceCallback): void; + renewLease(leaseId: string, options?: Models.BlobRenewLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { leaseId, @@ -285,7 +285,7 @@ export class Blob { * (String) for a list of valid GUID string formats. * @param callback The callback */ - changeLease(leaseId: string, proposedLeaseId: string, callback: msRest.ServiceCallback): void; + changeLease(leaseId: string, proposedLeaseId: string, callback: coreHttp.ServiceCallback): void; /** * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 @@ -294,8 +294,8 @@ export class Blob { * @param options The optional parameters * @param callback The callback */ - changeLease(leaseId: string, proposedLeaseId: string, options: Models.BlobChangeLeaseOptionalParams, callback: msRest.ServiceCallback): void; - changeLease(leaseId: string, proposedLeaseId: string, options?: Models.BlobChangeLeaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + changeLease(leaseId: string, proposedLeaseId: string, options: Models.BlobChangeLeaseOptionalParams, callback: coreHttp.ServiceCallback): void; + changeLease(leaseId: string, proposedLeaseId: string, options?: Models.BlobChangeLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { leaseId, @@ -316,13 +316,13 @@ export class Blob { /** * @param callback The callback */ - breakLease(callback: msRest.ServiceCallback): void; + breakLease(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - breakLease(options: Models.BlobBreakLeaseOptionalParams, callback: msRest.ServiceCallback): void; - breakLease(options?: Models.BlobBreakLeaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + breakLease(options: Models.BlobBreakLeaseOptionalParams, callback: coreHttp.ServiceCallback): void; + breakLease(options?: Models.BlobBreakLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -340,13 +340,13 @@ export class Blob { /** * @param callback The callback */ - createSnapshot(callback: msRest.ServiceCallback): void; + createSnapshot(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - createSnapshot(options: Models.BlobCreateSnapshotOptionalParams, callback: msRest.ServiceCallback): void; - createSnapshot(options?: Models.BlobCreateSnapshotOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createSnapshot(options: Models.BlobCreateSnapshotOptionalParams, callback: coreHttp.ServiceCallback): void; + createSnapshot(options?: Models.BlobCreateSnapshotOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -372,7 +372,7 @@ export class Blob { * via a shared access signature. * @param callback The callback */ - startCopyFromURL(copySource: string, callback: msRest.ServiceCallback): void; + startCopyFromURL(copySource: string, callback: coreHttp.ServiceCallback): void; /** * @param copySource 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 @@ -381,8 +381,8 @@ export class Blob { * @param options The optional parameters * @param callback The callback */ - startCopyFromURL(copySource: string, options: Models.BlobStartCopyFromURLOptionalParams, callback: msRest.ServiceCallback): void; - startCopyFromURL(copySource: string, options?: Models.BlobStartCopyFromURLOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + startCopyFromURL(copySource: string, options: Models.BlobStartCopyFromURLOptionalParams, callback: coreHttp.ServiceCallback): void; + startCopyFromURL(copySource: string, options?: Models.BlobStartCopyFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { copySource, @@ -406,15 +406,15 @@ export class Blob { * operation. * @param callback The callback */ - abortCopyFromURL(copyId: string, callback: msRest.ServiceCallback): void; + abortCopyFromURL(copyId: string, callback: coreHttp.ServiceCallback): void; /** * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob * operation. * @param options The optional parameters * @param callback The callback */ - abortCopyFromURL(copyId: string, options: Models.BlobAbortCopyFromURLOptionalParams, callback: msRest.ServiceCallback): void; - abortCopyFromURL(copyId: string, options?: Models.BlobAbortCopyFromURLOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + abortCopyFromURL(copyId: string, options: Models.BlobAbortCopyFromURLOptionalParams, callback: coreHttp.ServiceCallback): void; + abortCopyFromURL(copyId: string, options?: Models.BlobAbortCopyFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { copyId, @@ -441,15 +441,15 @@ export class Blob { * 'P10', 'P20', 'P30', 'P40', 'P50', 'Hot', 'Cool', 'Archive' * @param callback The callback */ - setTier(tier: Models.AccessTier, callback: msRest.ServiceCallback): void; + setTier(tier: Models.AccessTier, callback: coreHttp.ServiceCallback): void; /** * @param tier Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6', * 'P10', 'P20', 'P30', 'P40', 'P50', 'Hot', 'Cool', 'Archive' * @param options The optional parameters * @param callback The callback */ - setTier(tier: Models.AccessTier, options: Models.BlobSetTierOptionalParams, callback: msRest.ServiceCallback): void; - setTier(tier: Models.AccessTier, options?: Models.BlobSetTierOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setTier(tier: Models.AccessTier, options: Models.BlobSetTierOptionalParams, callback: coreHttp.ServiceCallback): void; + setTier(tier: Models.AccessTier, options?: Models.BlobSetTierOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { tier, @@ -464,17 +464,17 @@ export class Blob { * @param [options] The optional parameters * @returns Promise */ - getAccountInfo(options?: msRest.RequestOptionsBase): Promise; + getAccountInfo(options?: coreHttp.RequestOptionsBase): Promise; /** * @param callback The callback */ - getAccountInfo(callback: msRest.ServiceCallback): void; + getAccountInfo(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getAccountInfo(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getAccountInfo(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getAccountInfo(options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + getAccountInfo(options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -485,8 +485,8 @@ export class Blob { } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const downloadOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const downloadOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{containerName}/{blob}", urlParameters: [ @@ -534,7 +534,7 @@ const downloadOperationSpec: msRest.OperationSpec = { serializer }; -const getPropertiesOperationSpec: msRest.OperationSpec = { +const getPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "HEAD", path: "{containerName}/{blob}", urlParameters: [ @@ -565,7 +565,7 @@ const getPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteMethodOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", path: "{containerName}/{blob}", urlParameters: [ @@ -597,7 +597,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const undeleteOperationSpec: msRest.OperationSpec = { +const undeleteOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -623,7 +623,7 @@ const undeleteOperationSpec: msRest.OperationSpec = { serializer }; -const setHTTPHeadersOperationSpec: msRest.OperationSpec = { +const setHTTPHeadersOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -660,7 +660,7 @@ const setHTTPHeadersOperationSpec: msRest.OperationSpec = { serializer }; -const setMetadataOperationSpec: msRest.OperationSpec = { +const setMetadataOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -692,7 +692,7 @@ const setMetadataOperationSpec: msRest.OperationSpec = { serializer }; -const acquireLeaseOperationSpec: msRest.OperationSpec = { +const acquireLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -725,7 +725,7 @@ const acquireLeaseOperationSpec: msRest.OperationSpec = { serializer }; -const releaseLeaseOperationSpec: msRest.OperationSpec = { +const releaseLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -757,7 +757,7 @@ const releaseLeaseOperationSpec: msRest.OperationSpec = { serializer }; -const renewLeaseOperationSpec: msRest.OperationSpec = { +const renewLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -789,7 +789,7 @@ const renewLeaseOperationSpec: msRest.OperationSpec = { serializer }; -const changeLeaseOperationSpec: msRest.OperationSpec = { +const changeLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -822,7 +822,7 @@ const changeLeaseOperationSpec: msRest.OperationSpec = { serializer }; -const breakLeaseOperationSpec: msRest.OperationSpec = { +const breakLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -854,7 +854,7 @@ const breakLeaseOperationSpec: msRest.OperationSpec = { serializer }; -const createSnapshotOperationSpec: msRest.OperationSpec = { +const createSnapshotOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -886,7 +886,7 @@ const createSnapshotOperationSpec: msRest.OperationSpec = { serializer }; -const startCopyFromURLOperationSpec: msRest.OperationSpec = { +const startCopyFromURLOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -922,7 +922,7 @@ const startCopyFromURLOperationSpec: msRest.OperationSpec = { serializer }; -const abortCopyFromURLOperationSpec: msRest.OperationSpec = { +const abortCopyFromURLOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -951,7 +951,7 @@ const abortCopyFromURLOperationSpec: msRest.OperationSpec = { serializer }; -const setTierOperationSpec: msRest.OperationSpec = { +const setTierOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -982,7 +982,7 @@ const setTierOperationSpec: msRest.OperationSpec = { serializer }; -const getAccountInfoOperationSpec: msRest.OperationSpec = { +const getAccountInfoOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{containerName}/{blobName}", urlParameters: [ diff --git a/sdk/storage/storage-blob/src/generated/lib/operations/blockBlob.ts b/sdk/storage/storage-blob/src/generated/lib/operations/blockBlob.ts index 5a99bab5e006..f050665ed2fb 100644 --- a/sdk/storage/storage-blob/src/generated/lib/operations/blockBlob.ts +++ b/sdk/storage/storage-blob/src/generated/lib/operations/blockBlob.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/blockBlobMappers"; import * as Parameters from "../models/parameters"; @@ -37,21 +37,21 @@ export class BlockBlob { * @param [options] The optional parameters * @returns Promise */ - upload(body: msRest.HttpRequestBody, contentLength: number, options?: Models.BlockBlobUploadOptionalParams): Promise; + upload(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.BlockBlobUploadOptionalParams): Promise; /** * @param body Initial data * @param contentLength The length of the request. * @param callback The callback */ - upload(body: msRest.HttpRequestBody, contentLength: number, callback: msRest.ServiceCallback): void; + upload(body: coreHttp.HttpRequestBody, contentLength: number, callback: coreHttp.ServiceCallback): void; /** * @param body Initial data * @param contentLength The length of the request. * @param options The optional parameters * @param callback The callback */ - upload(body: msRest.HttpRequestBody, contentLength: number, options: Models.BlockBlobUploadOptionalParams, callback: msRest.ServiceCallback): void; - upload(body: msRest.HttpRequestBody, contentLength: number, options?: Models.BlockBlobUploadOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + upload(body: coreHttp.HttpRequestBody, contentLength: number, options: Models.BlockBlobUploadOptionalParams, callback: coreHttp.ServiceCallback): void; + upload(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.BlockBlobUploadOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { body, @@ -72,7 +72,7 @@ export class BlockBlob { * @param [options] The optional parameters * @returns Promise */ - stageBlock(blockId: string, contentLength: number, body: msRest.HttpRequestBody, options?: Models.BlockBlobStageBlockOptionalParams): Promise; + stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, options?: Models.BlockBlobStageBlockOptionalParams): Promise; /** * @param blockId 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 @@ -81,7 +81,7 @@ export class BlockBlob { * @param body Initial data * @param callback The callback */ - stageBlock(blockId: string, contentLength: number, body: msRest.HttpRequestBody, callback: msRest.ServiceCallback): void; + stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, callback: coreHttp.ServiceCallback): void; /** * @param blockId 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 @@ -91,8 +91,8 @@ export class BlockBlob { * @param options The optional parameters * @param callback The callback */ - stageBlock(blockId: string, contentLength: number, body: msRest.HttpRequestBody, options: Models.BlockBlobStageBlockOptionalParams, callback: msRest.ServiceCallback): void; - stageBlock(blockId: string, contentLength: number, body: msRest.HttpRequestBody, options?: Models.BlockBlobStageBlockOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, options: Models.BlockBlobStageBlockOptionalParams, callback: coreHttp.ServiceCallback): void; + stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, options?: Models.BlockBlobStageBlockOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { blockId, @@ -124,7 +124,7 @@ export class BlockBlob { * @param sourceUrl Specify a URL to the copy source. * @param callback The callback */ - stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, callback: msRest.ServiceCallback): void; + stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, callback: coreHttp.ServiceCallback): void; /** * @param blockId 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 @@ -134,8 +134,8 @@ export class BlockBlob { * @param options The optional parameters * @param callback The callback */ - stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options: Models.BlockBlobStageBlockFromURLOptionalParams, callback: msRest.ServiceCallback): void; - stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options?: Models.BlockBlobStageBlockFromURLOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options: Models.BlockBlobStageBlockFromURLOptionalParams, callback: coreHttp.ServiceCallback): void; + stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options?: Models.BlockBlobStageBlockFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { blockId, @@ -164,14 +164,14 @@ export class BlockBlob { * @param blocks * @param callback The callback */ - commitBlockList(blocks: Models.BlockLookupList, callback: msRest.ServiceCallback): void; + commitBlockList(blocks: Models.BlockLookupList, callback: coreHttp.ServiceCallback): void; /** * @param blocks * @param options The optional parameters * @param callback The callback */ - commitBlockList(blocks: Models.BlockLookupList, options: Models.BlockBlobCommitBlockListOptionalParams, callback: msRest.ServiceCallback): void; - commitBlockList(blocks: Models.BlockLookupList, options?: Models.BlockBlobCommitBlockListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + commitBlockList(blocks: Models.BlockLookupList, options: Models.BlockBlobCommitBlockListOptionalParams, callback: coreHttp.ServiceCallback): void; + commitBlockList(blocks: Models.BlockLookupList, options?: Models.BlockBlobCommitBlockListOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { blocks, @@ -197,7 +197,7 @@ export class BlockBlob { * 'all' * @param callback The callback */ - getBlockList(listType: Models.BlockListType, callback: msRest.ServiceCallback): void; + getBlockList(listType: Models.BlockListType, callback: coreHttp.ServiceCallback): void; /** * @param listType Specifies whether to return the list of committed blocks, the list of * uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted', @@ -205,8 +205,8 @@ export class BlockBlob { * @param options The optional parameters * @param callback The callback */ - getBlockList(listType: Models.BlockListType, options: Models.BlockBlobGetBlockListOptionalParams, callback: msRest.ServiceCallback): void; - getBlockList(listType: Models.BlockListType, options?: Models.BlockBlobGetBlockListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getBlockList(listType: Models.BlockListType, options: Models.BlockBlobGetBlockListOptionalParams, callback: coreHttp.ServiceCallback): void; + getBlockList(listType: Models.BlockListType, options?: Models.BlockBlobGetBlockListOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { listType, @@ -218,8 +218,8 @@ export class BlockBlob { } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const uploadOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const uploadOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -269,7 +269,7 @@ const uploadOperationSpec: msRest.OperationSpec = { serializer }; -const stageBlockOperationSpec: msRest.OperationSpec = { +const stageBlockOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -310,7 +310,7 @@ const stageBlockOperationSpec: msRest.OperationSpec = { serializer }; -const stageBlockFromURLOperationSpec: msRest.OperationSpec = { +const stageBlockFromURLOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -342,7 +342,7 @@ const stageBlockFromURLOperationSpec: msRest.OperationSpec = { serializer }; -const commitBlockListOperationSpec: msRest.OperationSpec = { +const commitBlockListOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -388,7 +388,7 @@ const commitBlockListOperationSpec: msRest.OperationSpec = { serializer }; -const getBlockListOperationSpec: msRest.OperationSpec = { +const getBlockListOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{containerName}/{blob}", urlParameters: [ diff --git a/sdk/storage/storage-blob/src/generated/lib/operations/container.ts b/sdk/storage/storage-blob/src/generated/lib/operations/container.ts index 28fb50df9ba5..175d34f7b679 100644 --- a/sdk/storage/storage-blob/src/generated/lib/operations/container.ts +++ b/sdk/storage/storage-blob/src/generated/lib/operations/container.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/containerMappers"; import * as Parameters from "../models/parameters"; @@ -36,13 +36,13 @@ export class Container { /** * @param callback The callback */ - create(callback: msRest.ServiceCallback): void; + create(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - create(options: Models.ContainerCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(options?: Models.ContainerCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(options: Models.ContainerCreateOptionalParams, callback: coreHttp.ServiceCallback): void; + create(options?: Models.ContainerCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -61,13 +61,13 @@ export class Container { /** * @param callback The callback */ - getProperties(callback: msRest.ServiceCallback): void; + getProperties(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getProperties(options: Models.ContainerGetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - getProperties(options?: Models.ContainerGetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProperties(options: Models.ContainerGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + getProperties(options?: Models.ContainerGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -86,13 +86,13 @@ export class Container { /** * @param callback The callback */ - deleteMethod(callback: msRest.ServiceCallback): void; + deleteMethod(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - deleteMethod(options: Models.ContainerDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; - deleteMethod(options?: Models.ContainerDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(options: Models.ContainerDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void; + deleteMethod(options?: Models.ContainerDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -110,13 +110,13 @@ export class Container { /** * @param callback The callback */ - setMetadata(callback: msRest.ServiceCallback): void; + setMetadata(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setMetadata(options: Models.ContainerSetMetadataOptionalParams, callback: msRest.ServiceCallback): void; - setMetadata(options?: Models.ContainerSetMetadataOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setMetadata(options: Models.ContainerSetMetadataOptionalParams, callback: coreHttp.ServiceCallback): void; + setMetadata(options?: Models.ContainerSetMetadataOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -135,13 +135,13 @@ export class Container { /** * @param callback The callback */ - getAccessPolicy(callback: msRest.ServiceCallback): void; + getAccessPolicy(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getAccessPolicy(options: Models.ContainerGetAccessPolicyOptionalParams, callback: msRest.ServiceCallback): void; - getAccessPolicy(options?: Models.ContainerGetAccessPolicyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getAccessPolicy(options: Models.ContainerGetAccessPolicyOptionalParams, callback: coreHttp.ServiceCallback): void; + getAccessPolicy(options?: Models.ContainerGetAccessPolicyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -160,13 +160,13 @@ export class Container { /** * @param callback The callback */ - setAccessPolicy(callback: msRest.ServiceCallback): void; + setAccessPolicy(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setAccessPolicy(options: Models.ContainerSetAccessPolicyOptionalParams, callback: msRest.ServiceCallback): void; - setAccessPolicy(options?: Models.ContainerSetAccessPolicyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setAccessPolicy(options: Models.ContainerSetAccessPolicyOptionalParams, callback: coreHttp.ServiceCallback): void; + setAccessPolicy(options?: Models.ContainerSetAccessPolicyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -185,13 +185,13 @@ export class Container { /** * @param callback The callback */ - acquireLease(callback: msRest.ServiceCallback): void; + acquireLease(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - acquireLease(options: Models.ContainerAcquireLeaseOptionalParams, callback: msRest.ServiceCallback): void; - acquireLease(options?: Models.ContainerAcquireLeaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + acquireLease(options: Models.ContainerAcquireLeaseOptionalParams, callback: coreHttp.ServiceCallback): void; + acquireLease(options?: Models.ContainerAcquireLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -212,14 +212,14 @@ export class Container { * @param leaseId Specifies the current lease ID on the resource. * @param callback The callback */ - releaseLease(leaseId: string, callback: msRest.ServiceCallback): void; + releaseLease(leaseId: string, callback: coreHttp.ServiceCallback): void; /** * @param leaseId Specifies the current lease ID on the resource. * @param options The optional parameters * @param callback The callback */ - releaseLease(leaseId: string, options: Models.ContainerReleaseLeaseOptionalParams, callback: msRest.ServiceCallback): void; - releaseLease(leaseId: string, options?: Models.ContainerReleaseLeaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + releaseLease(leaseId: string, options: Models.ContainerReleaseLeaseOptionalParams, callback: coreHttp.ServiceCallback): void; + releaseLease(leaseId: string, options?: Models.ContainerReleaseLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { leaseId, @@ -241,14 +241,14 @@ export class Container { * @param leaseId Specifies the current lease ID on the resource. * @param callback The callback */ - renewLease(leaseId: string, callback: msRest.ServiceCallback): void; + renewLease(leaseId: string, callback: coreHttp.ServiceCallback): void; /** * @param leaseId Specifies the current lease ID on the resource. * @param options The optional parameters * @param callback The callback */ - renewLease(leaseId: string, options: Models.ContainerRenewLeaseOptionalParams, callback: msRest.ServiceCallback): void; - renewLease(leaseId: string, options?: Models.ContainerRenewLeaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + renewLease(leaseId: string, options: Models.ContainerRenewLeaseOptionalParams, callback: coreHttp.ServiceCallback): void; + renewLease(leaseId: string, options?: Models.ContainerRenewLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { leaseId, @@ -268,13 +268,13 @@ export class Container { /** * @param callback The callback */ - breakLease(callback: msRest.ServiceCallback): void; + breakLease(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - breakLease(options: Models.ContainerBreakLeaseOptionalParams, callback: msRest.ServiceCallback): void; - breakLease(options?: Models.ContainerBreakLeaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + breakLease(options: Models.ContainerBreakLeaseOptionalParams, callback: coreHttp.ServiceCallback): void; + breakLease(options?: Models.ContainerBreakLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -301,7 +301,7 @@ export class Container { * (String) for a list of valid GUID string formats. * @param callback The callback */ - changeLease(leaseId: string, proposedLeaseId: string, callback: msRest.ServiceCallback): void; + changeLease(leaseId: string, proposedLeaseId: string, callback: coreHttp.ServiceCallback): void; /** * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 @@ -310,8 +310,8 @@ export class Container { * @param options The optional parameters * @param callback The callback */ - changeLease(leaseId: string, proposedLeaseId: string, options: Models.ContainerChangeLeaseOptionalParams, callback: msRest.ServiceCallback): void; - changeLease(leaseId: string, proposedLeaseId: string, options?: Models.ContainerChangeLeaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + changeLease(leaseId: string, proposedLeaseId: string, options: Models.ContainerChangeLeaseOptionalParams, callback: coreHttp.ServiceCallback): void; + changeLease(leaseId: string, proposedLeaseId: string, options?: Models.ContainerChangeLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { leaseId, @@ -331,13 +331,13 @@ export class Container { /** * @param callback The callback */ - listBlobFlatSegment(callback: msRest.ServiceCallback): void; + listBlobFlatSegment(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - listBlobFlatSegment(options: Models.ContainerListBlobFlatSegmentOptionalParams, callback: msRest.ServiceCallback): void; - listBlobFlatSegment(options?: Models.ContainerListBlobFlatSegmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBlobFlatSegment(options: Models.ContainerListBlobFlatSegmentOptionalParams, callback: coreHttp.ServiceCallback): void; + listBlobFlatSegment(options?: Models.ContainerListBlobFlatSegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -363,7 +363,7 @@ export class Container { * character or a string. * @param callback The callback */ - listBlobHierarchySegment(delimiter: string, callback: msRest.ServiceCallback): void; + listBlobHierarchySegment(delimiter: string, callback: coreHttp.ServiceCallback): void; /** * @param delimiter 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 @@ -372,8 +372,8 @@ export class Container { * @param options The optional parameters * @param callback The callback */ - listBlobHierarchySegment(delimiter: string, options: Models.ContainerListBlobHierarchySegmentOptionalParams, callback: msRest.ServiceCallback): void; - listBlobHierarchySegment(delimiter: string, options?: Models.ContainerListBlobHierarchySegmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBlobHierarchySegment(delimiter: string, options: Models.ContainerListBlobHierarchySegmentOptionalParams, callback: coreHttp.ServiceCallback): void; + listBlobHierarchySegment(delimiter: string, options?: Models.ContainerListBlobHierarchySegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { delimiter, @@ -388,17 +388,17 @@ export class Container { * @param [options] The optional parameters * @returns Promise */ - getAccountInfo(options?: msRest.RequestOptionsBase): Promise; + getAccountInfo(options?: coreHttp.RequestOptionsBase): Promise; /** * @param callback The callback */ - getAccountInfo(callback: msRest.ServiceCallback): void; + getAccountInfo(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getAccountInfo(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getAccountInfo(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getAccountInfo(options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + getAccountInfo(options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -406,11 +406,67 @@ export class Container { getAccountInfoOperationSpec, callback) as Promise; } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBlobFlatSegmentNext(nextPageLink: string, options?: Models.ContainerListBlobFlatSegmentNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBlobFlatSegmentNext(nextPageLink: string, callback: coreHttp.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBlobFlatSegmentNext(nextPageLink: string, options: Models.ContainerListBlobFlatSegmentNextOptionalParams, callback: coreHttp.ServiceCallback): void; + listBlobFlatSegmentNext(nextPageLink: string, options?: Models.ContainerListBlobFlatSegmentNextOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBlobFlatSegmentNextOperationSpec, + callback) as Promise; + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBlobHierarchySegmentNext(nextPageLink: string, options?: Models.ContainerListBlobHierarchySegmentNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBlobHierarchySegmentNext(nextPageLink: string, callback: coreHttp.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBlobHierarchySegmentNext(nextPageLink: string, options: Models.ContainerListBlobHierarchySegmentNextOptionalParams, callback: coreHttp.ServiceCallback): void; + listBlobHierarchySegmentNext(nextPageLink: string, options?: Models.ContainerListBlobHierarchySegmentNextOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBlobHierarchySegmentNextOperationSpec, + callback) as Promise; + } } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const createOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const createOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}", urlParameters: [ @@ -438,7 +494,7 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const getPropertiesOperationSpec: msRest.OperationSpec = { +const getPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{containerName}", urlParameters: [ @@ -465,7 +521,7 @@ const getPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteMethodOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", path: "{containerName}", urlParameters: [ @@ -494,7 +550,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const setMetadataOperationSpec: msRest.OperationSpec = { +const setMetadataOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}", urlParameters: [ @@ -524,7 +580,7 @@ const setMetadataOperationSpec: msRest.OperationSpec = { serializer }; -const getAccessPolicyOperationSpec: msRest.OperationSpec = { +const getAccessPolicyOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{containerName}", urlParameters: [ @@ -565,7 +621,7 @@ const getAccessPolicyOperationSpec: msRest.OperationSpec = { serializer }; -const setAccessPolicyOperationSpec: msRest.OperationSpec = { +const setAccessPolicyOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}", urlParameters: [ @@ -617,7 +673,7 @@ const setAccessPolicyOperationSpec: msRest.OperationSpec = { serializer }; -const acquireLeaseOperationSpec: msRest.OperationSpec = { +const acquireLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}", urlParameters: [ @@ -649,7 +705,7 @@ const acquireLeaseOperationSpec: msRest.OperationSpec = { serializer }; -const releaseLeaseOperationSpec: msRest.OperationSpec = { +const releaseLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}", urlParameters: [ @@ -680,7 +736,7 @@ const releaseLeaseOperationSpec: msRest.OperationSpec = { serializer }; -const renewLeaseOperationSpec: msRest.OperationSpec = { +const renewLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}", urlParameters: [ @@ -711,7 +767,7 @@ const renewLeaseOperationSpec: msRest.OperationSpec = { serializer }; -const breakLeaseOperationSpec: msRest.OperationSpec = { +const breakLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}", urlParameters: [ @@ -742,7 +798,7 @@ const breakLeaseOperationSpec: msRest.OperationSpec = { serializer }; -const changeLeaseOperationSpec: msRest.OperationSpec = { +const changeLeaseOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}", urlParameters: [ @@ -774,7 +830,7 @@ const changeLeaseOperationSpec: msRest.OperationSpec = { serializer }; -const listBlobFlatSegmentOperationSpec: msRest.OperationSpec = { +const listBlobFlatSegmentOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{containerName}", urlParameters: [ @@ -806,7 +862,7 @@ const listBlobFlatSegmentOperationSpec: msRest.OperationSpec = { serializer }; -const listBlobHierarchySegmentOperationSpec: msRest.OperationSpec = { +const listBlobHierarchySegmentOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{containerName}", urlParameters: [ @@ -839,7 +895,7 @@ const listBlobHierarchySegmentOperationSpec: msRest.OperationSpec = { serializer }; -const getAccountInfoOperationSpec: msRest.OperationSpec = { +const getAccountInfoOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{containerName}", urlParameters: [ @@ -863,3 +919,51 @@ const getAccountInfoOperationSpec: msRest.OperationSpec = { isXML: true, serializer }; + +const listBlobFlatSegmentNextOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + baseUrl: "{url}", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders + }, + default: { + bodyMapper: Mappers.StorageError + } + }, + isXML: true, + serializer +}; + +const listBlobHierarchySegmentNextOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + baseUrl: "{url}", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders + }, + default: { + bodyMapper: Mappers.StorageError + } + }, + isXML: true, + serializer +}; diff --git a/sdk/storage/storage-blob/src/generated/lib/operations/pageBlob.ts b/sdk/storage/storage-blob/src/generated/lib/operations/pageBlob.ts index 1831dcf136e2..fbd259ff7dc1 100644 --- a/sdk/storage/storage-blob/src/generated/lib/operations/pageBlob.ts +++ b/sdk/storage/storage-blob/src/generated/lib/operations/pageBlob.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/pageBlobMappers"; import * as Parameters from "../models/parameters"; @@ -41,7 +41,7 @@ export class PageBlob { * The page blob size must be aligned to a 512-byte boundary. * @param callback The callback */ - create(contentLength: number, blobContentLength: number, callback: msRest.ServiceCallback): void; + create(contentLength: number, blobContentLength: number, callback: coreHttp.ServiceCallback): void; /** * @param contentLength The length of the request. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. @@ -49,8 +49,8 @@ export class PageBlob { * @param options The optional parameters * @param callback The callback */ - create(contentLength: number, blobContentLength: number, options: Models.PageBlobCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(contentLength: number, blobContentLength: number, options?: Models.PageBlobCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(contentLength: number, blobContentLength: number, options: Models.PageBlobCreateOptionalParams, callback: coreHttp.ServiceCallback): void; + create(contentLength: number, blobContentLength: number, options?: Models.PageBlobCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { contentLength, @@ -68,21 +68,21 @@ export class PageBlob { * @param [options] The optional parameters * @returns Promise */ - uploadPages(body: msRest.HttpRequestBody, contentLength: number, options?: Models.PageBlobUploadPagesOptionalParams): Promise; + uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.PageBlobUploadPagesOptionalParams): Promise; /** * @param body Initial data * @param contentLength The length of the request. * @param callback The callback */ - uploadPages(body: msRest.HttpRequestBody, contentLength: number, callback: msRest.ServiceCallback): void; + uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, callback: coreHttp.ServiceCallback): void; /** * @param body Initial data * @param contentLength The length of the request. * @param options The optional parameters * @param callback The callback */ - uploadPages(body: msRest.HttpRequestBody, contentLength: number, options: Models.PageBlobUploadPagesOptionalParams, callback: msRest.ServiceCallback): void; - uploadPages(body: msRest.HttpRequestBody, contentLength: number, options?: Models.PageBlobUploadPagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, options: Models.PageBlobUploadPagesOptionalParams, callback: coreHttp.ServiceCallback): void; + uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.PageBlobUploadPagesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { body, @@ -104,14 +104,14 @@ export class PageBlob { * @param contentLength The length of the request. * @param callback The callback */ - clearPages(contentLength: number, callback: msRest.ServiceCallback): void; + clearPages(contentLength: number, callback: coreHttp.ServiceCallback): void; /** * @param contentLength The length of the request. * @param options The optional parameters * @param callback The callback */ - clearPages(contentLength: number, options: Models.PageBlobClearPagesOptionalParams, callback: msRest.ServiceCallback): void; - clearPages(contentLength: number, options?: Models.PageBlobClearPagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + clearPages(contentLength: number, options: Models.PageBlobClearPagesOptionalParams, callback: coreHttp.ServiceCallback): void; + clearPages(contentLength: number, options?: Models.PageBlobClearPagesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { contentLength, @@ -131,13 +131,13 @@ export class PageBlob { /** * @param callback The callback */ - getPageRanges(callback: msRest.ServiceCallback): void; + getPageRanges(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getPageRanges(options: Models.PageBlobGetPageRangesOptionalParams, callback: msRest.ServiceCallback): void; - getPageRanges(options?: Models.PageBlobGetPageRangesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getPageRanges(options: Models.PageBlobGetPageRangesOptionalParams, callback: coreHttp.ServiceCallback): void; + getPageRanges(options?: Models.PageBlobGetPageRangesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -156,13 +156,13 @@ export class PageBlob { /** * @param callback The callback */ - getPageRangesDiff(callback: msRest.ServiceCallback): void; + getPageRangesDiff(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getPageRangesDiff(options: Models.PageBlobGetPageRangesDiffOptionalParams, callback: msRest.ServiceCallback): void; - getPageRangesDiff(options?: Models.PageBlobGetPageRangesDiffOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getPageRangesDiff(options: Models.PageBlobGetPageRangesDiffOptionalParams, callback: coreHttp.ServiceCallback): void; + getPageRangesDiff(options?: Models.PageBlobGetPageRangesDiffOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -184,15 +184,15 @@ export class PageBlob { * The page blob size must be aligned to a 512-byte boundary. * @param callback The callback */ - resize(blobContentLength: number, callback: msRest.ServiceCallback): void; + resize(blobContentLength: number, callback: coreHttp.ServiceCallback): void; /** * @param blobContentLength 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. * @param options The optional parameters * @param callback The callback */ - resize(blobContentLength: number, options: Models.PageBlobResizeOptionalParams, callback: msRest.ServiceCallback): void; - resize(blobContentLength: number, options?: Models.PageBlobResizeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + resize(blobContentLength: number, options: Models.PageBlobResizeOptionalParams, callback: coreHttp.ServiceCallback): void; + resize(blobContentLength: number, options?: Models.PageBlobResizeOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { blobContentLength, @@ -217,7 +217,7 @@ export class PageBlob { * should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment' * @param callback The callback */ - updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, callback: msRest.ServiceCallback): void; + updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, callback: coreHttp.ServiceCallback): void; /** * @param sequenceNumberAction 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 @@ -225,8 +225,8 @@ export class PageBlob { * @param options The optional parameters * @param callback The callback */ - updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, options: Models.PageBlobUpdateSequenceNumberOptionalParams, callback: msRest.ServiceCallback): void; - updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, options?: Models.PageBlobUpdateSequenceNumberOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, options: Models.PageBlobUpdateSequenceNumberOptionalParams, callback: coreHttp.ServiceCallback): void; + updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, options?: Models.PageBlobUpdateSequenceNumberOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { sequenceNumberAction, @@ -257,7 +257,7 @@ export class PageBlob { * via a shared access signature. * @param callback The callback */ - copyIncremental(copySource: string, callback: msRest.ServiceCallback): void; + copyIncremental(copySource: string, callback: coreHttp.ServiceCallback): void; /** * @param copySource 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 @@ -266,8 +266,8 @@ export class PageBlob { * @param options The optional parameters * @param callback The callback */ - copyIncremental(copySource: string, options: Models.PageBlobCopyIncrementalOptionalParams, callback: msRest.ServiceCallback): void; - copyIncremental(copySource: string, options?: Models.PageBlobCopyIncrementalOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + copyIncremental(copySource: string, options: Models.PageBlobCopyIncrementalOptionalParams, callback: coreHttp.ServiceCallback): void; + copyIncremental(copySource: string, options?: Models.PageBlobCopyIncrementalOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { copySource, @@ -279,8 +279,8 @@ export class PageBlob { } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const createOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const createOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -321,7 +321,7 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const uploadPagesOperationSpec: msRest.OperationSpec = { +const uploadPagesOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -370,7 +370,7 @@ const uploadPagesOperationSpec: msRest.OperationSpec = { serializer }; -const clearPagesOperationSpec: msRest.OperationSpec = { +const clearPagesOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -407,7 +407,7 @@ const clearPagesOperationSpec: msRest.OperationSpec = { serializer }; -const getPageRangesOperationSpec: msRest.OperationSpec = { +const getPageRangesOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{containerName}/{blob}", urlParameters: [ @@ -441,7 +441,7 @@ const getPageRangesOperationSpec: msRest.OperationSpec = { serializer }; -const getPageRangesDiffOperationSpec: msRest.OperationSpec = { +const getPageRangesDiffOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{containerName}/{blob}", urlParameters: [ @@ -476,7 +476,7 @@ const getPageRangesDiffOperationSpec: msRest.OperationSpec = { serializer }; -const resizeOperationSpec: msRest.OperationSpec = { +const resizeOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -508,7 +508,7 @@ const resizeOperationSpec: msRest.OperationSpec = { serializer }; -const updateSequenceNumberOperationSpec: msRest.OperationSpec = { +const updateSequenceNumberOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ @@ -541,7 +541,7 @@ const updateSequenceNumberOperationSpec: msRest.OperationSpec = { serializer }; -const copyIncrementalOperationSpec: msRest.OperationSpec = { +const copyIncrementalOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{containerName}/{blob}", urlParameters: [ diff --git a/sdk/storage/storage-blob/src/generated/lib/operations/service.ts b/sdk/storage/storage-blob/src/generated/lib/operations/service.ts index ddedaf859313..38416dc1b176 100644 --- a/sdk/storage/storage-blob/src/generated/lib/operations/service.ts +++ b/sdk/storage/storage-blob/src/generated/lib/operations/service.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/serviceMappers"; import * as Parameters from "../models/parameters"; @@ -38,14 +38,14 @@ export class Service { * @param storageServiceProperties The StorageService properties. * @param callback The callback */ - setProperties(storageServiceProperties: Models.StorageServiceProperties, callback: msRest.ServiceCallback): void; + setProperties(storageServiceProperties: Models.StorageServiceProperties, callback: coreHttp.ServiceCallback): void; /** * @param storageServiceProperties The StorageService properties. * @param options The optional parameters * @param callback The callback */ - setProperties(storageServiceProperties: Models.StorageServiceProperties, options: Models.ServiceSetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - setProperties(storageServiceProperties: Models.StorageServiceProperties, options?: Models.ServiceSetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setProperties(storageServiceProperties: Models.StorageServiceProperties, options: Models.ServiceSetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + setProperties(storageServiceProperties: Models.StorageServiceProperties, options?: Models.ServiceSetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { storageServiceProperties, @@ -65,13 +65,13 @@ export class Service { /** * @param callback The callback */ - getProperties(callback: msRest.ServiceCallback): void; + getProperties(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getProperties(options: Models.ServiceGetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - getProperties(options?: Models.ServiceGetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProperties(options: Models.ServiceGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + getProperties(options?: Models.ServiceGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -91,13 +91,13 @@ export class Service { /** * @param callback The callback */ - getStatistics(callback: msRest.ServiceCallback): void; + getStatistics(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getStatistics(options: Models.ServiceGetStatisticsOptionalParams, callback: msRest.ServiceCallback): void; - getStatistics(options?: Models.ServiceGetStatisticsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getStatistics(options: Models.ServiceGetStatisticsOptionalParams, callback: coreHttp.ServiceCallback): void; + getStatistics(options?: Models.ServiceGetStatisticsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -116,13 +116,13 @@ export class Service { /** * @param callback The callback */ - listContainersSegment(callback: msRest.ServiceCallback): void; + listContainersSegment(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - listContainersSegment(options: Models.ServiceListContainersSegmentOptionalParams, callback: msRest.ServiceCallback): void; - listContainersSegment(options?: Models.ServiceListContainersSegmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listContainersSegment(options: Models.ServiceListContainersSegmentOptionalParams, callback: coreHttp.ServiceCallback): void; + listContainersSegment(options?: Models.ServiceListContainersSegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -136,17 +136,17 @@ export class Service { * @param [options] The optional parameters * @returns Promise */ - getAccountInfo(options?: msRest.RequestOptionsBase): Promise; + getAccountInfo(options?: coreHttp.RequestOptionsBase): Promise; /** * @param callback The callback */ - getAccountInfo(callback: msRest.ServiceCallback): void; + getAccountInfo(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getAccountInfo(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getAccountInfo(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getAccountInfo(options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + getAccountInfo(options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -154,11 +154,40 @@ export class Service { getAccountInfoOperationSpec, callback) as Promise; } + + /** + * The List Containers Segment operation returns a list of the containers under the specified + * account + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listContainersSegmentNext(nextPageLink: string, options?: Models.ServiceListContainersSegmentNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listContainersSegmentNext(nextPageLink: string, callback: coreHttp.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listContainersSegmentNext(nextPageLink: string, options: Models.ServiceListContainersSegmentNextOptionalParams, callback: coreHttp.ServiceCallback): void; + listContainersSegmentNext(nextPageLink: string, options?: Models.ServiceListContainersSegmentNextOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listContainersSegmentNextOperationSpec, + callback) as Promise; + } } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const setPropertiesOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const setPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", urlParameters: [ Parameters.url @@ -192,7 +221,7 @@ const setPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const getPropertiesOperationSpec: msRest.OperationSpec = { +const getPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", urlParameters: [ Parameters.url @@ -219,7 +248,7 @@ const getPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const getStatisticsOperationSpec: msRest.OperationSpec = { +const getStatisticsOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", urlParameters: [ Parameters.url @@ -246,7 +275,7 @@ const getStatisticsOperationSpec: msRest.OperationSpec = { serializer }; -const listContainersSegmentOperationSpec: msRest.OperationSpec = { +const listContainersSegmentOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", urlParameters: [ Parameters.url @@ -276,7 +305,7 @@ const listContainersSegmentOperationSpec: msRest.OperationSpec = { serializer }; -const getAccountInfoOperationSpec: msRest.OperationSpec = { +const getAccountInfoOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", urlParameters: [ Parameters.url @@ -299,3 +328,27 @@ const getAccountInfoOperationSpec: msRest.OperationSpec = { isXML: true, serializer }; + +const listContainersSegmentNextOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + baseUrl: "{url}", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders + }, + default: { + bodyMapper: Mappers.StorageError + } + }, + isXML: true, + serializer +}; diff --git a/sdk/storage/storage-blob/src/generated/lib/storageClient.ts b/sdk/storage/storage-blob/src/generated/lib/storageClient.ts index e8e1a48fadc2..d6daf46d68c7 100644 --- a/sdk/storage/storage-blob/src/generated/lib/storageClient.ts +++ b/sdk/storage/storage-blob/src/generated/lib/storageClient.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -29,7 +29,7 @@ class StorageClient extends StorageClientContext { * operation. * @param [options] The parameter options */ - constructor(url: string, options?: msRest.ServiceClientOptions) { + constructor(url: string, options?: coreHttp.ServiceClientOptions) { super(url, options); this.service = new operations.Service(this); this.container = new operations.Container(this); diff --git a/sdk/storage/storage-blob/src/generated/lib/storageClientContext.ts b/sdk/storage/storage-blob/src/generated/lib/storageClientContext.ts index fd9c8cba1daa..20899b210d79 100644 --- a/sdk/storage/storage-blob/src/generated/lib/storageClientContext.ts +++ b/sdk/storage/storage-blob/src/generated/lib/storageClientContext.ts @@ -8,12 +8,12 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; const packageName = "azure-storage-blob"; const packageVersion = "1.0.0"; -export class StorageClientContext extends msRest.ServiceClient { +export class StorageClientContext extends coreHttp.ServiceClient { url: string; version: string; @@ -23,16 +23,17 @@ export class StorageClientContext extends msRest.ServiceClient { * operation. * @param [options] The parameter options */ - constructor(url: string, options?: msRest.ServiceClientOptions) { - if (url === null || url === undefined) { - throw new Error('\'url\' cannot be null.'); + constructor(url: string, options?: coreHttp.ServiceClientOptions) { + if (url == undefined) { + throw new Error("'url' cannot be null."); } if (!options) { options = {}; } - if(!options.userAgent) { - const defaultUserAgent = msRest.getDefaultUserAgentValue(); + + if (!options.userAgent) { + const defaultUserAgent = coreHttp.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -42,6 +43,5 @@ export class StorageClientContext extends msRest.ServiceClient { this.baseUri = "{url}"; this.requestContentType = "application/json; charset=utf-8"; this.url = url; - } } diff --git a/sdk/storage/storage-blob/src/index.browser.ts b/sdk/storage/storage-blob/src/index.browser.ts index 65b53972f1bb..7c8094a9f9fe 100644 --- a/sdk/storage/storage-blob/src/index.browser.ts +++ b/sdk/storage/storage-blob/src/index.browser.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RestError } from "@azure/ms-rest-js"; +import { RestError } from "@azure/core-http"; import * as Models from "../src/generated/lib/models"; @@ -18,7 +18,7 @@ export * from "./PageBlobClient"; export * from "./BrowserPolicyFactory"; export * from "./credentials/AnonymousCredential"; export * from "./credentials/Credential"; -export * from "./credentials/TokenCredential"; +export * from "./credentials/RawTokenCredential"; export { IPRange } from "./IPRange"; export { Range } from "./Range"; export * from "./LeaseClient"; @@ -28,6 +28,5 @@ export * from "./policies/CredentialPolicy"; export * from "./RetryPolicyFactory"; export * from "./LoggingPolicyFactory"; export * from "./TelemetryPolicyFactory"; -export * from "./policies/TokenCredentialPolicy"; export * from "./UniqueRequestIDPolicyFactory"; export { Models, RestError }; diff --git a/sdk/storage/storage-blob/src/index.ts b/sdk/storage/storage-blob/src/index.ts index 491aeb127801..b474e51829fd 100644 --- a/sdk/storage/storage-blob/src/index.ts +++ b/sdk/storage/storage-blob/src/index.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RestError } from "@azure/ms-rest-js"; +import { RestError } from "@azure/core-http"; import * as Models from "../src/generated/lib/models"; @@ -25,7 +25,7 @@ export * from "./ContainerSASPermissions"; export * from "./credentials/AnonymousCredential"; export * from "./credentials/Credential"; export * from "./credentials/SharedKeyCredential"; -export * from "./credentials/TokenCredential"; +export * from "./credentials/RawTokenCredential"; export { IPRange } from "./IPRange"; export { Range } from "./Range"; export * from "./LeaseClient"; @@ -36,7 +36,6 @@ export * from "./RetryPolicyFactory"; export * from "./LoggingPolicyFactory"; export * from "./policies/SharedKeyCredentialPolicy"; export * from "./TelemetryPolicyFactory"; -export * from "./policies/TokenCredentialPolicy"; export * from "./UniqueRequestIDPolicyFactory"; export * from "./SASQueryParameters"; export { Models, RestError }; diff --git a/sdk/storage/storage-blob/src/policies/AnonymousCredentialPolicy.ts b/sdk/storage/storage-blob/src/policies/AnonymousCredentialPolicy.ts index d5368d185b02..f322060c2e98 100644 --- a/sdk/storage/storage-blob/src/policies/AnonymousCredentialPolicy.ts +++ b/sdk/storage/storage-blob/src/policies/AnonymousCredentialPolicy.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions } from "@azure/core-http"; import { CredentialPolicy } from "./CredentialPolicy"; diff --git a/sdk/storage/storage-blob/src/policies/BrowserPolicy.ts b/sdk/storage/storage-blob/src/policies/BrowserPolicy.ts index 2b7d37949eec..daee8c93cae1 100644 --- a/sdk/storage/storage-blob/src/policies/BrowserPolicy.ts +++ b/sdk/storage/storage-blob/src/policies/BrowserPolicy.ts @@ -8,7 +8,7 @@ import { RequestPolicy, RequestPolicyOptions, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { HeaderConstants, URLConstants } from "../utils/constants"; import { setURLParameter } from "../utils/utils.common"; diff --git a/sdk/storage/storage-blob/src/policies/CredentialPolicy.ts b/sdk/storage/storage-blob/src/policies/CredentialPolicy.ts index e15490e27e3d..32cf09b84d6b 100644 --- a/sdk/storage/storage-blob/src/policies/CredentialPolicy.ts +++ b/sdk/storage/storage-blob/src/policies/CredentialPolicy.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { BaseRequestPolicy, HttpOperationResponse, WebResource } from "@azure/ms-rest-js"; +import { BaseRequestPolicy, HttpOperationResponse, WebResource } from "@azure/core-http"; /** * Credential policy used to sign HTTP(S) requests before sending. This is an diff --git a/sdk/storage/storage-blob/src/policies/LoggingPolicy.ts b/sdk/storage/storage-blob/src/policies/LoggingPolicy.ts index 464669141234..67203bd43cf1 100644 --- a/sdk/storage/storage-blob/src/policies/LoggingPolicy.ts +++ b/sdk/storage/storage-blob/src/policies/LoggingPolicy.ts @@ -9,7 +9,7 @@ import { RequestPolicyOptions, RestError, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { RequestLogOptions } from "../LoggingPolicyFactory"; import { HTTPURLConnection } from "../utils/constants"; diff --git a/sdk/storage/storage-blob/src/policies/RetryPolicy.ts b/sdk/storage/storage-blob/src/policies/RetryPolicy.ts index 76086c4342c4..0d8a87f8a4ad 100644 --- a/sdk/storage/storage-blob/src/policies/RetryPolicy.ts +++ b/sdk/storage/storage-blob/src/policies/RetryPolicy.ts @@ -11,7 +11,7 @@ import { RequestPolicyOptions, RestError, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { RetryOptions } from "../RetryPolicyFactory"; import { URLConstants } from "../utils/constants"; diff --git a/sdk/storage/storage-blob/src/policies/SharedKeyCredentialPolicy.ts b/sdk/storage/storage-blob/src/policies/SharedKeyCredentialPolicy.ts index efff25662f55..89cd03a291be 100644 --- a/sdk/storage/storage-blob/src/policies/SharedKeyCredentialPolicy.ts +++ b/sdk/storage/storage-blob/src/policies/SharedKeyCredentialPolicy.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyOptions, WebResource } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions, WebResource } from "@azure/core-http"; import { SharedKeyCredential } from "../credentials/SharedKeyCredential"; import { HeaderConstants } from "../utils/constants"; import { getURLPath, getURLQueries } from "../utils/utils.common"; diff --git a/sdk/storage/storage-blob/src/policies/TelemetryPolicy.ts b/sdk/storage/storage-blob/src/policies/TelemetryPolicy.ts index b60d509e5906..ef2f837aa3dc 100644 --- a/sdk/storage/storage-blob/src/policies/TelemetryPolicy.ts +++ b/sdk/storage/storage-blob/src/policies/TelemetryPolicy.ts @@ -9,7 +9,7 @@ import { RequestPolicy, RequestPolicyOptions, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { HeaderConstants } from "../utils/constants"; diff --git a/sdk/storage/storage-blob/src/policies/TokenCredentialPolicy.ts b/sdk/storage/storage-blob/src/policies/TokenCredentialPolicy.ts deleted file mode 100644 index 295a6bbc53dc..000000000000 --- a/sdk/storage/storage-blob/src/policies/TokenCredentialPolicy.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -import { HttpHeaders, RequestPolicy, RequestPolicyOptions, WebResource } from "@azure/ms-rest-js"; -import { TokenCredential } from "../credentials/TokenCredential"; -import { HeaderConstants } from "../utils/constants"; -import { CredentialPolicy } from "./CredentialPolicy"; - -/** - * TokenCredentialPolicy is a policy used to sign HTTP request with a token. - * Such as an OAuth bearer token. - * - * @export - * @class TokenCredentialPolicy - * @extends {CredentialPolicy} - */ -export class TokenCredentialPolicy extends CredentialPolicy { - /** - * The value of token. - * - * @type {TokenCredential} - * @memberof TokenCredentialPolicy - */ - public readonly tokenCredential: TokenCredential; - - /** - * Token authorization scheme, default header is "Bearer". - * - * @type {string} - * @memberof TokenCredentialPolicy - */ - public readonly authorizationScheme: string; - - /** - * Creates an instance of TokenCredentialPolicy. - * @param {RequestPolicy} nextPolicy - * @param {RequestPolicyOptions} options - * @param {TokenCredential} tokenCredential - * @memberof TokenCredentialPolicy - */ - constructor( - nextPolicy: RequestPolicy, - options: RequestPolicyOptions, - tokenCredential: TokenCredential - ) { - super(nextPolicy, options); - this.tokenCredential = tokenCredential; - this.authorizationScheme = HeaderConstants.AUTHORIZATION_SCHEME; - } - - /** - * Sign request with token. - * - * @protected - * @param {WebResource} request - * @returns {WebResource} - * @memberof TokenCredentialPolicy - */ - protected signRequest(request: WebResource): WebResource { - if (!request.headers) { - request.headers = new HttpHeaders(); - } - request.headers.set( - HeaderConstants.AUTHORIZATION, - `${this.authorizationScheme} ${this.tokenCredential.token}` - ); - return request; - } -} diff --git a/sdk/storage/storage-blob/src/policies/UniqueRequestIDPolicy.ts b/sdk/storage/storage-blob/src/policies/UniqueRequestIDPolicy.ts index 5fd1681dc9f4..da15a58284f0 100644 --- a/sdk/storage/storage-blob/src/policies/UniqueRequestIDPolicy.ts +++ b/sdk/storage/storage-blob/src/policies/UniqueRequestIDPolicy.ts @@ -8,7 +8,7 @@ import { RequestPolicy, RequestPolicyOptions, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { HeaderConstants } from "../utils/constants"; diff --git a/sdk/storage/storage-blob/src/utils/RetriableReadableStream.ts b/sdk/storage/storage-blob/src/utils/RetriableReadableStream.ts index a6259e961f68..3706e04168eb 100644 --- a/sdk/storage/storage-blob/src/utils/RetriableReadableStream.ts +++ b/sdk/storage/storage-blob/src/utils/RetriableReadableStream.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RestError, TransferProgressEvent } from "@azure/ms-rest-js"; +import { RestError, TransferProgressEvent } from "@azure/core-http"; import { Readable } from "stream"; import { Aborter } from "../Aborter"; diff --git a/sdk/storage/storage-blob/src/utils/utils.common.ts b/sdk/storage/storage-blob/src/utils/utils.common.ts index 7651749d0ecb..5032fc38ea33 100644 --- a/sdk/storage/storage-blob/src/utils/utils.common.ts +++ b/sdk/storage/storage-blob/src/utils/utils.common.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as fs from "fs"; -import { HttpHeaders, isNode, URLBuilder } from "@azure/ms-rest-js"; +import { HttpHeaders, isNode, URLBuilder } from "@azure/core-http"; import { HeaderConstants, URLConstants } from "./constants"; /** diff --git a/sdk/storage/storage-blob/test/blobclient.spec.ts b/sdk/storage/storage-blob/test/blobclient.spec.ts index ebdacd83df89..450af1d9a750 100644 --- a/sdk/storage/storage-blob/test/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobclient.spec.ts @@ -1,6 +1,6 @@ import * as assert from "assert"; -import { isNode } from "@azure/ms-rest-js"; +import { isNode } from "@azure/core-http"; import * as dotenv from "dotenv"; import { bodyToString, getBSU, getUniqueName, sleep } from "./utils"; dotenv.config({ path: "../.env" }); diff --git a/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts b/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts index acb33e3fbd23..089559e5582b 100644 --- a/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/appendblobclient.spec.ts @@ -3,6 +3,8 @@ import * as assert from "assert"; import * as dotenv from "dotenv"; import { AppendBlobClient, newPipeline, SharedKeyCredential } from "../../src"; import { getBSU, getConnectionStringFromEnvironment, getUniqueName } from "../utils"; +import { TokenCredential } from '@azure/core-http'; +import { assertClientUsesTokenCredential } from '../utils/assert'; dotenv.config({ path: "../.env" }); describe("AppendBlobClient Node.js only", () => { @@ -44,6 +46,17 @@ describe("AppendBlobClient Node.js only", () => { await newClient.download(); }); + it("can be created with a url and a TokenCredential", async () => { + const tokenCredential: TokenCredential = { + getToken: () => Promise.resolve({ + token: 'token', + expiresOnTimestamp: 12345 + }) + } + const newClient = new AppendBlobClient(appendBlobClient.url, tokenCredential); + assertClientUsesTokenCredential(newClient); + }); + it("can be created with a url and a pipeline", async () => { const factories = (appendBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; diff --git a/sdk/storage/storage-blob/test/node/blobclient.spec.ts b/sdk/storage/storage-blob/test/node/blobclient.spec.ts index 9b5054a7d0cd..c16752fc4151 100644 --- a/sdk/storage/storage-blob/test/node/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/blobclient.spec.ts @@ -1,6 +1,6 @@ import * as assert from "assert"; -import { isNode } from "@azure/ms-rest-js"; +import { isNode } from "@azure/core-http"; import * as dotenv from "dotenv"; import { BlobClient, newPipeline, SharedKeyCredential } from "../../src"; import { @@ -10,6 +10,8 @@ import { getUniqueName, sleep } from "../utils"; +import { TokenCredential } from '@azure/core-http'; +import { assertClientUsesTokenCredential } from '../utils/assert'; dotenv.config({ path: "../.env" }); describe("BlobClient Node.js only", () => { @@ -265,6 +267,17 @@ describe("BlobClient Node.js only", () => { assert.deepStrictEqual(result.metadata, metadata); }); + it("can be created with a url and a TokenCredential", async () => { + const tokenCredential: TokenCredential = { + getToken: () => Promise.resolve({ + token: 'token', + expiresOnTimestamp: 12345 + }) + } + const newClient = new BlobClient(blobClient.url, tokenCredential); + assertClientUsesTokenCredential(newClient); + }); + it("can be created with a url and a pipeline", async () => { const factories = (blobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; diff --git a/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts b/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts index 9d83ec6399ab..be936efdc92c 100644 --- a/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/blockblobclient.spec.ts @@ -2,6 +2,8 @@ import * as assert from "assert"; import { bodyToString, getBSU, getUniqueName, getConnectionStringFromEnvironment } from "../utils"; import { BlockBlobClient, newPipeline, SharedKeyCredential } from "../../src"; +import { TokenCredential } from '@azure/core-http'; +import { assertClientUsesTokenCredential } from '../utils/assert'; describe("BlockBlobClient Node.js only", () => { const blobServiceClient = getBSU(); @@ -78,6 +80,17 @@ describe("BlockBlobClient Node.js only", () => { assert.deepStrictEqual(await bodyToString(result, body.length), body); }); + it("can be created with a url and a TokenCredential", async () => { + const tokenCredential: TokenCredential = { + getToken: () => Promise.resolve({ + token: 'token', + expiresOnTimestamp: 12345 + }) + } + const newClient = new BlockBlobClient(blockBlobClient.url, tokenCredential); + assertClientUsesTokenCredential(newClient); + }); + it("can be created with a url and a pipeline", async () => { const factories = (blockBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; diff --git a/sdk/storage/storage-blob/test/node/containerclient.spec.ts b/sdk/storage/storage-blob/test/node/containerclient.spec.ts index 920f118e8025..ee43fa9b55a8 100644 --- a/sdk/storage/storage-blob/test/node/containerclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/containerclient.spec.ts @@ -3,6 +3,8 @@ import * as assert from "assert"; import { getBSU, getUniqueName, getConnectionStringFromEnvironment } from "../utils"; import { PublicAccessType } from "../../src/generated/lib/models/index"; import { ContainerClient, newPipeline, SharedKeyCredential } from "../../src"; +import { TokenCredential } from '@azure/core-http'; +import { assertClientUsesTokenCredential } from '../utils/assert'; describe("ContainerClient Node.js only", () => { const blobServiceClient = getBSU(); @@ -87,6 +89,17 @@ describe("ContainerClient Node.js only", () => { assert.ok(!result.blobPublicAccess); }); + it("can be created with a url and a TokenCredential", async () => { + const tokenCredential: TokenCredential = { + getToken: () => Promise.resolve({ + token: 'token', + expiresOnTimestamp: 12345 + }) + } + const newClient = new ContainerClient(containerClient.url, tokenCredential); + assertClientUsesTokenCredential(newClient); + }); + it("can be created with a url and a pipeline", async () => { const factories = (containerClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; diff --git a/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts b/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts index c6c95aff7040..a6ac247602f4 100644 --- a/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts +++ b/sdk/storage/storage-blob/test/node/pageblobclient.spec.ts @@ -8,6 +8,8 @@ import { bodyToString } from "../utils"; import { newPipeline, PageBlobClient, SharedKeyCredential } from "../../src"; +import { TokenCredential } from '@azure/core-http'; +import { assertClientUsesTokenCredential } from '../utils/assert'; describe("PageBlobClient Node.js only", () => { const blobServiceClient = getBSU(); @@ -122,6 +124,17 @@ describe("PageBlobClient Node.js only", () => { assert.deepStrictEqual(await bodyToString(result, 512), "\u0000".repeat(512)); }); + it("can be created with a url and a TokenCredential", async () => { + const tokenCredential: TokenCredential = { + getToken: () => Promise.resolve({ + token: 'token', + expiresOnTimestamp: 12345 + }) + } + const newClient = new PageBlobClient(pageBlobClient.url, tokenCredential); + assertClientUsesTokenCredential(newClient); + }); + it("can be created with a url and a pipeline", async () => { const factories = (pageBlobClient as any).pipeline.factories; const credential = factories[factories.length - 1] as SharedKeyCredential; diff --git a/sdk/storage/storage-blob/test/retrypolicy.spec.ts b/sdk/storage/storage-blob/test/retrypolicy.spec.ts index 0b548934e7fc..40bb82341931 100644 --- a/sdk/storage/storage-blob/test/retrypolicy.spec.ts +++ b/sdk/storage/storage-blob/test/retrypolicy.spec.ts @@ -1,4 +1,4 @@ -import { URLBuilder } from "@azure/ms-rest-js"; +import { URLBuilder } from "@azure/core-http"; import * as assert from "assert"; import { ContainerClient, RestError } from "../src"; diff --git a/sdk/storage/storage-blob/test/utils/assert.ts b/sdk/storage/storage-blob/test/utils/assert.ts new file mode 100644 index 000000000000..6d8651251e82 --- /dev/null +++ b/sdk/storage/storage-blob/test/utils/assert.ts @@ -0,0 +1,8 @@ +import * as assert from "assert"; +import { StorageClient } from '../../src/internal'; + +export function assertClientUsesTokenCredential(client: StorageClient) { + const factories = (client as any).pipeline.factories + const authPolicy = factories[factories.length - 1].create(); + assert.strictEqual(authPolicy.constructor.name, "BearerTokenAuthenticationPolicy"); +} diff --git a/sdk/storage/storage-file/package.json b/sdk/storage/storage-file/package.json index adc01f9647b1..38d7ba72ea84 100644 --- a/sdk/storage/storage-file/package.json +++ b/sdk/storage/storage-file/package.json @@ -77,7 +77,7 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js#readme", "sideEffects": false, "dependencies": { - "@azure/ms-rest-js": "^1.2.6", + "@azure/core-http": "^1.2.6", "@azure/core-paging": "^1.0.0", "events": "^3.0.0", "tslib": "^1.9.3" diff --git a/sdk/storage/storage-file/rollup.base.config.js b/sdk/storage/storage-file/rollup.base.config.js index 1129dd221862..a596ff1a982e 100644 --- a/sdk/storage/storage-file/rollup.base.config.js +++ b/sdk/storage/storage-file/rollup.base.config.js @@ -23,7 +23,7 @@ const depNames = Object.keys(pkg.dependencies); const production = process.env.NODE_ENV === "production"; export function nodeConfig(test = false) { - const externalNodeBuiltins = ["@azure/ms-rest-js", "crypto", "fs", "events", "os", "stream"]; + const externalNodeBuiltins = ["@azure/core-http", "crypto", "fs", "events", "os", "stream"]; const baseConfig = { input: "dist-esm/src/index.js", external: depNames.concat(externalNodeBuiltins), @@ -70,7 +70,6 @@ export function nodeConfig(test = false) { export function browserConfig(test = false, production = false) { const baseConfig = { input: "dist-esm/src/index.browser.js", - external: ["ms-rest-js"], output: { file: "browser/azure-storage-file.js", banner: banner, diff --git a/sdk/storage/storage-file/src/Aborter.ts b/sdk/storage/storage-file/src/Aborter.ts index c2f612921006..c6674fb5ce45 100644 --- a/sdk/storage/storage-file/src/Aborter.ts +++ b/sdk/storage/storage-file/src/Aborter.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { AbortSignalLike, isNode } from "@azure/ms-rest-js"; +import { AbortSignalLike, isNode } from "@azure/core-http"; /** * An aborter instance implements AbortSignal interface, can abort HTTP requests. diff --git a/sdk/storage/storage-file/src/BrowserPolicyFactory.ts b/sdk/storage/storage-file/src/BrowserPolicyFactory.ts index 2038cf8deb5d..dd71e3befe57 100644 --- a/sdk/storage/storage-file/src/BrowserPolicyFactory.ts +++ b/sdk/storage/storage-file/src/BrowserPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { BrowserPolicy } from "./policies/BrowserPolicy"; /** diff --git a/sdk/storage/storage-file/src/DirectoryClient.ts b/sdk/storage/storage-file/src/DirectoryClient.ts index 11f28f3e5f45..04eca5761f8b 100644 --- a/sdk/storage/storage-file/src/DirectoryClient.ts +++ b/sdk/storage/storage-file/src/DirectoryClient.ts @@ -182,7 +182,7 @@ export class DirectoryClient extends StorageClient { * However, if a directory name includes %, directory name must be encoded in the URL. * Such as a directory named "mydir%", the URL should be "https://myaccount.file.core.windows.net/myshare/mydir%25". * @param {Credential} [credential] Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, AnonymousCredential is used. + * If not specified, AnonymousCredential is used. * @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline. * @memberof DirectoryClient */ diff --git a/sdk/storage/storage-file/src/FileClient.ts b/sdk/storage/storage-file/src/FileClient.ts index b681a1d7acb1..50946f05a4e5 100644 --- a/sdk/storage/storage-file/src/FileClient.ts +++ b/sdk/storage/storage-file/src/FileClient.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as fs from "fs"; -import { HttpRequestBody, HttpResponse, isNode, TransferProgressEvent } from "@azure/ms-rest-js"; +import { HttpRequestBody, HttpResponse, isNode, TransferProgressEvent } from "@azure/core-http"; import { Aborter } from "./Aborter"; import { FileDownloadResponse } from "./FileDownloadResponse"; import * as Models from "./generated/lib/models"; @@ -524,7 +524,7 @@ export class FileClient extends StorageClient { * However, if a file or directory name includes %, file or directory name must be encoded in the URL. * Such as a file named "myfile%", the URL should be "https://myaccount.file.core.windows.net/myshare/mydirectory/myfile%25". * @param {Credential} [credential] Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, AnonymousCredential is used. + * If not specified, AnonymousCredential is used. * @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline. * @memberof FileClient */ @@ -1255,7 +1255,7 @@ export class FileClient extends StorageClient { if (transferProgress + buffer.length > size) { throw new RangeError( `Stream size is larger than file size ${size} bytes, uploading failed. ` + - `Please make sure stream length is less or equal than file size.` + `Please make sure stream length is less or equal than file size.` ); } @@ -1276,11 +1276,11 @@ export class FileClient extends StorageClient { return scheduler.do(); } - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Downloads an Azure Blob to a local file. - * Fails if the the given file path already exits. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob to a local file. + * Fails if the the given file path already exits. * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. * * @param {string} filePath diff --git a/sdk/storage/storage-file/src/FileDownloadResponse.ts b/sdk/storage/storage-file/src/FileDownloadResponse.ts index f57aece3b7fe..05bcafbd1627 100644 --- a/sdk/storage/storage-file/src/FileDownloadResponse.ts +++ b/sdk/storage/storage-file/src/FileDownloadResponse.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { HttpResponse, isNode } from "@azure/ms-rest-js"; +import { HttpResponse, isNode } from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Metadata } from "./models"; import { diff --git a/sdk/storage/storage-file/src/FileServiceClient.ts b/sdk/storage/storage-file/src/FileServiceClient.ts index 24fd3560a750..8fba05d554aa 100644 --- a/sdk/storage/storage-file/src/FileServiceClient.ts +++ b/sdk/storage/storage-file/src/FileServiceClient.ts @@ -175,7 +175,7 @@ export class FileServiceClient extends StorageClient { * "https://myaccount.file.core.windows.net". You can Append a SAS * if using AnonymousCredential, such as "https://myaccount.file.core.windows.net?sasString". * @param {Credential} [credential] Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, AnonymousCredential is used. + * If not specified, AnonymousCredential is used. * @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline. * @memberof FileServiceClient */ @@ -429,7 +429,7 @@ export class FileServiceClient extends StorageClient { }); } }; - } +} /** * Gets the properties of a storage account's File service, including properties for Storage diff --git a/sdk/storage/storage-file/src/LoggingPolicyFactory.ts b/sdk/storage/storage-file/src/LoggingPolicyFactory.ts index 5d6b03bb1e00..03cd588ba5ce 100644 --- a/sdk/storage/storage-file/src/LoggingPolicyFactory.ts +++ b/sdk/storage/storage-file/src/LoggingPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { LoggingPolicy } from "./policies/LoggingPolicy"; /** diff --git a/sdk/storage/storage-file/src/Pipeline.ts b/sdk/storage/storage-file/src/Pipeline.ts index 07d659d7f747..29af8d3d87be 100644 --- a/sdk/storage/storage-file/src/Pipeline.ts +++ b/sdk/storage/storage-file/src/Pipeline.ts @@ -14,8 +14,8 @@ import { RequestPolicyFactory, RequestPolicyOptions, ServiceClientOptions, - WebResource -} from "@azure/ms-rest-js"; + WebResource, +} from "@azure/core-http"; import { BrowserPolicyFactory } from "./BrowserPolicyFactory"; import { Credential } from "./credentials/Credential"; import { LoggingPolicyFactory } from "./LoggingPolicyFactory"; diff --git a/sdk/storage/storage-file/src/RetryPolicyFactory.ts b/sdk/storage/storage-file/src/RetryPolicyFactory.ts index 94b960a7739f..3604674d71c6 100644 --- a/sdk/storage/storage-file/src/RetryPolicyFactory.ts +++ b/sdk/storage/storage-file/src/RetryPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { RetryPolicy, RetryPolicyType } from "./policies/RetryPolicy"; /** diff --git a/sdk/storage/storage-file/src/ShareClient.ts b/sdk/storage/storage-file/src/ShareClient.ts index 4dd4885906bb..f12035df79ba 100644 --- a/sdk/storage/storage-file/src/ShareClient.ts +++ b/sdk/storage/storage-file/src/ShareClient.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { HttpResponse } from "@azure/ms-rest-js"; +import { HttpResponse } from "@azure/core-http"; import { Aborter } from "./Aborter"; import * as Models from "./generated/lib/models"; @@ -225,24 +225,24 @@ export interface SignedIdentifier { export declare type ShareGetAccessPolicyResponse = { signedIdentifiers: SignedIdentifier[]; } & Models.ShareGetAccessPolicyHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { /** - * The underlying HTTP response. + * The parsed HTTP response headers. */ - _response: HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: Models.ShareGetAccessPolicyHeaders; - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Models.SignedIdentifier[]; - }; + parsedHeaders: Models.ShareGetAccessPolicyHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Models.SignedIdentifier[]; }; +}; /** * Options to configure Share - Create Snapshot operation. @@ -304,7 +304,7 @@ export class ShareClient extends StorageClient { * append a SAS if using AnonymousCredential, such as * "https://myaccount.file.core.windows.net/share?sasString". * @param {Credential} [credential] Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, AnonymousCredential is used. + * If not specified, AnonymousCredential is used. * @param {NewPipelineOptions} [options] Optional. Options to configure the HTTP pipeline. * @memberof ShareClient */ diff --git a/sdk/storage/storage-file/src/TelemetryPolicyFactory.ts b/sdk/storage/storage-file/src/TelemetryPolicyFactory.ts index 91786894ff93..e568fdd8801d 100644 --- a/sdk/storage/storage-file/src/TelemetryPolicyFactory.ts +++ b/sdk/storage/storage-file/src/TelemetryPolicyFactory.ts @@ -6,7 +6,7 @@ import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import * as os from "os"; import { TelemetryPolicy } from "./policies/TelemetryPolicy"; diff --git a/sdk/storage/storage-file/src/UniqueRequestIDPolicyFactory.ts b/sdk/storage/storage-file/src/UniqueRequestIDPolicyFactory.ts index 166ca47fb3a6..d5540d8418d3 100644 --- a/sdk/storage/storage-file/src/UniqueRequestIDPolicyFactory.ts +++ b/sdk/storage/storage-file/src/UniqueRequestIDPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { UniqueRequestIDPolicy } from "./policies/UniqueRequestIDPolicy"; diff --git a/sdk/storage/storage-file/src/credentials/AnonymousCredential.ts b/sdk/storage/storage-file/src/credentials/AnonymousCredential.ts index 85f357b28d58..a13ff503bd52 100644 --- a/sdk/storage/storage-file/src/credentials/AnonymousCredential.ts +++ b/sdk/storage/storage-file/src/credentials/AnonymousCredential.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions } from "@azure/core-http"; import { AnonymousCredentialPolicy } from "../policies/AnonymousCredentialPolicy"; import { Credential } from "./Credential"; diff --git a/sdk/storage/storage-file/src/credentials/Credential.ts b/sdk/storage/storage-file/src/credentials/Credential.ts index 1150f504dc4d..7a201480194a 100644 --- a/sdk/storage/storage-file/src/credentials/Credential.ts +++ b/sdk/storage/storage-file/src/credentials/Credential.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { CredentialPolicy } from "../policies/CredentialPolicy"; /** diff --git a/sdk/storage/storage-file/src/credentials/SharedKeyCredential.ts b/sdk/storage/storage-file/src/credentials/SharedKeyCredential.ts index 52ff7dfd09ab..88f8739bea47 100644 --- a/sdk/storage/storage-file/src/credentials/SharedKeyCredential.ts +++ b/sdk/storage/storage-file/src/credentials/SharedKeyCredential.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as Crypto from "crypto"; -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions } from "@azure/core-http"; import { SharedKeyCredentialPolicy } from "../policies/SharedKeyCredentialPolicy"; import { Credential } from "./Credential"; diff --git a/sdk/storage/storage-file/src/generated/lib/models/directoryMappers.ts b/sdk/storage/storage-file/src/generated/lib/models/directoryMappers.ts index 8145ca9fb9ca..15e7e8c122a9 100644 --- a/sdk/storage/storage-file/src/generated/lib/models/directoryMappers.ts +++ b/sdk/storage/storage-file/src/generated/lib/models/directoryMappers.ts @@ -1,24 +1,21 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { DirectoryCreateHeaders, - StorageError, - DirectoryGetPropertiesHeaders, DirectoryDeleteHeaders, - DirectorySetMetadataHeaders, - ListFilesAndDirectoriesSegmentResponse, - FilesAndDirectoriesListSegment, + DirectoryGetPropertiesHeaders, DirectoryItem, + DirectoryListFilesAndDirectoriesSegmentHeaders, + DirectorySetMetadataHeaders, FileItem, FileProperty, - DirectoryListFilesAndDirectoriesSegmentHeaders + FilesAndDirectoriesListSegment, + ListFilesAndDirectoriesSegmentResponse, + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-file/src/generated/lib/models/fileMappers.ts b/sdk/storage/storage-file/src/generated/lib/models/fileMappers.ts index 237eec5d71db..c5e7f30ffe93 100644 --- a/sdk/storage/storage-file/src/generated/lib/models/fileMappers.ts +++ b/sdk/storage/storage-file/src/generated/lib/models/fileMappers.ts @@ -1,25 +1,22 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + FileAbortCopyHeaders, FileCreateHeaders, - StorageError, + FileDeleteHeaders, FileDownloadHeaders, FileGetPropertiesHeaders, - FileDeleteHeaders, + FileGetRangeListHeaders, FileSetHTTPHeadersHeaders, FileSetMetadataHeaders, + FileStartCopyHeaders, FileUploadRangeHeaders, Range, - FileGetRangeListHeaders, - FileStartCopyHeaders, - FileAbortCopyHeaders + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-file/src/generated/lib/models/index.ts b/sdk/storage/storage-file/src/generated/lib/models/index.ts index 64a0b8e8e73e..e1384a35bae2 100644 --- a/sdk/storage/storage-file/src/generated/lib/models/index.ts +++ b/sdk/storage/storage-file/src/generated/lib/models/index.ts @@ -7,7 +7,7 @@ */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; /** * An Access policy. @@ -250,7 +250,7 @@ export interface StorageServiceProperties { /** * Optional Parameters. */ -export interface ServiceSetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface ServiceSetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -262,7 +262,7 @@ export interface ServiceSetPropertiesOptionalParams extends msRest.RequestOption /** * Optional Parameters. */ -export interface ServiceGetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface ServiceGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -274,7 +274,7 @@ export interface ServiceGetPropertiesOptionalParams extends msRest.RequestOption /** * Optional Parameters. */ -export interface ServiceListSharesSegmentOptionalParams extends msRest.RequestOptionsBase { +export interface ServiceListSharesSegmentOptionalParams extends coreHttp.RequestOptionsBase { /** * Filters the results to return only entries whose name begins with the specified prefix. */ @@ -306,7 +306,7 @@ export interface ServiceListSharesSegmentOptionalParams extends msRest.RequestOp /** * Optional Parameters. */ -export interface ShareCreateOptionalParams extends msRest.RequestOptionsBase { +export interface ShareCreateOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -326,7 +326,7 @@ export interface ShareCreateOptionalParams extends msRest.RequestOptionsBase { /** * Optional Parameters. */ -export interface ShareGetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface ShareGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** * The snapshot parameter is an opaque DateTime value that, when present, specifies the share * snapshot to query. @@ -343,7 +343,7 @@ export interface ShareGetPropertiesOptionalParams extends msRest.RequestOptionsB /** * Optional Parameters. */ -export interface ShareDeleteMethodOptionalParams extends msRest.RequestOptionsBase { +export interface ShareDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { /** * The snapshot parameter is an opaque DateTime value that, when present, specifies the share * snapshot to query. @@ -365,7 +365,7 @@ export interface ShareDeleteMethodOptionalParams extends msRest.RequestOptionsBa /** * Optional Parameters. */ -export interface ShareCreateSnapshotOptionalParams extends msRest.RequestOptionsBase { +export interface ShareCreateSnapshotOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -381,7 +381,7 @@ export interface ShareCreateSnapshotOptionalParams extends msRest.RequestOptions /** * Optional Parameters. */ -export interface ShareSetQuotaOptionalParams extends msRest.RequestOptionsBase { +export interface ShareSetQuotaOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -397,7 +397,7 @@ export interface ShareSetQuotaOptionalParams extends msRest.RequestOptionsBase { /** * Optional Parameters. */ -export interface ShareSetMetadataOptionalParams extends msRest.RequestOptionsBase { +export interface ShareSetMetadataOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -413,7 +413,7 @@ export interface ShareSetMetadataOptionalParams extends msRest.RequestOptionsBas /** * Optional Parameters. */ -export interface ShareGetAccessPolicyOptionalParams extends msRest.RequestOptionsBase { +export interface ShareGetAccessPolicyOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -425,7 +425,7 @@ export interface ShareGetAccessPolicyOptionalParams extends msRest.RequestOption /** * Optional Parameters. */ -export interface ShareSetAccessPolicyOptionalParams extends msRest.RequestOptionsBase { +export interface ShareSetAccessPolicyOptionalParams extends coreHttp.RequestOptionsBase { /** * The ACL for the share. */ @@ -441,7 +441,7 @@ export interface ShareSetAccessPolicyOptionalParams extends msRest.RequestOption /** * Optional Parameters. */ -export interface ShareGetStatisticsOptionalParams extends msRest.RequestOptionsBase { +export interface ShareGetStatisticsOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -453,7 +453,7 @@ export interface ShareGetStatisticsOptionalParams extends msRest.RequestOptionsB /** * Optional Parameters. */ -export interface DirectoryCreateOptionalParams extends msRest.RequestOptionsBase { +export interface DirectoryCreateOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -469,7 +469,7 @@ export interface DirectoryCreateOptionalParams extends msRest.RequestOptionsBase /** * Optional Parameters. */ -export interface DirectoryGetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface DirectoryGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** * The snapshot parameter is an opaque DateTime value that, when present, specifies the share * snapshot to query. @@ -486,7 +486,7 @@ export interface DirectoryGetPropertiesOptionalParams extends msRest.RequestOpti /** * Optional Parameters. */ -export interface DirectoryDeleteMethodOptionalParams extends msRest.RequestOptionsBase { +export interface DirectoryDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -498,7 +498,7 @@ export interface DirectoryDeleteMethodOptionalParams extends msRest.RequestOptio /** * Optional Parameters. */ -export interface DirectorySetMetadataOptionalParams extends msRest.RequestOptionsBase { +export interface DirectorySetMetadataOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -514,7 +514,7 @@ export interface DirectorySetMetadataOptionalParams extends msRest.RequestOption /** * Optional Parameters. */ -export interface DirectoryListFilesAndDirectoriesSegmentOptionalParams extends msRest.RequestOptionsBase { +export interface DirectoryListFilesAndDirectoriesSegmentOptionalParams extends coreHttp.RequestOptionsBase { /** * Filters the results to return only entries whose name begins with the specified prefix. */ @@ -547,7 +547,7 @@ export interface DirectoryListFilesAndDirectoriesSegmentOptionalParams extends m /** * Optional Parameters. */ -export interface FileCreateOptionalParams extends msRest.RequestOptionsBase { +export interface FileCreateOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -588,7 +588,7 @@ export interface FileCreateOptionalParams extends msRest.RequestOptionsBase { /** * Optional Parameters. */ -export interface FileDownloadOptionalParams extends msRest.RequestOptionsBase { +export interface FileDownloadOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -610,7 +610,7 @@ export interface FileDownloadOptionalParams extends msRest.RequestOptionsBase { /** * Optional Parameters. */ -export interface FileGetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface FileGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** * The snapshot parameter is an opaque DateTime value that, when present, specifies the share * snapshot to query. @@ -627,7 +627,7 @@ export interface FileGetPropertiesOptionalParams extends msRest.RequestOptionsBa /** * Optional Parameters. */ -export interface FileDeleteMethodOptionalParams extends msRest.RequestOptionsBase { +export interface FileDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -639,7 +639,7 @@ export interface FileDeleteMethodOptionalParams extends msRest.RequestOptionsBas /** * Optional Parameters. */ -export interface FileSetHTTPHeadersOptionalParams extends msRest.RequestOptionsBase { +export interface FileSetHTTPHeadersOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -681,7 +681,7 @@ export interface FileSetHTTPHeadersOptionalParams extends msRest.RequestOptionsB /** * Optional Parameters. */ -export interface FileSetMetadataOptionalParams extends msRest.RequestOptionsBase { +export interface FileSetMetadataOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -697,11 +697,11 @@ export interface FileSetMetadataOptionalParams extends msRest.RequestOptionsBase /** * Optional Parameters. */ -export interface FileUploadRangeOptionalParams extends msRest.RequestOptionsBase { +export interface FileUploadRangeOptionalParams extends coreHttp.RequestOptionsBase { /** * Initial data. */ - optionalbody?: msRest.HttpRequestBody; + optionalbody?: coreHttp.HttpRequestBody; /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -720,7 +720,7 @@ export interface FileUploadRangeOptionalParams extends msRest.RequestOptionsBase /** * Optional Parameters. */ -export interface FileGetRangeListOptionalParams extends msRest.RequestOptionsBase { +export interface FileGetRangeListOptionalParams extends coreHttp.RequestOptionsBase { /** * The snapshot parameter is an opaque DateTime value that, when present, specifies the share * snapshot to query. @@ -741,7 +741,7 @@ export interface FileGetRangeListOptionalParams extends msRest.RequestOptionsBas /** * Optional Parameters. */ -export interface FileStartCopyOptionalParams extends msRest.RequestOptionsBase { +export interface FileStartCopyOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -757,7 +757,7 @@ export interface FileStartCopyOptionalParams extends msRest.RequestOptionsBase { /** * Optional Parameters. */ -export interface FileAbortCopyOptionalParams extends msRest.RequestOptionsBase { +export interface FileAbortCopyOptionalParams extends coreHttp.RequestOptionsBase { /** * The timeout parameter is expressed in seconds. For more information, see Setting @@ -1735,6 +1735,29 @@ export interface FileAbortCopyHeaders { errorCode?: string; } +/** + * Defines values for StorageErrorCode. + * Possible values include: 'AccountAlreadyExists', 'AccountBeingCreated', 'AccountIsDisabled', + * 'AuthenticationFailed', 'AuthorizationFailure', 'ConditionHeadersNotSupported', + * 'ConditionNotMet', 'EmptyMetadataKey', 'InsufficientAccountPermissions', 'InternalError', + * 'InvalidAuthenticationInfo', 'InvalidHeaderValue', 'InvalidHttpVerb', 'InvalidInput', + * 'InvalidMd5', 'InvalidMetadata', 'InvalidQueryParameterValue', 'InvalidRange', + * 'InvalidResourceName', 'InvalidUri', 'InvalidXmlDocument', 'InvalidXmlNodeValue', 'Md5Mismatch', + * 'MetadataTooLarge', 'MissingContentLengthHeader', 'MissingRequiredQueryParameter', + * 'MissingRequiredHeader', 'MissingRequiredXmlNode', 'MultipleConditionHeadersNotSupported', + * 'OperationTimedOut', 'OutOfRangeInput', 'OutOfRangeQueryParameterValue', 'RequestBodyTooLarge', + * 'ResourceTypeMismatch', 'RequestUrlFailedToParse', 'ResourceAlreadyExists', 'ResourceNotFound', + * 'ServerBusy', 'UnsupportedHeader', 'UnsupportedXmlNode', 'UnsupportedQueryParameter', + * 'UnsupportedHttpVerb', 'CannotDeleteFileOrDirectory', 'ClientCacheFlushDelay', 'DeletePending', + * 'DirectoryNotEmpty', 'FileLockConflict', 'InvalidFileOrDirectoryPathName', 'ParentNotFound', + * 'ReadOnlyAttribute', 'ShareAlreadyExists', 'ShareBeingDeleted', 'ShareDisabled', + * 'ShareNotFound', 'SharingViolation', 'ShareSnapshotInProgress', 'ShareSnapshotCountExceeded', + * 'ShareSnapshotOperationNotSupported', 'ShareHasSnapshots', 'ContainerQuotaDowngradeNotAllowed' + * @readonly + * @enum {string} + */ +export type StorageErrorCode = 'AccountAlreadyExists' | 'AccountBeingCreated' | 'AccountIsDisabled' | 'AuthenticationFailed' | 'AuthorizationFailure' | 'ConditionHeadersNotSupported' | 'ConditionNotMet' | 'EmptyMetadataKey' | 'InsufficientAccountPermissions' | 'InternalError' | 'InvalidAuthenticationInfo' | 'InvalidHeaderValue' | 'InvalidHttpVerb' | 'InvalidInput' | 'InvalidMd5' | 'InvalidMetadata' | 'InvalidQueryParameterValue' | 'InvalidRange' | 'InvalidResourceName' | 'InvalidUri' | 'InvalidXmlDocument' | 'InvalidXmlNodeValue' | 'Md5Mismatch' | 'MetadataTooLarge' | 'MissingContentLengthHeader' | 'MissingRequiredQueryParameter' | 'MissingRequiredHeader' | 'MissingRequiredXmlNode' | 'MultipleConditionHeadersNotSupported' | 'OperationTimedOut' | 'OutOfRangeInput' | 'OutOfRangeQueryParameterValue' | 'RequestBodyTooLarge' | 'ResourceTypeMismatch' | 'RequestUrlFailedToParse' | 'ResourceAlreadyExists' | 'ResourceNotFound' | 'ServerBusy' | 'UnsupportedHeader' | 'UnsupportedXmlNode' | 'UnsupportedQueryParameter' | 'UnsupportedHttpVerb' | 'CannotDeleteFileOrDirectory' | 'ClientCacheFlushDelay' | 'DeletePending' | 'DirectoryNotEmpty' | 'FileLockConflict' | 'InvalidFileOrDirectoryPathName' | 'ParentNotFound' | 'ReadOnlyAttribute' | 'ShareAlreadyExists' | 'ShareBeingDeleted' | 'ShareDisabled' | 'ShareNotFound' | 'SharingViolation' | 'ShareSnapshotInProgress' | 'ShareSnapshotCountExceeded' | 'ShareSnapshotOperationNotSupported' | 'ShareHasSnapshots' | 'ContainerQuotaDowngradeNotAllowed'; + /** * Defines values for DeleteSnapshotsOptionType. * Possible values include: 'include' @@ -1782,7 +1805,7 @@ export type ServiceSetPropertiesResponse = ServiceSetPropertiesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1797,7 +1820,7 @@ export type ServiceGetPropertiesResponse = StorageServiceProperties & ServiceGet /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1822,7 +1845,7 @@ export type ServiceListSharesSegmentResponse = ListSharesResponse & ServiceListS /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1847,7 +1870,7 @@ export type ShareCreateResponse = ShareCreateHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1862,7 +1885,7 @@ export type ShareGetPropertiesResponse = ShareGetPropertiesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1877,7 +1900,7 @@ export type ShareDeleteResponse = ShareDeleteHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1892,7 +1915,7 @@ export type ShareCreateSnapshotResponse = ShareCreateSnapshotHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1907,7 +1930,7 @@ export type ShareSetQuotaResponse = ShareSetQuotaHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1922,7 +1945,7 @@ export type ShareSetMetadataResponse = ShareSetMetadataHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1937,7 +1960,7 @@ export type ShareGetAccessPolicyResponse = Array & ShareGetAcc /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1962,7 +1985,7 @@ export type ShareSetAccessPolicyResponse = ShareSetAccessPolicyHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1977,7 +2000,7 @@ export type ShareGetStatisticsResponse = ShareStats & ShareGetStatisticsHeaders /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2002,7 +2025,7 @@ export type DirectoryCreateResponse = DirectoryCreateHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2017,7 +2040,7 @@ export type DirectoryGetPropertiesResponse = DirectoryGetPropertiesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2032,7 +2055,7 @@ export type DirectoryDeleteResponse = DirectoryDeleteHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2047,7 +2070,7 @@ export type DirectorySetMetadataResponse = DirectorySetMetadataHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2062,7 +2085,7 @@ export type DirectoryListFilesAndDirectoriesSegmentResponse = ListFilesAndDirect /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2087,7 +2110,7 @@ export type FileCreateResponse = FileCreateHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2118,7 +2141,7 @@ export type FileDownloadResponse = FileDownloadHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2133,7 +2156,7 @@ export type FileGetPropertiesResponse = FileGetPropertiesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2148,7 +2171,7 @@ export type FileDeleteResponse = FileDeleteHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2163,7 +2186,7 @@ export type FileSetHTTPHeadersResponse = FileSetHTTPHeadersHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2178,7 +2201,7 @@ export type FileSetMetadataResponse = FileSetMetadataHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2193,7 +2216,7 @@ export type FileUploadRangeResponse = FileUploadRangeHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2208,7 +2231,7 @@ export type FileGetRangeListResponse = Array & FileGetRangeListHeaders & /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2233,7 +2256,7 @@ export type FileStartCopyResponse = FileStartCopyHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -2248,7 +2271,7 @@ export type FileAbortCopyResponse = FileAbortCopyHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ diff --git a/sdk/storage/storage-file/src/generated/lib/models/mappers.ts b/sdk/storage/storage-file/src/generated/lib/models/mappers.ts index 03e4fbbe6902..28ae69a3f06d 100644 --- a/sdk/storage/storage-file/src/generated/lib/models/mappers.ts +++ b/sdk/storage/storage-file/src/generated/lib/models/mappers.ts @@ -1,17 +1,15 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; -export const AccessPolicy: msRest.CompositeMapper = { +export const AccessPolicy: coreHttp.CompositeMapper = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -42,7 +40,7 @@ export const AccessPolicy: msRest.CompositeMapper = { } }; -export const CorsRule: msRest.CompositeMapper = { +export const CorsRule: coreHttp.CompositeMapper = { serializedName: "CorsRule", type: { name: "Composite", @@ -95,7 +93,7 @@ export const CorsRule: msRest.CompositeMapper = { } }; -export const DirectoryItem: msRest.CompositeMapper = { +export const DirectoryItem: coreHttp.CompositeMapper = { xmlName: "Directory", serializedName: "DirectoryItem", type: { @@ -114,7 +112,7 @@ export const DirectoryItem: msRest.CompositeMapper = { } }; -export const FileProperty: msRest.CompositeMapper = { +export const FileProperty: coreHttp.CompositeMapper = { serializedName: "FileProperty", type: { name: "Composite", @@ -132,7 +130,7 @@ export const FileProperty: msRest.CompositeMapper = { } }; -export const FileItem: msRest.CompositeMapper = { +export const FileItem: coreHttp.CompositeMapper = { xmlName: "File", serializedName: "FileItem", type: { @@ -160,7 +158,7 @@ export const FileItem: msRest.CompositeMapper = { } }; -export const FilesAndDirectoriesListSegment: msRest.CompositeMapper = { +export const FilesAndDirectoriesListSegment: coreHttp.CompositeMapper = { xmlName: "Entries", serializedName: "FilesAndDirectoriesListSegment", type: { @@ -201,7 +199,7 @@ export const FilesAndDirectoriesListSegment: msRest.CompositeMapper = { } }; -export const ListFilesAndDirectoriesSegmentResponse: msRest.CompositeMapper = { +export const ListFilesAndDirectoriesSegmentResponse: coreHttp.CompositeMapper = { xmlName: "EnumerationResults", serializedName: "ListFilesAndDirectoriesSegmentResponse", type: { @@ -286,7 +284,7 @@ export const ListFilesAndDirectoriesSegmentResponse: msRest.CompositeMapper = { } }; -export const ShareProperties: msRest.CompositeMapper = { +export const ShareProperties: coreHttp.CompositeMapper = { serializedName: "ShareProperties", type: { name: "Composite", @@ -320,7 +318,7 @@ export const ShareProperties: msRest.CompositeMapper = { } }; -export const ShareItem: msRest.CompositeMapper = { +export const ShareItem: coreHttp.CompositeMapper = { xmlName: "Share", serializedName: "ShareItem", type: { @@ -367,7 +365,7 @@ export const ShareItem: msRest.CompositeMapper = { } }; -export const ListSharesResponse: msRest.CompositeMapper = { +export const ListSharesResponse: coreHttp.CompositeMapper = { xmlName: "EnumerationResults", serializedName: "ListSharesResponse", type: { @@ -431,7 +429,7 @@ export const ListSharesResponse: msRest.CompositeMapper = { } }; -export const RetentionPolicy: msRest.CompositeMapper = { +export const RetentionPolicy: coreHttp.CompositeMapper = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -460,7 +458,7 @@ export const RetentionPolicy: msRest.CompositeMapper = { } }; -export const Metrics: msRest.CompositeMapper = { +export const Metrics: coreHttp.CompositeMapper = { serializedName: "Metrics", type: { name: "Composite", @@ -501,7 +499,7 @@ export const Metrics: msRest.CompositeMapper = { } }; -export const Range: msRest.CompositeMapper = { +export const Range: coreHttp.CompositeMapper = { serializedName: "Range", type: { name: "Composite", @@ -527,7 +525,7 @@ export const Range: msRest.CompositeMapper = { } }; -export const StorageError: msRest.CompositeMapper = { +export const StorageError: coreHttp.CompositeMapper = { serializedName: "StorageError", type: { name: "Composite", @@ -544,7 +542,7 @@ export const StorageError: msRest.CompositeMapper = { } }; -export const ShareStats: msRest.CompositeMapper = { +export const ShareStats: coreHttp.CompositeMapper = { serializedName: "ShareStats", type: { name: "Composite", @@ -562,7 +560,7 @@ export const ShareStats: msRest.CompositeMapper = { } }; -export const SignedIdentifier: msRest.CompositeMapper = { +export const SignedIdentifier: coreHttp.CompositeMapper = { serializedName: "SignedIdentifier", type: { name: "Composite", @@ -588,7 +586,7 @@ export const SignedIdentifier: msRest.CompositeMapper = { } }; -export const StorageServiceProperties: msRest.CompositeMapper = { +export const StorageServiceProperties: coreHttp.CompositeMapper = { serializedName: "StorageServiceProperties", type: { name: "Composite", @@ -629,7 +627,7 @@ export const StorageServiceProperties: msRest.CompositeMapper = { } }; -export const ServiceSetPropertiesHeaders: msRest.CompositeMapper = { +export const ServiceSetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "service-setproperties-headers", type: { name: "Composite", @@ -657,7 +655,7 @@ export const ServiceSetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const ServiceGetPropertiesHeaders: msRest.CompositeMapper = { +export const ServiceGetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "service-getproperties-headers", type: { name: "Composite", @@ -685,7 +683,7 @@ export const ServiceGetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const ServiceListSharesSegmentHeaders: msRest.CompositeMapper = { +export const ServiceListSharesSegmentHeaders: coreHttp.CompositeMapper = { serializedName: "service-listsharessegment-headers", type: { name: "Composite", @@ -713,7 +711,7 @@ export const ServiceListSharesSegmentHeaders: msRest.CompositeMapper = { } }; -export const ShareCreateHeaders: msRest.CompositeMapper = { +export const ShareCreateHeaders: coreHttp.CompositeMapper = { serializedName: "share-create-headers", type: { name: "Composite", @@ -759,7 +757,7 @@ export const ShareCreateHeaders: msRest.CompositeMapper = { } }; -export const ShareGetPropertiesHeaders: msRest.CompositeMapper = { +export const ShareGetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "share-getproperties-headers", type: { name: "Composite", @@ -823,7 +821,7 @@ export const ShareGetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const ShareDeleteHeaders: msRest.CompositeMapper = { +export const ShareDeleteHeaders: coreHttp.CompositeMapper = { serializedName: "share-delete-headers", type: { name: "Composite", @@ -857,7 +855,7 @@ export const ShareDeleteHeaders: msRest.CompositeMapper = { } }; -export const ShareCreateSnapshotHeaders: msRest.CompositeMapper = { +export const ShareCreateSnapshotHeaders: coreHttp.CompositeMapper = { serializedName: "share-createsnapshot-headers", type: { name: "Composite", @@ -909,7 +907,7 @@ export const ShareCreateSnapshotHeaders: msRest.CompositeMapper = { } }; -export const ShareSetQuotaHeaders: msRest.CompositeMapper = { +export const ShareSetQuotaHeaders: coreHttp.CompositeMapper = { serializedName: "share-setquota-headers", type: { name: "Composite", @@ -955,7 +953,7 @@ export const ShareSetQuotaHeaders: msRest.CompositeMapper = { } }; -export const ShareSetMetadataHeaders: msRest.CompositeMapper = { +export const ShareSetMetadataHeaders: coreHttp.CompositeMapper = { serializedName: "share-setmetadata-headers", type: { name: "Composite", @@ -1001,7 +999,7 @@ export const ShareSetMetadataHeaders: msRest.CompositeMapper = { } }; -export const ShareGetAccessPolicyHeaders: msRest.CompositeMapper = { +export const ShareGetAccessPolicyHeaders: coreHttp.CompositeMapper = { serializedName: "share-getaccesspolicy-headers", type: { name: "Composite", @@ -1047,7 +1045,7 @@ export const ShareGetAccessPolicyHeaders: msRest.CompositeMapper = { } }; -export const ShareSetAccessPolicyHeaders: msRest.CompositeMapper = { +export const ShareSetAccessPolicyHeaders: coreHttp.CompositeMapper = { serializedName: "share-setaccesspolicy-headers", type: { name: "Composite", @@ -1093,7 +1091,7 @@ export const ShareSetAccessPolicyHeaders: msRest.CompositeMapper = { } }; -export const ShareGetStatisticsHeaders: msRest.CompositeMapper = { +export const ShareGetStatisticsHeaders: coreHttp.CompositeMapper = { serializedName: "share-getstatistics-headers", type: { name: "Composite", @@ -1139,7 +1137,7 @@ export const ShareGetStatisticsHeaders: msRest.CompositeMapper = { } }; -export const DirectoryCreateHeaders: msRest.CompositeMapper = { +export const DirectoryCreateHeaders: coreHttp.CompositeMapper = { serializedName: "directory-create-headers", type: { name: "Composite", @@ -1191,7 +1189,7 @@ export const DirectoryCreateHeaders: msRest.CompositeMapper = { } }; -export const DirectoryGetPropertiesHeaders: msRest.CompositeMapper = { +export const DirectoryGetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "directory-getproperties-headers", type: { name: "Composite", @@ -1255,7 +1253,7 @@ export const DirectoryGetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const DirectoryDeleteHeaders: msRest.CompositeMapper = { +export const DirectoryDeleteHeaders: coreHttp.CompositeMapper = { serializedName: "directory-delete-headers", type: { name: "Composite", @@ -1289,7 +1287,7 @@ export const DirectoryDeleteHeaders: msRest.CompositeMapper = { } }; -export const DirectorySetMetadataHeaders: msRest.CompositeMapper = { +export const DirectorySetMetadataHeaders: coreHttp.CompositeMapper = { serializedName: "directory-setmetadata-headers", type: { name: "Composite", @@ -1335,7 +1333,7 @@ export const DirectorySetMetadataHeaders: msRest.CompositeMapper = { } }; -export const DirectoryListFilesAndDirectoriesSegmentHeaders: msRest.CompositeMapper = { +export const DirectoryListFilesAndDirectoriesSegmentHeaders: coreHttp.CompositeMapper = { serializedName: "directory-listfilesanddirectoriessegment-headers", type: { name: "Composite", @@ -1375,7 +1373,7 @@ export const DirectoryListFilesAndDirectoriesSegmentHeaders: msRest.CompositeMap } }; -export const FileCreateHeaders: msRest.CompositeMapper = { +export const FileCreateHeaders: coreHttp.CompositeMapper = { serializedName: "file-create-headers", type: { name: "Composite", @@ -1427,7 +1425,7 @@ export const FileCreateHeaders: msRest.CompositeMapper = { } }; -export const FileDownloadHeaders: msRest.CompositeMapper = { +export const FileDownloadHeaders: coreHttp.CompositeMapper = { serializedName: "file-download-headers", type: { name: "Composite", @@ -1593,7 +1591,7 @@ export const FileDownloadHeaders: msRest.CompositeMapper = { } }; -export const FileGetPropertiesHeaders: msRest.CompositeMapper = { +export const FileGetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "file-getproperties-headers", type: { name: "Composite", @@ -1747,7 +1745,7 @@ export const FileGetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const FileDeleteHeaders: msRest.CompositeMapper = { +export const FileDeleteHeaders: coreHttp.CompositeMapper = { serializedName: "file-delete-headers", type: { name: "Composite", @@ -1781,7 +1779,7 @@ export const FileDeleteHeaders: msRest.CompositeMapper = { } }; -export const FileSetHTTPHeadersHeaders: msRest.CompositeMapper = { +export const FileSetHTTPHeadersHeaders: coreHttp.CompositeMapper = { serializedName: "file-sethttpheaders-headers", type: { name: "Composite", @@ -1833,7 +1831,7 @@ export const FileSetHTTPHeadersHeaders: msRest.CompositeMapper = { } }; -export const FileSetMetadataHeaders: msRest.CompositeMapper = { +export const FileSetMetadataHeaders: coreHttp.CompositeMapper = { serializedName: "file-setmetadata-headers", type: { name: "Composite", @@ -1879,7 +1877,7 @@ export const FileSetMetadataHeaders: msRest.CompositeMapper = { } }; -export const FileUploadRangeHeaders: msRest.CompositeMapper = { +export const FileUploadRangeHeaders: coreHttp.CompositeMapper = { serializedName: "file-uploadrange-headers", type: { name: "Composite", @@ -1937,7 +1935,7 @@ export const FileUploadRangeHeaders: msRest.CompositeMapper = { } }; -export const FileGetRangeListHeaders: msRest.CompositeMapper = { +export const FileGetRangeListHeaders: coreHttp.CompositeMapper = { serializedName: "file-getrangelist-headers", type: { name: "Composite", @@ -1989,7 +1987,7 @@ export const FileGetRangeListHeaders: msRest.CompositeMapper = { } }; -export const FileStartCopyHeaders: msRest.CompositeMapper = { +export const FileStartCopyHeaders: coreHttp.CompositeMapper = { serializedName: "file-startcopy-headers", type: { name: "Composite", @@ -2053,7 +2051,7 @@ export const FileStartCopyHeaders: msRest.CompositeMapper = { } }; -export const FileAbortCopyHeaders: msRest.CompositeMapper = { +export const FileAbortCopyHeaders: coreHttp.CompositeMapper = { serializedName: "file-abortcopy-headers", type: { name: "Composite", diff --git a/sdk/storage/storage-file/src/generated/lib/models/parameters.ts b/sdk/storage/storage-file/src/generated/lib/models/parameters.ts index dd31473cc7b7..0d42dc06cf6a 100644 --- a/sdk/storage/storage-file/src/generated/lib/models/parameters.ts +++ b/sdk/storage/storage-file/src/generated/lib/models/parameters.ts @@ -8,9 +8,9 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; -export const comp0: msRest.OperationQueryParameter = { +export const comp0: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -22,7 +22,7 @@ export const comp0: msRest.OperationQueryParameter = { } } }; -export const comp1: msRest.OperationQueryParameter = { +export const comp1: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -34,7 +34,7 @@ export const comp1: msRest.OperationQueryParameter = { } } }; -export const comp2: msRest.OperationQueryParameter = { +export const comp2: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -46,7 +46,7 @@ export const comp2: msRest.OperationQueryParameter = { } } }; -export const comp3: msRest.OperationQueryParameter = { +export const comp3: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -58,7 +58,7 @@ export const comp3: msRest.OperationQueryParameter = { } } }; -export const comp4: msRest.OperationQueryParameter = { +export const comp4: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -70,7 +70,7 @@ export const comp4: msRest.OperationQueryParameter = { } } }; -export const comp5: msRest.OperationQueryParameter = { +export const comp5: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -82,7 +82,7 @@ export const comp5: msRest.OperationQueryParameter = { } } }; -export const comp6: msRest.OperationQueryParameter = { +export const comp6: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -94,7 +94,7 @@ export const comp6: msRest.OperationQueryParameter = { } } }; -export const comp7: msRest.OperationQueryParameter = { +export const comp7: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -106,7 +106,7 @@ export const comp7: msRest.OperationQueryParameter = { } } }; -export const comp8: msRest.OperationQueryParameter = { +export const comp8: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -118,7 +118,7 @@ export const comp8: msRest.OperationQueryParameter = { } } }; -export const contentLength: msRest.OperationParameter = { +export const contentLength: coreHttp.OperationParameter = { parameterPath: "contentLength", mapper: { required: true, @@ -128,7 +128,7 @@ export const contentLength: msRest.OperationParameter = { } } }; -export const contentMD5: msRest.OperationParameter = { +export const contentMD5: coreHttp.OperationParameter = { parameterPath: [ "options", "contentMD5" @@ -140,7 +140,7 @@ export const contentMD5: msRest.OperationParameter = { } } }; -export const copyActionAbortConstant: msRest.OperationParameter = { +export const copyActionAbortConstant: coreHttp.OperationParameter = { parameterPath: "copyActionAbortConstant", mapper: { required: true, @@ -152,7 +152,7 @@ export const copyActionAbortConstant: msRest.OperationParameter = { } } }; -export const copyId: msRest.OperationQueryParameter = { +export const copyId: coreHttp.OperationQueryParameter = { parameterPath: "copyId", mapper: { required: true, @@ -162,7 +162,7 @@ export const copyId: msRest.OperationQueryParameter = { } } }; -export const copySource: msRest.OperationParameter = { +export const copySource: coreHttp.OperationParameter = { parameterPath: "copySource", mapper: { required: true, @@ -172,7 +172,7 @@ export const copySource: msRest.OperationParameter = { } } }; -export const deleteSnapshots: msRest.OperationParameter = { +export const deleteSnapshots: coreHttp.OperationParameter = { parameterPath: [ "options", "deleteSnapshots" @@ -187,7 +187,7 @@ export const deleteSnapshots: msRest.OperationParameter = { } } }; -export const fileCacheControl: msRest.OperationParameter = { +export const fileCacheControl: coreHttp.OperationParameter = { parameterPath: [ "options", "fileCacheControl" @@ -199,7 +199,7 @@ export const fileCacheControl: msRest.OperationParameter = { } } }; -export const fileContentDisposition: msRest.OperationParameter = { +export const fileContentDisposition: coreHttp.OperationParameter = { parameterPath: [ "options", "fileContentDisposition" @@ -211,7 +211,7 @@ export const fileContentDisposition: msRest.OperationParameter = { } } }; -export const fileContentEncoding: msRest.OperationParameter = { +export const fileContentEncoding: coreHttp.OperationParameter = { parameterPath: [ "options", "fileContentEncoding" @@ -223,7 +223,7 @@ export const fileContentEncoding: msRest.OperationParameter = { } } }; -export const fileContentLanguage: msRest.OperationParameter = { +export const fileContentLanguage: coreHttp.OperationParameter = { parameterPath: [ "options", "fileContentLanguage" @@ -235,7 +235,7 @@ export const fileContentLanguage: msRest.OperationParameter = { } } }; -export const fileContentLength0: msRest.OperationParameter = { +export const fileContentLength0: coreHttp.OperationParameter = { parameterPath: "fileContentLength", mapper: { required: true, @@ -245,7 +245,7 @@ export const fileContentLength0: msRest.OperationParameter = { } } }; -export const fileContentLength1: msRest.OperationParameter = { +export const fileContentLength1: coreHttp.OperationParameter = { parameterPath: [ "options", "fileContentLength" @@ -257,7 +257,7 @@ export const fileContentLength1: msRest.OperationParameter = { } } }; -export const fileContentMD5: msRest.OperationParameter = { +export const fileContentMD5: coreHttp.OperationParameter = { parameterPath: [ "options", "fileContentMD5" @@ -269,7 +269,7 @@ export const fileContentMD5: msRest.OperationParameter = { } } }; -export const fileContentType: msRest.OperationParameter = { +export const fileContentType: coreHttp.OperationParameter = { parameterPath: [ "options", "fileContentType" @@ -281,7 +281,7 @@ export const fileContentType: msRest.OperationParameter = { } } }; -export const fileRangeWrite: msRest.OperationParameter = { +export const fileRangeWrite: coreHttp.OperationParameter = { parameterPath: "fileRangeWrite", mapper: { required: true, @@ -296,7 +296,7 @@ export const fileRangeWrite: msRest.OperationParameter = { } } }; -export const fileTypeConstant: msRest.OperationParameter = { +export const fileTypeConstant: coreHttp.OperationParameter = { parameterPath: "fileTypeConstant", mapper: { required: true, @@ -308,7 +308,7 @@ export const fileTypeConstant: msRest.OperationParameter = { } } }; -export const include: msRest.OperationQueryParameter = { +export const include: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "include" @@ -328,9 +328,9 @@ export const include: msRest.OperationQueryParameter = { } } }, - collectionFormat: msRest.QueryCollectionFormat.Csv + collectionFormat: coreHttp.QueryCollectionFormat.Csv }; -export const marker: msRest.OperationQueryParameter = { +export const marker: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "marker" @@ -342,7 +342,7 @@ export const marker: msRest.OperationQueryParameter = { } } }; -export const maxresults: msRest.OperationQueryParameter = { +export const maxresults: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "maxresults" @@ -357,7 +357,7 @@ export const maxresults: msRest.OperationQueryParameter = { } } }; -export const metadata: msRest.OperationParameter = { +export const metadata: coreHttp.OperationParameter = { parameterPath: [ "options", "metadata" @@ -375,7 +375,18 @@ export const metadata: msRest.OperationParameter = { headerCollectionPrefix: "x-ms-meta-" } }; -export const prefix: msRest.OperationQueryParameter = { +export const nextPageLink: coreHttp.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const prefix: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "prefix" @@ -387,7 +398,7 @@ export const prefix: msRest.OperationQueryParameter = { } } }; -export const quota: msRest.OperationParameter = { +export const quota: coreHttp.OperationParameter = { parameterPath: [ "options", "quota" @@ -402,7 +413,7 @@ export const quota: msRest.OperationParameter = { } } }; -export const range0: msRest.OperationParameter = { +export const range0: coreHttp.OperationParameter = { parameterPath: [ "options", "range" @@ -414,7 +425,7 @@ export const range0: msRest.OperationParameter = { } } }; -export const range1: msRest.OperationParameter = { +export const range1: coreHttp.OperationParameter = { parameterPath: "range", mapper: { required: true, @@ -424,7 +435,7 @@ export const range1: msRest.OperationParameter = { } } }; -export const rangeGetContentMD5: msRest.OperationParameter = { +export const rangeGetContentMD5: coreHttp.OperationParameter = { parameterPath: [ "options", "rangeGetContentMD5" @@ -436,7 +447,7 @@ export const rangeGetContentMD5: msRest.OperationParameter = { } } }; -export const restype0: msRest.OperationQueryParameter = { +export const restype0: coreHttp.OperationQueryParameter = { parameterPath: "restype", mapper: { required: true, @@ -448,7 +459,7 @@ export const restype0: msRest.OperationQueryParameter = { } } }; -export const restype1: msRest.OperationQueryParameter = { +export const restype1: coreHttp.OperationQueryParameter = { parameterPath: "restype", mapper: { required: true, @@ -460,7 +471,7 @@ export const restype1: msRest.OperationQueryParameter = { } } }; -export const restype2: msRest.OperationQueryParameter = { +export const restype2: coreHttp.OperationQueryParameter = { parameterPath: "restype", mapper: { required: true, @@ -472,7 +483,7 @@ export const restype2: msRest.OperationQueryParameter = { } } }; -export const sharesnapshot: msRest.OperationQueryParameter = { +export const sharesnapshot: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "sharesnapshot" @@ -484,7 +495,7 @@ export const sharesnapshot: msRest.OperationQueryParameter = { } } }; -export const timeout: msRest.OperationQueryParameter = { +export const timeout: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "timeout" @@ -499,7 +510,7 @@ export const timeout: msRest.OperationQueryParameter = { } } }; -export const url: msRest.OperationURLParameter = { +export const url: coreHttp.OperationURLParameter = { parameterPath: "url", mapper: { required: true, @@ -511,7 +522,7 @@ export const url: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const version: msRest.OperationParameter = { +export const version: coreHttp.OperationParameter = { parameterPath: "version", mapper: { required: true, diff --git a/sdk/storage/storage-file/src/generated/lib/models/serviceMappers.ts b/sdk/storage/storage-file/src/generated/lib/models/serviceMappers.ts index 63afd9e85a34..28c70f86a91f 100644 --- a/sdk/storage/storage-file/src/generated/lib/models/serviceMappers.ts +++ b/sdk/storage/storage-file/src/generated/lib/models/serviceMappers.ts @@ -1,24 +1,21 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - StorageServiceProperties, + CorsRule, + ListSharesResponse, Metrics, RetentionPolicy, - CorsRule, - ServiceSetPropertiesHeaders, - StorageError, ServiceGetPropertiesHeaders, - ListSharesResponse, + ServiceListSharesSegmentHeaders, + ServiceSetPropertiesHeaders, ShareItem, ShareProperties, - ServiceListSharesSegmentHeaders + StorageError, + StorageServiceProperties } from "../models/mappers"; - diff --git a/sdk/storage/storage-file/src/generated/lib/models/shareMappers.ts b/sdk/storage/storage-file/src/generated/lib/models/shareMappers.ts index d7132b71c760..587aa714def4 100644 --- a/sdk/storage/storage-file/src/generated/lib/models/shareMappers.ts +++ b/sdk/storage/storage-file/src/generated/lib/models/shareMappers.ts @@ -1,26 +1,23 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + AccessPolicy, ShareCreateHeaders, - StorageError, - ShareGetPropertiesHeaders, - ShareDeleteHeaders, ShareCreateSnapshotHeaders, - ShareSetQuotaHeaders, - ShareSetMetadataHeaders, - SignedIdentifier, - AccessPolicy, + ShareDeleteHeaders, ShareGetAccessPolicyHeaders, + ShareGetPropertiesHeaders, + ShareGetStatisticsHeaders, ShareSetAccessPolicyHeaders, + ShareSetMetadataHeaders, + ShareSetQuotaHeaders, ShareStats, - ShareGetStatisticsHeaders + SignedIdentifier, + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-file/src/generated/lib/operations/directory.ts b/sdk/storage/storage-file/src/generated/lib/operations/directory.ts index e388bce5a5c8..b8ef932790ba 100644 --- a/sdk/storage/storage-file/src/generated/lib/operations/directory.ts +++ b/sdk/storage/storage-file/src/generated/lib/operations/directory.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/directoryMappers"; import * as Parameters from "../models/parameters"; @@ -35,13 +35,13 @@ export class Directory { /** * @param callback The callback */ - create(callback: msRest.ServiceCallback): void; + create(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - create(options: Models.DirectoryCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(options?: Models.DirectoryCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(options: Models.DirectoryCreateOptionalParams, callback: coreHttp.ServiceCallback): void; + create(options?: Models.DirectoryCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -61,13 +61,13 @@ export class Directory { /** * @param callback The callback */ - getProperties(callback: msRest.ServiceCallback): void; + getProperties(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getProperties(options: Models.DirectoryGetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - getProperties(options?: Models.DirectoryGetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProperties(options: Models.DirectoryGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + getProperties(options?: Models.DirectoryGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -86,13 +86,13 @@ export class Directory { /** * @param callback The callback */ - deleteMethod(callback: msRest.ServiceCallback): void; + deleteMethod(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - deleteMethod(options: Models.DirectoryDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; - deleteMethod(options?: Models.DirectoryDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(options: Models.DirectoryDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void; + deleteMethod(options?: Models.DirectoryDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -110,13 +110,13 @@ export class Directory { /** * @param callback The callback */ - setMetadata(callback: msRest.ServiceCallback): void; + setMetadata(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setMetadata(options: Models.DirectorySetMetadataOptionalParams, callback: msRest.ServiceCallback): void; - setMetadata(options?: Models.DirectorySetMetadataOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setMetadata(options: Models.DirectorySetMetadataOptionalParams, callback: coreHttp.ServiceCallback): void; + setMetadata(options?: Models.DirectorySetMetadataOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -135,13 +135,13 @@ export class Directory { /** * @param callback The callback */ - listFilesAndDirectoriesSegment(callback: msRest.ServiceCallback): void; + listFilesAndDirectoriesSegment(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - listFilesAndDirectoriesSegment(options: Models.DirectoryListFilesAndDirectoriesSegmentOptionalParams, callback: msRest.ServiceCallback): void; - listFilesAndDirectoriesSegment(options?: Models.DirectoryListFilesAndDirectoriesSegmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listFilesAndDirectoriesSegment(options: Models.DirectoryListFilesAndDirectoriesSegmentOptionalParams, callback: coreHttp.ServiceCallback): void; + listFilesAndDirectoriesSegment(options?: Models.DirectoryListFilesAndDirectoriesSegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -149,11 +149,40 @@ export class Directory { listFilesAndDirectoriesSegmentOperationSpec, callback) as Promise; } + + /** + * Returns a list of files or directories under the specified share or directory. It lists the + * contents only for a single level of the directory hierarchy. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listFilesAndDirectoriesSegmentNext(nextPageLink: string, options?: coreHttp.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listFilesAndDirectoriesSegmentNext(nextPageLink: string, callback: coreHttp.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listFilesAndDirectoriesSegmentNext(nextPageLink: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + listFilesAndDirectoriesSegmentNext(nextPageLink: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listFilesAndDirectoriesSegmentNextOperationSpec, + callback) as Promise; + } } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const createOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const createOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}/{directory}", urlParameters: [ @@ -179,7 +208,7 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const getPropertiesOperationSpec: msRest.OperationSpec = { +const getPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{shareName}/{directory}", urlParameters: [ @@ -205,7 +234,7 @@ const getPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteMethodOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", path: "{shareName}/{directory}", urlParameters: [ @@ -230,7 +259,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const setMetadataOperationSpec: msRest.OperationSpec = { +const setMetadataOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}/{directory}", urlParameters: [ @@ -257,7 +286,7 @@ const setMetadataOperationSpec: msRest.OperationSpec = { serializer }; -const listFilesAndDirectoriesSegmentOperationSpec: msRest.OperationSpec = { +const listFilesAndDirectoriesSegmentOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{shareName}/{directory}", urlParameters: [ @@ -287,3 +316,26 @@ const listFilesAndDirectoriesSegmentOperationSpec: msRest.OperationSpec = { isXML: true, serializer }; + +const listFilesAndDirectoriesSegmentNextOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + baseUrl: "{url}", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.version + ], + responses: { + 200: { + bodyMapper: Mappers.ListFilesAndDirectoriesSegmentResponse, + headersMapper: Mappers.DirectoryListFilesAndDirectoriesSegmentHeaders + }, + default: { + bodyMapper: Mappers.StorageError + } + }, + isXML: true, + serializer +}; diff --git a/sdk/storage/storage-file/src/generated/lib/operations/file.ts b/sdk/storage/storage-file/src/generated/lib/operations/file.ts index ce11511a25ee..f585f3ea017a 100644 --- a/sdk/storage/storage-file/src/generated/lib/operations/file.ts +++ b/sdk/storage/storage-file/src/generated/lib/operations/file.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/fileMappers"; import * as Parameters from "../models/parameters"; @@ -37,14 +37,14 @@ export class File { * @param fileContentLength Specifies the maximum size for the file, up to 1 TB. * @param callback The callback */ - create(fileContentLength: number, callback: msRest.ServiceCallback): void; + create(fileContentLength: number, callback: coreHttp.ServiceCallback): void; /** * @param fileContentLength Specifies the maximum size for the file, up to 1 TB. * @param options The optional parameters * @param callback The callback */ - create(fileContentLength: number, options: Models.FileCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(fileContentLength: number, options?: Models.FileCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(fileContentLength: number, options: Models.FileCreateOptionalParams, callback: coreHttp.ServiceCallback): void; + create(fileContentLength: number, options?: Models.FileCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { fileContentLength, @@ -63,13 +63,13 @@ export class File { /** * @param callback The callback */ - download(callback: msRest.ServiceCallback): void; + download(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - download(options: Models.FileDownloadOptionalParams, callback: msRest.ServiceCallback): void; - download(options?: Models.FileDownloadOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + download(options: Models.FileDownloadOptionalParams, callback: coreHttp.ServiceCallback): void; + download(options?: Models.FileDownloadOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -88,13 +88,13 @@ export class File { /** * @param callback The callback */ - getProperties(callback: msRest.ServiceCallback): void; + getProperties(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getProperties(options: Models.FileGetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - getProperties(options?: Models.FileGetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProperties(options: Models.FileGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + getProperties(options?: Models.FileGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -112,13 +112,13 @@ export class File { /** * @param callback The callback */ - deleteMethod(callback: msRest.ServiceCallback): void; + deleteMethod(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - deleteMethod(options: Models.FileDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; - deleteMethod(options?: Models.FileDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(options: Models.FileDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void; + deleteMethod(options?: Models.FileDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -136,13 +136,13 @@ export class File { /** * @param callback The callback */ - setHTTPHeaders(callback: msRest.ServiceCallback): void; + setHTTPHeaders(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setHTTPHeaders(options: Models.FileSetHTTPHeadersOptionalParams, callback: msRest.ServiceCallback): void; - setHTTPHeaders(options?: Models.FileSetHTTPHeadersOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setHTTPHeaders(options: Models.FileSetHTTPHeadersOptionalParams, callback: coreHttp.ServiceCallback): void; + setHTTPHeaders(options?: Models.FileSetHTTPHeadersOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -160,13 +160,13 @@ export class File { /** * @param callback The callback */ - setMetadata(callback: msRest.ServiceCallback): void; + setMetadata(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setMetadata(options: Models.FileSetMetadataOptionalParams, callback: msRest.ServiceCallback): void; - setMetadata(options?: Models.FileSetMetadataOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setMetadata(options: Models.FileSetMetadataOptionalParams, callback: coreHttp.ServiceCallback): void; + setMetadata(options?: Models.FileSetMetadataOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -210,7 +210,7 @@ export class File { * the x-ms-write header is set to clear, the value of this header must be set to zero. * @param callback The callback */ - uploadRange(range: string, fileRangeWrite: Models.FileRangeWriteType, contentLength: number, callback: msRest.ServiceCallback): void; + uploadRange(range: string, fileRangeWrite: Models.FileRangeWriteType, contentLength: number, callback: coreHttp.ServiceCallback): void; /** * @param range Specifies the range of bytes to be written. Both the start and end of the range * must be specified. For an update operation, the range can be up to 4 MB in size. For a clear @@ -228,8 +228,8 @@ export class File { * @param options The optional parameters * @param callback The callback */ - uploadRange(range: string, fileRangeWrite: Models.FileRangeWriteType, contentLength: number, options: Models.FileUploadRangeOptionalParams, callback: msRest.ServiceCallback): void; - uploadRange(range: string, fileRangeWrite: Models.FileRangeWriteType, contentLength: number, options?: Models.FileUploadRangeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + uploadRange(range: string, fileRangeWrite: Models.FileRangeWriteType, contentLength: number, options: Models.FileUploadRangeOptionalParams, callback: coreHttp.ServiceCallback): void; + uploadRange(range: string, fileRangeWrite: Models.FileRangeWriteType, contentLength: number, options?: Models.FileUploadRangeOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { range, @@ -250,13 +250,13 @@ export class File { /** * @param callback The callback */ - getRangeList(callback: msRest.ServiceCallback): void; + getRangeList(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getRangeList(options: Models.FileGetRangeListOptionalParams, callback: msRest.ServiceCallback): void; - getRangeList(options?: Models.FileGetRangeListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getRangeList(options: Models.FileGetRangeListOptionalParams, callback: coreHttp.ServiceCallback): void; + getRangeList(options?: Models.FileGetRangeListOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -288,7 +288,7 @@ export class File { * specified as a copy source. * @param callback The callback */ - startCopy(copySource: string, callback: msRest.ServiceCallback): void; + startCopy(copySource: string, callback: coreHttp.ServiceCallback): void; /** * @param copySource Specifies the URL of the source file or blob, up to 2 KB in length. To copy a * file to another file within the same storage account, you may use Shared Key to authenticate the @@ -300,8 +300,8 @@ export class File { * @param options The optional parameters * @param callback The callback */ - startCopy(copySource: string, options: Models.FileStartCopyOptionalParams, callback: msRest.ServiceCallback): void; - startCopy(copySource: string, options?: Models.FileStartCopyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + startCopy(copySource: string, options: Models.FileStartCopyOptionalParams, callback: coreHttp.ServiceCallback): void; + startCopy(copySource: string, options?: Models.FileStartCopyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { copySource, @@ -325,15 +325,15 @@ export class File { * operation. * @param callback The callback */ - abortCopy(copyId: string, callback: msRest.ServiceCallback): void; + abortCopy(copyId: string, callback: coreHttp.ServiceCallback): void; /** * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy File * operation. * @param options The optional parameters * @param callback The callback */ - abortCopy(copyId: string, options: Models.FileAbortCopyOptionalParams, callback: msRest.ServiceCallback): void; - abortCopy(copyId: string, options?: Models.FileAbortCopyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + abortCopy(copyId: string, options: Models.FileAbortCopyOptionalParams, callback: coreHttp.ServiceCallback): void; + abortCopy(copyId: string, options?: Models.FileAbortCopyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { copyId, @@ -345,8 +345,8 @@ export class File { } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const createOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const createOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}/{directory}/{fileName}", urlParameters: [ @@ -379,7 +379,7 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const downloadOperationSpec: msRest.OperationSpec = { +const downloadOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{shareName}/{directory}/{fileName}", urlParameters: [ @@ -420,7 +420,7 @@ const downloadOperationSpec: msRest.OperationSpec = { serializer }; -const getPropertiesOperationSpec: msRest.OperationSpec = { +const getPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "HEAD", path: "{shareName}/{directory}/{fileName}", urlParameters: [ @@ -445,7 +445,7 @@ const getPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteMethodOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", path: "{shareName}/{directory}/{fileName}", urlParameters: [ @@ -469,7 +469,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const setHTTPHeadersOperationSpec: msRest.OperationSpec = { +const setHTTPHeadersOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}/{directory}/{fileName}", urlParameters: [ @@ -501,7 +501,7 @@ const setHTTPHeadersOperationSpec: msRest.OperationSpec = { serializer }; -const setMetadataOperationSpec: msRest.OperationSpec = { +const setMetadataOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}/{directory}/{fileName}", urlParameters: [ @@ -527,7 +527,7 @@ const setMetadataOperationSpec: msRest.OperationSpec = { serializer }; -const uploadRangeOperationSpec: msRest.OperationSpec = { +const uploadRangeOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}/{directory}/{fileName}", urlParameters: [ @@ -569,7 +569,7 @@ const uploadRangeOperationSpec: msRest.OperationSpec = { serializer }; -const getRangeListOperationSpec: msRest.OperationSpec = { +const getRangeListOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{shareName}/{directory}/{fileName}", urlParameters: [ @@ -609,7 +609,7 @@ const getRangeListOperationSpec: msRest.OperationSpec = { serializer }; -const startCopyOperationSpec: msRest.OperationSpec = { +const startCopyOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}/{directory}/{fileName}", urlParameters: [ @@ -635,7 +635,7 @@ const startCopyOperationSpec: msRest.OperationSpec = { serializer }; -const abortCopyOperationSpec: msRest.OperationSpec = { +const abortCopyOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}/{directory}/{fileName}", urlParameters: [ diff --git a/sdk/storage/storage-file/src/generated/lib/operations/service.ts b/sdk/storage/storage-file/src/generated/lib/operations/service.ts index b31eb2b17e5d..0606cac5b6a9 100644 --- a/sdk/storage/storage-file/src/generated/lib/operations/service.ts +++ b/sdk/storage/storage-file/src/generated/lib/operations/service.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/serviceMappers"; import * as Parameters from "../models/parameters"; @@ -38,14 +38,14 @@ export class Service { * @param storageServiceProperties The StorageService properties. * @param callback The callback */ - setProperties(storageServiceProperties: Models.StorageServiceProperties, callback: msRest.ServiceCallback): void; + setProperties(storageServiceProperties: Models.StorageServiceProperties, callback: coreHttp.ServiceCallback): void; /** * @param storageServiceProperties The StorageService properties. * @param options The optional parameters * @param callback The callback */ - setProperties(storageServiceProperties: Models.StorageServiceProperties, options: Models.ServiceSetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - setProperties(storageServiceProperties: Models.StorageServiceProperties, options?: Models.ServiceSetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setProperties(storageServiceProperties: Models.StorageServiceProperties, options: Models.ServiceSetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + setProperties(storageServiceProperties: Models.StorageServiceProperties, options?: Models.ServiceSetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { storageServiceProperties, @@ -65,13 +65,13 @@ export class Service { /** * @param callback The callback */ - getProperties(callback: msRest.ServiceCallback): void; + getProperties(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getProperties(options: Models.ServiceGetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - getProperties(options?: Models.ServiceGetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProperties(options: Models.ServiceGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + getProperties(options?: Models.ServiceGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -90,13 +90,13 @@ export class Service { /** * @param callback The callback */ - listSharesSegment(callback: msRest.ServiceCallback): void; + listSharesSegment(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - listSharesSegment(options: Models.ServiceListSharesSegmentOptionalParams, callback: msRest.ServiceCallback): void; - listSharesSegment(options?: Models.ServiceListSharesSegmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSharesSegment(options: Models.ServiceListSharesSegmentOptionalParams, callback: coreHttp.ServiceCallback): void; + listSharesSegment(options?: Models.ServiceListSharesSegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -104,11 +104,40 @@ export class Service { listSharesSegmentOperationSpec, callback) as Promise; } + + /** + * The List Shares Segment operation returns a list of the shares and share snapshots under the + * specified account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listSharesSegmentNext(nextPageLink: string, options?: coreHttp.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listSharesSegmentNext(nextPageLink: string, callback: coreHttp.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listSharesSegmentNext(nextPageLink: string, options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void; + listSharesSegmentNext(nextPageLink: string, options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listSharesSegmentNextOperationSpec, + callback) as Promise; + } } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const setPropertiesOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const setPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", urlParameters: [ Parameters.url @@ -141,7 +170,7 @@ const setPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const getPropertiesOperationSpec: msRest.OperationSpec = { +const getPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", urlParameters: [ Parameters.url @@ -167,7 +196,7 @@ const getPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const listSharesSegmentOperationSpec: msRest.OperationSpec = { +const listSharesSegmentOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", urlParameters: [ Parameters.url @@ -195,3 +224,26 @@ const listSharesSegmentOperationSpec: msRest.OperationSpec = { isXML: true, serializer }; + +const listSharesSegmentNextOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + baseUrl: "{url}", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.version + ], + responses: { + 200: { + bodyMapper: Mappers.ListSharesResponse, + headersMapper: Mappers.ServiceListSharesSegmentHeaders + }, + default: { + bodyMapper: Mappers.StorageError + } + }, + isXML: true, + serializer +}; diff --git a/sdk/storage/storage-file/src/generated/lib/operations/share.ts b/sdk/storage/storage-file/src/generated/lib/operations/share.ts index 8d64625601f6..89c89dc81a7d 100644 --- a/sdk/storage/storage-file/src/generated/lib/operations/share.ts +++ b/sdk/storage/storage-file/src/generated/lib/operations/share.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/shareMappers"; import * as Parameters from "../models/parameters"; @@ -36,13 +36,13 @@ export class Share { /** * @param callback The callback */ - create(callback: msRest.ServiceCallback): void; + create(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - create(options: Models.ShareCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(options?: Models.ShareCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(options: Models.ShareCreateOptionalParams, callback: coreHttp.ServiceCallback): void; + create(options?: Models.ShareCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -61,13 +61,13 @@ export class Share { /** * @param callback The callback */ - getProperties(callback: msRest.ServiceCallback): void; + getProperties(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getProperties(options: Models.ShareGetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - getProperties(options?: Models.ShareGetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProperties(options: Models.ShareGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + getProperties(options?: Models.ShareGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -86,13 +86,13 @@ export class Share { /** * @param callback The callback */ - deleteMethod(callback: msRest.ServiceCallback): void; + deleteMethod(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - deleteMethod(options: Models.ShareDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; - deleteMethod(options?: Models.ShareDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(options: Models.ShareDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void; + deleteMethod(options?: Models.ShareDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -110,13 +110,13 @@ export class Share { /** * @param callback The callback */ - createSnapshot(callback: msRest.ServiceCallback): void; + createSnapshot(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - createSnapshot(options: Models.ShareCreateSnapshotOptionalParams, callback: msRest.ServiceCallback): void; - createSnapshot(options?: Models.ShareCreateSnapshotOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createSnapshot(options: Models.ShareCreateSnapshotOptionalParams, callback: coreHttp.ServiceCallback): void; + createSnapshot(options?: Models.ShareCreateSnapshotOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -134,13 +134,13 @@ export class Share { /** * @param callback The callback */ - setQuota(callback: msRest.ServiceCallback): void; + setQuota(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setQuota(options: Models.ShareSetQuotaOptionalParams, callback: msRest.ServiceCallback): void; - setQuota(options?: Models.ShareSetQuotaOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setQuota(options: Models.ShareSetQuotaOptionalParams, callback: coreHttp.ServiceCallback): void; + setQuota(options?: Models.ShareSetQuotaOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -158,13 +158,13 @@ export class Share { /** * @param callback The callback */ - setMetadata(callback: msRest.ServiceCallback): void; + setMetadata(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setMetadata(options: Models.ShareSetMetadataOptionalParams, callback: msRest.ServiceCallback): void; - setMetadata(options?: Models.ShareSetMetadataOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setMetadata(options: Models.ShareSetMetadataOptionalParams, callback: coreHttp.ServiceCallback): void; + setMetadata(options?: Models.ShareSetMetadataOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -182,13 +182,13 @@ export class Share { /** * @param callback The callback */ - getAccessPolicy(callback: msRest.ServiceCallback): void; + getAccessPolicy(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getAccessPolicy(options: Models.ShareGetAccessPolicyOptionalParams, callback: msRest.ServiceCallback): void; - getAccessPolicy(options?: Models.ShareGetAccessPolicyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getAccessPolicy(options: Models.ShareGetAccessPolicyOptionalParams, callback: coreHttp.ServiceCallback): void; + getAccessPolicy(options?: Models.ShareGetAccessPolicyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -206,13 +206,13 @@ export class Share { /** * @param callback The callback */ - setAccessPolicy(callback: msRest.ServiceCallback): void; + setAccessPolicy(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setAccessPolicy(options: Models.ShareSetAccessPolicyOptionalParams, callback: msRest.ServiceCallback): void; - setAccessPolicy(options?: Models.ShareSetAccessPolicyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setAccessPolicy(options: Models.ShareSetAccessPolicyOptionalParams, callback: coreHttp.ServiceCallback): void; + setAccessPolicy(options?: Models.ShareSetAccessPolicyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -230,13 +230,13 @@ export class Share { /** * @param callback The callback */ - getStatistics(callback: msRest.ServiceCallback): void; + getStatistics(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getStatistics(options: Models.ShareGetStatisticsOptionalParams, callback: msRest.ServiceCallback): void; - getStatistics(options?: Models.ShareGetStatisticsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getStatistics(options: Models.ShareGetStatisticsOptionalParams, callback: coreHttp.ServiceCallback): void; + getStatistics(options?: Models.ShareGetStatisticsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -247,8 +247,8 @@ export class Share { } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const createOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const createOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}", urlParameters: [ @@ -275,7 +275,7 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const getPropertiesOperationSpec: msRest.OperationSpec = { +const getPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{shareName}", urlParameters: [ @@ -301,7 +301,7 @@ const getPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteMethodOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", path: "{shareName}", urlParameters: [ @@ -328,7 +328,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const createSnapshotOperationSpec: msRest.OperationSpec = { +const createSnapshotOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}", urlParameters: [ @@ -355,7 +355,7 @@ const createSnapshotOperationSpec: msRest.OperationSpec = { serializer }; -const setQuotaOperationSpec: msRest.OperationSpec = { +const setQuotaOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}", urlParameters: [ @@ -382,7 +382,7 @@ const setQuotaOperationSpec: msRest.OperationSpec = { serializer }; -const setMetadataOperationSpec: msRest.OperationSpec = { +const setMetadataOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}", urlParameters: [ @@ -409,7 +409,7 @@ const setMetadataOperationSpec: msRest.OperationSpec = { serializer }; -const getAccessPolicyOperationSpec: msRest.OperationSpec = { +const getAccessPolicyOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{shareName}", urlParameters: [ @@ -448,7 +448,7 @@ const getAccessPolicyOperationSpec: msRest.OperationSpec = { serializer }; -const setAccessPolicyOperationSpec: msRest.OperationSpec = { +const setAccessPolicyOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{shareName}", urlParameters: [ @@ -495,7 +495,7 @@ const setAccessPolicyOperationSpec: msRest.OperationSpec = { serializer }; -const getStatisticsOperationSpec: msRest.OperationSpec = { +const getStatisticsOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{shareName}", urlParameters: [ diff --git a/sdk/storage/storage-file/src/generated/lib/storageClient.ts b/sdk/storage/storage-file/src/generated/lib/storageClient.ts index fd1d1af30ee5..82f6af41ecc4 100644 --- a/sdk/storage/storage-file/src/generated/lib/storageClient.ts +++ b/sdk/storage/storage-file/src/generated/lib/storageClient.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -27,7 +27,7 @@ class StorageClient extends StorageClientContext { * desired operation. * @param [options] The parameter options */ - constructor(url: string, options?: msRest.ServiceClientOptions) { + constructor(url: string, options?: coreHttp.ServiceClientOptions) { super(url, options); this.service = new operations.Service(this); this.share = new operations.Share(this); diff --git a/sdk/storage/storage-file/src/generated/lib/storageClientContext.ts b/sdk/storage/storage-file/src/generated/lib/storageClientContext.ts index 2eecbce67cb1..2dc21b4a1eba 100644 --- a/sdk/storage/storage-file/src/generated/lib/storageClientContext.ts +++ b/sdk/storage/storage-file/src/generated/lib/storageClientContext.ts @@ -8,12 +8,12 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; const packageName = "azure-storage-file"; const packageVersion = "1.0.0"; -export class StorageClientContext extends msRest.ServiceClient { +export class StorageClientContext extends coreHttp.ServiceClient { version: string; url: string; @@ -23,16 +23,17 @@ export class StorageClientContext extends msRest.ServiceClient { * desired operation. * @param [options] The parameter options */ - constructor(url: string, options?: msRest.ServiceClientOptions) { - if (url === null || url === undefined) { - throw new Error('\'url\' cannot be null.'); + constructor(url: string, options?: coreHttp.ServiceClientOptions) { + if (url == undefined) { + throw new Error("'url' cannot be null."); } if (!options) { options = {}; } - if(!options.userAgent) { - const defaultUserAgent = msRest.getDefaultUserAgentValue(); + + if (!options.userAgent) { + const defaultUserAgent = coreHttp.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -42,6 +43,5 @@ export class StorageClientContext extends msRest.ServiceClient { this.baseUri = "{url}"; this.requestContentType = "application/json; charset=utf-8"; this.url = url; - } } diff --git a/sdk/storage/storage-file/src/index.browser.ts b/sdk/storage/storage-file/src/index.browser.ts index 82aaebb6ffd2..bbce55de93fc 100644 --- a/sdk/storage/storage-file/src/index.browser.ts +++ b/sdk/storage/storage-file/src/index.browser.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RestError } from "@azure/ms-rest-js"; +import { RestError } from "@azure/core-http"; import * as Models from "../src/generated/lib/models"; diff --git a/sdk/storage/storage-file/src/index.ts b/sdk/storage/storage-file/src/index.ts index dff31e20914d..0d6009f12288 100644 --- a/sdk/storage/storage-file/src/index.ts +++ b/sdk/storage/storage-file/src/index.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RestError } from "@azure/ms-rest-js"; +import { RestError } from "@azure/core-http"; import * as Models from "../src/generated/lib/models"; diff --git a/sdk/storage/storage-file/src/policies/AnonymousCredentialPolicy.ts b/sdk/storage/storage-file/src/policies/AnonymousCredentialPolicy.ts index d5368d185b02..f322060c2e98 100644 --- a/sdk/storage/storage-file/src/policies/AnonymousCredentialPolicy.ts +++ b/sdk/storage/storage-file/src/policies/AnonymousCredentialPolicy.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions } from "@azure/core-http"; import { CredentialPolicy } from "./CredentialPolicy"; diff --git a/sdk/storage/storage-file/src/policies/BrowserPolicy.ts b/sdk/storage/storage-file/src/policies/BrowserPolicy.ts index 2b7d37949eec..daee8c93cae1 100644 --- a/sdk/storage/storage-file/src/policies/BrowserPolicy.ts +++ b/sdk/storage/storage-file/src/policies/BrowserPolicy.ts @@ -8,7 +8,7 @@ import { RequestPolicy, RequestPolicyOptions, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { HeaderConstants, URLConstants } from "../utils/constants"; import { setURLParameter } from "../utils/utils.common"; diff --git a/sdk/storage/storage-file/src/policies/CredentialPolicy.ts b/sdk/storage/storage-file/src/policies/CredentialPolicy.ts index e15490e27e3d..32cf09b84d6b 100644 --- a/sdk/storage/storage-file/src/policies/CredentialPolicy.ts +++ b/sdk/storage/storage-file/src/policies/CredentialPolicy.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { BaseRequestPolicy, HttpOperationResponse, WebResource } from "@azure/ms-rest-js"; +import { BaseRequestPolicy, HttpOperationResponse, WebResource } from "@azure/core-http"; /** * Credential policy used to sign HTTP(S) requests before sending. This is an diff --git a/sdk/storage/storage-file/src/policies/LoggingPolicy.ts b/sdk/storage/storage-file/src/policies/LoggingPolicy.ts index 464669141234..67203bd43cf1 100644 --- a/sdk/storage/storage-file/src/policies/LoggingPolicy.ts +++ b/sdk/storage/storage-file/src/policies/LoggingPolicy.ts @@ -9,7 +9,7 @@ import { RequestPolicyOptions, RestError, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { RequestLogOptions } from "../LoggingPolicyFactory"; import { HTTPURLConnection } from "../utils/constants"; diff --git a/sdk/storage/storage-file/src/policies/RetryPolicy.ts b/sdk/storage/storage-file/src/policies/RetryPolicy.ts index 4aebeb792e9a..ab3cfbf4765d 100644 --- a/sdk/storage/storage-file/src/policies/RetryPolicy.ts +++ b/sdk/storage/storage-file/src/policies/RetryPolicy.ts @@ -11,7 +11,7 @@ import { RequestPolicyOptions, RestError, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { RetryOptions } from "../RetryPolicyFactory"; import { URLConstants } from "../utils/constants"; diff --git a/sdk/storage/storage-file/src/policies/SharedKeyCredentialPolicy.ts b/sdk/storage/storage-file/src/policies/SharedKeyCredentialPolicy.ts index efff25662f55..89cd03a291be 100644 --- a/sdk/storage/storage-file/src/policies/SharedKeyCredentialPolicy.ts +++ b/sdk/storage/storage-file/src/policies/SharedKeyCredentialPolicy.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyOptions, WebResource } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions, WebResource } from "@azure/core-http"; import { SharedKeyCredential } from "../credentials/SharedKeyCredential"; import { HeaderConstants } from "../utils/constants"; import { getURLPath, getURLQueries } from "../utils/utils.common"; diff --git a/sdk/storage/storage-file/src/policies/TelemetryPolicy.ts b/sdk/storage/storage-file/src/policies/TelemetryPolicy.ts index b60d509e5906..ef2f837aa3dc 100644 --- a/sdk/storage/storage-file/src/policies/TelemetryPolicy.ts +++ b/sdk/storage/storage-file/src/policies/TelemetryPolicy.ts @@ -9,7 +9,7 @@ import { RequestPolicy, RequestPolicyOptions, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { HeaderConstants } from "../utils/constants"; diff --git a/sdk/storage/storage-file/src/policies/UniqueRequestIDPolicy.ts b/sdk/storage/storage-file/src/policies/UniqueRequestIDPolicy.ts index 5fd1681dc9f4..da15a58284f0 100644 --- a/sdk/storage/storage-file/src/policies/UniqueRequestIDPolicy.ts +++ b/sdk/storage/storage-file/src/policies/UniqueRequestIDPolicy.ts @@ -8,7 +8,7 @@ import { RequestPolicy, RequestPolicyOptions, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { HeaderConstants } from "../utils/constants"; diff --git a/sdk/storage/storage-file/src/utils/RetriableReadableStream.ts b/sdk/storage/storage-file/src/utils/RetriableReadableStream.ts index db7856449c15..0bbbfeaf9aa0 100644 --- a/sdk/storage/storage-file/src/utils/RetriableReadableStream.ts +++ b/sdk/storage/storage-file/src/utils/RetriableReadableStream.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RestError, TransferProgressEvent } from "@azure/ms-rest-js"; +import { RestError, TransferProgressEvent } from "@azure/core-http"; import { Readable } from "stream"; import { Aborter } from "../Aborter"; diff --git a/sdk/storage/storage-file/src/utils/utils.common.ts b/sdk/storage/storage-file/src/utils/utils.common.ts index 8ebed3da3d23..aa707d34f417 100644 --- a/sdk/storage/storage-file/src/utils/utils.common.ts +++ b/sdk/storage/storage-file/src/utils/utils.common.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as fs from "fs"; -import { HttpHeaders, isNode, URLBuilder } from "@azure/ms-rest-js"; +import { HttpHeaders, isNode, URLBuilder } from "@azure/core-http"; import { HeaderConstants, URLConstants } from "./constants"; /** diff --git a/sdk/storage/storage-file/test/fileclient.spec.ts b/sdk/storage/storage-file/test/fileclient.spec.ts index a962ff07010f..090113b7f021 100644 --- a/sdk/storage/storage-file/test/fileclient.spec.ts +++ b/sdk/storage/storage-file/test/fileclient.spec.ts @@ -1,5 +1,5 @@ import * as assert from "assert"; -import { isNode } from "@azure/ms-rest-js"; +import { isNode } from "@azure/core-http"; import { record } from "./utils/recorder"; import * as dotenv from "dotenv"; import { Aborter, ShareClient, DirectoryClient, FileClient } from "../src"; @@ -18,7 +18,7 @@ describe("FileClient", () => { let recorder: any; - beforeEach(async function() { + beforeEach(async function () { recorder = record(this); shareName = recorder.getUniqueName("share"); shareClient = serviceClient.createShareClient(shareName); @@ -293,7 +293,7 @@ describe("FileClient", () => { const rs = result.readableStreamBody!; // tslint:disable-next-line:no-empty - rs.on("data", () => {}); + rs.on("data", () => { }); rs.on("end", resolve); rs.on("error", reject); } else { @@ -303,7 +303,7 @@ describe("FileClient", () => { assert.fail(); // tslint:disable-next-line:no-empty - } catch (err) {} + } catch (err) { } assert.ok(eventTriggered); }); }); diff --git a/sdk/storage/storage-queue/BreakingChanges.md b/sdk/storage/storage-queue/BreakingChanges.md index b8e8604ca663..75d9475a50cf 100644 --- a/sdk/storage/storage-queue/BreakingChanges.md +++ b/sdk/storage/storage-queue/BreakingChanges.md @@ -1,6 +1,10 @@ # Breaking Changes +2019.6 Version 11.0.0-preview.1 +* The type of the `include` field of both `ServiceListQueuesOptions` and `ServiceListQueuesSegmentOptions` has changed from `ListQueuesIncludeType` to `ListQueuesIncludeType[]` due to changes in the underlying OpenAPI specification. +* `TokenCredential` has been renamed to `RawTokenCredential` to make way for the new `@azure/identity` library's `TokenCredential` interface. + 2019.1 Version 10.1.0 * Updated convenience layer methods enum type parameters into typescript union types, this will help to reduce bundle footprint. * `SASQueryParameters` is not going to be exported in browser bundle, and will be exported in Node.js runtime. -* IE11 needs `Array.prototype.includes` and `Object.keys` polyfills loaded. \ No newline at end of file +* IE11 needs `Array.prototype.includes` and `Object.keys` polyfills loaded. diff --git a/sdk/storage/storage-queue/README.md b/sdk/storage/storage-queue/README.md index 7827cdb55508..bd6e17a3353c 100644 --- a/sdk/storage/storage-queue/README.md +++ b/sdk/storage/storage-queue/README.md @@ -239,6 +239,10 @@ main() }); ``` +## Authenticating with Azure Active Directory + +If you have [registered an application](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app) with an Azure Active Directory tenant, you can [assign it to an RBAC role](https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad) in your Azure Storage account. This enables you to use the Azure.Identity library to authenticate with Azure Storage as shown in the [azureAdAuth.ts sample](./samples/azureAdAuth.ts). + ## More Code Samples - [Queue Storage Examples](https://github.com/azure/azure-sdk-for-js/tree/master/sdk/storage/storage-queue/samples) diff --git a/sdk/storage/storage-queue/package.json b/sdk/storage/storage-queue/package.json index a7294e0d1a47..4e881e05892b 100644 --- a/sdk/storage/storage-queue/package.json +++ b/sdk/storage/storage-queue/package.json @@ -74,11 +74,12 @@ "homepage": "https://github.com/Azure/azure-storage-js#readme", "sideEffects": false, "dependencies": { - "@azure/ms-rest-js": "^1.2.6", + "@azure/core-http": "^1.2.6", "@azure/core-paging": "^1.0.0", "tslib": "^1.9.3" }, "devDependencies": { + "@azure/identity": "^0.1.0", "@microsoft/api-extractor": "^7.1.5", "@azure/core-paging": "^1.0.0", "@types/dotenv": "^6.1.0", diff --git a/sdk/storage/storage-queue/rollup.base.config.js b/sdk/storage/storage-queue/rollup.base.config.js index d676da37d022..bbe2454b74c1 100644 --- a/sdk/storage/storage-queue/rollup.base.config.js +++ b/sdk/storage/storage-queue/rollup.base.config.js @@ -23,7 +23,7 @@ const depNames = Object.keys(pkg.dependencies); const production = process.env.NODE_ENV === "production"; export function nodeConfig(test = false) { - const externalNodeBuiltins = ["@azure/ms-rest-js", "crypto", "fs", "os"]; + const externalNodeBuiltins = ["@azure/core-http", "crypto", "fs", "os"]; const baseConfig = { input: "dist-esm/src/index.js", external: depNames.concat(externalNodeBuiltins), diff --git a/sdk/storage/storage-queue/samples/javascript/azureAdAuth.js b/sdk/storage/storage-queue/samples/javascript/azureAdAuth.js new file mode 100644 index 000000000000..18b84e99f55d --- /dev/null +++ b/sdk/storage/storage-queue/samples/javascript/azureAdAuth.js @@ -0,0 +1,67 @@ +/* + Setup: Enter your Azure Active Directory credentials as described in main() +*/ + +const { + QueueServiceClient, + newPipeline, +} = require("../.."); // Change to "@azure/storage-queue" in your package + +const { DefaultAzureCredential } = require("@azure/identity"); + +async function main() { + // Enter your storage account name and shared key + const account = ""; + + // DefaultAzureCredential will first look for Azure Active Directory (AAD) + // client secret credentials in the following environment variables: + // + // - AZURE_TENANT_ID: The ID of your AAD tenant + // - AZURE_CLIENT_ID: The ID of your AAD app registration (client) + // - AZURE_CLIENT_SECRET: The client secret for your AAD app registration + // + // If those environment variables aren't found and your application is deployed + // to an Azure VM or App Service instance, the managed service identity endpoint + // will be used as a fallback authentication source. + const defaultAzureCredential = new DefaultAzureCredential(); + + const pipeline = newPipeline(defaultAzureCredential, { + // httpClient: MyHTTPClient, // A customized HTTP client implementing IHttpClient interface + // logger: MyLogger, // A customized logger implementing IHttpPipelineLogger interface + retryOptions: { + maxTries: 4 + }, // Retry options + telemetry: { + value: "BasicSample V10.0.0" + } // Customized telemetry string + }); + + // List queues + const queueServiceClient = new QueueServiceClient( + // When using AnonymousCredential, following url should include a valid SAS or support public access + `https://${account}.queue.core.windows.net`, + pipeline + ); + + console.log(`List queues`); + let marker; + do { + const listQueuesResponse = await queueServiceClient.listQueuesSegment( + marker + ); + + marker = listQueuesResponse.nextMarker; + for (const queue of listQueuesResponse.queueItems) { + console.log(`Queue: ${queue.name}`); + } + } while (marker); +} + +// An async method returns a Promise object, which is compatible with then().catch() coding style. +main() + .then(() => { + console.log("Successfully executed sample."); + }) + .catch((err) => { + console.log(err.message); + }); diff --git a/sdk/storage/storage-queue/samples/javascript/basic.js b/sdk/storage/storage-queue/samples/javascript/basic.js index 343c14979da0..5fca277f7d80 100644 --- a/sdk/storage/storage-queue/samples/javascript/basic.js +++ b/sdk/storage/storage-queue/samples/javascript/basic.js @@ -8,30 +8,30 @@ const { SharedKeyCredential, AnonymousCredential, HttpPipelineLogLevel, - TokenCredential + RawTokenCredential } = require("../.."); // Change to "@azure/storage-queue" in your package class ConsoleHttpPipelineLogger { - constructor(minimumLogLevel) { - this.minimumLogLevel = minimumLogLevel; - } - log(logLevel, message) { - const logMessage = `${new Date().toISOString()} ${HttpPipelineLogLevel[logLevel]}: ${message}`; - switch (logLevel) { - case HttpPipelineLogLevel.ERROR: - // tslint:disable-next-line:no-console - console.error(logMessage); - break; - case HttpPipelineLogLevel.WARNING: - // tslint:disable-next-line:no-console - console.warn(logMessage); - break; - case HttpPipelineLogLevel.INFO: - // tslint:disable-next-line:no-console - console.log(logMessage); - break; + constructor(minimumLogLevel) { + this.minimumLogLevel = minimumLogLevel; + } + log(logLevel, message) { + const logMessage = `${new Date().toISOString()} ${HttpPipelineLogLevel[logLevel]}: ${message}`; + switch (logLevel) { + case HttpPipelineLogLevel.ERROR: + // tslint:disable-next-line:no-console + console.error(logMessage); + break; + case HttpPipelineLogLevel.WARNING: + // tslint:disable-next-line:no-console + console.warn(logMessage); + break; + case HttpPipelineLogLevel.INFO: + // tslint:disable-next-line:no-console + console.log(logMessage); + break; + } } - } } async function main() { @@ -42,8 +42,11 @@ async function main() { // Use SharedKeyCredential with storage account and account key const sharedKeyCredential = new SharedKeyCredential(account, accountKey); - // Use TokenCredential with OAuth token - const tokenCredential = new TokenCredential("token"); + // Use RawTokenCredential with OAuth token. You can find more + // TokenCredential implementations in the @azure/identity library + // to use client secrets, certificates, or managed identities for + // authentication. + const tokenCredential = new RawTokenCredential("token"); tokenCredential.token = "renewedToken"; // Renew the token by updating token field of token credential // Use AnonymousCredential when url already includes a SAS signature @@ -126,4 +129,4 @@ main() }) .catch(err => { console.log(err.message); - }); \ No newline at end of file + }); diff --git a/sdk/storage/storage-queue/samples/typescript/azureAdAuth.ts b/sdk/storage/storage-queue/samples/typescript/azureAdAuth.ts new file mode 100644 index 000000000000..12fc4014be59 --- /dev/null +++ b/sdk/storage/storage-queue/samples/typescript/azureAdAuth.ts @@ -0,0 +1,68 @@ +/* + Setup: Enter your Azure Active Directory credentials as described in main() +*/ + +import { + QueueServiceClient, + newPipeline, + Models +} from "../../src"; // Change to "@azure/storage-queue" in your package + +import { DefaultAzureCredential } from "@azure/identity"; + +async function main() { + // Enter your storage account name and shared key + const account = ""; + + // DefaultAzureCredential will first look for Azure Active Directory (AAD) + // client secret credentials in the following environment variables: + // + // - AZURE_TENANT_ID: The ID of your AAD tenant + // - AZURE_CLIENT_ID: The ID of your AAD app registration (client) + // - AZURE_CLIENT_SECRET: The client secret for your AAD app registration + // + // If those environment variables aren't found and your application is deployed + // to an Azure VM or App Service instance, the managed service identity endpoint + // will be used as a fallback authentication source. + const defaultAzureCredential = new DefaultAzureCredential(); + + const pipeline = newPipeline(defaultAzureCredential, { + // httpClient: MyHTTPClient, // A customized HTTP client implementing IHttpClient interface + // logger: MyLogger, // A customized logger implementing IHttpPipelineLogger interface + retryOptions: { + maxTries: 4 + }, // Retry options + telemetry: { + value: "BasicSample V10.0.0" + } // Customized telemetry string + }); + + // List queues + const queueServiceClient = new QueueServiceClient( + // When using AnonymousCredential, following url should include a valid SAS or support public access + `https://${account}.queue.core.windows.net`, + pipeline + ); + + console.log(`List queues`); + let marker; + do { + const listQueuesResponse: Models.ServiceListQueuesSegmentResponse = await queueServiceClient.listQueuesSegment( + marker + ); + + marker = listQueuesResponse.nextMarker; + for (const queue of listQueuesResponse.queueItems!) { + console.log(`Queue: ${queue.name}`); + } + } while (marker); +} + +// An async method returns a Promise object, which is compatible with then().catch() coding style. +main() + .then(() => { + console.log("Successfully executed sample."); + }) + .catch((err) => { + console.log(err.message); + }); diff --git a/sdk/storage/storage-queue/samples/typescript/basic.ts b/sdk/storage/storage-queue/samples/typescript/basic.ts index cc4450344806..dcca0ab9db78 100644 --- a/sdk/storage/storage-queue/samples/typescript/basic.ts +++ b/sdk/storage/storage-queue/samples/typescript/basic.ts @@ -6,7 +6,7 @@ import { QueueServiceClient, StorageClient, SharedKeyCredential, - TokenCredential, + RawTokenCredential, Models } from "../../src"; // Change to "@azure/storage-queue" in your package @@ -17,8 +17,11 @@ async function main() { // Use SharedKeyCredential with storage account and account key const sharedKeyCredential = new SharedKeyCredential(account, accountKey); - // Use TokenCredential with OAuth token - const tokenCredential = new TokenCredential("token"); + // Use RawTokenCredential with OAuth token. You can find more + // TokenCredential implementations in the @azure/identity library + // to use client secrets, certificates, or managed identities for + // authentication. + const tokenCredential = new RawTokenCredential("token"); tokenCredential.token = "renewedToken"; // Renew the token by updating token field of token credential // Use AnonymousCredential when url already includes a SAS signature @@ -62,7 +65,7 @@ async function main() { const createQueueResponse = await queueClient.create(); console.log( `Create queue ${queueName} successfully, service assigned request Id: ${ - createQueueResponse.requestId + createQueueResponse.requestId }` ); @@ -71,7 +74,7 @@ async function main() { const enqueueQueueResponse = await messagesClient.enqueue("Hello World!"); console.log( `Enqueue message successfully, service assigned message Id: ${ - enqueueQueueResponse.messageId + enqueueQueueResponse.messageId }, service assigned request Id: ${enqueueQueueResponse.requestId}` ); diff --git a/sdk/storage/storage-queue/src/Aborter.ts b/sdk/storage/storage-queue/src/Aborter.ts index 30be81bfac43..f936e1923bd3 100644 --- a/sdk/storage/storage-queue/src/Aborter.ts +++ b/sdk/storage/storage-queue/src/Aborter.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { AbortSignalLike, isNode } from "@azure/ms-rest-js"; +import { AbortSignalLike, isNode } from "@azure/core-http"; /** * An aborter instance implements AbortSignal interface, can abort HTTP requests. diff --git a/sdk/storage/storage-queue/src/BrowserPolicyFactory.ts b/sdk/storage/storage-queue/src/BrowserPolicyFactory.ts index 2038cf8deb5d..dd71e3befe57 100644 --- a/sdk/storage/storage-queue/src/BrowserPolicyFactory.ts +++ b/sdk/storage/storage-queue/src/BrowserPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { BrowserPolicy } from "./policies/BrowserPolicy"; /** diff --git a/sdk/storage/storage-queue/src/LoggingPolicyFactory.ts b/sdk/storage/storage-queue/src/LoggingPolicyFactory.ts index 5d6b03bb1e00..03cd588ba5ce 100644 --- a/sdk/storage/storage-queue/src/LoggingPolicyFactory.ts +++ b/sdk/storage/storage-queue/src/LoggingPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { LoggingPolicy } from "./policies/LoggingPolicy"; /** diff --git a/sdk/storage/storage-queue/src/MessageIdClient.ts b/sdk/storage/storage-queue/src/MessageIdClient.ts index 8e7cf2555deb..9b985515aae0 100644 --- a/sdk/storage/storage-queue/src/MessageIdClient.ts +++ b/sdk/storage/storage-queue/src/MessageIdClient.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import { TokenCredential, isTokenCredential } from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; import { MessageId } from "./generated/lib/operations"; @@ -87,12 +88,17 @@ export class MessageIdClient extends StorageClient { * "https://myaccount.queue.core.windows.net/myqueue/messages/messageid". You can * append a SAS if using AnonymousCredential, such as * "https://myaccount.queue.core.windows.net/myqueue/messages/messageid?sasString". - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, anonymous credential is used. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. If not specified, + * AnonymousCredential is used. * @param {NewPipelineOptions} [options] Options to configure the HTTP pipeline. * @memberof MessageIdClient */ - constructor(url: string, credential?: Credential, options?: NewPipelineOptions); + constructor( + url: string, + credential?: Credential | TokenCredential, + options?: NewPipelineOptions + ); /** * Creates an instance of MessageIdClient. * @@ -107,14 +113,17 @@ export class MessageIdClient extends StorageClient { constructor(url: string, pipeline: Pipeline); constructor( urlOrConnectionString: string, - credentialOrPipelineOrQueueName?: Credential | Pipeline | string, + credentialOrPipelineOrQueueName?: Credential | TokenCredential | Pipeline | string, messageIdOrOptions?: string | NewPipelineOptions, options: NewPipelineOptions = {} ) { let pipeline: Pipeline; if (credentialOrPipelineOrQueueName instanceof Pipeline) { pipeline = credentialOrPipelineOrQueueName; - } else if (credentialOrPipelineOrQueueName instanceof Credential) { + } else if ( + credentialOrPipelineOrQueueName instanceof Credential || + isTokenCredential(credentialOrPipelineOrQueueName) + ) { options = messageIdOrOptions as NewPipelineOptions; pipeline = newPipeline(credentialOrPipelineOrQueueName, options); } else if ( diff --git a/sdk/storage/storage-queue/src/MessagesClient.ts b/sdk/storage/storage-queue/src/MessagesClient.ts index bae2c66c1109..638eb444c2a3 100644 --- a/sdk/storage/storage-queue/src/MessagesClient.ts +++ b/sdk/storage/storage-queue/src/MessagesClient.ts @@ -1,7 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { HttpResponse } from "@azure/ms-rest-js"; +import { + HttpResponse, + TokenCredential, + isTokenCredential +} from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; import { Messages } from "./generated/lib/operations"; @@ -38,7 +42,7 @@ export interface MessagesClearOptions { * @interface MessagesEnqueueOptions * @extends {Models.MessagesEnqueueOptionalParams} */ -export interface MessagesEnqueueOptions extends Models.MessagesEnqueueOptionalParams {} +export interface MessagesEnqueueOptions extends Models.MessagesEnqueueOptionalParams { } /** * Options to configure Messages - Dequeue operation @@ -47,7 +51,7 @@ export interface MessagesEnqueueOptions extends Models.MessagesEnqueueOptionalPa * @interface MessagesDequeueOptions * @extends {Models.MessagesDequeueOptionalParams} */ -export interface MessagesDequeueOptions extends Models.MessagesDequeueOptionalParams {} +export interface MessagesDequeueOptions extends Models.MessagesDequeueOptionalParams { } /** * Options to configure Messages - Peek operation @@ -56,7 +60,7 @@ export interface MessagesDequeueOptions extends Models.MessagesDequeueOptionalPa * @interface MessagesPeekOptions * @extends {Models.MessagesPeekOptionalParams} */ -export interface MessagesPeekOptions extends Models.MessagesPeekOptionalParams {} +export interface MessagesPeekOptions extends Models.MessagesPeekOptionalParams { } export declare type MessagesEnqueueResponse = { /** @@ -85,68 +89,68 @@ export declare type MessagesEnqueueResponse = { */ timeNextVisible: Date; } & Models.MessagesEnqueueHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { /** - * The underlying HTTP response. + * The parsed HTTP response headers. */ - _response: HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: Models.MessagesEnqueueHeaders; - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Models.EnqueuedMessage[]; - }; + parsedHeaders: Models.MessagesEnqueueHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Models.EnqueuedMessage[]; }; +}; export declare type MessagesDequeueResponse = { dequeuedMessageItems: Models.DequeuedMessageItem[]; } & Models.MessagesDequeueHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { /** - * The underlying HTTP response. + * The parsed HTTP response headers. */ - _response: HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: Models.MessagesDequeueHeaders; - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Models.DequeuedMessageItem[]; - }; + parsedHeaders: Models.MessagesDequeueHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Models.DequeuedMessageItem[]; }; +}; export declare type MessagesPeekResponse = { peekedMessageItems: Models.PeekedMessageItem[]; } & Models.MessagesPeekHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { /** - * The underlying HTTP response. + * The parsed HTTP response headers. */ - _response: HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: Models.MessagesPeekHeaders; - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Models.PeekedMessageItem[]; - }; + parsedHeaders: Models.MessagesPeekHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Models.PeekedMessageItem[]; }; +}; /** * A MessagesClient represents a URL to an Azure Storage Queue's messages allowing you to manipulate its messages. @@ -182,12 +186,17 @@ export class MessagesClient extends StorageClient { * "https://myaccount.queue.core.windows.net/myqueue/messages". You can * append a SAS if using AnonymousCredential, such as * "https://myaccount.queue.core.windows.net/myqueue/messages?sasString". - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, anonymous credential is used. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. If not specified, + * AnonymousCredential is used. * @param {NewPipelineOptions} [options] Options to configure the HTTP pipeline. * @memberof MessagesClient */ - constructor(url: string, credential?: Credential, options?: NewPipelineOptions); + constructor( + url: string, + credential?: Credential | TokenCredential, + options?: NewPipelineOptions + ); /** * Creates an instance of MessagesClient. * @@ -202,13 +211,16 @@ export class MessagesClient extends StorageClient { constructor(url: string, pipeline: Pipeline); constructor( urlOrConnectionString: string, - credentialOrPipelineOrQueueName?: Credential | Pipeline | string, + credentialOrPipelineOrQueueName?: Credential | TokenCredential | Pipeline | string, options?: NewPipelineOptions ) { let pipeline: Pipeline; if (credentialOrPipelineOrQueueName instanceof Pipeline) { pipeline = credentialOrPipelineOrQueueName; - } else if (credentialOrPipelineOrQueueName instanceof Credential) { + } else if ( + credentialOrPipelineOrQueueName instanceof Credential || + isTokenCredential(credentialOrPipelineOrQueueName) + ) { pipeline = newPipeline(credentialOrPipelineOrQueueName, options); } else if ( !credentialOrPipelineOrQueueName && diff --git a/sdk/storage/storage-queue/src/Pipeline.ts b/sdk/storage/storage-queue/src/Pipeline.ts index aa57b5d530f9..9041e1bcdc63 100644 --- a/sdk/storage/storage-queue/src/Pipeline.ts +++ b/sdk/storage/storage-queue/src/Pipeline.ts @@ -14,8 +14,11 @@ import { RequestPolicyFactory, RequestPolicyOptions, ServiceClientOptions, - WebResource -} from "@azure/ms-rest-js"; + WebResource, + TokenCredential, + isTokenCredential, + bearerTokenAuthenticationPolicy +} from "@azure/core-http"; import { BrowserPolicyFactory } from "./BrowserPolicyFactory"; import { Credential } from "./credentials/Credential"; import { LoggingPolicyFactory } from "./LoggingPolicyFactory"; @@ -159,13 +162,15 @@ export interface NewPipelineOptions { * Creates a new Pipeline object with Credential provided. * * @static - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. If not specified, + * AnonymousCredential is used. * @param {NewPipelineOptions} [pipelineOptions] Options. * @returns {Pipeline} A new Pipeline object. * @memberof Pipeline */ export function newPipeline( - credential: Credential, + credential: Credential | TokenCredential, pipelineOptions: NewPipelineOptions = {} ): Pipeline { // Order is important. Closer to the API at the top & closer to the network at the bottom. @@ -178,7 +183,9 @@ export function newPipeline( deserializationPolicy(), // Default deserializationPolicy is provided by protocol layer new RetryPolicyFactory(pipelineOptions.retryOptions), new LoggingPolicyFactory(), - credential + isTokenCredential(credential) + ? bearerTokenAuthenticationPolicy(credential, "https://storage.azure.com/.default") + : credential ]; return new Pipeline(factories, { diff --git a/sdk/storage/storage-queue/src/QueueClient.ts b/sdk/storage/storage-queue/src/QueueClient.ts index dd5f8d5ce732..ebf426c07078 100644 --- a/sdk/storage/storage-queue/src/QueueClient.ts +++ b/sdk/storage/storage-queue/src/QueueClient.ts @@ -1,7 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { HttpResponse } from "@azure/ms-rest-js"; +import { + HttpResponse, + TokenCredential, + isTokenCredential +} from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; import { Queue } from "./generated/lib/operations"; @@ -168,24 +172,24 @@ export interface SignedIdentifier { export declare type QueueGetAccessPolicyResponse = { signedIdentifiers: SignedIdentifier[]; } & Models.QueueGetAccessPolicyHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { /** - * The underlying HTTP response. + * The parsed HTTP response headers. */ - _response: HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: Models.QueueGetAccessPolicyHeaders; - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Models.SignedIdentifier[]; - }; + parsedHeaders: Models.QueueGetAccessPolicyHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Models.SignedIdentifier[]; }; +}; /** * A QueueClient represents a URL to the Azure Storage queue. @@ -221,12 +225,17 @@ export class QueueClient extends StorageClient { * "https://myaccount.queue.core.windows.net/myqueue". You can * append a SAS if using AnonymousCredential, such as * "https://myaccount.queue.core.windows.net/myqueue?sasString". - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, anonymous credential is used. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. If not specified, + * AnonymousCredential is used. * @param {NewPipelineOptions} [options] Options to configure the HTTP pipeline. * @memberof QueueClient */ - constructor(url: string, credential?: Credential, options?: NewPipelineOptions); + constructor( + url: string, + credential?: Credential | TokenCredential, + options?: NewPipelineOptions + ); /** * Creates an instance of QueueClient. * @@ -241,13 +250,16 @@ export class QueueClient extends StorageClient { constructor(url: string, pipeline: Pipeline); constructor( urlOrConnectionString: string, - credentialOrPipelineOrQueueName?: Credential | Pipeline | string, + credentialOrPipelineOrQueueName?: Credential | TokenCredential | Pipeline | string, options?: NewPipelineOptions ) { let pipeline: Pipeline; if (credentialOrPipelineOrQueueName instanceof Pipeline) { pipeline = credentialOrPipelineOrQueueName; - } else if (credentialOrPipelineOrQueueName instanceof Credential) { + } else if ( + credentialOrPipelineOrQueueName instanceof Credential || + isTokenCredential(credentialOrPipelineOrQueueName) + ) { pipeline = newPipeline(credentialOrPipelineOrQueueName, options); } else if ( !credentialOrPipelineOrQueueName && diff --git a/sdk/storage/storage-queue/src/QueueServiceClient.ts b/sdk/storage/storage-queue/src/QueueServiceClient.ts index 5990b4c3e2c7..095af5e097f4 100644 --- a/sdk/storage/storage-queue/src/QueueServiceClient.ts +++ b/sdk/storage/storage-queue/src/QueueServiceClient.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import { TokenCredential, isTokenCredential } from "@azure/core-http"; import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; import { ListQueuesIncludeType } from "./generated/lib/models/index"; @@ -104,7 +105,7 @@ export interface ServiceListQueuesSegmentOptions { * specify that the queue's metadata be returned as part of the response * body. Possible values include: 'metadata' */ - include?: ListQueuesIncludeType; + include?: ListQueuesIncludeType[]; } /** @@ -133,7 +134,7 @@ export interface ServiceListQueuesOptions { * specify that the queue's metadata be returned as part of the response * body. Possible values include: 'metadata' */ - include?: ListQueuesIncludeType; + include?: ListQueuesIncludeType[]; } /** @@ -183,12 +184,17 @@ export class QueueServiceClient extends StorageClient { * @param {string} url A URL string pointing to Azure Storage queue service, such as * "https://myaccount.queue.core.windows.net". You can append a SAS * if using AnonymousCredential, such as "https://myaccount.queue.core.windows.net?sasString". - * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * If not specified, anonymous credential is used. + * @param {Credential | TokenCredential} credential Such as AnonymousCredential, SharedKeyCredential, RawTokenCredential, + * or a TokenCredential from @azure/identity. If not specified, + * AnonymousCredential is used. * @param {NewPipelineOptions} [options] Options to configure the HTTP pipeline. * @memberof QueueServiceClient */ - constructor(url: string, credential?: Credential, options?: NewPipelineOptions); + constructor( + url: string, + credential?: Credential | TokenCredential, + options?: NewPipelineOptions + ); /** * Creates an instance of QueueServiceClient. * @@ -202,13 +208,16 @@ export class QueueServiceClient extends StorageClient { constructor(url: string, pipeline: Pipeline); constructor( url: string, - credentialOrPipeline?: Credential | Pipeline, + credentialOrPipeline?: Credential | TokenCredential | Pipeline, options?: NewPipelineOptions ) { let pipeline: Pipeline; if (credentialOrPipeline instanceof Pipeline) { pipeline = credentialOrPipeline; - } else if (credentialOrPipeline instanceof Credential) { + } else if ( + credentialOrPipeline instanceof Credential || + isTokenCredential(credentialOrPipeline) + ) { pipeline = newPipeline(credentialOrPipeline, options); } else { // The second paramter is undefined. Use anonymous credential. @@ -307,7 +316,7 @@ export class QueueServiceClient extends StorageClient { abortSignal: aborter, marker, ...options - }); + } as Models.ServiceListQueuesSegmentOptionalParams); } /** diff --git a/sdk/storage/storage-queue/src/RetryPolicyFactory.ts b/sdk/storage/storage-queue/src/RetryPolicyFactory.ts index d6ec0278c527..2757b8b1351c 100644 --- a/sdk/storage/storage-queue/src/RetryPolicyFactory.ts +++ b/sdk/storage/storage-queue/src/RetryPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { RetryPolicy, RetryPolicyType } from "./policies/RetryPolicy"; /** diff --git a/sdk/storage/storage-queue/src/TelemetryPolicyFactory.ts b/sdk/storage/storage-queue/src/TelemetryPolicyFactory.ts index 7ae0be43f6e3..fd7def22f22b 100644 --- a/sdk/storage/storage-queue/src/TelemetryPolicyFactory.ts +++ b/sdk/storage/storage-queue/src/TelemetryPolicyFactory.ts @@ -6,7 +6,7 @@ import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import * as os from "os"; import { TelemetryPolicy } from "./policies/TelemetryPolicy"; diff --git a/sdk/storage/storage-queue/src/UniqueRequestIDPolicyFactory.ts b/sdk/storage/storage-queue/src/UniqueRequestIDPolicyFactory.ts index 3128391507e0..caf56b5ac0c5 100644 --- a/sdk/storage/storage-queue/src/UniqueRequestIDPolicyFactory.ts +++ b/sdk/storage/storage-queue/src/UniqueRequestIDPolicyFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { UniqueRequestIDPolicy } from "./policies/UniqueRequestIDPolicy"; /** diff --git a/sdk/storage/storage-queue/src/credentials/AnonymousCredential.ts b/sdk/storage/storage-queue/src/credentials/AnonymousCredential.ts index 85f357b28d58..a13ff503bd52 100644 --- a/sdk/storage/storage-queue/src/credentials/AnonymousCredential.ts +++ b/sdk/storage/storage-queue/src/credentials/AnonymousCredential.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions } from "@azure/core-http"; import { AnonymousCredentialPolicy } from "../policies/AnonymousCredentialPolicy"; import { Credential } from "./Credential"; diff --git a/sdk/storage/storage-queue/src/credentials/Credential.ts b/sdk/storage/storage-queue/src/credentials/Credential.ts index 1150f504dc4d..7a201480194a 100644 --- a/sdk/storage/storage-queue/src/credentials/Credential.ts +++ b/sdk/storage/storage-queue/src/credentials/Credential.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "@azure/core-http"; import { CredentialPolicy } from "../policies/CredentialPolicy"; /** diff --git a/sdk/storage/storage-queue/src/credentials/RawTokenCredential.ts b/sdk/storage/storage-queue/src/credentials/RawTokenCredential.ts new file mode 100644 index 000000000000..52aeac1225b7 --- /dev/null +++ b/sdk/storage/storage-queue/src/credentials/RawTokenCredential.ts @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-http"; + +/** + * RawTokenCredential is a TokenCredential that always returns the given token. + * Renew the token by setting a new token string value to token property. + * + * @example + * const rawTokenCredential = new RawTokenCredential("token"); + * const pipeline = newPipeline(tokenCredential); + * + * const queueServiceClient = new QueueServiceClient("https://mystorageaccount.queue.core.windows.net", pipeline); + * + * // Set up a timer to refresh the token + * const timerID = setInterval(() => { + * // Update token by accessing to public tokenCredential.token + * tokenCredential.token = "updatedToken"; + * // WARNING: Timer must be manually stopped! It will forbid GC of tokenCredential + * if (shouldStop()) { + * clearInterval(timerID); + * } + * }, 60 * 60 * 1000); // Set an interval time before your token expired + * @export + * @implements {TokenCredential} + * + */ +export class RawTokenCredential implements TokenCredential { + /** + * Mutable token value. You can set a renewed token value to this property, + * for example, when an OAuth token is expired. + * + * @type {string} + */ + public token: string; + + /** + * Creates an instance of TokenCredential. + * @param {string} token + */ + constructor(token: string) { + this.token = token; + } + + /** + * Retrieves the token stored in this RawTokenCredential. + * + * @param _scopes Ignored since token is already known. + * @param _options Ignored since token is already known. + * @returns {AccessToken} The access token details. + */ + async getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise { + return { + token: this.token, + expiresOnTimestamp: Date.now() + 2 * 60 * 1000 // 2 Minutes + }; + } +} diff --git a/sdk/storage/storage-queue/src/credentials/SharedKeyCredential.ts b/sdk/storage/storage-queue/src/credentials/SharedKeyCredential.ts index 52ff7dfd09ab..88f8739bea47 100644 --- a/sdk/storage/storage-queue/src/credentials/SharedKeyCredential.ts +++ b/sdk/storage/storage-queue/src/credentials/SharedKeyCredential.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as Crypto from "crypto"; -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions } from "@azure/core-http"; import { SharedKeyCredentialPolicy } from "../policies/SharedKeyCredentialPolicy"; import { Credential } from "./Credential"; diff --git a/sdk/storage/storage-queue/src/generated/lib/models/index.ts b/sdk/storage/storage-queue/src/generated/lib/models/index.ts index 8fd9609fe1b6..904f7640b3ab 100644 --- a/sdk/storage/storage-queue/src/generated/lib/models/index.ts +++ b/sdk/storage/storage-queue/src/generated/lib/models/index.ts @@ -1,1372 +1,1049 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; /** - * @interface - * An interface representing AccessPolicy. * An Access policy - * */ export interface AccessPolicy { /** - * @member {string} start the date-time the policy is active - * **NOTE: This entity will be treated as a string instead of a Date because - * the API can potentially deal with a higher precision value than what is - * supported by JavaScript.** + * the date-time the policy is active + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** */ start: string; /** - * @member {string} expiry the date-time the policy expires - * **NOTE: This entity will be treated as a string instead of a Date because - * the API can potentially deal with a higher precision value than what is - * supported by JavaScript.** + * the date-time the policy expires + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** */ expiry: string; /** - * @member {string} permission the permissions for the acl policy + * the permissions for the acl policy */ permission: string; } /** - * @interface - * An interface representing QueueItem. * An Azure Storage Queue. - * */ export interface QueueItem { /** - * @member {string} name The name of the Queue. + * The name of the Queue. */ name: string; - /** - * @member {{ [propertyName: string]: string }} [metadata] - */ metadata?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing ListQueuesSegmentResponse. * The object returned when calling List Queues on a Queue Service. - * */ export interface ListQueuesSegmentResponse { - /** - * @member {string} serviceEndpoint - */ serviceEndpoint: string; - /** - * @member {string} prefix - */ prefix: string; - /** - * @member {string} [marker] - */ marker?: string; - /** - * @member {number} maxResults - */ maxResults: number; - /** - * @member {QueueItem[]} [queueItems] - */ queueItems?: QueueItem[]; - /** - * @member {string} nextMarker - */ nextMarker: string; } /** - * @interface - * An interface representing CorsRule. - * 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 - * + * 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 { /** - * @member {string} allowedOrigins The origin domains that are permitted to - * make a request against the storage service via CORS. The origin domain is - * the domain from which the request originates. Note that the origin must be - * an exact case-sensitive match with the origin that the user age sends to - * the service. You can also use the wildcard character '*' to allow all - * origin domains to make requests via CORS. + * The origin domains that are permitted to make a request against the storage service via CORS. + * The origin domain is the domain from which the request originates. Note that the origin must + * be an exact case-sensitive match with the origin that the user age sends to the service. You + * can also use the wildcard character '*' to allow all origin domains to make requests via CORS. */ allowedOrigins: string; /** - * @member {string} allowedMethods The methods (HTTP request verbs) that the - * origin domain may use for a CORS request. (comma separated) + * The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma + * separated) */ allowedMethods: string; /** - * @member {string} allowedHeaders the request headers that the origin domain - * may specify on the CORS request. + * the request headers that the origin domain may specify on the CORS request. */ allowedHeaders: string; /** - * @member {string} exposedHeaders The response headers that may be sent in - * the response to the CORS request and exposed by the browser to the request - * issuer + * The response headers that may be sent in the response to the CORS request and exposed by the + * browser to the request issuer */ exposedHeaders: string; /** - * @member {number} maxAgeInSeconds The maximum amount time that a browser - * should cache the preflight OPTIONS request. + * The maximum amount time that a browser should cache the preflight OPTIONS request. */ maxAgeInSeconds: number; } /** - * @interface * An interface representing GeoReplication. */ export interface GeoReplication { /** - * @member {GeoReplicationStatusType} status The status of the secondary - * location. Possible values include: 'live', 'bootstrap', 'unavailable' + * The status of the secondary location. Possible values include: 'live', 'bootstrap', + * 'unavailable' */ status: GeoReplicationStatusType; /** - * @member {Date} lastSyncTime 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 + * 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: Date; } /** - * @interface - * An interface representing RetentionPolicy. * the retention policy - * */ export interface RetentionPolicy { /** - * @member {boolean} enabled Indicates whether a retention policy is enabled - * for the storage service + * Indicates whether a retention policy is enabled for the storage service */ enabled: boolean; /** - * @member {number} [days] Indicates the number of days that metrics or - * logging or soft-deleted data should be retained. All data older than this - * value will be deleted + * Indicates the number of days that metrics or logging or soft-deleted data should be retained. + * All data older than this value will be deleted */ days?: number; } /** - * @interface - * An interface representing Logging. * Azure Analytics Logging settings. - * */ export interface Logging { /** - * @member {string} version The version of Storage Analytics to configure. + * The version of Storage Analytics to configure. */ version: string; /** - * @member {boolean} deleteProperty Indicates whether all delete requests - * should be logged. + * Indicates whether all delete requests should be logged. */ deleteProperty: boolean; /** - * @member {boolean} read Indicates whether all read requests should be - * logged. + * Indicates whether all read requests should be logged. */ read: boolean; /** - * @member {boolean} write Indicates whether all write requests should be - * logged. + * Indicates whether all write requests should be logged. */ write: boolean; - /** - * @member {RetentionPolicy} retentionPolicy - */ retentionPolicy: RetentionPolicy; } /** - * @interface * An interface representing StorageError. */ export interface StorageError { - /** - * @member {string} [message] - */ message?: string; } /** - * @interface * An interface representing Metrics. */ export interface Metrics { /** - * @member {string} [version] The version of Storage Analytics to configure. + * The version of Storage Analytics to configure. */ version?: string; /** - * @member {boolean} enabled Indicates whether metrics are enabled for the - * Queue service. + * Indicates whether metrics are enabled for the Queue service. */ enabled: boolean; /** - * @member {boolean} [includeAPIs] Indicates whether metrics should generate - * summary statistics for called API operations. + * Indicates whether metrics should generate summary statistics for called API operations. */ includeAPIs?: boolean; - /** - * @member {RetentionPolicy} [retentionPolicy] - */ retentionPolicy?: RetentionPolicy; } /** - * @interface - * An interface representing QueueMessage. * A Message object which can be stored in a Queue - * */ export interface QueueMessage { /** - * @member {string} messageText The content of the message + * The content of the message */ messageText: string; } /** - * @interface - * An interface representing DequeuedMessageItem. - * The object returned in the QueueMessageList array when calling Get Messages - * on a Queue. - * + * The object returned in the QueueMessageList array when calling Get Messages on a Queue. */ export interface DequeuedMessageItem { /** - * @member {string} messageId The Id of the Message. + * The Id of the Message. */ messageId: string; /** - * @member {Date} insertionTime The time the Message was inserted into the - * Queue. + * The time the Message was inserted into the Queue. */ insertionTime: Date; /** - * @member {Date} expirationTime The time that the Message will expire and be - * automatically deleted. + * The time that the Message will expire and be automatically deleted. */ expirationTime: Date; /** - * @member {string} popReceipt This value is required to delete the Message. - * If deletion fails using this popreceipt then the message has been dequeued - * by another client. + * This value is required to delete the Message. If deletion fails using this popreceipt then the + * message has been dequeued by another client. */ popReceipt: string; /** - * @member {Date} timeNextVisible The time that the message will again become - * visible in the Queue. + * The time that the message will again become visible in the Queue. */ timeNextVisible: Date; /** - * @member {number} dequeueCount The number of times the message has been - * dequeued. + * The number of times the message has been dequeued. */ dequeueCount: number; /** - * @member {string} messageText The content of the Message. + * The content of the Message. */ messageText: string; } /** - * @interface - * An interface representing PeekedMessageItem. - * The object returned in the QueueMessageList array when calling Peek Messages - * on a Queue - * + * The object returned in the QueueMessageList array when calling Peek Messages on a Queue */ export interface PeekedMessageItem { /** - * @member {string} messageId The Id of the Message. + * The Id of the Message. */ messageId: string; /** - * @member {Date} insertionTime The time the Message was inserted into the - * Queue. + * The time the Message was inserted into the Queue. */ insertionTime: Date; /** - * @member {Date} expirationTime The time that the Message will expire and be - * automatically deleted. + * The time that the Message will expire and be automatically deleted. */ expirationTime: Date; /** - * @member {number} dequeueCount The number of times the message has been - * dequeued. + * The number of times the message has been dequeued. */ dequeueCount: number; /** - * @member {string} messageText The content of the Message. + * The content of the Message. */ messageText: string; } /** - * @interface - * An interface representing EnqueuedMessage. - * The object returned in the QueueMessageList array when calling Put Message - * on a Queue - * + * The object returned in the QueueMessageList array when calling Put Message on a Queue */ export interface EnqueuedMessage { /** - * @member {string} messageId The Id of the Message. + * The Id of the Message. */ messageId: string; /** - * @member {Date} insertionTime The time the Message was inserted into the - * Queue. + * The time the Message was inserted into the Queue. */ insertionTime: Date; /** - * @member {Date} expirationTime The time that the Message will expire and be - * automatically deleted. + * The time that the Message will expire and be automatically deleted. */ expirationTime: Date; /** - * @member {string} popReceipt This value is required to delete the Message. - * If deletion fails using this popreceipt then the message has been dequeued - * by another client. + * This value is required to delete the Message. If deletion fails using this popreceipt then the + * message has been dequeued by another client. */ popReceipt: string; /** - * @member {Date} timeNextVisible The time that the message will again become - * visible in the Queue. + * The time that the message will again become visible in the Queue. */ timeNextVisible: Date; } /** - * @interface - * An interface representing SignedIdentifier. * signed identifier - * */ export interface SignedIdentifier { /** - * @member {string} id a unique id + * a unique id */ id: string; /** - * @member {AccessPolicy} accessPolicy The access policy + * The access policy */ accessPolicy: AccessPolicy; } /** - * @interface - * An interface representing StorageServiceProperties. * Storage Service Properties. - * */ export interface StorageServiceProperties { /** - * @member {Logging} [logging] Azure Analytics Logging settings + * Azure Analytics Logging settings */ logging?: Logging; /** - * @member {Metrics} [hourMetrics] A summary of request statistics grouped by - * API in hourly aggregates for queues + * A summary of request statistics grouped by API in hourly aggregates for queues */ hourMetrics?: Metrics; /** - * @member {Metrics} [minuteMetrics] a summary of request statistics grouped - * by API in minute aggregates for queues + * a summary of request statistics grouped by API in minute aggregates for queues */ minuteMetrics?: Metrics; /** - * @member {CorsRule[]} [cors] The set of CORS rules. + * The set of CORS rules. */ cors?: CorsRule[]; } /** - * @interface - * An interface representing StorageServiceStats. * Stats for the storage service. - * */ export interface StorageServiceStats { /** - * @member {GeoReplication} [geoReplication] Geo-Replication information for - * the Secondary Storage Service + * Geo-Replication information for the Secondary Storage Service */ geoReplication?: GeoReplication; } /** - * @interface - * An interface representing ServiceSetPropertiesOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ServiceSetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface ServiceSetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The The timeout parameter is expressed - * in seconds. For more information, see Setting * Timeouts for Queue Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing ServiceGetStatisticsOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ServiceGetStatisticsOptionalParams extends msRest.RequestOptionsBase { +export interface ServiceGetStatisticsOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The The timeout parameter is expressed - * in seconds. For more information, see Setting * Timeouts for Queue Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; +} + +/** + * Optional Parameters. + */ +export interface ServiceListQueuesSegmentNextOptionalParams extends coreHttp.RequestOptionsBase { + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing QueueCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface QueueCreateOptionalParams extends msRest.RequestOptionsBase { +export interface QueueCreateOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The The timeout parameter is expressed - * in seconds. For more information, see Setting * Timeouts for Queue Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing QueueGetPropertiesOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface QueueGetPropertiesOptionalParams extends msRest.RequestOptionsBase { +export interface QueueGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The The timeout parameter is expressed - * in seconds. For more information, see Setting * Timeouts for Queue Service Operations. */ timeoutParameter?: number; /** - * @member {{ [propertyName: string]: string }} [metadata] Optional. Include - * this parameter to specify that the queue's metadata be returned as part of - * the response body. Note that metadata requested with this parameter must - * be stored in accordance with the naming restrictions imposed by the - * 2009-09-19 version of the Queue service. Beginning with this version, all - * metadata names must adhere to the naming conventions for C# identifiers. + * Optional. Include this parameter to specify that the queue's metadata be returned as part of + * the response body. Note that metadata requested with this parameter must be stored in + * accordance with the naming restrictions imposed by the 2009-09-19 version of the Queue + * service. Beginning with this version, all metadata names must adhere to the naming conventions + * for C# identifiers. */ metadata?: { [propertyName: string]: string }; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing QueueGetAccessPolicyOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface QueueGetAccessPolicyOptionalParams extends msRest.RequestOptionsBase { +export interface QueueGetAccessPolicyOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The The timeout parameter is expressed - * in seconds. For more information, see Setting * Timeouts for Queue Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing MessagesDequeueOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface MessagesDequeueOptionalParams extends msRest.RequestOptionsBase { +export interface MessagesDequeueOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [numberOfMessages] Optional. A nonzero integer value that - * specifies the number of messages to retrieve from the queue, up to a - * maximum of 32. If fewer are visible, the visible messages are returned. By + * Optional. A nonzero integer value that specifies the number of messages to retrieve from the + * queue, up to a maximum of 32. If fewer are visible, the visible messages are returned. By * default, a single message is retrieved from the queue with this operation. */ numberOfMessages?: number; /** - * @member {number} [visibilitytimeout] Optional. Specifies the new - * visibility timeout value, in seconds, relative to server time. The default - * value is 30 seconds. A specified value must be larger than or equal to 1 - * second, and cannot be larger than 7 days, or larger than 2 hours on REST - * protocol versions prior to version 2011-08-18. The visibility timeout of a - * message can be set to a value later than the expiry time. + * Optional. Specifies the new visibility timeout value, in seconds, relative to server time. The + * default value is 30 seconds. A specified value must be larger than or equal to 1 second, and + * cannot be larger than 7 days, or larger than 2 hours on REST protocol versions prior to + * version 2011-08-18. The visibility timeout of a message can be set to a value later than the + * expiry time. */ visibilitytimeout?: number; /** - * @member {number} [timeoutParameter] The The timeout parameter is expressed - * in seconds. For more information, see Setting * Timeouts for Queue Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing MessagesEnqueueOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface MessagesEnqueueOptionalParams extends msRest.RequestOptionsBase { +export interface MessagesEnqueueOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [visibilitytimeout] Optional. Specifies the new - * visibility timeout value, in seconds, relative to server time. The default - * value is 30 seconds. A specified value must be larger than or equal to 1 - * second, and cannot be larger than 7 days, or larger than 2 hours on REST - * protocol versions prior to version 2011-08-18. The visibility timeout of a - * message can be set to a value later than the expiry time. + * Optional. Specifies the new visibility timeout value, in seconds, relative to server time. The + * default value is 30 seconds. A specified value must be larger than or equal to 1 second, and + * cannot be larger than 7 days, or larger than 2 hours on REST protocol versions prior to + * version 2011-08-18. The visibility timeout of a message can be set to a value later than the + * expiry time. */ visibilitytimeout?: number; /** - * @member {number} [messageTimeToLive] Optional. Specifies the time-to-live - * interval for the message, in seconds. Prior to version 2017-07-29, the - * maximum time-to-live allowed is 7 days. For version 2017-07-29 or later, - * the maximum time-to-live can be any positive number, as well as -1 - * indicating that the message does not expire. If this parameter is omitted, - * the default time-to-live is 7 days. + * Optional. Specifies the time-to-live interval for the message, in seconds. Prior to version + * 2017-07-29, the maximum time-to-live allowed is 7 days. For version 2017-07-29 or later, the + * maximum time-to-live can be any positive number, as well as -1 indicating that the message + * does not expire. If this parameter is omitted, the default time-to-live is 7 days. */ messageTimeToLive?: number; /** - * @member {number} [timeoutParameter] The The timeout parameter is expressed - * in seconds. For more information, see Setting * Timeouts for Queue Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing MessageIdUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface MessageIdUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface MessageIdUpdateOptionalParams extends coreHttp.RequestOptionsBase { /** - * @member {number} [timeoutParameter] The The timeout parameter is expressed - * in seconds. For more information, see Setting * Timeouts for Queue Service Operations. */ timeoutParameter?: number; /** - * @member {string} [requestId] Provides a client-generated, opaque value - * with a 1 KB character limit that is recorded in the analytics logs when - * storage analytics logging is enabled. + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. */ requestId?: string; } /** - * @interface - * An interface representing ServiceSetPropertiesHeaders. * Defines headers for SetProperties operation. - * */ export interface ServiceSetPropertiesHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ServiceGetPropertiesHeaders. * Defines headers for GetProperties operation. - * */ export interface ServiceGetPropertiesHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ServiceGetStatisticsHeaders. * Defines headers for GetStatistics operation. - * */ export interface ServiceGetStatisticsHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing ServiceListQueuesSegmentHeaders. * Defines headers for ListQueuesSegment operation. - * */ export interface ServiceListQueuesSegmentHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing QueueCreateHeaders. * Defines headers for Create operation. - * */ export interface QueueCreateHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing QueueDeleteHeaders. * Defines headers for Delete operation. - * */ export interface QueueDeleteHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing QueueGetPropertiesHeaders. * Defines headers for GetProperties operation. - * */ export interface QueueGetPropertiesHeaders { - /** - * @member {{ [propertyName: string]: string }} [metadata] - */ metadata?: { [propertyName: string]: string }; /** - * @member {number} [approximateMessagesCount] The approximate number of - * messages in the queue. This number is not lower than the actual number of - * messages in the queue, but could be higher. + * The approximate number of messages in the queue. This number is not lower than the actual + * number of messages in the queue, but could be higher. */ approximateMessagesCount?: number; /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing QueueSetMetadataHeaders. * Defines headers for SetMetadata operation. - * */ export interface QueueSetMetadataHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing QueueGetAccessPolicyHeaders. * Defines headers for GetAccessPolicy operation. - * */ export interface QueueGetAccessPolicyHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing QueueSetAccessPolicyHeaders. * Defines headers for SetAccessPolicy operation. - * */ export interface QueueSetAccessPolicyHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing MessagesDequeueHeaders. * Defines headers for Dequeue operation. - * */ export interface MessagesDequeueHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing MessagesClearHeaders. * Defines headers for Clear operation. - * */ export interface MessagesClearHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing MessagesEnqueueHeaders. * Defines headers for Enqueue operation. - * */ export interface MessagesEnqueueHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing MessagesPeekHeaders. * Defines headers for Peek operation. - * */ export interface MessagesPeekHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing MessageIdUpdateHeaders. * Defines headers for Update operation. - * */ export interface MessageIdUpdateHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; /** - * @member {string} [popReceipt] The pop receipt of the queue message. + * The pop receipt of the queue message. */ popReceipt?: string; /** - * @member {Date} [timeNextVisible] A UTC date/time value that represents - * when the message will be visible on the queue. + * A UTC date/time value that represents when the message will be visible on the queue. */ timeNextVisible?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** - * @interface - * An interface representing MessageIdDeleteHeaders. * Defines headers for Delete operation. - * */ export interface MessageIdDeleteHeaders { /** - * @member {string} [requestId] This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. */ requestId?: string; /** - * @member {string} [version] Indicates the version of the Queue service used - * to execute the request. This header is returned for requests made against - * version 2009-09-19 and above. + * Indicates the version of the Queue service used to execute the request. This header is + * returned for requests made against version 2009-09-19 and above. */ version?: string; /** - * @member {Date} [date] UTC date/time value generated by the service that - * indicates the time at which the response was initiated + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated */ date?: Date; - /** - * @member {string} [errorCode] - */ errorCode?: string; } /** * Defines values for StorageErrorCode. * Possible values include: 'AccountAlreadyExists', 'AccountBeingCreated', 'AccountIsDisabled', - * 'AuthenticationFailed', 'ConditionHeadersNotSupported', 'ConditionNotMet', 'EmptyMetadataKey', - * 'InsufficientAccountPermissions', 'InternalError', 'InvalidAuthenticationInfo', - * 'InvalidHeaderValue', 'InvalidHttpVerb', 'InvalidInput', 'InvalidMd5', 'InvalidMetadata', - * 'InvalidQueryParameterValue', 'InvalidRange', 'InvalidResourceName', 'InvalidUri', - * 'InvalidXmlDocument', 'InvalidXmlNodeValue', 'Md5Mismatch', 'MetadataTooLarge', - * 'MissingContentLengthHeader', 'MissingRequiredQueryParameter', 'MissingRequiredHeader', - * 'MissingRequiredXmlNode', 'MultipleConditionHeadersNotSupported', 'OperationTimedOut', - * 'OutOfRangeInput', 'OutOfRangeQueryParameterValue', 'RequestBodyTooLarge', + * 'AuthenticationFailed', 'AuthorizationFailure', 'ConditionHeadersNotSupported', + * 'ConditionNotMet', 'EmptyMetadataKey', 'InsufficientAccountPermissions', 'InternalError', + * 'InvalidAuthenticationInfo', 'InvalidHeaderValue', 'InvalidHttpVerb', 'InvalidInput', + * 'InvalidMd5', 'InvalidMetadata', 'InvalidQueryParameterValue', 'InvalidRange', + * 'InvalidResourceName', 'InvalidUri', 'InvalidXmlDocument', 'InvalidXmlNodeValue', 'Md5Mismatch', + * 'MetadataTooLarge', 'MissingContentLengthHeader', 'MissingRequiredQueryParameter', + * 'MissingRequiredHeader', 'MissingRequiredXmlNode', 'MultipleConditionHeadersNotSupported', + * 'OperationTimedOut', 'OutOfRangeInput', 'OutOfRangeQueryParameterValue', 'RequestBodyTooLarge', * 'ResourceTypeMismatch', 'RequestUrlFailedToParse', 'ResourceAlreadyExists', 'ResourceNotFound', * 'ServerBusy', 'UnsupportedHeader', 'UnsupportedXmlNode', 'UnsupportedQueryParameter', * 'UnsupportedHttpVerb', 'InvalidMarker', 'MessageNotFound', 'MessageTooLarge', @@ -1375,7 +1052,7 @@ export interface MessageIdDeleteHeaders { * @readonly * @enum {string} */ -export type StorageErrorCode = 'AccountAlreadyExists' | 'AccountBeingCreated' | 'AccountIsDisabled' | 'AuthenticationFailed' | 'ConditionHeadersNotSupported' | 'ConditionNotMet' | 'EmptyMetadataKey' | 'InsufficientAccountPermissions' | 'InternalError' | 'InvalidAuthenticationInfo' | 'InvalidHeaderValue' | 'InvalidHttpVerb' | 'InvalidInput' | 'InvalidMd5' | 'InvalidMetadata' | 'InvalidQueryParameterValue' | 'InvalidRange' | 'InvalidResourceName' | 'InvalidUri' | 'InvalidXmlDocument' | 'InvalidXmlNodeValue' | 'Md5Mismatch' | 'MetadataTooLarge' | 'MissingContentLengthHeader' | 'MissingRequiredQueryParameter' | 'MissingRequiredHeader' | 'MissingRequiredXmlNode' | 'MultipleConditionHeadersNotSupported' | 'OperationTimedOut' | 'OutOfRangeInput' | 'OutOfRangeQueryParameterValue' | 'RequestBodyTooLarge' | 'ResourceTypeMismatch' | 'RequestUrlFailedToParse' | 'ResourceAlreadyExists' | 'ResourceNotFound' | 'ServerBusy' | 'UnsupportedHeader' | 'UnsupportedXmlNode' | 'UnsupportedQueryParameter' | 'UnsupportedHttpVerb' | 'InvalidMarker' | 'MessageNotFound' | 'MessageTooLarge' | 'PopReceiptMismatch' | 'QueueAlreadyExists' | 'QueueBeingDeleted' | 'QueueDisabled' | 'QueueNotEmpty' | 'QueueNotFound'; +export type StorageErrorCode = 'AccountAlreadyExists' | 'AccountBeingCreated' | 'AccountIsDisabled' | 'AuthenticationFailed' | 'AuthorizationFailure' | 'ConditionHeadersNotSupported' | 'ConditionNotMet' | 'EmptyMetadataKey' | 'InsufficientAccountPermissions' | 'InternalError' | 'InvalidAuthenticationInfo' | 'InvalidHeaderValue' | 'InvalidHttpVerb' | 'InvalidInput' | 'InvalidMd5' | 'InvalidMetadata' | 'InvalidQueryParameterValue' | 'InvalidRange' | 'InvalidResourceName' | 'InvalidUri' | 'InvalidXmlDocument' | 'InvalidXmlNodeValue' | 'Md5Mismatch' | 'MetadataTooLarge' | 'MissingContentLengthHeader' | 'MissingRequiredQueryParameter' | 'MissingRequiredHeader' | 'MissingRequiredXmlNode' | 'MultipleConditionHeadersNotSupported' | 'OperationTimedOut' | 'OutOfRangeInput' | 'OutOfRangeQueryParameterValue' | 'RequestBodyTooLarge' | 'ResourceTypeMismatch' | 'RequestUrlFailedToParse' | 'ResourceAlreadyExists' | 'ResourceNotFound' | 'ServerBusy' | 'UnsupportedHeader' | 'UnsupportedXmlNode' | 'UnsupportedQueryParameter' | 'UnsupportedHttpVerb' | 'InvalidMarker' | 'MessageNotFound' | 'MessageTooLarge' | 'PopReceiptMismatch' | 'QueueAlreadyExists' | 'QueueBeingDeleted' | 'QueueDisabled' | 'QueueNotEmpty' | 'QueueNotFound'; /** * Defines values for GeoReplicationStatusType. @@ -1400,7 +1077,7 @@ export type ServiceSetPropertiesResponse = ServiceSetPropertiesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1415,15 +1092,17 @@ export type ServiceGetPropertiesResponse = StorageServiceProperties & ServiceGet /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: ServiceGetPropertiesHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1438,15 +1117,17 @@ export type ServiceGetStatisticsResponse = StorageServiceStats & ServiceGetStati /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: ServiceGetStatisticsHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1461,15 +1142,17 @@ export type ServiceListQueuesSegmentResponse = ListQueuesSegmentResponse & Servi /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: ServiceListQueuesSegmentHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1484,7 +1167,7 @@ export type QueueCreateResponse = QueueCreateHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1499,7 +1182,7 @@ export type QueueDeleteResponse = QueueDeleteHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1514,7 +1197,7 @@ export type QueueGetPropertiesResponse = QueueGetPropertiesHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1529,7 +1212,7 @@ export type QueueSetMetadataResponse = QueueSetMetadataHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1544,15 +1227,17 @@ export type QueueGetAccessPolicyResponse = Array & QueueGetAcc /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: QueueGetAccessPolicyHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1567,7 +1252,7 @@ export type QueueSetAccessPolicyResponse = QueueSetAccessPolicyHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1582,15 +1267,17 @@ export type MessagesDequeueResponse = Array & MessagesDeque /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: MessagesDequeueHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1605,7 +1292,7 @@ export type MessagesClearResponse = MessagesClearHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1620,15 +1307,17 @@ export type MessagesEnqueueResponse = Array & MessagesEnqueueHe /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: MessagesEnqueueHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1643,15 +1332,17 @@ export type MessagesPeekResponse = Array & MessagesPeekHeader /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ parsedHeaders: MessagesPeekHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1666,7 +1357,7 @@ export type MessageIdUpdateResponse = MessageIdUpdateHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ @@ -1681,7 +1372,7 @@ export type MessageIdDeleteResponse = MessageIdDeleteHeaders & { /** * The underlying HTTP response. */ - _response: msRest.HttpResponse & { + _response: coreHttp.HttpResponse & { /** * The parsed HTTP response headers. */ diff --git a/sdk/storage/storage-queue/src/generated/lib/models/mappers.ts b/sdk/storage/storage-queue/src/generated/lib/models/mappers.ts index 2f786a9e2135..c3dd5818fed9 100644 --- a/sdk/storage/storage-queue/src/generated/lib/models/mappers.ts +++ b/sdk/storage/storage-queue/src/generated/lib/models/mappers.ts @@ -1,17 +1,15 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; -export const AccessPolicy: msRest.CompositeMapper = { +export const AccessPolicy: coreHttp.CompositeMapper = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -45,7 +43,7 @@ export const AccessPolicy: msRest.CompositeMapper = { } }; -export const QueueItem: msRest.CompositeMapper = { +export const QueueItem: coreHttp.CompositeMapper = { xmlName: "Queue", serializedName: "QueueItem", type: { @@ -76,7 +74,7 @@ export const QueueItem: msRest.CompositeMapper = { } }; -export const ListQueuesSegmentResponse: msRest.CompositeMapper = { +export const ListQueuesSegmentResponse: coreHttp.CompositeMapper = { xmlName: "EnumerationResults", serializedName: "ListQueuesSegmentResponse", type: { @@ -142,7 +140,7 @@ export const ListQueuesSegmentResponse: msRest.CompositeMapper = { } }; -export const CorsRule: msRest.CompositeMapper = { +export const CorsRule: coreHttp.CompositeMapper = { serializedName: "CorsRule", type: { name: "Composite", @@ -195,7 +193,7 @@ export const CorsRule: msRest.CompositeMapper = { } }; -export const GeoReplication: msRest.CompositeMapper = { +export const GeoReplication: coreHttp.CompositeMapper = { serializedName: "GeoReplication", type: { name: "Composite", @@ -221,7 +219,7 @@ export const GeoReplication: msRest.CompositeMapper = { } }; -export const RetentionPolicy: msRest.CompositeMapper = { +export const RetentionPolicy: coreHttp.CompositeMapper = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -249,7 +247,7 @@ export const RetentionPolicy: msRest.CompositeMapper = { } }; -export const Logging: msRest.CompositeMapper = { +export const Logging: coreHttp.CompositeMapper = { serializedName: "Logging", type: { name: "Composite", @@ -300,7 +298,7 @@ export const Logging: msRest.CompositeMapper = { } }; -export const StorageError: msRest.CompositeMapper = { +export const StorageError: coreHttp.CompositeMapper = { serializedName: "StorageError", type: { name: "Composite", @@ -317,7 +315,7 @@ export const StorageError: msRest.CompositeMapper = { } }; -export const Metrics: msRest.CompositeMapper = { +export const Metrics: coreHttp.CompositeMapper = { serializedName: "Metrics", type: { name: "Composite", @@ -357,7 +355,7 @@ export const Metrics: msRest.CompositeMapper = { } }; -export const QueueMessage: msRest.CompositeMapper = { +export const QueueMessage: coreHttp.CompositeMapper = { serializedName: "QueueMessage", type: { name: "Composite", @@ -375,7 +373,7 @@ export const QueueMessage: msRest.CompositeMapper = { } }; -export const DequeuedMessageItem: msRest.CompositeMapper = { +export const DequeuedMessageItem: coreHttp.CompositeMapper = { xmlName: "QueueMessage", serializedName: "DequeuedMessageItem", type: { @@ -442,7 +440,7 @@ export const DequeuedMessageItem: msRest.CompositeMapper = { } }; -export const PeekedMessageItem: msRest.CompositeMapper = { +export const PeekedMessageItem: coreHttp.CompositeMapper = { xmlName: "QueueMessage", serializedName: "PeekedMessageItem", type: { @@ -493,7 +491,7 @@ export const PeekedMessageItem: msRest.CompositeMapper = { } }; -export const EnqueuedMessage: msRest.CompositeMapper = { +export const EnqueuedMessage: coreHttp.CompositeMapper = { xmlName: "QueueMessage", serializedName: "EnqueuedMessage", type: { @@ -544,7 +542,7 @@ export const EnqueuedMessage: msRest.CompositeMapper = { } }; -export const SignedIdentifier: msRest.CompositeMapper = { +export const SignedIdentifier: coreHttp.CompositeMapper = { serializedName: "SignedIdentifier", type: { name: "Composite", @@ -571,7 +569,7 @@ export const SignedIdentifier: msRest.CompositeMapper = { } }; -export const StorageServiceProperties: msRest.CompositeMapper = { +export const StorageServiceProperties: coreHttp.CompositeMapper = { serializedName: "StorageServiceProperties", type: { name: "Composite", @@ -620,7 +618,7 @@ export const StorageServiceProperties: msRest.CompositeMapper = { } }; -export const StorageServiceStats: msRest.CompositeMapper = { +export const StorageServiceStats: coreHttp.CompositeMapper = { serializedName: "StorageServiceStats", type: { name: "Composite", @@ -638,7 +636,7 @@ export const StorageServiceStats: msRest.CompositeMapper = { } }; -export const ServiceSetPropertiesHeaders: msRest.CompositeMapper = { +export const ServiceSetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "service-setproperties-headers", type: { name: "Composite", @@ -666,7 +664,7 @@ export const ServiceSetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const ServiceGetPropertiesHeaders: msRest.CompositeMapper = { +export const ServiceGetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "service-getproperties-headers", type: { name: "Composite", @@ -694,7 +692,7 @@ export const ServiceGetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const ServiceGetStatisticsHeaders: msRest.CompositeMapper = { +export const ServiceGetStatisticsHeaders: coreHttp.CompositeMapper = { serializedName: "service-getstatistics-headers", type: { name: "Composite", @@ -728,7 +726,7 @@ export const ServiceGetStatisticsHeaders: msRest.CompositeMapper = { } }; -export const ServiceListQueuesSegmentHeaders: msRest.CompositeMapper = { +export const ServiceListQueuesSegmentHeaders: coreHttp.CompositeMapper = { serializedName: "service-listqueuessegment-headers", type: { name: "Composite", @@ -762,7 +760,7 @@ export const ServiceListQueuesSegmentHeaders: msRest.CompositeMapper = { } }; -export const QueueCreateHeaders: msRest.CompositeMapper = { +export const QueueCreateHeaders: coreHttp.CompositeMapper = { serializedName: "queue-create-headers", type: { name: "Composite", @@ -796,7 +794,7 @@ export const QueueCreateHeaders: msRest.CompositeMapper = { } }; -export const QueueDeleteHeaders: msRest.CompositeMapper = { +export const QueueDeleteHeaders: coreHttp.CompositeMapper = { serializedName: "queue-delete-headers", type: { name: "Composite", @@ -830,7 +828,7 @@ export const QueueDeleteHeaders: msRest.CompositeMapper = { } }; -export const QueueGetPropertiesHeaders: msRest.CompositeMapper = { +export const QueueGetPropertiesHeaders: coreHttp.CompositeMapper = { serializedName: "queue-getproperties-headers", type: { name: "Composite", @@ -882,7 +880,7 @@ export const QueueGetPropertiesHeaders: msRest.CompositeMapper = { } }; -export const QueueSetMetadataHeaders: msRest.CompositeMapper = { +export const QueueSetMetadataHeaders: coreHttp.CompositeMapper = { serializedName: "queue-setmetadata-headers", type: { name: "Composite", @@ -916,7 +914,7 @@ export const QueueSetMetadataHeaders: msRest.CompositeMapper = { } }; -export const QueueGetAccessPolicyHeaders: msRest.CompositeMapper = { +export const QueueGetAccessPolicyHeaders: coreHttp.CompositeMapper = { serializedName: "queue-getaccesspolicy-headers", type: { name: "Composite", @@ -950,7 +948,7 @@ export const QueueGetAccessPolicyHeaders: msRest.CompositeMapper = { } }; -export const QueueSetAccessPolicyHeaders: msRest.CompositeMapper = { +export const QueueSetAccessPolicyHeaders: coreHttp.CompositeMapper = { serializedName: "queue-setaccesspolicy-headers", type: { name: "Composite", @@ -984,7 +982,7 @@ export const QueueSetAccessPolicyHeaders: msRest.CompositeMapper = { } }; -export const MessagesDequeueHeaders: msRest.CompositeMapper = { +export const MessagesDequeueHeaders: coreHttp.CompositeMapper = { serializedName: "messages-dequeue-headers", type: { name: "Composite", @@ -1018,7 +1016,7 @@ export const MessagesDequeueHeaders: msRest.CompositeMapper = { } }; -export const MessagesClearHeaders: msRest.CompositeMapper = { +export const MessagesClearHeaders: coreHttp.CompositeMapper = { serializedName: "messages-clear-headers", type: { name: "Composite", @@ -1052,7 +1050,7 @@ export const MessagesClearHeaders: msRest.CompositeMapper = { } }; -export const MessagesEnqueueHeaders: msRest.CompositeMapper = { +export const MessagesEnqueueHeaders: coreHttp.CompositeMapper = { serializedName: "messages-enqueue-headers", type: { name: "Composite", @@ -1086,7 +1084,7 @@ export const MessagesEnqueueHeaders: msRest.CompositeMapper = { } }; -export const MessagesPeekHeaders: msRest.CompositeMapper = { +export const MessagesPeekHeaders: coreHttp.CompositeMapper = { serializedName: "messages-peek-headers", type: { name: "Composite", @@ -1120,7 +1118,7 @@ export const MessagesPeekHeaders: msRest.CompositeMapper = { } }; -export const MessageIdUpdateHeaders: msRest.CompositeMapper = { +export const MessageIdUpdateHeaders: coreHttp.CompositeMapper = { serializedName: "messageid-update-headers", type: { name: "Composite", @@ -1166,7 +1164,7 @@ export const MessageIdUpdateHeaders: msRest.CompositeMapper = { } }; -export const MessageIdDeleteHeaders: msRest.CompositeMapper = { +export const MessageIdDeleteHeaders: coreHttp.CompositeMapper = { serializedName: "messageid-delete-headers", type: { name: "Composite", diff --git a/sdk/storage/storage-queue/src/generated/lib/models/messageIdMappers.ts b/sdk/storage/storage-queue/src/generated/lib/models/messageIdMappers.ts index 7dcf98133833..d63abf988a30 100644 --- a/sdk/storage/storage-queue/src/generated/lib/models/messageIdMappers.ts +++ b/sdk/storage/storage-queue/src/generated/lib/models/messageIdMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - QueueMessage, + MessageIdDeleteHeaders, MessageIdUpdateHeaders, - StorageError, - MessageIdDeleteHeaders + QueueMessage, + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-queue/src/generated/lib/models/messagesMappers.ts b/sdk/storage/storage-queue/src/generated/lib/models/messagesMappers.ts index 06f346045d31..5a0a96fa549d 100644 --- a/sdk/storage/storage-queue/src/generated/lib/models/messagesMappers.ts +++ b/sdk/storage/storage-queue/src/generated/lib/models/messagesMappers.ts @@ -1,22 +1,19 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { DequeuedMessageItem, - MessagesDequeueHeaders, - StorageError, - MessagesClearHeaders, - QueueMessage, EnqueuedMessage, + MessagesClearHeaders, + MessagesDequeueHeaders, MessagesEnqueueHeaders, + MessagesPeekHeaders, PeekedMessageItem, - MessagesPeekHeaders + QueueMessage, + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-queue/src/generated/lib/models/parameters.ts b/sdk/storage/storage-queue/src/generated/lib/models/parameters.ts index b9396a048778..e87b49438357 100644 --- a/sdk/storage/storage-queue/src/generated/lib/models/parameters.ts +++ b/sdk/storage/storage-queue/src/generated/lib/models/parameters.ts @@ -8,9 +8,9 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; -export const comp0: msRest.OperationQueryParameter = { +export const comp0: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -22,7 +22,7 @@ export const comp0: msRest.OperationQueryParameter = { } } }; -export const comp1: msRest.OperationQueryParameter = { +export const comp1: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -34,7 +34,7 @@ export const comp1: msRest.OperationQueryParameter = { } } }; -export const comp2: msRest.OperationQueryParameter = { +export const comp2: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -46,7 +46,7 @@ export const comp2: msRest.OperationQueryParameter = { } } }; -export const comp3: msRest.OperationQueryParameter = { +export const comp3: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -58,7 +58,7 @@ export const comp3: msRest.OperationQueryParameter = { } } }; -export const comp4: msRest.OperationQueryParameter = { +export const comp4: coreHttp.OperationQueryParameter = { parameterPath: "comp", mapper: { required: true, @@ -70,7 +70,7 @@ export const comp4: msRest.OperationQueryParameter = { } } }; -export const include: msRest.OperationQueryParameter = { +export const include: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "include" @@ -78,14 +78,20 @@ export const include: msRest.OperationQueryParameter = { mapper: { serializedName: "include", type: { - name: "Enum", - allowedValues: [ - "metadata" - ] + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "metadata" + ] + } + } } - } + }, + collectionFormat: coreHttp.QueryCollectionFormat.Csv }; -export const marker: msRest.OperationQueryParameter = { +export const marker: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "marker" @@ -97,7 +103,7 @@ export const marker: msRest.OperationQueryParameter = { } } }; -export const maxresults: msRest.OperationQueryParameter = { +export const maxresults: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "maxresults" @@ -112,7 +118,7 @@ export const maxresults: msRest.OperationQueryParameter = { } } }; -export const messageTimeToLive: msRest.OperationQueryParameter = { +export const messageTimeToLive: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "messageTimeToLive" @@ -127,7 +133,7 @@ export const messageTimeToLive: msRest.OperationQueryParameter = { } } }; -export const metadata: msRest.OperationParameter = { +export const metadata: coreHttp.OperationParameter = { parameterPath: [ "options", "metadata" @@ -145,7 +151,18 @@ export const metadata: msRest.OperationParameter = { headerCollectionPrefix: "x-ms-meta-" } }; -export const numberOfMessages: msRest.OperationQueryParameter = { +export const nextPageLink: coreHttp.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const numberOfMessages: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "numberOfMessages" @@ -160,7 +177,7 @@ export const numberOfMessages: msRest.OperationQueryParameter = { } } }; -export const peekonly: msRest.OperationQueryParameter = { +export const peekonly: coreHttp.OperationQueryParameter = { parameterPath: "peekonly", mapper: { required: true, @@ -172,7 +189,7 @@ export const peekonly: msRest.OperationQueryParameter = { } } }; -export const popReceipt: msRest.OperationQueryParameter = { +export const popReceipt: coreHttp.OperationQueryParameter = { parameterPath: "popReceipt", mapper: { required: true, @@ -182,7 +199,7 @@ export const popReceipt: msRest.OperationQueryParameter = { } } }; -export const prefix: msRest.OperationQueryParameter = { +export const prefix: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "prefix" @@ -194,7 +211,7 @@ export const prefix: msRest.OperationQueryParameter = { } } }; -export const requestId: msRest.OperationParameter = { +export const requestId: coreHttp.OperationParameter = { parameterPath: [ "options", "requestId" @@ -206,7 +223,7 @@ export const requestId: msRest.OperationParameter = { } } }; -export const restype: msRest.OperationQueryParameter = { +export const restype: coreHttp.OperationQueryParameter = { parameterPath: "restype", mapper: { required: true, @@ -218,7 +235,7 @@ export const restype: msRest.OperationQueryParameter = { } } }; -export const timeout: msRest.OperationQueryParameter = { +export const timeout: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "timeout" @@ -233,7 +250,7 @@ export const timeout: msRest.OperationQueryParameter = { } } }; -export const url: msRest.OperationURLParameter = { +export const url: coreHttp.OperationURLParameter = { parameterPath: "url", mapper: { required: true, @@ -245,7 +262,7 @@ export const url: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const version: msRest.OperationParameter = { +export const version: coreHttp.OperationParameter = { parameterPath: "version", mapper: { required: true, @@ -257,7 +274,7 @@ export const version: msRest.OperationParameter = { } } }; -export const visibilitytimeout0: msRest.OperationQueryParameter = { +export const visibilitytimeout0: coreHttp.OperationQueryParameter = { parameterPath: [ "options", "visibilitytimeout" @@ -273,7 +290,7 @@ export const visibilitytimeout0: msRest.OperationQueryParameter = { } } }; -export const visibilitytimeout1: msRest.OperationQueryParameter = { +export const visibilitytimeout1: coreHttp.OperationQueryParameter = { parameterPath: "visibilitytimeout", mapper: { required: true, diff --git a/sdk/storage/storage-queue/src/generated/lib/models/queueMappers.ts b/sdk/storage/storage-queue/src/generated/lib/models/queueMappers.ts index 136df44b3a06..3f28732d98e8 100644 --- a/sdk/storage/storage-queue/src/generated/lib/models/queueMappers.ts +++ b/sdk/storage/storage-queue/src/generated/lib/models/queueMappers.ts @@ -1,22 +1,19 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + AccessPolicy, QueueCreateHeaders, - StorageError, QueueDeleteHeaders, + QueueGetAccessPolicyHeaders, QueueGetPropertiesHeaders, + QueueSetAccessPolicyHeaders, QueueSetMetadataHeaders, SignedIdentifier, - AccessPolicy, - QueueGetAccessPolicyHeaders, - QueueSetAccessPolicyHeaders + StorageError } from "../models/mappers"; - diff --git a/sdk/storage/storage-queue/src/generated/lib/models/serviceMappers.ts b/sdk/storage/storage-queue/src/generated/lib/models/serviceMappers.ts index 58e3c8c6da99..f2c0d244e7b0 100644 --- a/sdk/storage/storage-queue/src/generated/lib/models/serviceMappers.ts +++ b/sdk/storage/storage-queue/src/generated/lib/models/serviceMappers.ts @@ -1,27 +1,24 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - StorageServiceProperties, - Logging, - RetentionPolicy, - Metrics, CorsRule, - ServiceSetPropertiesHeaders, - StorageError, - ServiceGetPropertiesHeaders, - StorageServiceStats, GeoReplication, - ServiceGetStatisticsHeaders, ListQueuesSegmentResponse, + Logging, + Metrics, QueueItem, - ServiceListQueuesSegmentHeaders + RetentionPolicy, + ServiceGetPropertiesHeaders, + ServiceGetStatisticsHeaders, + ServiceListQueuesSegmentHeaders, + ServiceSetPropertiesHeaders, + StorageError, + StorageServiceProperties, + StorageServiceStats } from "../models/mappers"; - diff --git a/sdk/storage/storage-queue/src/generated/lib/operations/messageId.ts b/sdk/storage/storage-queue/src/generated/lib/operations/messageId.ts index 01e499212f0d..c73dab1d6333 100644 --- a/sdk/storage/storage-queue/src/generated/lib/operations/messageId.ts +++ b/sdk/storage/storage-queue/src/generated/lib/operations/messageId.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/messageIdMappers"; import * as Parameters from "../models/parameters"; @@ -54,7 +54,7 @@ export class MessageId { * later than the expiry time. * @param callback The callback */ - update(queueMessage: Models.QueueMessage, popReceipt: string, visibilitytimeout: number, callback: msRest.ServiceCallback): void; + update(queueMessage: Models.QueueMessage, popReceipt: string, visibilitytimeout: number, callback: coreHttp.ServiceCallback): void; /** * @param queueMessage A Message object which can be stored in a Queue * @param popReceipt Required. Specifies the valid pop receipt value returned from an earlier call @@ -67,8 +67,8 @@ export class MessageId { * @param options The optional parameters * @param callback The callback */ - update(queueMessage: Models.QueueMessage, popReceipt: string, visibilitytimeout: number, options: Models.MessageIdUpdateOptionalParams, callback: msRest.ServiceCallback): void; - update(queueMessage: Models.QueueMessage, popReceipt: string, visibilitytimeout: number, options?: Models.MessageIdUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(queueMessage: Models.QueueMessage, popReceipt: string, visibilitytimeout: number, options: Models.MessageIdUpdateOptionalParams, callback: coreHttp.ServiceCallback): void; + update(queueMessage: Models.QueueMessage, popReceipt: string, visibilitytimeout: number, options?: Models.MessageIdUpdateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { queueMessage, @@ -93,15 +93,15 @@ export class MessageId { * to the Get Messages or Update Message operation. * @param callback The callback */ - deleteMethod(popReceipt: string, callback: msRest.ServiceCallback): void; + deleteMethod(popReceipt: string, callback: coreHttp.ServiceCallback): void; /** * @param popReceipt Required. Specifies the valid pop receipt value returned from an earlier call * to the Get Messages or Update Message operation. * @param options The optional parameters * @param callback The callback */ - deleteMethod(popReceipt: string, options: Models.MessageIdDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; - deleteMethod(popReceipt: string, options?: Models.MessageIdDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(popReceipt: string, options: Models.MessageIdDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void; + deleteMethod(popReceipt: string, options?: Models.MessageIdDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { popReceipt, @@ -113,8 +113,8 @@ export class MessageId { } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const updateOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const updateOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{queueName}/messages/{messageid}", urlParameters: [ @@ -149,7 +149,7 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteMethodOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", path: "{queueName}/messages/{messageid}", urlParameters: [ diff --git a/sdk/storage/storage-queue/src/generated/lib/operations/messages.ts b/sdk/storage/storage-queue/src/generated/lib/operations/messages.ts index bf0b4c5e0086..65efb63664bd 100644 --- a/sdk/storage/storage-queue/src/generated/lib/operations/messages.ts +++ b/sdk/storage/storage-queue/src/generated/lib/operations/messages.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/messagesMappers"; import * as Parameters from "../models/parameters"; @@ -35,13 +35,13 @@ export class Messages { /** * @param callback The callback */ - dequeue(callback: msRest.ServiceCallback): void; + dequeue(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - dequeue(options: Models.MessagesDequeueOptionalParams, callback: msRest.ServiceCallback): void; - dequeue(options?: Models.MessagesDequeueOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + dequeue(options: Models.MessagesDequeueOptionalParams, callback: coreHttp.ServiceCallback): void; + dequeue(options?: Models.MessagesDequeueOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -59,13 +59,13 @@ export class Messages { /** * @param callback The callback */ - clear(callback: msRest.ServiceCallback): void; + clear(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - clear(options: Models.MessagesClearOptionalParams, callback: msRest.ServiceCallback): void; - clear(options?: Models.MessagesClearOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + clear(options: Models.MessagesClearOptionalParams, callback: coreHttp.ServiceCallback): void; + clear(options?: Models.MessagesClearOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -89,14 +89,14 @@ export class Messages { * @param queueMessage A Message object which can be stored in a Queue * @param callback The callback */ - enqueue(queueMessage: Models.QueueMessage, callback: msRest.ServiceCallback): void; + enqueue(queueMessage: Models.QueueMessage, callback: coreHttp.ServiceCallback): void; /** * @param queueMessage A Message object which can be stored in a Queue * @param options The optional parameters * @param callback The callback */ - enqueue(queueMessage: Models.QueueMessage, options: Models.MessagesEnqueueOptionalParams, callback: msRest.ServiceCallback): void; - enqueue(queueMessage: Models.QueueMessage, options?: Models.MessagesEnqueueOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + enqueue(queueMessage: Models.QueueMessage, options: Models.MessagesEnqueueOptionalParams, callback: coreHttp.ServiceCallback): void; + enqueue(queueMessage: Models.QueueMessage, options?: Models.MessagesEnqueueOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { queueMessage, @@ -116,13 +116,13 @@ export class Messages { /** * @param callback The callback */ - peek(callback: msRest.ServiceCallback): void; + peek(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - peek(options: Models.MessagesPeekOptionalParams, callback: msRest.ServiceCallback): void; - peek(options?: Models.MessagesPeekOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + peek(options: Models.MessagesPeekOptionalParams, callback: coreHttp.ServiceCallback): void; + peek(options?: Models.MessagesPeekOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -133,8 +133,8 @@ export class Messages { } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const dequeueOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const dequeueOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{queueName}/messages", urlParameters: [ @@ -174,7 +174,7 @@ const dequeueOperationSpec: msRest.OperationSpec = { serializer }; -const clearOperationSpec: msRest.OperationSpec = { +const clearOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", path: "{queueName}/messages", urlParameters: [ @@ -199,7 +199,7 @@ const clearOperationSpec: msRest.OperationSpec = { serializer }; -const enqueueOperationSpec: msRest.OperationSpec = { +const enqueueOperationSpec: coreHttp.OperationSpec = { httpMethod: "POST", path: "{queueName}/messages", urlParameters: [ @@ -247,7 +247,7 @@ const enqueueOperationSpec: msRest.OperationSpec = { serializer }; -const peekOperationSpec: msRest.OperationSpec = { +const peekOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{queueName}/messages", urlParameters: [ diff --git a/sdk/storage/storage-queue/src/generated/lib/operations/queue.ts b/sdk/storage/storage-queue/src/generated/lib/operations/queue.ts index a15afd1a0308..9d3cde4b6999 100644 --- a/sdk/storage/storage-queue/src/generated/lib/operations/queue.ts +++ b/sdk/storage/storage-queue/src/generated/lib/operations/queue.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/queueMappers"; import * as Parameters from "../models/parameters"; @@ -35,13 +35,13 @@ export class Queue { /** * @param callback The callback */ - create(callback: msRest.ServiceCallback): void; + create(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - create(options: Models.QueueCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(options?: Models.QueueCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(options: Models.QueueCreateOptionalParams, callback: coreHttp.ServiceCallback): void; + create(options?: Models.QueueCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -59,13 +59,13 @@ export class Queue { /** * @param callback The callback */ - deleteMethod(callback: msRest.ServiceCallback): void; + deleteMethod(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - deleteMethod(options: Models.QueueDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; - deleteMethod(options?: Models.QueueDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(options: Models.QueueDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void; + deleteMethod(options?: Models.QueueDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -84,13 +84,13 @@ export class Queue { /** * @param callback The callback */ - getProperties(callback: msRest.ServiceCallback): void; + getProperties(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getProperties(options: Models.QueueGetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - getProperties(options?: Models.QueueGetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProperties(options: Models.QueueGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + getProperties(options?: Models.QueueGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -109,13 +109,13 @@ export class Queue { /** * @param callback The callback */ - setMetadata(callback: msRest.ServiceCallback): void; + setMetadata(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setMetadata(options: Models.QueueSetMetadataOptionalParams, callback: msRest.ServiceCallback): void; - setMetadata(options?: Models.QueueSetMetadataOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setMetadata(options: Models.QueueSetMetadataOptionalParams, callback: coreHttp.ServiceCallback): void; + setMetadata(options?: Models.QueueSetMetadataOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -134,13 +134,13 @@ export class Queue { /** * @param callback The callback */ - getAccessPolicy(callback: msRest.ServiceCallback): void; + getAccessPolicy(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getAccessPolicy(options: Models.QueueGetAccessPolicyOptionalParams, callback: msRest.ServiceCallback): void; - getAccessPolicy(options?: Models.QueueGetAccessPolicyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getAccessPolicy(options: Models.QueueGetAccessPolicyOptionalParams, callback: coreHttp.ServiceCallback): void; + getAccessPolicy(options?: Models.QueueGetAccessPolicyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -158,13 +158,13 @@ export class Queue { /** * @param callback The callback */ - setAccessPolicy(callback: msRest.ServiceCallback): void; + setAccessPolicy(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - setAccessPolicy(options: Models.QueueSetAccessPolicyOptionalParams, callback: msRest.ServiceCallback): void; - setAccessPolicy(options?: Models.QueueSetAccessPolicyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setAccessPolicy(options: Models.QueueSetAccessPolicyOptionalParams, callback: coreHttp.ServiceCallback): void; + setAccessPolicy(options?: Models.QueueSetAccessPolicyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -175,8 +175,8 @@ export class Queue { } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const createOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const createOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{queueName}", urlParameters: [ @@ -205,7 +205,7 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteMethodOperationSpec: coreHttp.OperationSpec = { httpMethod: "DELETE", path: "{queueName}", urlParameters: [ @@ -230,7 +230,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const getPropertiesOperationSpec: msRest.OperationSpec = { +const getPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{queueName}", urlParameters: [ @@ -256,7 +256,7 @@ const getPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const setMetadataOperationSpec: msRest.OperationSpec = { +const setMetadataOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{queueName}", urlParameters: [ @@ -283,7 +283,7 @@ const setMetadataOperationSpec: msRest.OperationSpec = { serializer }; -const getAccessPolicyOperationSpec: msRest.OperationSpec = { +const getAccessPolicyOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", path: "{queueName}", urlParameters: [ @@ -322,7 +322,7 @@ const getAccessPolicyOperationSpec: msRest.OperationSpec = { serializer }; -const setAccessPolicyOperationSpec: msRest.OperationSpec = { +const setAccessPolicyOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", path: "{queueName}", urlParameters: [ diff --git a/sdk/storage/storage-queue/src/generated/lib/operations/service.ts b/sdk/storage/storage-queue/src/generated/lib/operations/service.ts index 9923a6395955..fff54aae0ec2 100644 --- a/sdk/storage/storage-queue/src/generated/lib/operations/service.ts +++ b/sdk/storage/storage-queue/src/generated/lib/operations/service.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "../models"; import * as Mappers from "../models/serviceMappers"; import * as Parameters from "../models/parameters"; @@ -38,14 +38,14 @@ export class Service { * @param storageServiceProperties The StorageService properties. * @param callback The callback */ - setProperties(storageServiceProperties: Models.StorageServiceProperties, callback: msRest.ServiceCallback): void; + setProperties(storageServiceProperties: Models.StorageServiceProperties, callback: coreHttp.ServiceCallback): void; /** * @param storageServiceProperties The StorageService properties. * @param options The optional parameters * @param callback The callback */ - setProperties(storageServiceProperties: Models.StorageServiceProperties, options: Models.ServiceSetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - setProperties(storageServiceProperties: Models.StorageServiceProperties, options?: Models.ServiceSetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + setProperties(storageServiceProperties: Models.StorageServiceProperties, options: Models.ServiceSetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + setProperties(storageServiceProperties: Models.StorageServiceProperties, options?: Models.ServiceSetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { storageServiceProperties, @@ -65,13 +65,13 @@ export class Service { /** * @param callback The callback */ - getProperties(callback: msRest.ServiceCallback): void; + getProperties(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getProperties(options: Models.ServiceGetPropertiesOptionalParams, callback: msRest.ServiceCallback): void; - getProperties(options?: Models.ServiceGetPropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProperties(options: Models.ServiceGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void; + getProperties(options?: Models.ServiceGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -91,13 +91,13 @@ export class Service { /** * @param callback The callback */ - getStatistics(callback: msRest.ServiceCallback): void; + getStatistics(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - getStatistics(options: Models.ServiceGetStatisticsOptionalParams, callback: msRest.ServiceCallback): void; - getStatistics(options?: Models.ServiceGetStatisticsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getStatistics(options: Models.ServiceGetStatisticsOptionalParams, callback: coreHttp.ServiceCallback): void; + getStatistics(options?: Models.ServiceGetStatisticsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -115,13 +115,13 @@ export class Service { /** * @param callback The callback */ - listQueuesSegment(callback: msRest.ServiceCallback): void; + listQueuesSegment(callback: coreHttp.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - listQueuesSegment(options: Models.ServiceListQueuesSegmentOptionalParams, callback: msRest.ServiceCallback): void; - listQueuesSegment(options?: Models.ServiceListQueuesSegmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listQueuesSegment(options: Models.ServiceListQueuesSegmentOptionalParams, callback: coreHttp.ServiceCallback): void; + listQueuesSegment(options?: Models.ServiceListQueuesSegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -129,11 +129,39 @@ export class Service { listQueuesSegmentOperationSpec, callback) as Promise; } + + /** + * The List Queues Segment operation returns a list of the queues under the specified account + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listQueuesSegmentNext(nextPageLink: string, options?: Models.ServiceListQueuesSegmentNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listQueuesSegmentNext(nextPageLink: string, callback: coreHttp.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listQueuesSegmentNext(nextPageLink: string, options: Models.ServiceListQueuesSegmentNextOptionalParams, callback: coreHttp.ServiceCallback): void; + listQueuesSegmentNext(nextPageLink: string, options?: Models.ServiceListQueuesSegmentNextOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listQueuesSegmentNextOperationSpec, + callback) as Promise; + } } // Operation Specifications -const serializer = new msRest.Serializer(Mappers, true); -const setPropertiesOperationSpec: msRest.OperationSpec = { +const serializer = new coreHttp.Serializer(Mappers, true); +const setPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "PUT", urlParameters: [ Parameters.url @@ -167,7 +195,7 @@ const setPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const getPropertiesOperationSpec: msRest.OperationSpec = { +const getPropertiesOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", urlParameters: [ Parameters.url @@ -194,7 +222,7 @@ const getPropertiesOperationSpec: msRest.OperationSpec = { serializer }; -const getStatisticsOperationSpec: msRest.OperationSpec = { +const getStatisticsOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", urlParameters: [ Parameters.url @@ -221,7 +249,7 @@ const getStatisticsOperationSpec: msRest.OperationSpec = { serializer }; -const listQueuesSegmentOperationSpec: msRest.OperationSpec = { +const listQueuesSegmentOperationSpec: coreHttp.OperationSpec = { httpMethod: "GET", urlParameters: [ Parameters.url @@ -250,3 +278,27 @@ const listQueuesSegmentOperationSpec: msRest.OperationSpec = { isXML: true, serializer }; + +const listQueuesSegmentNextOperationSpec: coreHttp.OperationSpec = { + httpMethod: "GET", + baseUrl: "{url}", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.ListQueuesSegmentResponse, + headersMapper: Mappers.ServiceListQueuesSegmentHeaders + }, + default: { + bodyMapper: Mappers.StorageError + } + }, + isXML: true, + serializer +}; diff --git a/sdk/storage/storage-queue/src/generated/lib/storageClient.ts b/sdk/storage/storage-queue/src/generated/lib/storageClient.ts index efda8ea6b532..653d1adb0fb0 100644 --- a/sdk/storage/storage-queue/src/generated/lib/storageClient.ts +++ b/sdk/storage/storage-queue/src/generated/lib/storageClient.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -27,7 +27,7 @@ class StorageClient extends StorageClientContext { * operation. * @param [options] The parameter options */ - constructor(url: string, options?: msRest.ServiceClientOptions) { + constructor(url: string, options?: coreHttp.ServiceClientOptions) { super(url, options); this.service = new operations.Service(this); this.queue = new operations.Queue(this); diff --git a/sdk/storage/storage-queue/src/generated/lib/storageClientContext.ts b/sdk/storage/storage-queue/src/generated/lib/storageClientContext.ts index 5cbdba82ff1a..8ac14b0245bf 100644 --- a/sdk/storage/storage-queue/src/generated/lib/storageClientContext.ts +++ b/sdk/storage/storage-queue/src/generated/lib/storageClientContext.ts @@ -8,12 +8,12 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as coreHttp from "@azure/core-http"; const packageName = "azure-storage-queue"; const packageVersion = "1.0.0"; -export class StorageClientContext extends msRest.ServiceClient { +export class StorageClientContext extends coreHttp.ServiceClient { url: string; version: string; @@ -23,16 +23,17 @@ export class StorageClientContext extends msRest.ServiceClient { * operation. * @param [options] The parameter options */ - constructor(url: string, options?: msRest.ServiceClientOptions) { - if (url === null || url === undefined) { - throw new Error('\'url\' cannot be null.'); + constructor(url: string, options?: coreHttp.ServiceClientOptions) { + if (url == undefined) { + throw new Error("'url' cannot be null."); } if (!options) { options = {}; } - if(!options.userAgent) { - const defaultUserAgent = msRest.getDefaultUserAgentValue(); + + if (!options.userAgent) { + const defaultUserAgent = coreHttp.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -42,6 +43,5 @@ export class StorageClientContext extends msRest.ServiceClient { this.baseUri = "{url}"; this.requestContentType = "application/json; charset=utf-8"; this.url = url; - } } diff --git a/sdk/storage/storage-queue/src/index.browser.ts b/sdk/storage/storage-queue/src/index.browser.ts index b1ebd504867a..c1347d36766b 100644 --- a/sdk/storage/storage-queue/src/index.browser.ts +++ b/sdk/storage/storage-queue/src/index.browser.ts @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RestError } from "@azure/ms-rest-js"; +import { RestError } from "@azure/core-http"; import * as Models from "../src/generated/lib/models"; export * from "./Aborter"; export * from "./credentials/AnonymousCredential"; export * from "./credentials/Credential"; -export * from "./credentials/TokenCredential"; +export * from "./credentials/RawTokenCredential"; export { IPRange } from "./IPRange"; export * from "./MessageIdClient"; export * from "./MessagesClient"; @@ -18,7 +18,6 @@ export * from "./policies/CredentialPolicy"; export * from "./RetryPolicyFactory"; export * from "./LoggingPolicyFactory"; export * from "./TelemetryPolicyFactory"; -export * from "./policies/TokenCredentialPolicy"; export * from "./QueueClient"; export * from "./QueueSASPermissions"; export * from "./UniqueRequestIDPolicyFactory"; diff --git a/sdk/storage/storage-queue/src/index.ts b/sdk/storage/storage-queue/src/index.ts index 2e3e1b6ef645..e3c623f117d3 100644 --- a/sdk/storage/storage-queue/src/index.ts +++ b/sdk/storage/storage-queue/src/index.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RestError } from "@azure/ms-rest-js"; +import { RestError } from "@azure/core-http"; import * as Models from "../src/generated/lib/models"; @@ -13,7 +13,7 @@ export * from "./AccountSASSignatureValues"; export * from "./credentials/AnonymousCredential"; export * from "./credentials/Credential"; export * from "./credentials/SharedKeyCredential"; -export * from "./credentials/TokenCredential"; +export * from "./credentials/RawTokenCredential"; export { IPRange } from "./IPRange"; export * from "./MessageIdClient"; export * from "./MessagesClient"; @@ -24,7 +24,6 @@ export * from "./RetryPolicyFactory"; export * from "./LoggingPolicyFactory"; export * from "./policies/SharedKeyCredentialPolicy"; export * from "./TelemetryPolicyFactory"; -export * from "./policies/TokenCredentialPolicy"; export * from "./QueueClient"; export * from "./QueueSASPermissions"; export * from "./QueueSASSignatureValues"; diff --git a/sdk/storage/storage-queue/src/policies/AnonymousCredentialPolicy.ts b/sdk/storage/storage-queue/src/policies/AnonymousCredentialPolicy.ts index d5368d185b02..f322060c2e98 100644 --- a/sdk/storage/storage-queue/src/policies/AnonymousCredentialPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/AnonymousCredentialPolicy.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyOptions } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions } from "@azure/core-http"; import { CredentialPolicy } from "./CredentialPolicy"; diff --git a/sdk/storage/storage-queue/src/policies/BrowserPolicy.ts b/sdk/storage/storage-queue/src/policies/BrowserPolicy.ts index 2b7d37949eec..daee8c93cae1 100644 --- a/sdk/storage/storage-queue/src/policies/BrowserPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/BrowserPolicy.ts @@ -8,7 +8,7 @@ import { RequestPolicy, RequestPolicyOptions, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { HeaderConstants, URLConstants } from "../utils/constants"; import { setURLParameter } from "../utils/utils.common"; diff --git a/sdk/storage/storage-queue/src/policies/CredentialPolicy.ts b/sdk/storage/storage-queue/src/policies/CredentialPolicy.ts index e15490e27e3d..32cf09b84d6b 100644 --- a/sdk/storage/storage-queue/src/policies/CredentialPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/CredentialPolicy.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { BaseRequestPolicy, HttpOperationResponse, WebResource } from "@azure/ms-rest-js"; +import { BaseRequestPolicy, HttpOperationResponse, WebResource } from "@azure/core-http"; /** * Credential policy used to sign HTTP(S) requests before sending. This is an diff --git a/sdk/storage/storage-queue/src/policies/LoggingPolicy.ts b/sdk/storage/storage-queue/src/policies/LoggingPolicy.ts index 464669141234..67203bd43cf1 100644 --- a/sdk/storage/storage-queue/src/policies/LoggingPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/LoggingPolicy.ts @@ -9,7 +9,7 @@ import { RequestPolicyOptions, RestError, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { RequestLogOptions } from "../LoggingPolicyFactory"; import { HTTPURLConnection } from "../utils/constants"; diff --git a/sdk/storage/storage-queue/src/policies/RetryPolicy.ts b/sdk/storage/storage-queue/src/policies/RetryPolicy.ts index 8781d9d990fb..bbc123163b63 100644 --- a/sdk/storage/storage-queue/src/policies/RetryPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/RetryPolicy.ts @@ -11,7 +11,7 @@ import { RequestPolicyOptions, RestError, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { RetryOptions } from "../RetryPolicyFactory"; import { URLConstants } from "../utils/constants"; diff --git a/sdk/storage/storage-queue/src/policies/SharedKeyCredentialPolicy.ts b/sdk/storage/storage-queue/src/policies/SharedKeyCredentialPolicy.ts index 603db7206cf5..faa6080cf01e 100644 --- a/sdk/storage/storage-queue/src/policies/SharedKeyCredentialPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/SharedKeyCredentialPolicy.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { RequestPolicy, RequestPolicyOptions, WebResource } from "@azure/ms-rest-js"; +import { RequestPolicy, RequestPolicyOptions, WebResource } from "@azure/core-http"; import { SharedKeyCredential } from "../credentials/SharedKeyCredential"; import { HeaderConstants } from "../utils/constants"; import { getURLPath, getURLQueries } from "../utils/utils.common"; diff --git a/sdk/storage/storage-queue/src/policies/TelemetryPolicy.ts b/sdk/storage/storage-queue/src/policies/TelemetryPolicy.ts index b60d509e5906..ef2f837aa3dc 100644 --- a/sdk/storage/storage-queue/src/policies/TelemetryPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/TelemetryPolicy.ts @@ -9,7 +9,7 @@ import { RequestPolicy, RequestPolicyOptions, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { HeaderConstants } from "../utils/constants"; diff --git a/sdk/storage/storage-queue/src/policies/TokenCredentialPolicy.ts b/sdk/storage/storage-queue/src/policies/TokenCredentialPolicy.ts deleted file mode 100644 index f852d3b331d1..000000000000 --- a/sdk/storage/storage-queue/src/policies/TokenCredentialPolicy.ts +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -import { HttpHeaders, RequestPolicy, RequestPolicyOptions, WebResource } from "@azure/ms-rest-js"; - -import { TokenCredential } from "../credentials/TokenCredential"; -import { HeaderConstants } from "../utils/constants"; -import { CredentialPolicy } from "./CredentialPolicy"; - -/** - * TokenCredentialPolicy is a policy used to sign HTTP request with a token. - * Such as an OAuth bearer token. - * - * @export - * @class TokenCredentialPolicy - * @extends {CredentialPolicy} - */ -export class TokenCredentialPolicy extends CredentialPolicy { - /** - * The value of token. - * - * @type {TokenCredential} - * @memberof TokenCredentialPolicy - */ - public readonly tokenCredential: TokenCredential; - - /** - * Token authorization scheme, default header is "Bearer". - * - * @type {string} - * @memberof TokenCredentialPolicy - */ - public readonly authorizationScheme: string; - - /** - * Creates an instance of TokenCredentialPolicy. - * @param {RequestPolicy} nextPolicy - * @param {RequestPolicyOptions} options - * @param {TokenCredential} tokenCredential - * @memberof TokenCredentialPolicy - */ - constructor( - nextPolicy: RequestPolicy, - options: RequestPolicyOptions, - tokenCredential: TokenCredential - ) { - super(nextPolicy, options); - this.tokenCredential = tokenCredential; - this.authorizationScheme = HeaderConstants.AUTHORIZATION_SCHEME; - } - - /** - * Sign request with token. - * - * @protected - * @param {WebResource} request - * @returns {WebResource} - * @memberof TokenCredentialPolicy - */ - protected signRequest(request: WebResource): WebResource { - if (!request.headers) { - request.headers = new HttpHeaders(); - } - request.headers.set( - HeaderConstants.AUTHORIZATION, - `${this.authorizationScheme} ${this.tokenCredential.token}` - ); - return request; - } -} diff --git a/sdk/storage/storage-queue/src/policies/UniqueRequestIDPolicy.ts b/sdk/storage/storage-queue/src/policies/UniqueRequestIDPolicy.ts index 5fd1681dc9f4..da15a58284f0 100644 --- a/sdk/storage/storage-queue/src/policies/UniqueRequestIDPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/UniqueRequestIDPolicy.ts @@ -8,7 +8,7 @@ import { RequestPolicy, RequestPolicyOptions, WebResource -} from "@azure/ms-rest-js"; +} from "@azure/core-http"; import { HeaderConstants } from "../utils/constants"; diff --git a/sdk/storage/storage-queue/src/utils/utils.common.ts b/sdk/storage/storage-queue/src/utils/utils.common.ts index ca1dcfe9b28a..628286020537 100644 --- a/sdk/storage/storage-queue/src/utils/utils.common.ts +++ b/sdk/storage/storage-queue/src/utils/utils.common.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { HttpHeaders, URLBuilder } from "@azure/ms-rest-js"; +import { HttpHeaders, URLBuilder } from "@azure/core-http"; import { HeaderConstants, URLConstants } from "./constants"; /** diff --git a/sdk/storage/storage-queue/test/messageidclient.spec.ts b/sdk/storage/storage-queue/test/messageidclient.spec.ts index 7ffb2f31a692..f4ea2bbe4676 100644 --- a/sdk/storage/storage-queue/test/messageidclient.spec.ts +++ b/sdk/storage/storage-queue/test/messageidclient.spec.ts @@ -13,7 +13,7 @@ describe("MessageIdClient", () => { let recorder: any; - beforeEach(async function() { + beforeEach(async function () { recorder = record(this); queueName = recorder.getUniqueName("queue"); queueClient = queueServiceClient.createQueueClient(queueName); diff --git a/sdk/storage/storage-queue/test/messagesclient.spec.ts b/sdk/storage/storage-queue/test/messagesclient.spec.ts index 8876dca40953..bec590b6548a 100644 --- a/sdk/storage/storage-queue/test/messagesclient.spec.ts +++ b/sdk/storage/storage-queue/test/messagesclient.spec.ts @@ -13,7 +13,7 @@ describe("MessagesClient", () => { let recorder: any; - beforeEach(async function() { + beforeEach(async function () { recorder = record(this); queueName = recorder.getUniqueName("queue"); queueClient = queueServiceClient.createQueueClient(queueName); diff --git a/sdk/storage/storage-queue/test/node/messageidclient.spec.ts b/sdk/storage/storage-queue/test/node/messageidclient.spec.ts index 3e4e818fc71c..a8a2d33eb408 100644 --- a/sdk/storage/storage-queue/test/node/messageidclient.spec.ts +++ b/sdk/storage/storage-queue/test/node/messageidclient.spec.ts @@ -1,9 +1,12 @@ import * as assert from "assert"; +import { MessageIdClient } from '../../src'; import { getQSU, getConnectionStringFromEnvironment } from "../utils"; import { record } from "../utils/recorder"; import { QueueClient } from "../../src/QueueClient"; import { MessagesClient } from "../../src/MessagesClient"; import { SharedKeyCredential } from "../../src/credentials/SharedKeyCredential"; +import { TokenCredential } from '@azure/core-http'; +import { assertClientUsesTokenCredential } from '../utils/assert'; describe("MessageIdClient Node.js only", () => { const queueServiceClient = getQSU(); @@ -13,7 +16,7 @@ describe("MessageIdClient Node.js only", () => { let recorder: any; - beforeEach(async function() { + beforeEach(async function () { recorder = record(this); queueName = recorder.getUniqueName("queue"); queueClient = queueServiceClient.createQueueClient(queueName); @@ -180,4 +183,15 @@ describe("MessageIdClient Node.js only", () => { ); } }); + + it("can be created with a url and a TokenCredential", async () => { + const tokenCredential: TokenCredential = { + getToken: () => Promise.resolve({ + token: 'token', + expiresOnTimestamp: 12345 + }) + } + const newClient = new MessageIdClient("https://queue", tokenCredential); + assertClientUsesTokenCredential(newClient); + }); }); diff --git a/sdk/storage/storage-queue/test/node/messagesclient.spec.ts b/sdk/storage/storage-queue/test/node/messagesclient.spec.ts index 84b6d792582b..89d3888b4a30 100644 --- a/sdk/storage/storage-queue/test/node/messagesclient.spec.ts +++ b/sdk/storage/storage-queue/test/node/messagesclient.spec.ts @@ -4,6 +4,8 @@ import { record } from "../utils/recorder"; import { QueueClient } from "../../src/QueueClient"; import { MessagesClient } from "../../src/MessagesClient"; import { SharedKeyCredential } from "../../src/credentials/SharedKeyCredential"; +import { TokenCredential } from '@azure/core-http'; +import { assertClientUsesTokenCredential } from '../utils/assert'; describe("MessagesClient Node.js only", () => { const queueServiceClient = getQSU(); @@ -13,7 +15,7 @@ describe("MessagesClient Node.js only", () => { let recorder: any; - beforeEach(async function() { + beforeEach(async function () { recorder = record(this); queueName = recorder.getUniqueName("queue"); queueClient = queueServiceClient.createQueueClient(queueName); @@ -188,4 +190,15 @@ describe("MessagesClient Node.js only", () => { ); } }); + + it("can be created with a url and a TokenCredential", async () => { + const tokenCredential: TokenCredential = { + getToken: () => Promise.resolve({ + token: 'token', + expiresOnTimestamp: 12345 + }) + } + const newClient = new MessagesClient("https://queue", tokenCredential); + assertClientUsesTokenCredential(newClient); + }); }); diff --git a/sdk/storage/storage-queue/test/node/queueclient.spec.ts b/sdk/storage/storage-queue/test/node/queueclient.spec.ts index 74fe8992f743..54e511c7cf4c 100644 --- a/sdk/storage/storage-queue/test/node/queueclient.spec.ts +++ b/sdk/storage/storage-queue/test/node/queueclient.spec.ts @@ -2,6 +2,8 @@ import * as assert from "assert"; import { getQSU, getConnectionStringFromEnvironment } from "../utils"; import { record } from "../utils/recorder"; import { newPipeline, QueueClient, SharedKeyCredential } from "../../src"; +import { TokenCredential } from '@azure/core-http'; +import { assertClientUsesTokenCredential } from '../utils/assert'; describe("QueueClient Node.js only", () => { const queueServiceClient = getQSU(); @@ -10,7 +12,7 @@ describe("QueueClient Node.js only", () => { let recorder: any; - beforeEach(async function() { + beforeEach(async function () { recorder = record(this); queueName = recorder.getUniqueName("queue"); queueClient = queueServiceClient.createQueueClient(queueName); @@ -123,4 +125,15 @@ describe("QueueClient Node.js only", () => { ); } }); + + it("can be created with a url and a TokenCredential", async () => { + const tokenCredential: TokenCredential = { + getToken: () => Promise.resolve({ + token: 'token', + expiresOnTimestamp: 12345 + }) + } + const newClient = new QueueClient("https://queue", tokenCredential); + assertClientUsesTokenCredential(newClient); + }); }); diff --git a/sdk/storage/storage-queue/test/node/queueserviceclient.spec.ts b/sdk/storage/storage-queue/test/node/queueserviceclient.spec.ts index e517bca12211..2ab83709583b 100644 --- a/sdk/storage/storage-queue/test/node/queueserviceclient.spec.ts +++ b/sdk/storage/storage-queue/test/node/queueserviceclient.spec.ts @@ -4,11 +4,13 @@ import { record } from "../utils/recorder"; import { QueueServiceClient } from "../../src/QueueServiceClient"; import { SharedKeyCredential } from "../../src/credentials/SharedKeyCredential"; import { newPipeline } from "../../src"; +import { TokenCredential } from '@azure/core-http'; +import { assertClientUsesTokenCredential } from '../utils/assert'; describe("QueueServiceClient Node.js only", () => { let recorder: any; - beforeEach(function() { + beforeEach(function () { recorder = record(this); }); @@ -71,4 +73,15 @@ describe("QueueServiceClient Node.js only", () => { assert.ok(typeof result.requestId); assert.ok(result.requestId!.length > 0); }); + + it("can be created with a url and a TokenCredential", async () => { + const tokenCredential: TokenCredential = { + getToken: () => Promise.resolve({ + token: 'token', + expiresOnTimestamp: 12345 + }) + } + const newClient = new QueueServiceClient("https://queue", tokenCredential); + assertClientUsesTokenCredential(newClient); + }); }); diff --git a/sdk/storage/storage-queue/test/queueclient.spec.ts b/sdk/storage/storage-queue/test/queueclient.spec.ts index 164b7292b4e7..88eb7b83032a 100644 --- a/sdk/storage/storage-queue/test/queueclient.spec.ts +++ b/sdk/storage/storage-queue/test/queueclient.spec.ts @@ -12,7 +12,7 @@ describe("QueueClient", () => { let recorder: any; - beforeEach(async function() { + beforeEach(async function () { recorder = record(this); queueName = recorder.getUniqueName("queue"); queueClient = queueServiceClient.createQueueClient(queueName); diff --git a/sdk/storage/storage-queue/test/queueserviceclient.spec.ts b/sdk/storage/storage-queue/test/queueserviceclient.spec.ts index 64c97ac7401d..0edf2db9c581 100644 --- a/sdk/storage/storage-queue/test/queueserviceclient.spec.ts +++ b/sdk/storage/storage-queue/test/queueserviceclient.spec.ts @@ -8,7 +8,7 @@ dotenv.config({ path: "../.env" }); describe("QueueServiceClient", () => { let recorder: any; - beforeEach(function() { + beforeEach(function () { recorder = record(this); }); @@ -45,7 +45,7 @@ describe("QueueServiceClient", () => { await queueClient2.create({ metadata: { key: "val" } }); const result1 = await queueServiceClient.listQueuesSegment(undefined, { - include: "metadata", + include: ["metadata"], maxresults: 1, prefix: queueNamePrefix }); @@ -56,7 +56,7 @@ describe("QueueServiceClient", () => { assert.deepEqual(result1.queueItems![0].metadata!.key, "val"); const result2 = await queueServiceClient.listQueuesSegment(result1.nextMarker, { - include: "metadata", + include: ["metadata"], maxresults: 1, prefix: queueNamePrefix }); @@ -83,7 +83,7 @@ describe("QueueServiceClient", () => { await queueClient2.create({ metadata: { key: "val" } }); for await (const item of queueServiceClient.listQueues({ - include: "metadata", + include: ["metadata"], prefix: queueNamePrefix })) { assert.ok(item.name.startsWith(queueNamePrefix)); @@ -107,7 +107,7 @@ describe("QueueServiceClient", () => { await queueClient2.create({ metadata: { key: "val" } }); let iter1 = await queueServiceClient.listQueues({ - include: "metadata", + include: ["metadata"], prefix: queueNamePrefix }); let queueItem = await iter1.next(); @@ -135,7 +135,7 @@ describe("QueueServiceClient", () => { for await (const response of queueServiceClient .listQueues({ - include: "metadata", + include: ["metadata"], prefix: queueNamePrefix }) .byPage({ maxPageSize: 2 })) { @@ -163,7 +163,7 @@ describe("QueueServiceClient", () => { let iter = queueServiceClient .listQueues({ - include: "metadata", + include: ["metadata"], prefix: queueNamePrefix }) .byPage({ maxPageSize: 2 }); @@ -180,7 +180,7 @@ describe("QueueServiceClient", () => { // Passing next marker as continuationToken iter = queueServiceClient .listQueues({ - include: "metadata", + include: ["metadata"], prefix: queueNamePrefix }) .byPage({ continuationToken: marker, maxPageSize: 10 }); diff --git a/sdk/storage/storage-queue/test/retrypolicy.spec.ts b/sdk/storage/storage-queue/test/retrypolicy.spec.ts index 27e5c716f16b..58952c3d7bf0 100644 --- a/sdk/storage/storage-queue/test/retrypolicy.spec.ts +++ b/sdk/storage/storage-queue/test/retrypolicy.spec.ts @@ -1,4 +1,4 @@ -import { URLBuilder } from "@azure/ms-rest-js"; +import { URLBuilder } from "@azure/core-http"; import * as assert from "assert"; import { QueueClient, RestError, newPipeline } from "../src"; import { Pipeline } from "../src/Pipeline"; diff --git a/sdk/storage/storage-queue/test/utils/assert.ts b/sdk/storage/storage-queue/test/utils/assert.ts new file mode 100644 index 000000000000..9e8d08397fbe --- /dev/null +++ b/sdk/storage/storage-queue/test/utils/assert.ts @@ -0,0 +1,8 @@ +import * as assert from "assert"; +import { StorageClient } from '../../src/StorageClient'; + +export function assertClientUsesTokenCredential(client: StorageClient) { + const factories = (client as any).pipeline.factories + const authPolicy = factories[factories.length - 1].create(); + assert.strictEqual(authPolicy.constructor.name, "BearerTokenAuthenticationPolicy"); +}