From ee7312e9f3e520a71da260d8ce127ada82ca8000 Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Thu, 12 Jun 2025 15:02:40 -0700 Subject: [PATCH 1/7] Initial generation v16 --- eng/emitter-package-lock.json | 196 +-- eng/emitter-package.json | 22 +- .../generated/clients/append_blob_client.rs | 19 +- .../src/generated/clients/blob_client.rs | 58 +- .../clients/blob_container_client.rs | 65 +- .../generated/clients/blob_service_client.rs | 28 +- .../generated/clients/block_blob_client.rs | 40 +- .../src/generated/clients/page_blob_client.rs | 25 +- .../src/generated/models/enums.rs | 7 + .../src/generated/models/header_traits.rs | 1327 +++++++++++++++-- .../src/generated/models/method_options.rs | 37 +- .../src/generated/models/pub_models.rs | 44 +- .../src/generated/models/xml_helpers.rs | 30 +- .../azure_storage_blob/tsp-location.yaml | 2 +- 14 files changed, 1561 insertions(+), 339 deletions(-) diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index e5d28798d9..1f0ed47868 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,18 +5,18 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-rust": "0.15.0" + "@azure-tools/typespec-rust": "0.16.0" }, "devDependencies": { - "@azure-tools/typespec-azure-core": "0.56.0", - "@azure-tools/typespec-azure-rulesets": "0.56.0", - "@azure-tools/typespec-client-generator-core": "0.56.3", - "@typespec/compiler": "1.0.0", - "@typespec/http": "1.0.1", - "@typespec/openapi": "1.0.0", - "@typespec/rest": "0.70.0", - "@typespec/versioning": "0.70.0", - "@typespec/xml": "0.70.0" + "@azure-tools/typespec-azure-core": "0.57.0", + "@azure-tools/typespec-azure-rulesets": "0.57.0", + "@azure-tools/typespec-client-generator-core": "0.57.0", + "@typespec/compiler": "1.1.0", + "@typespec/http": "1.1.0", + "@typespec/openapi": "1.1.0", + "@typespec/rest": "0.71.0", + "@typespec/versioning": "0.71.0", + "@typespec/xml": "0.71.0" } }, "node_modules/@azure-tools/async-io": { @@ -65,23 +65,23 @@ } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.56.0.tgz", - "integrity": "sha512-5Pb2p9MQJqcyQyptM/oo98ws3IXkXl14hVaaORFi+4VTRsOtALvnHdrUvnUQ9iTJrHioaXPxhR2+W7VuotoXsQ==", + "version": "0.57.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.57.0.tgz", + "integrity": "sha512-O+F3axrJOJHjYGrQLRWoydHtWjWiXeAlaaILncS0I0xe6kinyFkpn7VIVKxH9ZZ+hPmkDAZybO53656R3PRfUA==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.0.0", - "@typespec/http": "^1.0.0", - "@typespec/rest": "^0.70.0" + "@typespec/compiler": "^1.1.0", + "@typespec/http": "^1.1.0", + "@typespec/rest": "^0.71.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.56.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.56.2.tgz", - "integrity": "sha512-h1xYafwdSxtdu7Aqyicg7cG65rHGRw+e/H880JYlzJ41lniwPc1ci6yJmoeab8EgiQjbjoGAvVY1gYTLbFrESw==", + "version": "0.57.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.57.0.tgz", + "integrity": "sha512-KWDEzPTt6ifRjiUiugLyLUiGSSyQLoXxLmz/wpfmxIfvFK5oM0UL+l7K8eC5dob993r2LQvp/2c8EJugeAZ4Ug==", "dev": true, "license": "MIT", "peer": true, @@ -93,34 +93,34 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.56.0", - "@typespec/compiler": "^1.0.0", - "@typespec/http": "^1.0.1", - "@typespec/openapi": "^1.0.0", - "@typespec/rest": "^0.70.0", - "@typespec/versioning": "^0.70.0" + "@azure-tools/typespec-azure-core": "^0.57.0", + "@typespec/compiler": "^1.1.0", + "@typespec/http": "^1.1.0", + "@typespec/openapi": "^1.1.0", + "@typespec/rest": "^0.71.0", + "@typespec/versioning": "^0.71.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.56.0.tgz", - "integrity": "sha512-V073uLUTGBYhn5MyOS2RHUadYuYGYrFDlhuvqoAUNDG/v8CSWEyXx4CHo8dq+Y/0DauLc9YfNzwXrDgtlW9HrA==", + "version": "0.57.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.57.0.tgz", + "integrity": "sha512-O3Qw/RFIkNoJCWfwbg57hmj/GtnfNg3ZpBG6qCrSJSJLt6XG6EZ3yWujCqjx17nOsvAwB/J1+f/t/pFizQhWaw==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.56.0", - "@azure-tools/typespec-azure-resource-manager": "^0.56.0", - "@azure-tools/typespec-client-generator-core": "^0.56.0", - "@typespec/compiler": "^1.0.0" + "@azure-tools/typespec-azure-core": "^0.57.0", + "@azure-tools/typespec-azure-resource-manager": "^0.57.0", + "@azure-tools/typespec-client-generator-core": "^0.57.0", + "@typespec/compiler": "^1.1.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.56.3", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.56.3.tgz", - "integrity": "sha512-R5IyWcRrbX8SdGbtRo7doeQxV9sgcfDQeE0GGJDK0gGXaoJRuEWYGgoX6NgCFdtCMQfNTV+SdP832oa5lfOivg==", + "version": "0.57.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.57.0.tgz", + "integrity": "sha512-k8Z2BMKF5OtsjnAA3kJTT/5iK4ndhxcen1k5H8xKv8TSNlpAK0TX98Kvhpo5y1HJXBNNnW0VRcS2y3onDfsecw==", "license": "MIT", "dependencies": { "change-case": "~5.4.4", @@ -131,22 +131,22 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.56.0", - "@typespec/compiler": "^1.0.0", - "@typespec/events": "^0.70.0", - "@typespec/http": "^1.0.1", - "@typespec/openapi": "^1.0.0", - "@typespec/rest": "^0.70.0", - "@typespec/sse": "^0.70.0", - "@typespec/streams": "^0.70.0", - "@typespec/versioning": "^0.70.0", - "@typespec/xml": "^0.70.0" + "@azure-tools/typespec-azure-core": "^0.57.0", + "@typespec/compiler": "^1.1.0", + "@typespec/events": "^0.71.0", + "@typespec/http": "^1.1.0", + "@typespec/openapi": "^1.1.0", + "@typespec/rest": "^0.71.0", + "@typespec/sse": "^0.71.0", + "@typespec/streams": "^0.71.0", + "@typespec/versioning": "^0.71.0", + "@typespec/xml": "^0.71.0" } }, "node_modules/@azure-tools/typespec-rust": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-rust/-/typespec-rust-0.15.0.tgz", - "integrity": "sha512-hZpdQh5FoRS+zRzGiSBxrz21QSNM3ZfZ80wkzAK3e4lvam7LlADhSPhjwelmHhwbt5ImsD+ztDgmCzmaFPBeZw==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-rust/-/typespec-rust-0.16.0.tgz", + "integrity": "sha512-Whc0jAkbW75iXB6Uu5NJz7gGdcXo6jRb0A0W0fQ57AUUpPVBlo92oRpo2ga4bgvHGS+R4dQYJwfKl9KV5yENOg==", "license": "MIT", "dependencies": { "@azure-tools/codegen": "~2.10.0", @@ -161,20 +161,20 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-client-generator-core": ">=0.56.3 <1.0.0", - "@typespec/compiler": "^1.0.0", - "@typespec/http": "^1.0.1" + "@azure-tools/typespec-client-generator-core": ">=0.57.0 <1.0.0", + "@typespec/compiler": "^1.1.0", + "@typespec/http": "^1.1.0" } }, "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", + "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" @@ -565,12 +565,12 @@ "license": "MIT" }, "node_modules/@typespec/compiler": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.0.0.tgz", - "integrity": "sha512-QFy0otaB4xkN4kQmYyT17yu3OVhN0gti9+EKnZqs5JFylw2Xecx22BPwUE1Byj42pZYg5d9WlO+WwmY5ALtRDg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.1.0.tgz", + "integrity": "sha512-dtwosIqd2UUEEIVBR+oDiUtN4n1lP8/9GxQVno+wbkijQgKDj4Hg0Vaq6HG4BduF7RptDdtzkdGQCS9CgOIdRA==", "license": "MIT", "dependencies": { - "@babel/code-frame": "~7.26.2", + "@babel/code-frame": "~7.27.1", "@inquirer/prompts": "^7.4.0", "ajv": "~8.17.1", "change-case": "~5.4.4", @@ -597,29 +597,29 @@ } }, "node_modules/@typespec/events": { - "version": "0.70.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.70.0.tgz", - "integrity": "sha512-qHW1N05n8PkNf2YQGNMdl/sAYqrJv+zQ1kny+3vg/20nzVj7sZpNFIKqUIc11z0GkT7k3Q9SPTymvq+K00sAUg==", + "version": "0.71.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.71.0.tgz", + "integrity": "sha512-dJeyqBGqTTSlFDVWpdqeMjDpEyRmenH3yDABK3T/30MrO94sdXigxmeBnPCcOaaqst6pV3anFuKwfAqEN3GnbA==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.0.0" + "@typespec/compiler": "^1.1.0" } }, "node_modules/@typespec/http": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.0.1.tgz", - "integrity": "sha512-J5tqBWlmkvI/W+kJn4EFuN0laGxbY8qT68jzEQEiYeAXSfNyFGRSoCwn8Ex6dJphq4IozOMdVTNtOZWIJlwmfw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.1.0.tgz", + "integrity": "sha512-1doVGmkv3N8l57fVuci4jGMZ61EZBlDzuNZO2b9o0+mexCOs/P96CIpFkaNVvTQgjpyFsW1DlXiUKAvUC9zQfg==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.0.0", - "@typespec/streams": "^0.70.0" + "@typespec/compiler": "^1.1.0", + "@typespec/streams": "^0.71.0" }, "peerDependenciesMeta": { "@typespec/streams": { @@ -628,82 +628,82 @@ } }, "node_modules/@typespec/openapi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.0.0.tgz", - "integrity": "sha512-pONzKIdK4wHgD1vBfD9opUk66zDG55DlHbueKOldH2p1LVf5FnMiuKE4kW0pl1dokT/HBNR5OJciCzzVf44AgQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.1.0.tgz", + "integrity": "sha512-HPvrpSS7eSVk3fEkWndcDTrAZssWRYv3FyDTqVqljildc7FAiXdo88+r5CCK8endmgIrES7uJdHLkcIGUZx1pg==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.0.0", - "@typespec/http": "^1.0.0" + "@typespec/compiler": "^1.1.0", + "@typespec/http": "^1.1.0" } }, "node_modules/@typespec/rest": { - "version": "0.70.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.70.0.tgz", - "integrity": "sha512-pn3roMQV6jBNT4bVA/hnrBAAHleXSyfWQqNO+DhI3+tLU4jCrJHmUZDi82nI9xBl+jkmy2WZFZOelZA9PSABeg==", + "version": "0.71.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.71.0.tgz", + "integrity": "sha512-5qX+nWO5Jx4P1iTTT2REgdCtHsTMjlv/gL90u8cO1ih3yHDtf18a41UL6jSYaVUIvIj6rlmrgopActf0FhhUcw==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.0.0", - "@typespec/http": "^1.0.0" + "@typespec/compiler": "^1.1.0", + "@typespec/http": "^1.1.0" } }, "node_modules/@typespec/sse": { - "version": "0.70.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.70.0.tgz", - "integrity": "sha512-11VsIRqPuK+bIq7gHVghM5CAqvcfe9TmL9mZkxlPKuV6RRWju831k18KqlwXTOgeEMwVGA1Xbg1TTi1F4S1B+w==", + "version": "0.71.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.71.0.tgz", + "integrity": "sha512-4lAwDMj8h/50s6zp/8IX8CLW+H3P+od5O32Bb8+fyTabEo7+H3PbdBbIJGv9Sj7+l8+bZXsyfRXa+aJxR9o2ZA==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.0.0", - "@typespec/events": "^0.70.0", - "@typespec/http": "^1.0.0", - "@typespec/streams": "^0.70.0" + "@typespec/compiler": "^1.1.0", + "@typespec/events": "^0.71.0", + "@typespec/http": "^1.1.0", + "@typespec/streams": "^0.71.0" } }, "node_modules/@typespec/streams": { - "version": "0.70.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.70.0.tgz", - "integrity": "sha512-WIixoZ7CCLq2INX4UkN+aXlj07Je+ntW0xbeFGmpfq6Z2xifKnL6/sPiztURMXd4Z1I+XXFCn2pw1r9q5i4Cmw==", + "version": "0.71.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.71.0.tgz", + "integrity": "sha512-ofyAcg8GnO6uTffGo00D6MMfRkqie4QtnUUSGNC1Bam2WG+wkeSG/huP0WNRT8GofzK1N0M6QqQwAW/vdq9ymQ==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.0.0" + "@typespec/compiler": "^1.1.0" } }, "node_modules/@typespec/versioning": { - "version": "0.70.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.70.0.tgz", - "integrity": "sha512-LvuhDGJU9ksdUKuBZLBle7n9/xlS4e18kg5cqPpQGUI0hx9KSrZtXMoL6VRpoBVtEWcAmn4Q5dBL3+K4ur7/vg==", + "version": "0.71.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.71.0.tgz", + "integrity": "sha512-8qknFLOpZTVzQ+SveXg9G7WJV8P80yxLlj0nOc3ZLBKiPgM6FF7vGWHRNtnh7s3gSXvWyxopaJ9fZSLZSJmbww==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.0.0" + "@typespec/compiler": "^1.1.0" } }, "node_modules/@typespec/xml": { - "version": "0.70.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.70.0.tgz", - "integrity": "sha512-8feX+sFx2OVlGOZ3Bl9G/VFwbqbz6reVt8yllfO4aY0EVSM3GxIB7TivZofBrxDRYvwEADpc8+2gI+kdJaSL1w==", + "version": "0.71.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.71.0.tgz", + "integrity": "sha512-IcBM4fd5li+hfaUoxeiFrUJx+gCGwIJ+LojdbAZPP3Kbdv12RS+8+CHH6d9qGV3qExgWGCny6WDUrUIaVCLonw==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.0.0" + "@typespec/compiler": "^1.1.0" } }, "node_modules/ajv": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 3ff82d41ac..4ca9fc9439 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,17 +1,17 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-rust": "0.15.0" + "@azure-tools/typespec-rust": "0.16.0" }, "devDependencies": { - "@azure-tools/typespec-azure-core": "0.56.0", - "@azure-tools/typespec-azure-rulesets": "0.56.0", - "@azure-tools/typespec-client-generator-core": "0.56.3", - "@typespec/compiler": "1.0.0", - "@typespec/http": "1.0.1", - "@typespec/openapi": "1.0.0", - "@typespec/rest": "0.70.0", - "@typespec/versioning": "0.70.0", - "@typespec/xml": "0.70.0" + "@azure-tools/typespec-azure-core": "0.57.0", + "@azure-tools/typespec-azure-rulesets": "0.57.0", + "@azure-tools/typespec-client-generator-core": "0.57.0", + "@typespec/compiler": "1.1.0", + "@typespec/http": "1.1.0", + "@typespec/openapi": "1.1.0", + "@typespec/rest": "0.71.0", + "@typespec/versioning": "0.71.0", + "@typespec/xml": "0.71.0" } -} +} \ No newline at end of file diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/append_blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/append_blob_client.rs index 60974f2262..97bd88e47a 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/append_blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/append_blob_client.rs @@ -16,7 +16,7 @@ use azure_core::{ fmt::SafeDebug, http::{ policies::{BearerTokenCredentialPolicy, Policy}, - ClientOptions, Context, Method, Pipeline, Request, RequestContent, Response, Url, + ClientOptions, Context, Method, NoFormat, Pipeline, Request, RequestContent, Response, Url, }, Bytes, Result, }; @@ -102,7 +102,7 @@ impl AppendBlobClient { body: RequestContent, content_length: u64, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -200,7 +200,7 @@ impl AppendBlobClient { source_url: String, content_length: u64, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -265,6 +265,9 @@ impl AppendBlobClient { if let Some(encryption_scope) = options.encryption_scope { request.insert_header("x-ms-encryption-scope", encryption_scope); } + if let Some(file_request_intent) = options.file_request_intent { + request.insert_header("x-ms-file-request-intent", file_request_intent.to_string()); + } if let Some(if_tags) = options.if_tags { request.insert_header("x-ms-if-tags", if_tags); } @@ -312,13 +315,11 @@ impl AppendBlobClient { /// /// # Arguments /// - /// * `content_length` - The length of the request. /// * `options` - Optional parameters for the request. pub async fn create( &self, - content_length: u64, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -332,7 +333,7 @@ impl AppendBlobClient { } let mut request = Request::new(url, Method::Put); request.insert_header("accept", "application/xml"); - request.insert_header("content-length", content_length.to_string()); + request.insert_header("content-length", "0"); if let Some(if_match) = options.if_match { request.insert_header("if-match", if_match); } @@ -427,7 +428,7 @@ impl AppendBlobClient { pub async fn seal( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -476,7 +477,7 @@ impl Default for AppendBlobClientOptions { fn default() -> Self { Self { client_options: ClientOptions::default(), - version: String::from("2025-01-05"), + version: String::from("2025-11-05"), } } } diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs index 23a2f4f63c..30174395a2 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs @@ -11,7 +11,7 @@ use crate::generated::{ BlobClientBreakLeaseResult, BlobClientChangeLeaseOptions, BlobClientChangeLeaseResult, BlobClientCopyFromUrlOptions, BlobClientCopyFromUrlResult, BlobClientCreateSnapshotOptions, BlobClientCreateSnapshotResult, BlobClientDeleteImmutabilityPolicyOptions, - BlobClientDeleteImmutabilityPolicyResult, BlobClientDeleteOptions, + BlobClientDeleteImmutabilityPolicyResult, BlobClientDeleteOptions, BlobClientDeleteResult, BlobClientDownloadOptions, BlobClientDownloadResult, BlobClientGetAccountInfoOptions, BlobClientGetAccountInfoResult, BlobClientGetPropertiesOptions, BlobClientGetPropertiesResult, BlobClientGetTagsOptions, BlobClientReleaseLeaseOptions, @@ -19,8 +19,9 @@ use crate::generated::{ BlobClientSetExpiryOptions, BlobClientSetExpiryResult, BlobClientSetImmutabilityPolicyOptions, BlobClientSetImmutabilityPolicyResult, BlobClientSetLegalHoldOptions, BlobClientSetLegalHoldResult, BlobClientSetMetadataOptions, - BlobClientSetPropertiesOptions, BlobClientSetTagsOptions, BlobClientSetTagsResult, - BlobClientSetTierOptions, BlobClientStartCopyFromUrlOptions, + BlobClientSetMetadataResult, BlobClientSetPropertiesOptions, BlobClientSetPropertiesResult, + BlobClientSetTagsOptions, BlobClientSetTagsResult, BlobClientSetTierOptions, + BlobClientSetTierResult, BlobClientStartCopyFromUrlOptions, BlobClientStartCopyFromUrlResult, BlobClientUndeleteOptions, BlobClientUndeleteResult, BlobExpiryOptions, BlobTags, }, @@ -32,7 +33,7 @@ use azure_core::{ fmt::SafeDebug, http::{ policies::{BearerTokenCredentialPolicy, Policy}, - ClientOptions, Context, Method, Pipeline, Request, RequestContent, Response, Url, + ClientOptions, Context, Method, NoFormat, Pipeline, Request, RequestContent, Response, Url, XmlFormat, }, Result, @@ -118,7 +119,7 @@ impl BlobClient { &self, copy_id: &str, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -156,7 +157,7 @@ impl BlobClient { pub async fn acquire_lease( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -214,7 +215,7 @@ impl BlobClient { pub async fn break_lease( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -273,7 +274,7 @@ impl BlobClient { lease_id: String, proposed_lease_id: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -331,7 +332,7 @@ impl BlobClient { &self, copy_source: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -380,6 +381,9 @@ impl BlobClient { if let Some(encryption_scope) = options.encryption_scope { request.insert_header("x-ms-encryption-scope", encryption_scope); } + if let Some(file_request_intent) = options.file_request_intent { + request.insert_header("x-ms-file-request-intent", file_request_intent.to_string()); + } if let Some(if_tags) = options.if_tags { request.insert_header("x-ms-if-tags", if_tags); } @@ -445,7 +449,7 @@ impl BlobClient { pub async fn create_snapshot( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -525,7 +529,7 @@ impl BlobClient { pub async fn delete( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -589,7 +593,7 @@ impl BlobClient { pub async fn delete_immutability_policy( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -628,7 +632,7 @@ impl BlobClient { pub async fn download( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -714,7 +718,7 @@ impl BlobClient { pub async fn get_account_info( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -782,7 +786,7 @@ impl BlobClient { pub async fn get_properties( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -897,7 +901,7 @@ impl BlobClient { &self, lease_id: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -952,7 +956,7 @@ impl BlobClient { &self, lease_id: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1006,7 +1010,7 @@ impl BlobClient { &self, expiry_options: BlobExpiryOptions, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1041,7 +1045,7 @@ impl BlobClient { pub async fn set_immutability_policy( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1099,7 +1103,7 @@ impl BlobClient { &self, legal_hold: bool, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1137,7 +1141,7 @@ impl BlobClient { pub async fn set_metadata( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1209,7 +1213,7 @@ impl BlobClient { pub async fn set_properties( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1283,7 +1287,7 @@ impl BlobClient { &self, tags: RequestContent, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1337,7 +1341,7 @@ impl BlobClient { &self, tier: AccessTier, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1388,7 +1392,7 @@ impl BlobClient { &self, copy_source: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1493,7 +1497,7 @@ impl BlobClient { pub async fn undelete( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1521,7 +1525,7 @@ impl Default for BlobClientOptions { fn default() -> Self { Self { client_options: ClientOptions::default(), - version: String::from("2025-01-05"), + version: String::from("2025-11-05"), } } } diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs index 73b340f331..15463a92b0 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs @@ -9,7 +9,8 @@ use crate::generated::{ BlobContainerClientAcquireLeaseOptions, BlobContainerClientAcquireLeaseResult, BlobContainerClientBreakLeaseOptions, BlobContainerClientBreakLeaseResult, BlobContainerClientChangeLeaseOptions, BlobContainerClientChangeLeaseResult, - BlobContainerClientCreateOptions, BlobContainerClientDeleteOptions, + BlobContainerClientCreateOptions, BlobContainerClientCreateResult, + BlobContainerClientDeleteOptions, BlobContainerClientDeleteResult, BlobContainerClientFilterBlobsOptions, BlobContainerClientGetAccessPolicyOptions, BlobContainerClientGetAccountInfoOptions, BlobContainerClientGetAccountInfoResult, BlobContainerClientGetPropertiesOptions, BlobContainerClientGetPropertiesResult, @@ -20,8 +21,8 @@ use crate::generated::{ BlobContainerClientRenewLeaseResult, BlobContainerClientRestoreOptions, BlobContainerClientRestoreResult, BlobContainerClientSetAccessPolicyOptions, BlobContainerClientSetAccessPolicyResult, BlobContainerClientSetMetadataOptions, - FilterBlobSegment, ListBlobsFlatSegmentResponse, ListBlobsHierarchySegmentResponse, - SignedIdentifier, + BlobContainerClientSetMetadataResult, FilterBlobSegment, ListBlobsFlatSegmentResponse, + ListBlobsHierarchySegmentResponse, SignedIdentifier, }, }; use azure_core::{ @@ -30,8 +31,8 @@ use azure_core::{ fmt::SafeDebug, http::{ policies::{BearerTokenCredentialPolicy, Policy}, - ClientOptions, Context, Method, PageIterator, PagerResult, Pipeline, RawResponse, Request, - RequestContent, Response, Url, XmlFormat, + ClientOptions, Context, Method, NoFormat, PageIterator, PagerResult, Pipeline, RawResponse, + Request, RequestContent, Response, Url, XmlFormat, }, xml, Result, }; @@ -110,7 +111,7 @@ impl BlobContainerClient { pub async fn acquire_lease( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -157,7 +158,7 @@ impl BlobContainerClient { pub async fn break_lease( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -205,7 +206,7 @@ impl BlobContainerClient { lease_id: String, proposed_lease_id: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -248,7 +249,7 @@ impl BlobContainerClient { pub async fn create( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -294,7 +295,7 @@ impl BlobContainerClient { pub async fn delete( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -418,7 +419,7 @@ impl BlobContainerClient { pub async fn get_account_info( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -464,7 +465,7 @@ impl BlobContainerClient { pub async fn get_properties( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -556,20 +557,17 @@ impl BlobContainerClient { let ctx = options.method_options.context.clone(); let pipeline = pipeline.clone(); async move { - let rsp: Response = - pipeline.send(&ctx, &mut request).await?.into(); + let rsp: RawResponse = pipeline.send(&ctx, &mut request).await?; let (status, headers, body) = rsp.deconstruct(); let bytes = body.collect().await?; let res: ListBlobsFlatSegmentResponse = xml::read_xml(&bytes)?; let rsp = RawResponse::from_bytes(status, headers, bytes).into(); - let next_marker = res.next_marker.unwrap_or_default(); - Ok(if next_marker.is_empty() { - PagerResult::Done { response: rsp } - } else { - PagerResult::More { + Ok(match res.next_marker { + Some(next_marker) if !next_marker.is_empty() => PagerResult::More { response: rsp, next: next_marker, - } + }, + _ => PagerResult::Done { response: rsp }, }) } }, @@ -653,20 +651,17 @@ impl BlobContainerClient { let ctx = options.method_options.context.clone(); let pipeline = pipeline.clone(); async move { - let rsp: Response = - pipeline.send(&ctx, &mut request).await?.into(); + let rsp: RawResponse = pipeline.send(&ctx, &mut request).await?; let (status, headers, body) = rsp.deconstruct(); let bytes = body.collect().await?; let res: ListBlobsHierarchySegmentResponse = xml::read_xml(&bytes)?; let rsp = RawResponse::from_bytes(status, headers, bytes).into(); - let next_marker = res.next_marker.unwrap_or_default(); - Ok(if next_marker.is_empty() { - PagerResult::Done { response: rsp } - } else { - PagerResult::More { + Ok(match res.next_marker { + Some(next_marker) if !next_marker.is_empty() => PagerResult::More { response: rsp, next: next_marker, - } + }, + _ => PagerResult::Done { response: rsp }, }) } }, @@ -685,7 +680,7 @@ impl BlobContainerClient { &self, lease_id: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -728,7 +723,7 @@ impl BlobContainerClient { &self, source_container_name: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -765,7 +760,7 @@ impl BlobContainerClient { &self, lease_id: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -806,7 +801,7 @@ impl BlobContainerClient { pub async fn restore( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -845,7 +840,7 @@ impl BlobContainerClient { &self, container_acl: RequestContent>, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -891,7 +886,7 @@ impl BlobContainerClient { pub async fn set_metadata( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -929,7 +924,7 @@ impl Default for BlobContainerClientOptions { fn default() -> Self { Self { client_options: ClientOptions::default(), - version: String::from("2025-01-05"), + version: String::from("2025-11-05"), } } } diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/blob_service_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/blob_service_client.rs index 6e42dd741d..9f602632ca 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/blob_service_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/blob_service_client.rs @@ -10,8 +10,9 @@ use crate::generated::{ BlobServiceClientGetAccountInfoResult, BlobServiceClientGetPropertiesOptions, BlobServiceClientGetStatisticsOptions, BlobServiceClientGetUserDelegationKeyOptions, BlobServiceClientListContainersSegmentOptions, BlobServiceClientSetPropertiesOptions, - FilterBlobSegment, KeyInfo, ListContainersSegmentResponse, StorageServiceProperties, - StorageServiceStats, UserDelegationKey, + BlobServiceClientSetPropertiesResult, FilterBlobSegment, KeyInfo, + ListContainersSegmentResponse, StorageServiceProperties, StorageServiceStats, + UserDelegationKey, }, }; use azure_core::{ @@ -19,8 +20,8 @@ use azure_core::{ fmt::SafeDebug, http::{ policies::{BearerTokenCredentialPolicy, Policy}, - ClientOptions, Context, Method, PageIterator, PagerResult, Pipeline, RawResponse, Request, - RequestContent, Response, Url, XmlFormat, + ClientOptions, Context, Method, NoFormat, PageIterator, PagerResult, Pipeline, RawResponse, + Request, RequestContent, Response, Url, XmlFormat, }, xml, Result, }; @@ -141,7 +142,7 @@ impl BlobServiceClient { pub async fn get_account_info( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -332,20 +333,17 @@ impl BlobServiceClient { let ctx = options.method_options.context.clone(); let pipeline = pipeline.clone(); async move { - let rsp: Response = - pipeline.send(&ctx, &mut request).await?.into(); + let rsp: RawResponse = pipeline.send(&ctx, &mut request).await?; let (status, headers, body) = rsp.deconstruct(); let bytes = body.collect().await?; let res: ListContainersSegmentResponse = xml::read_xml(&bytes)?; let rsp = RawResponse::from_bytes(status, headers, bytes).into(); - let next_marker = res.next_marker.unwrap_or_default(); - Ok(if next_marker.is_empty() { - PagerResult::Done { response: rsp } - } else { - PagerResult::More { + Ok(match res.next_marker { + Some(next_marker) if !next_marker.is_empty() => PagerResult::More { response: rsp, next: next_marker, - } + }, + _ => PagerResult::Done { response: rsp }, }) } }, @@ -363,7 +361,7 @@ impl BlobServiceClient { &self, storage_service_properties: RequestContent, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -390,7 +388,7 @@ impl Default for BlobServiceClientOptions { fn default() -> Self { Self { client_options: ClientOptions::default(), - version: String::from("2025-01-05"), + version: String::from("2025-11-05"), } } } diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs index fd77b79ee6..4f593b2e4b 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs @@ -19,7 +19,7 @@ use azure_core::{ fmt::SafeDebug, http::{ policies::{BearerTokenCredentialPolicy, Policy}, - ClientOptions, Context, Method, Pipeline, Request, RequestContent, Response, Url, + ClientOptions, Context, Method, NoFormat, Pipeline, Request, RequestContent, Response, Url, XmlFormat, }, Bytes, Result, @@ -109,7 +109,7 @@ impl BlockBlobClient { &self, blocks: RequestContent, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -284,7 +284,7 @@ impl BlockBlobClient { content_length: u64, copy_source: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -373,6 +373,9 @@ impl BlockBlobClient { if let Some(encryption_scope) = options.encryption_scope { request.insert_header("x-ms-encryption-scope", encryption_scope); } + if let Some(file_request_intent) = options.file_request_intent { + request.insert_header("x-ms-file-request-intent", file_request_intent.to_string()); + } if let Some(if_tags) = options.if_tags { request.insert_header("x-ms-if-tags", if_tags); } @@ -428,7 +431,7 @@ impl BlockBlobClient { &self, query_request: RequestContent, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -504,7 +507,7 @@ impl BlockBlobClient { content_length: u64, body: RequestContent, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -553,6 +556,15 @@ impl BlockBlobClient { if let Some(lease_id) = options.lease_id { request.insert_header("x-ms-lease-id", lease_id); } + if let Some(structured_body_type) = options.structured_body_type { + request.insert_header("x-ms-structured-body", structured_body_type); + } + if let Some(structured_content_length) = options.structured_content_length { + request.insert_header( + "x-ms-structured-content-length", + structured_content_length.to_string(), + ); + } request.insert_header("x-ms-version", &self.version); request.set_body(body); self.pipeline.send(&ctx, &mut request).await.map(Into::into) @@ -575,7 +587,7 @@ impl BlockBlobClient { content_length: u64, source_url: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -618,6 +630,9 @@ impl BlockBlobClient { if let Some(encryption_scope) = options.encryption_scope { request.insert_header("x-ms-encryption-scope", encryption_scope); } + if let Some(file_request_intent) = options.file_request_intent { + request.insert_header("x-ms-file-request-intent", file_request_intent.to_string()); + } if let Some(lease_id) = options.lease_id { request.insert_header("x-ms-lease-id", lease_id); } @@ -673,7 +688,7 @@ impl BlockBlobClient { body: RequestContent, content_length: u64, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -779,6 +794,15 @@ impl BlockBlobClient { request.insert_header(format!("x-ms-meta-{}", k), v); } } + if let Some(structured_body_type) = options.structured_body_type { + request.insert_header("x-ms-structured-body", structured_body_type); + } + if let Some(structured_content_length) = options.structured_content_length { + request.insert_header( + "x-ms-structured-content-length", + structured_content_length.to_string(), + ); + } if let Some(blob_tags_string) = options.blob_tags_string { request.insert_header("x-ms-tags", blob_tags_string); } @@ -792,7 +816,7 @@ impl Default for BlockBlobClientOptions { fn default() -> Self { Self { client_options: ClientOptions::default(), - version: String::from("2025-01-05"), + version: String::from("2025-11-05"), } } } diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/page_blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/page_blob_client.rs index 0d11f6582f..45c6690157 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/page_blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/page_blob_client.rs @@ -21,7 +21,7 @@ use azure_core::{ fmt::SafeDebug, http::{ policies::{BearerTokenCredentialPolicy, Policy}, - ClientOptions, Context, Method, Pipeline, Request, RequestContent, Response, Url, + ClientOptions, Context, Method, NoFormat, Pipeline, Request, RequestContent, Response, Url, XmlFormat, }, Bytes, Result, @@ -106,7 +106,7 @@ impl PageBlobClient { &self, content_length: u64, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -205,7 +205,7 @@ impl PageBlobClient { &self, copy_source: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -251,16 +251,14 @@ impl PageBlobClient { /// /// # Arguments /// - /// * `content_length` - The length of the request. /// * `blob_content_length` - 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. /// * `options` - Optional parameters for the request. pub async fn create( &self, - content_length: u64, blob_content_length: u64, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -274,7 +272,7 @@ impl PageBlobClient { } let mut request = Request::new(url, Method::Put); request.insert_header("accept", "application/xml"); - request.insert_header("content-length", content_length.to_string()); + request.insert_header("content-length", "0"); if let Some(if_match) = options.if_match { request.insert_header("if-match", if_match); } @@ -520,7 +518,7 @@ impl PageBlobClient { &self, blob_content_length: u64, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -594,7 +592,7 @@ impl PageBlobClient { &self, sequence_number_action: SequenceNumberActionType, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -662,7 +660,7 @@ impl PageBlobClient { body: RequestContent, content_length: u64, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -784,7 +782,7 @@ impl PageBlobClient { content_length: u64, range: String, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -840,6 +838,9 @@ impl PageBlobClient { if let Some(encryption_scope) = options.encryption_scope { request.insert_header("x-ms-encryption-scope", encryption_scope); } + if let Some(file_request_intent) = options.file_request_intent { + request.insert_header("x-ms-file-request-intent", file_request_intent.to_string()); + } if let Some(if_sequence_number_equal_to) = options.if_sequence_number_equal_to { request.insert_header( "x-ms-if-sequence-number-eq", @@ -907,7 +908,7 @@ impl Default for PageBlobClientOptions { fn default() -> Self { Self { client_options: ClientOptions::default(), - version: String::from("2025-01-05"), + version: String::from("2025-11-05"), } } } diff --git a/sdk/storage/azure_storage_blob/src/generated/models/enums.rs b/sdk/storage/azure_storage_blob/src/generated/models/enums.rs index e9245214c8..e38b41e502 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/enums.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/enums.rs @@ -151,6 +151,13 @@ create_extensible_enum!( (AES256, "AES256") ); +create_extensible_enum!( + #[doc = r#"/// The file share token intent types."#] + FileShareTokenIntent, + #[doc = r#"/// The file share token intent is backup."#] + (Backup, "backup") +); + create_extensible_enum!( #[doc = r#"/// The filter blobs includes."#] FilterBlobsIncludeItem, diff --git a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs index 9199549c01..50d2ea92d3 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs @@ -9,31 +9,35 @@ use super::{ ArchiveStatus, BlobClientAbortCopyFromUrlResult, BlobClientAcquireLeaseResult, BlobClientBreakLeaseResult, BlobClientChangeLeaseResult, BlobClientCopyFromUrlResult, BlobClientCreateSnapshotResult, BlobClientDeleteImmutabilityPolicyResult, - BlobClientDownloadResult, BlobClientGetAccountInfoResult, BlobClientGetPropertiesResult, - BlobClientReleaseLeaseResult, BlobClientRenewLeaseResult, BlobClientSetExpiryResult, - BlobClientSetImmutabilityPolicyResult, BlobClientSetLegalHoldResult, BlobClientSetTagsResult, - BlobClientStartCopyFromUrlResult, BlobClientUndeleteResult, + BlobClientDeleteResult, BlobClientDownloadResult, BlobClientGetAccountInfoResult, + BlobClientGetPropertiesResult, BlobClientReleaseLeaseResult, BlobClientRenewLeaseResult, + BlobClientSetExpiryResult, BlobClientSetImmutabilityPolicyResult, BlobClientSetLegalHoldResult, + BlobClientSetMetadataResult, BlobClientSetPropertiesResult, BlobClientSetTagsResult, + BlobClientSetTierResult, BlobClientStartCopyFromUrlResult, BlobClientUndeleteResult, BlobContainerClientAcquireLeaseResult, BlobContainerClientBreakLeaseResult, - BlobContainerClientChangeLeaseResult, BlobContainerClientGetAccountInfoResult, + BlobContainerClientChangeLeaseResult, BlobContainerClientCreateResult, + BlobContainerClientDeleteResult, BlobContainerClientGetAccountInfoResult, BlobContainerClientGetPropertiesResult, BlobContainerClientReleaseLeaseResult, BlobContainerClientRenameResult, BlobContainerClientRenewLeaseResult, BlobContainerClientRestoreResult, BlobContainerClientSetAccessPolicyResult, - BlobImmutabilityPolicyMode, BlobServiceClientGetAccountInfoResult, BlobTags, BlobType, - BlockBlobClientCommitBlockListResult, BlockBlobClientPutBlobFromUrlResult, + BlobContainerClientSetMetadataResult, BlobImmutabilityPolicyMode, + BlobServiceClientGetAccountInfoResult, BlobServiceClientSetPropertiesResult, BlobTags, + BlobType, BlockBlobClientCommitBlockListResult, BlockBlobClientPutBlobFromUrlResult, BlockBlobClientQueryResult, BlockBlobClientStageBlockFromUrlResult, BlockBlobClientStageBlockResult, BlockBlobClientUploadResult, BlockList, CopyStatus, FilterBlobSegment, LeaseDuration, LeaseState, LeaseStatus, ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, PageBlobClientClearPagesResult, - PageBlobClientCopyIncrementalResult, PageBlobClientCreateResult, PageBlobClientResizeResult, + ListBlobsHierarchySegmentResponse, ListContainersSegmentResponse, + PageBlobClientClearPagesResult, PageBlobClientCopyIncrementalResult, + PageBlobClientCreateResult, PageBlobClientResizeResult, PageBlobClientUpdateSequenceNumberResult, PageBlobClientUploadPagesFromUrlResult, PageBlobClientUploadPagesResult, PageList, PublicAccessType, RehydratePriority, - SignedIdentifier, SkuName, StorageServiceStats, UserDelegationKey, + SignedIdentifier, SkuName, StorageServiceProperties, StorageServiceStats, UserDelegationKey, }; use azure_core::{ base64, date, http::{ headers::{HeaderName, Headers}, - Response, XmlFormat, + NoFormat, Response, XmlFormat, }, Result, }; @@ -56,6 +60,7 @@ const BLOB_SEALED: HeaderName = HeaderName::from_static("x-ms-blob-sealed"); const BLOB_SEQUENCE_NUMBER: HeaderName = HeaderName::from_static("x-ms-blob-sequence-number"); const BLOB_TYPE: HeaderName = HeaderName::from_static("x-ms-blob-type"); const CACHE_CONTROL: HeaderName = HeaderName::from_static("cache-control"); +const CLIENT_REQUEST_ID: HeaderName = HeaderName::from_static("x-ms-client-request-id"); const CONTENT_CRC64: HeaderName = HeaderName::from_static("x-ms-content-crc64"); const CONTENT_DISPOSITION: HeaderName = HeaderName::from_static("content-disposition"); const CONTENT_ENCODING: HeaderName = HeaderName::from_static("content-encoding"); @@ -69,6 +74,8 @@ const COPY_DESTINATION_SNAPSHOT: HeaderName = const COPY_ID: HeaderName = HeaderName::from_static("x-ms-copy-id"); const COPY_PROGRESS: HeaderName = HeaderName::from_static("x-ms-copy-progress"); const COPY_SOURCE: HeaderName = HeaderName::from_static("x-ms-copy-source"); +const COPY_SOURCE_ERROR_CODE: HeaderName = HeaderName::from_static("x-ms-copy-source-error-code"); +const COPY_SOURCE_STATUS_CODE: HeaderName = HeaderName::from_static("x-ms-copy-source-status-code"); const COPY_STATUS: HeaderName = HeaderName::from_static("x-ms-copy-status"); const COPY_STATUS_DESCRIPTION: HeaderName = HeaderName::from_static("x-ms-copy-status-description"); const CREATION_TIME: HeaderName = HeaderName::from_static("x-ms-creation-time"); @@ -104,11 +111,15 @@ const META: &str = "x-ms-meta-"; const OR: &str = "x-ms-or-"; const OR_POLICY_ID: HeaderName = HeaderName::from_static("x-ms-or-policy-id"); const REHYDRATE_PRIORITY: HeaderName = HeaderName::from_static("x-ms-rehydrate-priority"); +const REQUEST_ID: HeaderName = HeaderName::from_static("x-ms-request-id"); const REQUEST_SERVER_ENCRYPTED: HeaderName = HeaderName::from_static("x-ms-request-server-encrypted"); +const SERVER_ENCRYPTED: HeaderName = HeaderName::from_static("x-ms-server-encrypted"); const SKU_NAME: HeaderName = HeaderName::from_static("x-ms-sku-name"); const SNAPSHOT: HeaderName = HeaderName::from_static("x-ms-snapshot"); const STRUCTURED_BODY: HeaderName = HeaderName::from_static("x-ms-structured-body"); +const STRUCTURED_CONTENT_LENGTH: HeaderName = + HeaderName::from_static("x-ms-structured-content-length"); const TAG_COUNT: HeaderName = HeaderName::from_static("x-ms-tag-count"); const VERSION_ID: HeaderName = HeaderName::from_static("x-ms-version-id"); @@ -120,14 +131,18 @@ pub trait AppendBlobClientAppendBlockFromUrlResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn blob_append_offset(&self) -> Result>; fn blob_committed_block_count(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; + fn copy_source_error_code(&self) -> Result>; + fn copy_source_status_code(&self) -> Result>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; + fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; } impl AppendBlobClientAppendBlockFromUrlResultHeaders - for Response + for Response { /// 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. @@ -163,6 +178,11 @@ impl AppendBlobClientAppendBlockFromUrlResultHeaders Headers::get_optional_as(self.headers(), &BLOB_COMMITTED_BLOCK_COUNT) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -170,6 +190,16 @@ impl AppendBlobClientAppendBlockFromUrlResultHeaders }) } + /// The error code for the copy source. + fn copy_source_error_code(&self) -> Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) + } + + /// The status code for the copy source. + fn copy_source_status_code(&self) -> Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) + } + /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted /// with a customer-provided key. fn encryption_key_sha256(&self) -> Result> { @@ -183,6 +213,11 @@ impl AppendBlobClientAppendBlockFromUrlResultHeaders Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) } + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// 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. fn is_server_encrypted(&self) -> Result> { @@ -198,14 +233,18 @@ pub trait AppendBlobClientAppendBlockResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn blob_append_offset(&self) -> Result>; fn blob_committed_block_count(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; + fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn structured_body_type(&self) -> Result>; } -impl AppendBlobClientAppendBlockResultHeaders for Response { +impl AppendBlobClientAppendBlockResultHeaders + for Response +{ /// 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. fn content_md5(&self) -> Result>> { @@ -240,6 +279,11 @@ impl AppendBlobClientAppendBlockResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -260,6 +304,11 @@ impl AppendBlobClientAppendBlockResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// 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. fn is_server_encrypted(&self) -> Result> { @@ -284,7 +333,7 @@ pub trait AppendBlobClientCreateResultHeaders: private::Sealed { fn version_id(&self) -> Result>; } -impl AppendBlobClientCreateResultHeaders for Response { +impl AppendBlobClientCreateResultHeaders for Response { /// 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. fn content_md5(&self) -> Result>> { @@ -340,9 +389,11 @@ pub trait AppendBlobClientSealResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn is_sealed(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl AppendBlobClientSealResultHeaders for Response { +impl AppendBlobClientSealResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -364,18 +415,42 @@ impl AppendBlobClientSealResultHeaders for Response fn is_sealed(&self) -> Result> { Headers::get_optional_as(self.headers(), &BLOB_SEALED) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::abort_copy_from_url()` pub trait BlobClientAbortCopyFromUrlResultHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobClientAbortCopyFromUrlResultHeaders for Response { +impl BlobClientAbortCopyFromUrlResultHeaders + for Response +{ /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::acquire_lease()` @@ -383,10 +458,12 @@ pub trait BlobClientAcquireLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobClientAcquireLeaseResultHeaders for Response { +impl BlobClientAcquireLeaseResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -404,10 +481,20 @@ impl BlobClientAcquireLeaseResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::break_lease()` @@ -415,10 +502,12 @@ pub trait BlobClientBreakLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn lease_time(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobClientBreakLeaseResultHeaders for Response { +impl BlobClientBreakLeaseResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -436,10 +525,20 @@ impl BlobClientBreakLeaseResultHeaders for Response Headers::get_optional_as(self.headers(), &ETAG) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Approximate time remaining in the lease period, in seconds. fn lease_time(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_TIME) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::change_lease()` @@ -447,10 +546,12 @@ pub trait BlobClientChangeLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobClientChangeLeaseResultHeaders for Response { +impl BlobClientChangeLeaseResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -468,10 +569,20 @@ impl BlobClientChangeLeaseResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::copy_from_url()` @@ -480,14 +591,18 @@ pub trait BlobClientCopyFromUrlResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn copy_id(&self) -> Result>; + fn copy_source_error_code(&self) -> Result>; + fn copy_source_status_code(&self) -> Result>; fn copy_status(&self) -> Result>; fn encryption_scope(&self) -> Result>; + fn request_id(&self) -> Result>; fn version_id(&self) -> Result>; } -impl BlobClientCopyFromUrlResultHeaders for Response { +impl BlobClientCopyFromUrlResultHeaders for Response { /// 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. fn content_md5(&self) -> Result>> { @@ -511,6 +626,11 @@ impl BlobClientCopyFromUrlResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -524,6 +644,16 @@ impl BlobClientCopyFromUrlResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) + } + + /// The status code for the copy source. + fn copy_source_status_code(&self) -> Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) + } + /// State of the copy operation identified by x-ms-copy-id. fn copy_status(&self) -> Result> { Headers::get_optional_as(self.headers(), ©_STATUS) @@ -536,6 +666,11 @@ impl BlobClientCopyFromUrlResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -548,12 +683,14 @@ pub trait BlobClientCreateSnapshotResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn snapshot(&self) -> Result>; fn version_id(&self) -> Result>; } -impl BlobClientCreateSnapshotResultHeaders for Response { +impl BlobClientCreateSnapshotResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -571,6 +708,16 @@ impl BlobClientCreateSnapshotResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// 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. fn is_server_encrypted(&self) -> Result> { @@ -593,15 +740,51 @@ impl BlobClientCreateSnapshotResultHeaders for Response Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl BlobClientDeleteImmutabilityPolicyResultHeaders - for Response + for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } +} + +/// Provides access to typed response headers for `BlobClient::delete()` +pub trait BlobClientDeleteResultHeaders: private::Sealed { + fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; +} + +impl BlobClientDeleteResultHeaders for Response { + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::download()` @@ -614,6 +797,7 @@ pub trait BlobClientDownloadResultHeaders: private::Sealed { fn content_length(&self) -> Result>; fn content_md5(&self) -> Result>>; fn content_range(&self) -> Result>; + fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_committed_block_count(&self) -> Result>; @@ -621,6 +805,7 @@ pub trait BlobClientDownloadResultHeaders: private::Sealed { fn is_sealed(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; fn blob_type(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn copy_completion_time(&self) -> Result>; fn copy_id(&self) -> Result>; @@ -642,12 +827,15 @@ pub trait BlobClientDownloadResultHeaders: private::Sealed { fn metadata(&self) -> Result>; fn object_replication_rules(&self) -> Result>; fn object_replication_policy_id(&self) -> Result>; + fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn structured_body_type(&self) -> Result>; + fn structured_content_length(&self) -> Result>; fn tag_count(&self) -> Result>; fn version_id(&self) -> Result>; } -impl BlobClientDownloadResultHeaders for Response { +impl BlobClientDownloadResultHeaders for Response { /// Indicates that the service supports requests for partial blob content. fn accept_ranges(&self) -> Result> { Headers::get_optional_as(self.headers(), &ACCEPT_RANGES) @@ -693,6 +881,11 @@ impl BlobClientDownloadResultHeaders for Response { Headers::get_optional_as(self.headers(), &CONTENT_RANGE) } + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -734,6 +927,11 @@ impl BlobClientDownloadResultHeaders for Response { Headers::get_optional_as(self.headers(), &BLOB_TYPE) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -881,10 +1079,26 @@ impl BlobClientDownloadResultHeaders for Response { Headers::get_optional_as(self.headers(), &OR_POLICY_ID) } + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// 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. fn is_server_encrypted(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) + Headers::get_optional_as(self.headers(), &SERVER_ENCRYPTED) + } + + /// Indicates the response body contains a structured message and specifies the message schema version and properties. + fn structured_body_type(&self) -> Result> { + Headers::get_optional_as(self.headers(), &STRUCTURED_BODY) + } + + /// The length of the blob/file content inside the message body when the response body is returned as a structured message. + /// Will always be smaller than Content-Length. + fn structured_content_length(&self) -> Result> { + Headers::get_optional_as(self.headers(), &STRUCTURED_CONTENT_LENGTH) } /// The number of tags associated with the blob @@ -903,11 +1117,13 @@ impl BlobClientDownloadResultHeaders for Response { pub trait BlobClientGetAccountInfoResultHeaders: private::Sealed { fn date(&self) -> Result>; fn account_kind(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn is_hierarchical_namespace_enabled(&self) -> Result>; + fn request_id(&self) -> Result>; fn sku_name(&self) -> Result>; } -impl BlobClientGetAccountInfoResultHeaders for Response { +impl BlobClientGetAccountInfoResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -918,11 +1134,21 @@ impl BlobClientGetAccountInfoResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. fn is_hierarchical_namespace_enabled(&self) -> Result> { Headers::get_optional_as(self.headers(), &IS_HNS_ENABLED) } + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// Identifies the sku name of the account fn sku_name(&self) -> Result> { Headers::get_optional_as(self.headers(), &SKU_NAME) @@ -931,12 +1157,14 @@ impl BlobClientGetAccountInfoResultHeaders for Response Result>; fn cache_control(&self) -> Result>; fn content_disposition(&self) -> Result>; fn content_encoding(&self) -> Result>; fn content_language(&self) -> Result>; fn content_length(&self) -> Result>; fn content_md5(&self) -> Result>>; + fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn tier(&self) -> Result>; @@ -976,7 +1204,12 @@ pub trait BlobClientGetPropertiesResultHeaders: private::Sealed { fn version_id(&self) -> Result>; } -impl BlobClientGetPropertiesResultHeaders for Response { +impl BlobClientGetPropertiesResultHeaders for Response { + /// Indicates that the service supports requests for partial blob content. + fn accept_ranges(&self) -> Result> { + Headers::get_optional_as(self.headers(), &ACCEPT_RANGES) + } + /// This header is returned if it was previously specified for the blob. fn cache_control(&self) -> Result> { Headers::get_optional_as(self.headers(), &CACHE_CONTROL) @@ -1011,6 +1244,11 @@ impl BlobClientGetPropertiesResultHeaders for Response Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -1235,7 +1473,7 @@ impl BlobClientGetPropertiesResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) + Headers::get_optional_as(self.headers(), &SERVER_ENCRYPTED) } /// The number of tags associated with the blob @@ -1255,9 +1493,11 @@ pub trait BlobClientReleaseLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobClientReleaseLeaseResultHeaders for Response { +impl BlobClientReleaseLeaseResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -1274,6 +1514,16 @@ impl BlobClientReleaseLeaseResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &ETAG) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::renew_lease()` @@ -1281,10 +1531,12 @@ pub trait BlobClientRenewLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobClientRenewLeaseResultHeaders for Response { +impl BlobClientRenewLeaseResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -1302,10 +1554,20 @@ impl BlobClientRenewLeaseResultHeaders for Response Headers::get_optional_as(self.headers(), &ETAG) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::set_expiry()` @@ -1313,9 +1575,11 @@ pub trait BlobClientSetExpiryResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobClientSetExpiryResultHeaders for Response { +impl BlobClientSetExpiryResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -1332,23 +1596,40 @@ impl BlobClientSetExpiryResultHeaders for Response { fn etag(&self) -> Result> { Headers::get_optional_as(self.headers(), &ETAG) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::set_immutability_policy()` pub trait BlobClientSetImmutabilityPolicyResultHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn immutability_policy_mode(&self) -> Result>; fn immutability_policy_expires_on(&self) -> Result>; + fn request_id(&self) -> Result>; } impl BlobClientSetImmutabilityPolicyResultHeaders - for Response + for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Indicates the immutability policy mode of the blob. fn immutability_policy_mode(&self) -> Result> { Headers::get_optional_as(self.headers(), &IMMUTABILITY_POLICY_MODE) @@ -1360,36 +1641,194 @@ impl BlobClientSetImmutabilityPolicyResultHeaders date::parse_rfc7231(h.as_str()) }) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::set_legal_hold()` pub trait BlobClientSetLegalHoldResultHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn legal_hold(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobClientSetLegalHoldResultHeaders for Response { +impl BlobClientSetLegalHoldResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Specifies the legal hold status to set on the blob. fn legal_hold(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEGAL_HOLD) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } +} + +/// Provides access to typed response headers for `BlobClient::set_metadata()` +pub trait BlobClientSetMetadataResultHeaders: private::Sealed { + fn date(&self) -> Result>; + fn last_modified(&self) -> Result>; + fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn encryption_key_sha256(&self) -> Result>; + fn encryption_scope(&self) -> Result>; + fn request_id(&self) -> Result>; + fn is_server_encrypted(&self) -> Result>; + fn version_id(&self) -> Result>; +} + +impl BlobClientSetMetadataResultHeaders for Response { + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + + /// The date/time that the container was last modified. + fn last_modified(&self) -> Result> { + Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { + date::parse_rfc7231(h.as_str()) + }) + } + + /// The ETag contains a value that you can use to perform operations conditionally. + fn etag(&self) -> Result> { + Headers::get_optional_as(self.headers(), &ETAG) + } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted + /// with a customer-provided key. + fn encryption_key_sha256(&self) -> Result> { + Headers::get_optional_as(self.headers(), &ENCRYPTION_KEY_SHA256) + } + + /// 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 + fn encryption_scope(&self) -> Result> { + Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + + /// 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. + fn is_server_encrypted(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) + } + + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob + /// version, and may be used in subsequent requests to access this version of the blob. + fn version_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION_ID) + } +} + +/// Provides access to typed response headers for `BlobClient::set_properties()` +pub trait BlobClientSetPropertiesResultHeaders: private::Sealed { + fn date(&self) -> Result>; + fn last_modified(&self) -> Result>; + fn etag(&self) -> Result>; + fn blob_sequence_number(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; +} + +impl BlobClientSetPropertiesResultHeaders for Response { + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + + /// The date/time that the container was last modified. + fn last_modified(&self) -> Result> { + Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { + date::parse_rfc7231(h.as_str()) + }) + } + + /// The ETag contains a value that you can use to perform operations conditionally. + fn etag(&self) -> Result> { + Headers::get_optional_as(self.headers(), &ETAG) + } + + /// The current sequence number for a page blob. This header is not returned for block blobs or append blobs. + fn blob_sequence_number(&self) -> Result> { + Headers::get_optional_as(self.headers(), &BLOB_SEQUENCE_NUMBER) + } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::set_tags()` pub trait BlobClientSetTagsResultHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobClientSetTagsResultHeaders for Response { +impl BlobClientSetTagsResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } +} + +/// Provides access to typed response headers for `BlobClient::set_tier()` +pub trait BlobClientSetTierResultHeaders: private::Sealed { + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; +} + +impl BlobClientSetTierResultHeaders for Response { + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobClient::start_copy_from_url()` @@ -1397,12 +1836,18 @@ pub trait BlobClientStartCopyFromUrlResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn copy_id(&self) -> Result>; + fn copy_source_error_code(&self) -> Result>; + fn copy_source_status_code(&self) -> Result>; fn copy_status(&self) -> Result>; + fn request_id(&self) -> Result>; fn version_id(&self) -> Result>; } -impl BlobClientStartCopyFromUrlResultHeaders for Response { +impl BlobClientStartCopyFromUrlResultHeaders + for Response +{ /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -1420,17 +1865,37 @@ impl BlobClientStartCopyFromUrlResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// 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. fn copy_id(&self) -> Result> { Headers::get_optional_as(self.headers(), ©_ID) } + /// The error code for the copy source. + fn copy_source_error_code(&self) -> Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) + } + + /// The status code for the copy source. + fn copy_source_status_code(&self) -> Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) + } + /// State of the copy operation identified by x-ms-copy-id. fn copy_status(&self) -> Result> { Headers::get_optional_as(self.headers(), ©_STATUS) } + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -1441,13 +1906,25 @@ impl BlobClientStartCopyFromUrlResultHeaders for Response Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobClientUndeleteResultHeaders for Response { +impl BlobClientUndeleteResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::acquire_lease()` @@ -1455,11 +1932,13 @@ pub trait BlobContainerClientAcquireLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl BlobContainerClientAcquireLeaseResultHeaders - for Response + for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { @@ -1478,10 +1957,20 @@ impl BlobContainerClientAcquireLeaseResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::break_lease()` @@ -1489,11 +1978,15 @@ pub trait BlobContainerClientBreakLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; fn lease_time(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobContainerClientBreakLeaseResultHeaders for Response { +impl BlobContainerClientBreakLeaseResultHeaders + for Response +{ /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -1511,6 +2004,11 @@ impl BlobContainerClientBreakLeaseResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) @@ -1520,6 +2018,11 @@ impl BlobContainerClientBreakLeaseResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &LEASE_TIME) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::change_lease()` @@ -1527,11 +2030,13 @@ pub trait BlobContainerClientChangeLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl BlobContainerClientChangeLeaseResultHeaders - for Response + for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { @@ -1550,22 +2055,100 @@ impl BlobContainerClientChangeLeaseResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } +} + +/// Provides access to typed response headers for `BlobContainerClient::create()` +pub trait BlobContainerClientCreateResultHeaders: private::Sealed { + fn date(&self) -> Result>; + fn last_modified(&self) -> Result>; + fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; +} + +impl BlobContainerClientCreateResultHeaders + for Response +{ + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + + /// The date/time that the container was last modified. + fn last_modified(&self) -> Result> { + Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { + date::parse_rfc7231(h.as_str()) + }) + } + + /// The ETag contains a value that you can use to perform operations conditionally. + fn etag(&self) -> Result> { + Headers::get_optional_as(self.headers(), &ETAG) + } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } +} + +/// Provides access to typed response headers for `BlobContainerClient::delete()` +pub trait BlobContainerClientDeleteResultHeaders: private::Sealed { + fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; +} + +impl BlobContainerClientDeleteResultHeaders + for Response +{ + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::get_account_info()` pub trait BlobContainerClientGetAccountInfoResultHeaders: private::Sealed { fn date(&self) -> Result>; fn account_kind(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn is_hierarchical_namespace_enabled(&self) -> Result>; + fn request_id(&self) -> Result>; fn sku_name(&self) -> Result>; } impl BlobContainerClientGetAccountInfoResultHeaders - for Response + for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { @@ -1577,11 +2160,21 @@ impl BlobContainerClientGetAccountInfoResultHeaders Headers::get_optional_as(self.headers(), &ACCOUNT_KIND) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. fn is_hierarchical_namespace_enabled(&self) -> Result> { Headers::get_optional_as(self.headers(), &IS_HNS_ENABLED) } + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// Identifies the sku name of the account fn sku_name(&self) -> Result> { Headers::get_optional_as(self.headers(), &SKU_NAME) @@ -1590,9 +2183,11 @@ impl BlobContainerClientGetAccountInfoResultHeaders /// Provides access to typed response headers for `BlobContainerClient::get_properties()` pub trait BlobContainerClientGetPropertiesResultHeaders: private::Sealed { + fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn access(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn default_encryption_scope(&self) -> Result>; fn prevent_encryption_scope_override(&self) -> Result>; fn has_immutability_policy(&self) -> Result>; @@ -1602,11 +2197,17 @@ pub trait BlobContainerClientGetPropertiesResultHeaders: private::Sealed { fn lease_state(&self) -> Result>; fn lease_status(&self) -> Result>; fn metadata(&self) -> Result>; + fn request_id(&self) -> Result>; } impl BlobContainerClientGetPropertiesResultHeaders - for Response + for Response { + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -1624,6 +2225,11 @@ impl BlobContainerClientGetPropertiesResultHeaders Headers::get_optional_as(self.headers(), &BLOB_PUBLIC_ACCESS) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// The default encryption scope for the container. fn default_encryption_scope(&self) -> Result> { Headers::get_optional_as(self.headers(), &DEFAULT_ENCRYPTION_SCOPE) @@ -1677,6 +2283,11 @@ impl BlobContainerClientGetPropertiesResultHeaders } Ok(values) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::release_lease()` @@ -1684,10 +2295,12 @@ pub trait BlobContainerClientReleaseLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl BlobContainerClientReleaseLeaseResultHeaders - for Response + for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { @@ -1705,18 +2318,42 @@ impl BlobContainerClientReleaseLeaseResultHeaders fn etag(&self) -> Result> { Headers::get_optional_as(self.headers(), &ETAG) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::rename()` pub trait BlobContainerClientRenameResultHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobContainerClientRenameResultHeaders for Response { +impl BlobContainerClientRenameResultHeaders + for Response +{ /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::renew_lease()` @@ -1724,10 +2361,14 @@ pub trait BlobContainerClientRenewLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobContainerClientRenewLeaseResultHeaders for Response { +impl BlobContainerClientRenewLeaseResultHeaders + for Response +{ /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -1745,22 +2386,46 @@ impl BlobContainerClientRenewLeaseResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::restore()` pub trait BlobContainerClientRestoreResultHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl BlobContainerClientRestoreResultHeaders for Response { +impl BlobContainerClientRestoreResultHeaders + for Response +{ /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::set_access_policy()` @@ -1768,10 +2433,12 @@ pub trait BlobContainerClientSetAccessPolicyResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl BlobContainerClientSetAccessPolicyResultHeaders - for Response + for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { @@ -1789,18 +2456,70 @@ impl BlobContainerClientSetAccessPolicyResultHeaders fn etag(&self) -> Result> { Headers::get_optional_as(self.headers(), &ETAG) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } +} + +/// Provides access to typed response headers for `BlobContainerClient::set_metadata()` +pub trait BlobContainerClientSetMetadataResultHeaders: private::Sealed { + fn date(&self) -> Result>; + fn last_modified(&self) -> Result>; + fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; +} + +impl BlobContainerClientSetMetadataResultHeaders + for Response +{ + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + + /// The date/time that the container was last modified. + fn last_modified(&self) -> Result> { + Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { + date::parse_rfc7231(h.as_str()) + }) + } + + /// The ETag contains a value that you can use to perform operations conditionally. + fn etag(&self) -> Result> { + Headers::get_optional_as(self.headers(), &ETAG) + } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobServiceClient::get_account_info()` pub trait BlobServiceClientGetAccountInfoResultHeaders: private::Sealed { fn date(&self) -> Result>; fn account_kind(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn is_hierarchical_namespace_enabled(&self) -> Result>; + fn request_id(&self) -> Result>; fn sku_name(&self) -> Result>; } impl BlobServiceClientGetAccountInfoResultHeaders - for Response + for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { @@ -1812,20 +2531,52 @@ impl BlobServiceClientGetAccountInfoResultHeaders Headers::get_optional_as(self.headers(), &ACCOUNT_KIND) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. fn is_hierarchical_namespace_enabled(&self) -> Result> { Headers::get_optional_as(self.headers(), &IS_HNS_ENABLED) } + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// Identifies the sku name of the account fn sku_name(&self) -> Result> { Headers::get_optional_as(self.headers(), &SKU_NAME) } } +/// Provides access to typed response headers for `BlobServiceClient::set_properties()` +pub trait BlobServiceClientSetPropertiesResultHeaders: private::Sealed { + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; +} + +impl BlobServiceClientSetPropertiesResultHeaders + for Response +{ + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } +} + /// Provides access to typed response headers for `BlobClient::get_tags()` pub trait BlobTagsHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl BlobTagsHeaders for Response { @@ -1833,22 +2584,35 @@ impl BlobTagsHeaders for Response { fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlockBlobClient::commit_block_list()` pub trait BlockBlobClientCommitBlockListResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; + fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; + fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn version_id(&self) -> Result>; } impl BlockBlobClientCommitBlockListResultHeaders - for Response + for Response { /// 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. @@ -1856,6 +2620,11 @@ impl BlockBlobClientCommitBlockListResultHeaders Headers::get_optional_with(self.headers(), &CONTENT_MD5, |h| base64::decode(h.as_str())) } + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -1868,6 +2637,11 @@ impl BlockBlobClientCommitBlockListResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -1888,6 +2662,11 @@ impl BlockBlobClientCommitBlockListResultHeaders Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) } + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// 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. fn is_server_encrypted(&self) -> Result> { @@ -1907,13 +2686,17 @@ pub trait BlockBlobClientPutBlobFromUrlResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn copy_source_error_code(&self) -> Result>; + fn copy_source_status_code(&self) -> Result>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn version_id(&self) -> Result>; } -impl BlockBlobClientPutBlobFromUrlResultHeaders for Response { +impl BlockBlobClientPutBlobFromUrlResultHeaders + for Response +{ /// 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. fn content_md5(&self) -> Result>> { @@ -1937,6 +2720,16 @@ impl BlockBlobClientPutBlobFromUrlResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) + } + + /// The status code for the copy source. + fn copy_source_status_code(&self) -> Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) + } + /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted /// with a customer-provided key. fn encryption_key_sha256(&self) -> Result> { @@ -1980,6 +2773,7 @@ pub trait BlockBlobClientQueryResultHeaders: private::Sealed { fn blob_content_md5(&self) -> Result>>; fn blob_sequence_number(&self) -> Result>; fn blob_type(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn copy_completion_time(&self) -> Result>; fn copy_id(&self) -> Result>; @@ -1993,10 +2787,11 @@ pub trait BlockBlobClientQueryResultHeaders: private::Sealed { fn lease_state(&self) -> Result>; fn lease_status(&self) -> Result>; fn metadata(&self) -> Result>; + fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; } -impl BlockBlobClientQueryResultHeaders for Response { +impl BlockBlobClientQueryResultHeaders for Response { /// Indicates that the service supports requests for partial blob content. fn accept_ranges(&self) -> Result> { Headers::get_optional_as(self.headers(), &ACCEPT_RANGES) @@ -2083,6 +2878,11 @@ impl BlockBlobClientQueryResultHeaders for Response Headers::get_optional_as(self.headers(), &BLOB_TYPE) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -2175,10 +2975,15 @@ impl BlockBlobClientQueryResultHeaders for Response Ok(values) } + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// 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. fn is_server_encrypted(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) + Headers::get_optional_as(self.headers(), &SERVER_ENCRYPTED) } } @@ -2186,14 +2991,18 @@ impl BlockBlobClientQueryResultHeaders for Response pub trait BlockBlobClientStageBlockFromUrlResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; + fn copy_source_error_code(&self) -> Result>; + fn copy_source_status_code(&self) -> Result>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; + fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; } impl BlockBlobClientStageBlockFromUrlResultHeaders - for Response + for Response { /// 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. @@ -2206,6 +3015,11 @@ impl BlockBlobClientStageBlockFromUrlResultHeaders Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -2213,6 +3027,16 @@ impl BlockBlobClientStageBlockFromUrlResultHeaders }) } + /// The error code for the copy source. + fn copy_source_error_code(&self) -> Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) + } + + /// The status code for the copy source. + fn copy_source_status_code(&self) -> Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) + } + /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted /// with a customer-provided key. fn encryption_key_sha256(&self) -> Result> { @@ -2226,6 +3050,11 @@ impl BlockBlobClientStageBlockFromUrlResultHeaders Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) } + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// 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. fn is_server_encrypted(&self) -> Result> { @@ -2236,19 +3065,35 @@ impl BlockBlobClientStageBlockFromUrlResultHeaders /// Provides access to typed response headers for `BlockBlobClient::stage_block()` pub trait BlockBlobClientStageBlockResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; + fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; + fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn structured_body_type(&self) -> Result>; } -impl BlockBlobClientStageBlockResultHeaders for Response { +impl BlockBlobClientStageBlockResultHeaders + for Response +{ /// 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. fn content_md5(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_MD5, |h| base64::decode(h.as_str())) } + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -2269,31 +3114,50 @@ impl BlockBlobClientStageBlockResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// 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. fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } + + /// Indicates the response body contains a structured message and specifies the message schema version and properties. + fn structured_body_type(&self) -> Result> { + Headers::get_optional_as(self.headers(), &STRUCTURED_BODY) + } } /// Provides access to typed response headers for `BlockBlobClient::upload()` pub trait BlockBlobClientUploadResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; + fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; + fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn structured_body_type(&self) -> Result>; fn version_id(&self) -> Result>; } -impl BlockBlobClientUploadResultHeaders for Response { +impl BlockBlobClientUploadResultHeaders for Response { /// 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. fn content_md5(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_MD5, |h| base64::decode(h.as_str())) } + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -2306,6 +3170,11 @@ impl BlockBlobClientUploadResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted /// with a customer-provided key. fn encryption_key_sha256(&self) -> Result> { @@ -2319,12 +3188,22 @@ impl BlockBlobClientUploadResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// 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. fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } + /// Indicates the response body contains a structured message and specifies the message schema version and properties. + fn structured_body_type(&self) -> Result> { + Headers::get_optional_as(self.headers(), &STRUCTURED_BODY) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -2334,12 +3213,20 @@ impl BlockBlobClientUploadResultHeaders for Response Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_content_length(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl BlockListHeaders for Response { + /// UTC date/time value generated by the service that indicates the time at which the response was initiated + fn date(&self) -> Result> { + Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) + } + /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -2357,6 +3244,16 @@ impl BlockListHeaders for Response { fn blob_content_length(&self) -> Result> { Headers::get_optional_as(self.headers(), &BLOB_CONTENT_LENGTH) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for the following methods: @@ -2364,6 +3261,8 @@ impl BlockListHeaders for Response { /// * `BlobServiceClient::filter_blobs()` pub trait FilterBlobSegmentHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl FilterBlobSegmentHeaders for Response { @@ -2371,11 +3270,23 @@ impl FilterBlobSegmentHeaders for Response { fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::list_blob_flat_segment()` pub trait ListBlobsFlatSegmentResponseHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl ListBlobsFlatSegmentResponseHeaders for Response { @@ -2383,11 +3294,23 @@ impl ListBlobsFlatSegmentResponseHeaders for Response Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::list_blob_hierarchy_segment()` pub trait ListBlobsHierarchySegmentResponseHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl ListBlobsHierarchySegmentResponseHeaders @@ -2397,6 +3320,34 @@ impl ListBlobsHierarchySegmentResponseHeaders fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } +} + +/// Provides access to typed response headers for `BlobServiceClient::list_containers_segment()` +pub trait ListContainersSegmentResponseHeaders: private::Sealed { + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; +} + +impl ListContainersSegmentResponseHeaders for Response { + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `PageBlobClient::clear_pages()` @@ -2409,7 +3360,7 @@ pub trait PageBlobClientClearPagesResultHeaders: private::Sealed { fn content_crc64(&self) -> Result>>; } -impl PageBlobClientClearPagesResultHeaders for Response { +impl PageBlobClientClearPagesResultHeaders for Response { /// 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. fn content_md5(&self) -> Result>> { @@ -2451,11 +3402,15 @@ pub trait PageBlobClientCopyIncrementalResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn copy_id(&self) -> Result>; fn copy_status(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl PageBlobClientCopyIncrementalResultHeaders for Response { +impl PageBlobClientCopyIncrementalResultHeaders + for Response +{ /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -2473,6 +3428,11 @@ impl PageBlobClientCopyIncrementalResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// 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. fn copy_id(&self) -> Result> { @@ -2483,6 +3443,11 @@ impl PageBlobClientCopyIncrementalResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), ©_STATUS) } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `PageBlobClient::create()` @@ -2497,7 +3462,7 @@ pub trait PageBlobClientCreateResultHeaders: private::Sealed { fn version_id(&self) -> Result>; } -impl PageBlobClientCreateResultHeaders for Response { +impl PageBlobClientCreateResultHeaders for Response { /// 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. fn content_md5(&self) -> Result>> { @@ -2553,9 +3518,11 @@ pub trait PageBlobClientResizeResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } -impl PageBlobClientResizeResultHeaders for Response { +impl PageBlobClientResizeResultHeaders for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) @@ -2577,6 +3544,16 @@ impl PageBlobClientResizeResultHeaders for Response fn blob_sequence_number(&self) -> Result> { Headers::get_optional_as(self.headers(), &BLOB_SEQUENCE_NUMBER) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `PageBlobClient::update_sequence_number()` @@ -2585,10 +3562,12 @@ pub trait PageBlobClientUpdateSequenceNumberResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl PageBlobClientUpdateSequenceNumberResultHeaders - for Response + for Response { /// UTC date/time value generated by the service that indicates the time at which the response was initiated fn date(&self) -> Result> { @@ -2611,6 +3590,16 @@ impl PageBlobClientUpdateSequenceNumberResultHeaders fn blob_sequence_number(&self) -> Result> { Headers::get_optional_as(self.headers(), &BLOB_SEQUENCE_NUMBER) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `PageBlobClient::upload_pages_from_url()` @@ -2621,13 +3610,15 @@ pub trait PageBlobClientUploadPagesFromUrlResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; fn content_crc64(&self) -> Result>>; + fn copy_source_error_code(&self) -> Result>; + fn copy_source_status_code(&self) -> Result>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; } impl PageBlobClientUploadPagesFromUrlResultHeaders - for Response + for Response { /// 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. @@ -2664,6 +3655,16 @@ impl PageBlobClientUploadPagesFromUrlResultHeaders }) } + /// The error code for the copy source. + fn copy_source_error_code(&self) -> Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) + } + + /// The status code for the copy source. + fn copy_source_status_code(&self) -> Result> { + Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) + } + /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted /// with a customer-provided key. fn encryption_key_sha256(&self) -> Result> { @@ -2691,14 +3692,18 @@ pub trait PageBlobClientUploadPagesResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; + fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; + fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn structured_body_type(&self) -> Result>; } -impl PageBlobClientUploadPagesResultHeaders for Response { +impl PageBlobClientUploadPagesResultHeaders + for Response +{ /// 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. fn content_md5(&self) -> Result>> { @@ -2727,6 +3732,11 @@ impl PageBlobClientUploadPagesResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -2747,6 +3757,11 @@ impl PageBlobClientUploadPagesResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } + /// 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. fn is_server_encrypted(&self) -> Result> { @@ -2767,6 +3782,8 @@ pub trait PageListHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_content_length(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl PageListHeaders for Response { @@ -2792,11 +3809,41 @@ impl PageListHeaders for Response { fn blob_content_length(&self) -> Result> { Headers::get_optional_as(self.headers(), &BLOB_CONTENT_LENGTH) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } +} + +/// Provides access to typed response headers for `BlobServiceClient::get_properties()` +pub trait StorageServicePropertiesHeaders: private::Sealed { + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; +} + +impl StorageServicePropertiesHeaders for Response { + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobServiceClient::get_statistics()` pub trait StorageServiceStatsHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl StorageServiceStatsHeaders for Response { @@ -2804,11 +3851,23 @@ impl StorageServiceStatsHeaders for Response { fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobServiceClient::get_user_delegation_key()` pub trait UserDelegationKeyHeaders: private::Sealed { fn date(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl UserDelegationKeyHeaders for Response { @@ -2816,6 +3875,16 @@ impl UserDelegationKeyHeaders for Response { fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } /// Provides access to typed response headers for `BlobContainerClient::get_access_policy()` @@ -2824,6 +3893,8 @@ pub trait VecSignedIdentifierHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn access(&self) -> Result>; + fn client_request_id(&self) -> Result>; + fn request_id(&self) -> Result>; } impl VecSignedIdentifierHeaders for Response, XmlFormat> { @@ -2848,6 +3919,16 @@ impl VecSignedIdentifierHeaders for Response, XmlFormat> { fn access(&self) -> Result> { Headers::get_optional_as(self.headers(), &BLOB_PUBLIC_ACCESS) } + + /// An opaque, globally-unique, client-generated string identifier for the request. + fn client_request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) + } + + /// An opaque, globally-unique, server-generated string identifier for the request. + fn request_id(&self) -> Result> { + Headers::get_optional_as(self.headers(), &REQUEST_ID) + } } mod private { @@ -2856,82 +3937,96 @@ mod private { AppendBlobClientCreateResult, AppendBlobClientSealResult, BlobClientAbortCopyFromUrlResult, BlobClientAcquireLeaseResult, BlobClientBreakLeaseResult, BlobClientChangeLeaseResult, BlobClientCopyFromUrlResult, BlobClientCreateSnapshotResult, - BlobClientDeleteImmutabilityPolicyResult, BlobClientDownloadResult, + BlobClientDeleteImmutabilityPolicyResult, BlobClientDeleteResult, BlobClientDownloadResult, BlobClientGetAccountInfoResult, BlobClientGetPropertiesResult, BlobClientReleaseLeaseResult, BlobClientRenewLeaseResult, BlobClientSetExpiryResult, BlobClientSetImmutabilityPolicyResult, BlobClientSetLegalHoldResult, - BlobClientSetTagsResult, BlobClientStartCopyFromUrlResult, BlobClientUndeleteResult, + BlobClientSetMetadataResult, BlobClientSetPropertiesResult, BlobClientSetTagsResult, + BlobClientSetTierResult, BlobClientStartCopyFromUrlResult, BlobClientUndeleteResult, BlobContainerClientAcquireLeaseResult, BlobContainerClientBreakLeaseResult, - BlobContainerClientChangeLeaseResult, BlobContainerClientGetAccountInfoResult, + BlobContainerClientChangeLeaseResult, BlobContainerClientCreateResult, + BlobContainerClientDeleteResult, BlobContainerClientGetAccountInfoResult, BlobContainerClientGetPropertiesResult, BlobContainerClientReleaseLeaseResult, BlobContainerClientRenameResult, BlobContainerClientRenewLeaseResult, BlobContainerClientRestoreResult, BlobContainerClientSetAccessPolicyResult, - BlobServiceClientGetAccountInfoResult, BlobTags, BlockBlobClientCommitBlockListResult, + BlobContainerClientSetMetadataResult, BlobServiceClientGetAccountInfoResult, + BlobServiceClientSetPropertiesResult, BlobTags, BlockBlobClientCommitBlockListResult, BlockBlobClientPutBlobFromUrlResult, BlockBlobClientQueryResult, BlockBlobClientStageBlockFromUrlResult, BlockBlobClientStageBlockResult, BlockBlobClientUploadResult, BlockList, FilterBlobSegment, ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, PageBlobClientClearPagesResult, - PageBlobClientCopyIncrementalResult, PageBlobClientCreateResult, - PageBlobClientResizeResult, PageBlobClientUpdateSequenceNumberResult, - PageBlobClientUploadPagesFromUrlResult, PageBlobClientUploadPagesResult, PageList, - SignedIdentifier, StorageServiceStats, UserDelegationKey, + ListBlobsHierarchySegmentResponse, ListContainersSegmentResponse, + PageBlobClientClearPagesResult, PageBlobClientCopyIncrementalResult, + PageBlobClientCreateResult, PageBlobClientResizeResult, + PageBlobClientUpdateSequenceNumberResult, PageBlobClientUploadPagesFromUrlResult, + PageBlobClientUploadPagesResult, PageList, SignedIdentifier, StorageServiceProperties, + StorageServiceStats, UserDelegationKey, }; - use azure_core::http::{Response, XmlFormat}; + use azure_core::http::{NoFormat, Response, XmlFormat}; pub trait Sealed {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} + impl Sealed for Response {} impl Sealed for Response {} + impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response, XmlFormat> {} diff --git a/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs b/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs index 2a52a8bd63..721bc294a2 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs @@ -5,8 +5,9 @@ use super::{ AccessTier, BlobDeleteType, BlobImmutabilityPolicyMode, DeleteSnapshotsOptionType, - EncryptionAlgorithmType, FilterBlobsIncludeItem, LeaseDuration, ListBlobsIncludeItem, - ListContainersIncludeType, PremiumPageBlobAccessTier, PublicAccessType, RehydratePriority, + EncryptionAlgorithmType, FileShareTokenIntent, FilterBlobsIncludeItem, LeaseDuration, + ListBlobsIncludeItem, ListContainersIncludeType, PremiumPageBlobAccessTier, PublicAccessType, + RehydratePriority, }; use azure_core::{fmt::SafeDebug, http::ClientMethodOptions}; use std::collections::HashMap; @@ -115,6 +116,9 @@ pub struct AppendBlobClientAppendBlockFromUrlOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, + /// Valid value is backup + pub file_request_intent: Option, + /// The request should only proceed if an entity matches this string. pub if_match: Option, @@ -422,6 +426,9 @@ pub struct BlobClientCopyFromUrlOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, + /// Valid value is backup + pub file_request_intent: Option, + /// The request should only proceed if an entity matches this string. pub if_match: Option, @@ -650,7 +657,8 @@ pub struct BlobClientDownloadOptions<'a> { /// information on working with blob snapshots, see [Creating a Snapshot of a Blob.](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob) pub snapshot: Option, - /// Required if the request body is a structured message. Specifies the message schema version and properties. + /// Specifies the response content should be returned as a structured message and specifies the message schema version and + /// properties. pub structured_body_type: Option, /// The timeout parameter is expressed in seconds. For more information, see [Setting Timeouts for Blob Service Operations.](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations) @@ -1846,6 +1854,9 @@ pub struct BlockBlobClientPutBlobFromUrlOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, + /// Valid value is backup + pub file_request_intent: Option, + /// The request should only proceed if an entity matches this string. pub if_match: Option, @@ -1976,6 +1987,13 @@ pub struct BlockBlobClientStageBlockOptions<'a> { /// Allows customization of the method call. pub method_options: ClientMethodOptions<'a>, + /// Required if the request body is a structured message. Specifies the message schema version and properties. + pub structured_body_type: Option, + + /// Required if the request body is a structured message. Specifies the length of the blob/file content inside the message + /// body. Will always be smaller than Content-Length. + pub structured_content_length: Option, + /// The timeout parameter is expressed in seconds. For more information, see [Setting Timeouts for Blob Service Operations.](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations) pub timeout: Option, @@ -2013,6 +2031,9 @@ pub struct BlockBlobClientStageBlockFromUrlOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, + /// Valid value is backup + pub file_request_intent: Option, + /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. pub lease_id: Option, @@ -2126,6 +2147,13 @@ pub struct BlockBlobClientUploadOptions<'a> { /// Allows customization of the method call. pub method_options: ClientMethodOptions<'a>, + /// Required if the request body is a structured message. Specifies the message schema version and properties. + pub structured_body_type: Option, + + /// Required if the request body is a structured message. Specifies the length of the blob/file content inside the message + /// body. Will always be smaller than Content-Length. + pub structured_content_length: Option, + /// The tier to be set on the blob. pub tier: Option, @@ -2610,6 +2638,9 @@ pub struct PageBlobClientUploadPagesFromUrlOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, + /// Valid value is backup + pub file_request_intent: Option, + /// The request should only proceed if an entity matches this string. pub if_match: Option, diff --git a/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs b/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs index 4102475cdd..9e6d67aff6 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs @@ -6,8 +6,9 @@ use super::{ models_serde, xml_helpers::{ - Blob_tag_setTag, BlobsBlob, Clear_rangeClearRange, Committed_blocksBlock, CorsCorsRule, - Page_rangePageRange, SchemaField, Uncommitted_blocksBlock, + Blob_tag_setTag, BlobsBlob, Clear_rangeClearRange, Committed_blocksBlock, + Container_itemsContainer, CorsCorsRule, Page_rangePageRange, SchemaField, + Uncommitted_blocksBlock, }, AccessTier, ArchiveStatus, BlobImmutabilityPolicyMode, BlobType, CopyStatus, GeoReplicationStatusType, LeaseDuration, LeaseState, LeaseStatus, PublicAccessType, @@ -123,6 +124,10 @@ pub struct BlobClientCreateSnapshotResult; #[derive(SafeDebug)] pub struct BlobClientDeleteImmutabilityPolicyResult; +/// Contains results for `BlobClient::delete()` +#[derive(SafeDebug)] +pub struct BlobClientDeleteResult; + /// Contains results for `BlobClient::download()` #[derive(SafeDebug)] pub struct BlobClientDownloadResult; @@ -155,10 +160,22 @@ pub struct BlobClientSetImmutabilityPolicyResult; #[derive(SafeDebug)] pub struct BlobClientSetLegalHoldResult; +/// Contains results for `BlobClient::set_metadata()` +#[derive(SafeDebug)] +pub struct BlobClientSetMetadataResult; + +/// Contains results for `BlobClient::set_properties()` +#[derive(SafeDebug)] +pub struct BlobClientSetPropertiesResult; + /// Contains results for `BlobClient::set_tags()` #[derive(SafeDebug)] pub struct BlobClientSetTagsResult; +/// Contains results for `BlobClient::set_tier()` +#[derive(SafeDebug)] +pub struct BlobClientSetTierResult; + /// Contains results for `BlobClient::start_copy_from_url()` #[derive(SafeDebug)] pub struct BlobClientStartCopyFromUrlResult; @@ -179,6 +196,14 @@ pub struct BlobContainerClientBreakLeaseResult; #[derive(SafeDebug)] pub struct BlobContainerClientChangeLeaseResult; +/// Contains results for `BlobContainerClient::create()` +#[derive(SafeDebug)] +pub struct BlobContainerClientCreateResult; + +/// Contains results for `BlobContainerClient::delete()` +#[derive(SafeDebug)] +pub struct BlobContainerClientDeleteResult; + /// Contains results for `BlobContainerClient::get_account_info()` #[derive(SafeDebug)] pub struct BlobContainerClientGetAccountInfoResult; @@ -207,6 +232,10 @@ pub struct BlobContainerClientRestoreResult; #[derive(SafeDebug)] pub struct BlobContainerClientSetAccessPolicyResult; +/// Contains results for `BlobContainerClient::set_metadata()` +#[derive(SafeDebug)] +pub struct BlobContainerClientSetMetadataResult; + /// The blob flat list segment. #[derive(Clone, Default, Deserialize, SafeDebug, Serialize)] #[non_exhaustive] @@ -546,6 +575,10 @@ pub struct BlobPropertiesInternal { #[derive(SafeDebug)] pub struct BlobServiceClientGetAccountInfoResult; +/// Contains results for `BlobServiceClient::set_properties()` +#[derive(SafeDebug)] +pub struct BlobServiceClientSetPropertiesResult; + /// The blob tags. #[derive(Clone, Default, Deserialize, SafeDebug, Serialize)] #[serde(rename = "Tag")] @@ -1016,7 +1049,12 @@ pub struct ListBlobsHierarchySegmentResponse { #[serde(rename = "EnumerationResults")] pub struct ListContainersSegmentResponse { /// The container segment. - #[serde(default, rename = "Containers")] + #[serde( + default, + deserialize_with = "Container_itemsContainer::unwrap", + rename = "Containers", + serialize_with = "Container_itemsContainer::wrap" + )] pub container_items: Vec, /// The marker of the containers. diff --git a/sdk/storage/azure_storage_blob/src/generated/models/xml_helpers.rs b/sdk/storage/azure_storage_blob/src/generated/models/xml_helpers.rs index fc8948dedc..fa9a828573 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/xml_helpers.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/xml_helpers.rs @@ -6,7 +6,9 @@ #![allow(non_camel_case_types)] #![allow(non_snake_case)] -use super::{ArrowField, BlobTag, Block, ClearRange, CorsRule, FilterBlobItem, PageRange}; +use super::{ + ArrowField, BlobTag, Block, ClearRange, ContainerItem, CorsRule, FilterBlobItem, PageRange, +}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Deserialize, Serialize)] @@ -116,6 +118,32 @@ impl Committed_blocksBlock { } } +#[derive(Deserialize, Serialize)] +#[serde(rename = "Containers")] +pub(crate) struct Container_itemsContainer { + #[serde(default)] + Container: Vec, +} + +impl Container_itemsContainer { + pub fn unwrap<'de, D>(deserializer: D) -> Result, D::Error> + where + D: Deserializer<'de>, + { + Ok(Container_itemsContainer::deserialize(deserializer)?.Container) + } + + pub fn wrap(to_serialize: &Vec, serializer: S) -> Result + where + S: Serializer, + { + Container_itemsContainer { + Container: to_serialize.to_owned(), + } + .serialize(serializer) + } +} + #[derive(Deserialize, Serialize)] #[serde(rename = "Cors")] pub(crate) struct CorsCorsRule { diff --git a/sdk/storage/azure_storage_blob/tsp-location.yaml b/sdk/storage/azure_storage_blob/tsp-location.yaml index 0133a7f2c1..7fba2faba8 100644 --- a/sdk/storage/azure_storage_blob/tsp-location.yaml +++ b/sdk/storage/azure_storage_blob/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storage/Microsoft.BlobStorage -commit: 709432c627fed96769d10d14084f1a8ea8be6680 +commit: fef06be6c78c22fe5a91331a4f546f0e2c1e0b05 repo: Azure/azure-rest-api-specs additionalDirectories: From 39881b12586b0e81aadbcd274275d34aaf45381c Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Thu, 12 Jun 2025 15:52:58 -0700 Subject: [PATCH 2/7] Regenerate against bulk of header work (just need template) --- .../src/generated/models/header_traits.rs | 208 ------------------ .../src/generated/models/method_options.rs | 4 +- .../azure_storage_blob/tsp-location.yaml | 2 +- 3 files changed, 3 insertions(+), 211 deletions(-) diff --git a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs index 50d2ea92d3..d20578c3c0 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs @@ -118,8 +118,6 @@ const SERVER_ENCRYPTED: HeaderName = HeaderName::from_static("x-ms-server-encryp const SKU_NAME: HeaderName = HeaderName::from_static("x-ms-sku-name"); const SNAPSHOT: HeaderName = HeaderName::from_static("x-ms-snapshot"); const STRUCTURED_BODY: HeaderName = HeaderName::from_static("x-ms-structured-body"); -const STRUCTURED_CONTENT_LENGTH: HeaderName = - HeaderName::from_static("x-ms-structured-content-length"); const TAG_COUNT: HeaderName = HeaderName::from_static("x-ms-tag-count"); const VERSION_ID: HeaderName = HeaderName::from_static("x-ms-version-id"); @@ -765,17 +763,11 @@ impl BlobClientDeleteImmutabilityPolicyResultHeaders /// Provides access to typed response headers for `BlobClient::delete()` pub trait BlobClientDeleteResultHeaders: private::Sealed { - fn date(&self) -> Result>; fn client_request_id(&self) -> Result>; fn request_id(&self) -> Result>; } impl BlobClientDeleteResultHeaders for Response { - /// UTC date/time value generated by the service that indicates the time at which the response was initiated - fn date(&self) -> Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - /// An opaque, globally-unique, client-generated string identifier for the request. fn client_request_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) @@ -789,7 +781,6 @@ impl BlobClientDeleteResultHeaders for Response Result>; fn cache_control(&self) -> Result>; fn content_disposition(&self) -> Result>; fn content_encoding(&self) -> Result>; @@ -797,7 +788,6 @@ pub trait BlobClientDownloadResultHeaders: private::Sealed { fn content_length(&self) -> Result>; fn content_md5(&self) -> Result>>; fn content_range(&self) -> Result>; - fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_committed_block_count(&self) -> Result>; @@ -829,18 +819,11 @@ pub trait BlobClientDownloadResultHeaders: private::Sealed { fn object_replication_policy_id(&self) -> Result>; fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn structured_body_type(&self) -> Result>; - fn structured_content_length(&self) -> Result>; fn tag_count(&self) -> Result>; fn version_id(&self) -> Result>; } impl BlobClientDownloadResultHeaders for Response { - /// Indicates that the service supports requests for partial blob content. - fn accept_ranges(&self) -> Result> { - Headers::get_optional_as(self.headers(), &ACCEPT_RANGES) - } - /// This header is returned if it was previously specified for the blob. fn cache_control(&self) -> Result> { Headers::get_optional_as(self.headers(), &CACHE_CONTROL) @@ -881,11 +864,6 @@ impl BlobClientDownloadResultHeaders for Response Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -1090,17 +1068,6 @@ impl BlobClientDownloadResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &STRUCTURED_BODY) - } - - /// The length of the blob/file content inside the message body when the response body is returned as a structured message. - /// Will always be smaller than Content-Length. - fn structured_content_length(&self) -> Result> { - Headers::get_optional_as(self.headers(), &STRUCTURED_CONTENT_LENGTH) - } - /// The number of tags associated with the blob fn tag_count(&self) -> Result> { Headers::get_optional_as(self.headers(), &TAG_COUNT) @@ -1157,14 +1124,12 @@ impl BlobClientGetAccountInfoResultHeaders for Response Result>; fn cache_control(&self) -> Result>; fn content_disposition(&self) -> Result>; fn content_encoding(&self) -> Result>; fn content_language(&self) -> Result>; fn content_length(&self) -> Result>; fn content_md5(&self) -> Result>>; - fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn tier(&self) -> Result>; @@ -1205,11 +1170,6 @@ pub trait BlobClientGetPropertiesResultHeaders: private::Sealed { } impl BlobClientGetPropertiesResultHeaders for Response { - /// Indicates that the service supports requests for partial blob content. - fn accept_ranges(&self) -> Result> { - Headers::get_optional_as(self.headers(), &ACCEPT_RANGES) - } - /// This header is returned if it was previously specified for the blob. fn cache_control(&self) -> Result> { Headers::get_optional_as(self.headers(), &CACHE_CONTROL) @@ -1244,11 +1204,6 @@ impl BlobClientGetPropertiesResultHeaders for Response Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -1680,104 +1635,29 @@ impl BlobClientSetLegalHoldResultHeaders for Response Result>; - fn last_modified(&self) -> Result>; - fn etag(&self) -> Result>; fn client_request_id(&self) -> Result>; - fn encryption_key_sha256(&self) -> Result>; - fn encryption_scope(&self) -> Result>; fn request_id(&self) -> Result>; - fn is_server_encrypted(&self) -> Result>; - fn version_id(&self) -> Result>; } impl BlobClientSetMetadataResultHeaders for Response { - /// UTC date/time value generated by the service that indicates the time at which the response was initiated - fn date(&self) -> Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - - /// The date/time that the container was last modified. - fn last_modified(&self) -> Result> { - Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { - date::parse_rfc7231(h.as_str()) - }) - } - - /// The ETag contains a value that you can use to perform operations conditionally. - fn etag(&self) -> Result> { - Headers::get_optional_as(self.headers(), &ETAG) - } - /// An opaque, globally-unique, client-generated string identifier for the request. fn client_request_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) } - /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted - /// with a customer-provided key. - fn encryption_key_sha256(&self) -> Result> { - Headers::get_optional_as(self.headers(), &ENCRYPTION_KEY_SHA256) - } - - /// 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 - fn encryption_scope(&self) -> Result> { - Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) - } - /// An opaque, globally-unique, server-generated string identifier for the request. fn request_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_ID) } - - /// 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. - fn is_server_encrypted(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) - } - - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob - /// version, and may be used in subsequent requests to access this version of the blob. - fn version_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION_ID) - } } /// Provides access to typed response headers for `BlobClient::set_properties()` pub trait BlobClientSetPropertiesResultHeaders: private::Sealed { - fn date(&self) -> Result>; - fn last_modified(&self) -> Result>; - fn etag(&self) -> Result>; - fn blob_sequence_number(&self) -> Result>; fn client_request_id(&self) -> Result>; fn request_id(&self) -> Result>; } impl BlobClientSetPropertiesResultHeaders for Response { - /// UTC date/time value generated by the service that indicates the time at which the response was initiated - fn date(&self) -> Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - - /// The date/time that the container was last modified. - fn last_modified(&self) -> Result> { - Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { - date::parse_rfc7231(h.as_str()) - }) - } - - /// The ETag contains a value that you can use to perform operations conditionally. - fn etag(&self) -> Result> { - Headers::get_optional_as(self.headers(), &ETAG) - } - - /// The current sequence number for a page blob. This header is not returned for block blobs or append blobs. - fn blob_sequence_number(&self) -> Result> { - Headers::get_optional_as(self.headers(), &BLOB_SEQUENCE_NUMBER) - } - /// An opaque, globally-unique, client-generated string identifier for the request. fn client_request_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) @@ -2073,9 +1953,6 @@ impl BlobContainerClientChangeLeaseResultHeaders /// Provides access to typed response headers for `BlobContainerClient::create()` pub trait BlobContainerClientCreateResultHeaders: private::Sealed { - fn date(&self) -> Result>; - fn last_modified(&self) -> Result>; - fn etag(&self) -> Result>; fn client_request_id(&self) -> Result>; fn request_id(&self) -> Result>; } @@ -2083,23 +1960,6 @@ pub trait BlobContainerClientCreateResultHeaders: private::Sealed { impl BlobContainerClientCreateResultHeaders for Response { - /// UTC date/time value generated by the service that indicates the time at which the response was initiated - fn date(&self) -> Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - - /// The date/time that the container was last modified. - fn last_modified(&self) -> Result> { - Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { - date::parse_rfc7231(h.as_str()) - }) - } - - /// The ETag contains a value that you can use to perform operations conditionally. - fn etag(&self) -> Result> { - Headers::get_optional_as(self.headers(), &ETAG) - } - /// An opaque, globally-unique, client-generated string identifier for the request. fn client_request_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) @@ -2113,7 +1973,6 @@ impl BlobContainerClientCreateResultHeaders /// Provides access to typed response headers for `BlobContainerClient::delete()` pub trait BlobContainerClientDeleteResultHeaders: private::Sealed { - fn date(&self) -> Result>; fn client_request_id(&self) -> Result>; fn request_id(&self) -> Result>; } @@ -2121,11 +1980,6 @@ pub trait BlobContainerClientDeleteResultHeaders: private::Sealed { impl BlobContainerClientDeleteResultHeaders for Response { - /// UTC date/time value generated by the service that indicates the time at which the response was initiated - fn date(&self) -> Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - /// An opaque, globally-unique, client-generated string identifier for the request. fn client_request_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) @@ -2183,7 +2037,6 @@ impl BlobContainerClientGetAccountInfoResultHeaders /// Provides access to typed response headers for `BlobContainerClient::get_properties()` pub trait BlobContainerClientGetPropertiesResultHeaders: private::Sealed { - fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn access(&self) -> Result>; @@ -2203,11 +2056,6 @@ pub trait BlobContainerClientGetPropertiesResultHeaders: private::Sealed { impl BlobContainerClientGetPropertiesResultHeaders for Response { - /// UTC date/time value generated by the service that indicates the time at which the response was initiated - fn date(&self) -> Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -2470,9 +2318,6 @@ impl BlobContainerClientSetAccessPolicyResultHeaders /// Provides access to typed response headers for `BlobContainerClient::set_metadata()` pub trait BlobContainerClientSetMetadataResultHeaders: private::Sealed { - fn date(&self) -> Result>; - fn last_modified(&self) -> Result>; - fn etag(&self) -> Result>; fn client_request_id(&self) -> Result>; fn request_id(&self) -> Result>; } @@ -2480,23 +2325,6 @@ pub trait BlobContainerClientSetMetadataResultHeaders: private::Sealed { impl BlobContainerClientSetMetadataResultHeaders for Response { - /// UTC date/time value generated by the service that indicates the time at which the response was initiated - fn date(&self) -> Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - - /// The date/time that the container was last modified. - fn last_modified(&self) -> Result> { - Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { - date::parse_rfc7231(h.as_str()) - }) - } - - /// The ETag contains a value that you can use to perform operations conditionally. - fn etag(&self) -> Result> { - Headers::get_optional_as(self.headers(), &ETAG) - } - /// An opaque, globally-unique, client-generated string identifier for the request. fn client_request_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) @@ -2599,7 +2427,6 @@ impl BlobTagsHeaders for Response { /// Provides access to typed response headers for `BlockBlobClient::commit_block_list()` pub trait BlockBlobClientCommitBlockListResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; - fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn client_request_id(&self) -> Result>; @@ -2620,11 +2447,6 @@ impl BlockBlobClientCommitBlockListResultHeaders Headers::get_optional_with(self.headers(), &CONTENT_MD5, |h| base64::decode(h.as_str())) } - /// UTC date/time value generated by the service that indicates the time at which the response was initiated - fn date(&self) -> Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -3065,14 +2887,12 @@ impl BlockBlobClientStageBlockFromUrlResultHeaders /// Provides access to typed response headers for `BlockBlobClient::stage_block()` pub trait BlockBlobClientStageBlockResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; - fn date(&self) -> Result>; fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn structured_body_type(&self) -> Result>; } impl BlockBlobClientStageBlockResultHeaders @@ -3084,11 +2904,6 @@ impl BlockBlobClientStageBlockResultHeaders Headers::get_optional_with(self.headers(), &CONTENT_MD5, |h| base64::decode(h.as_str())) } - /// UTC date/time value generated by the service that indicates the time at which the response was initiated - fn date(&self) -> Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - /// An opaque, globally-unique, client-generated string identifier for the request. fn client_request_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) @@ -3124,17 +2939,11 @@ impl BlockBlobClientStageBlockResultHeaders fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - - /// Indicates the response body contains a structured message and specifies the message schema version and properties. - fn structured_body_type(&self) -> Result> { - Headers::get_optional_as(self.headers(), &STRUCTURED_BODY) - } } /// Provides access to typed response headers for `BlockBlobClient::upload()` pub trait BlockBlobClientUploadResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; - fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn client_request_id(&self) -> Result>; @@ -3142,7 +2951,6 @@ pub trait BlockBlobClientUploadResultHeaders: private::Sealed { fn encryption_scope(&self) -> Result>; fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn structured_body_type(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -3153,11 +2961,6 @@ impl BlockBlobClientUploadResultHeaders for Response Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { @@ -3199,11 +3002,6 @@ impl BlockBlobClientUploadResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &STRUCTURED_BODY) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -3213,7 +3011,6 @@ impl BlockBlobClientUploadResultHeaders for Response Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_content_length(&self) -> Result>; @@ -3222,11 +3019,6 @@ pub trait BlockListHeaders: private::Sealed { } impl BlockListHeaders for Response { - /// UTC date/time value generated by the service that indicates the time at which the response was initiated - fn date(&self) -> Result> { - Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) - } - /// The date/time that the container was last modified. fn last_modified(&self) -> Result> { Headers::get_optional_with(self.headers(), &LAST_MODIFIED, |h| { diff --git a/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs b/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs index 721bc294a2..e9b9ad00a4 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs @@ -1992,7 +1992,7 @@ pub struct BlockBlobClientStageBlockOptions<'a> { /// Required if the request body is a structured message. Specifies the length of the blob/file content inside the message /// body. Will always be smaller than Content-Length. - pub structured_content_length: Option, + pub structured_content_length: Option, /// The timeout parameter is expressed in seconds. For more information, see [Setting Timeouts for Blob Service Operations.](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations) pub timeout: Option, @@ -2152,7 +2152,7 @@ pub struct BlockBlobClientUploadOptions<'a> { /// Required if the request body is a structured message. Specifies the length of the blob/file content inside the message /// body. Will always be smaller than Content-Length. - pub structured_content_length: Option, + pub structured_content_length: Option, /// The tier to be set on the blob. pub tier: Option, diff --git a/sdk/storage/azure_storage_blob/tsp-location.yaml b/sdk/storage/azure_storage_blob/tsp-location.yaml index 7fba2faba8..0c4d11d4f1 100644 --- a/sdk/storage/azure_storage_blob/tsp-location.yaml +++ b/sdk/storage/azure_storage_blob/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storage/Microsoft.BlobStorage -commit: fef06be6c78c22fe5a91331a4f546f0e2c1e0b05 +commit: d5014d5141eb58eb0506823e46029e53786e2eb9 repo: Azure/azure-rest-api-specs additionalDirectories: From 23be8eee3d6db47db4e8e616f48291d68b905ce2 Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Fri, 13 Jun 2025 12:53:05 -0700 Subject: [PATCH 3/7] Regenerate against adjusted header traits --- .../generated/clients/append_blob_client.rs | 4 +- .../src/generated/clients/blob_client.rs | 8 +- .../clients/blob_container_client.rs | 6 +- .../generated/clients/block_blob_client.rs | 6 +- .../src/generated/clients/page_blob_client.rs | 7 +- .../src/generated/models/enums.rs | 45 +- .../src/generated/models/header_traits.rs | 991 ++++++------------ .../src/generated/models/method_options.rs | 18 +- .../azure_storage_blob/tsp-location.yaml | 2 +- 9 files changed, 358 insertions(+), 729 deletions(-) diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/append_blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/append_blob_client.rs index 97bd88e47a..543eb4d657 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/append_blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/append_blob_client.rs @@ -7,7 +7,7 @@ use crate::generated::models::{ AppendBlobClientAppendBlockFromUrlOptions, AppendBlobClientAppendBlockFromUrlResult, AppendBlobClientAppendBlockOptions, AppendBlobClientAppendBlockResult, AppendBlobClientCreateOptions, AppendBlobClientCreateResult, AppendBlobClientSealOptions, - AppendBlobClientSealResult, BlobType, + AppendBlobClientSealResult, }; use azure_core::{ base64, @@ -367,7 +367,7 @@ impl AppendBlobClient { if let Some(blob_content_type) = options.blob_content_type { request.insert_header("x-ms-blob-content-type", blob_content_type); } - request.insert_header("x-ms-blob-type", BlobType::AppendBlob.to_string()); + request.insert_header("x-ms-blob-type", "AppendBlob"); if let Some(client_request_id) = options.client_request_id { request.insert_header("x-ms-client-request-id", client_request_id); } diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs index 30174395a2..276766cba0 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs @@ -141,6 +141,7 @@ impl BlobClient { if let Some(client_request_id) = options.client_request_id { request.insert_header("x-ms-client-request-id", client_request_id); } + request.insert_header("x-ms-copy-action", "abort"); if let Some(lease_id) = options.lease_id { request.insert_header("x-ms-lease-id", lease_id); } @@ -174,7 +175,6 @@ impl BlobClient { } let mut request = Request::new(url, Method::Put); request.insert_header("accept", "application/xml"); - request.insert_header("content-type", "application/xml"); if let Some(if_match) = options.if_match { request.insert_header("if-match", if_match); } @@ -196,6 +196,7 @@ impl BlobClient { if let Some(if_tags) = options.if_tags { request.insert_header("x-ms-if-tags", if_tags); } + request.insert_header("x-ms-lease-action", "acquire"); if let Some(duration) = options.duration { request.insert_header("x-ms-lease-duration", duration.to_string()); } @@ -254,6 +255,7 @@ impl BlobClient { if let Some(if_tags) = options.if_tags { request.insert_header("x-ms-if-tags", if_tags); } + request.insert_header("x-ms-lease-action", "break"); if let Some(break_period) = options.break_period { request.insert_header("x-ms-lease-break-period", break_period.to_string()); } @@ -313,6 +315,7 @@ impl BlobClient { if let Some(if_tags) = options.if_tags { request.insert_header("x-ms-if-tags", if_tags); } + request.insert_header("x-ms-lease-action", "change"); request.insert_header("x-ms-lease-id", lease_id); request.insert_header("x-ms-proposed-lease-id", proposed_lease_id); request.insert_header("x-ms-version", &self.version); @@ -940,6 +943,7 @@ impl BlobClient { if let Some(if_tags) = options.if_tags { request.insert_header("x-ms-if-tags", if_tags); } + request.insert_header("x-ms-lease-action", "release"); request.insert_header("x-ms-lease-id", lease_id); request.insert_header("x-ms-version", &self.version); self.pipeline.send(&ctx, &mut request).await.map(Into::into) @@ -995,6 +999,7 @@ impl BlobClient { if let Some(if_tags) = options.if_tags { request.insert_header("x-ms-if-tags", if_tags); } + request.insert_header("x-ms-lease-action", "renew"); request.insert_header("x-ms-lease-id", lease_id); request.insert_header("x-ms-version", &self.version); self.pipeline.send(&ctx, &mut request).await.map(Into::into) @@ -1458,6 +1463,7 @@ impl BlobClient { if let Some(rehydrate_priority) = options.rehydrate_priority { request.insert_header("x-ms-rehydrate-priority", rehydrate_priority.to_string()); } + request.insert_header("x-ms-requires-sync", "true"); if let Some(seal_blob) = options.seal_blob { request.insert_header("x-ms-seal-blob", seal_blob.to_string()); } diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs index 15463a92b0..fb6d920592 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs @@ -126,7 +126,6 @@ impl BlobContainerClient { } let mut request = Request::new(url, Method::Put); request.insert_header("accept", "application/xml"); - request.insert_header("content-type", "application/xml"); if let Some(if_modified_since) = options.if_modified_since { request.insert_header("if-modified-since", date::to_rfc7231(&if_modified_since)); } @@ -139,6 +138,7 @@ impl BlobContainerClient { if let Some(client_request_id) = options.client_request_id { request.insert_header("x-ms-client-request-id", client_request_id); } + request.insert_header("x-ms-lease-action", "acquire"); if let Some(duration) = options.duration { request.insert_header("x-ms-lease-duration", duration.to_string()); } @@ -186,6 +186,7 @@ impl BlobContainerClient { if let Some(client_request_id) = options.client_request_id { request.insert_header("x-ms-client-request-id", client_request_id); } + request.insert_header("x-ms-lease-action", "break"); if let Some(break_period) = options.break_period { request.insert_header("x-ms-lease-break-period", break_period.to_string()); } @@ -234,6 +235,7 @@ impl BlobContainerClient { if let Some(client_request_id) = options.client_request_id { request.insert_header("x-ms-client-request-id", client_request_id); } + request.insert_header("x-ms-lease-action", "change"); request.insert_header("x-ms-lease-id", lease_id); request.insert_header("x-ms-proposed-lease-id", proposed_lease_id); request.insert_header("x-ms-version", &self.version); @@ -708,6 +710,7 @@ impl BlobContainerClient { if let Some(client_request_id) = options.client_request_id { request.insert_header("x-ms-client-request-id", client_request_id); } + request.insert_header("x-ms-lease-action", "release"); request.insert_header("x-ms-lease-id", lease_id); request.insert_header("x-ms-version", &self.version); self.pipeline.send(&ctx, &mut request).await.map(Into::into) @@ -788,6 +791,7 @@ impl BlobContainerClient { if let Some(client_request_id) = options.client_request_id { request.insert_header("x-ms-client-request-id", client_request_id); } + request.insert_header("x-ms-lease-action", "renew"); request.insert_header("x-ms-lease-id", lease_id); request.insert_header("x-ms-version", &self.version); self.pipeline.send(&ctx, &mut request).await.map(Into::into) diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs index 4f593b2e4b..f5b10efdaa 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs @@ -4,7 +4,7 @@ // Code generated by Microsoft (R) Rust Code Generator. DO NOT EDIT. use crate::generated::models::{ - BlobType, BlockBlobClientCommitBlockListOptions, BlockBlobClientCommitBlockListResult, + BlockBlobClientCommitBlockListOptions, BlockBlobClientCommitBlockListResult, BlockBlobClientGetBlockListOptions, BlockBlobClientPutBlobFromUrlOptions, BlockBlobClientPutBlobFromUrlResult, BlockBlobClientQueryOptions, BlockBlobClientQueryResult, BlockBlobClientStageBlockFromUrlOptions, BlockBlobClientStageBlockFromUrlResult, @@ -341,7 +341,7 @@ impl BlockBlobClient { if let Some(blob_content_type) = options.blob_content_type { request.insert_header("x-ms-blob-content-type", blob_content_type); } - request.insert_header("x-ms-blob-type", BlobType::BlockBlob.to_string()); + request.insert_header("x-ms-blob-type", "BlockBlob"); if let Some(client_request_id) = options.client_request_id { request.insert_header("x-ms-client-request-id", client_request_id); } @@ -743,7 +743,7 @@ impl BlockBlobClient { if let Some(blob_content_type) = options.blob_content_type { request.insert_header("x-ms-blob-content-type", blob_content_type); } - request.insert_header("x-ms-blob-type", BlobType::BlockBlob.to_string()); + request.insert_header("x-ms-blob-type", "BlockBlob"); if let Some(client_request_id) = options.client_request_id { request.insert_header("x-ms-client-request-id", client_request_id); } diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/page_blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/page_blob_client.rs index 45c6690157..9fcb689b1b 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/page_blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/page_blob_client.rs @@ -4,7 +4,7 @@ // Code generated by Microsoft (R) Rust Code Generator. DO NOT EDIT. use crate::generated::models::{ - BlobType, PageBlobClientClearPagesOptions, PageBlobClientClearPagesResult, + PageBlobClientClearPagesOptions, PageBlobClientClearPagesResult, PageBlobClientCopyIncrementalOptions, PageBlobClientCopyIncrementalResult, PageBlobClientCreateOptions, PageBlobClientCreateResult, PageBlobClientGetPageRangesDiffOptions, PageBlobClientGetPageRangesOptions, @@ -183,6 +183,7 @@ impl PageBlobClient { if let Some(lease_id) = options.lease_id { request.insert_header("x-ms-lease-id", lease_id); } + request.insert_header("x-ms-page-write", "clear"); if let Some(range) = options.range { request.insert_header("x-ms-range", range); } @@ -316,7 +317,7 @@ impl PageBlobClient { blob_sequence_number.to_string(), ); } - request.insert_header("x-ms-blob-type", BlobType::PageBlob.to_string()); + request.insert_header("x-ms-blob-type", "PageBlob"); if let Some(client_request_id) = options.client_request_id { request.insert_header("x-ms-client-request-id", client_request_id); } @@ -747,6 +748,7 @@ impl PageBlobClient { if let Some(lease_id) = options.lease_id { request.insert_header("x-ms-lease-id", lease_id); } + request.insert_header("x-ms-page-write", "update"); if let Some(range) = options.range { request.insert_header("x-ms-range", range); } @@ -867,6 +869,7 @@ impl PageBlobClient { if let Some(lease_id) = options.lease_id { request.insert_header("x-ms-lease-id", lease_id); } + request.insert_header("x-ms-page-write", "update"); request.insert_header("x-ms-range", range); if let Some(source_content_crc64) = options.source_content_crc64 { request.insert_header( diff --git a/sdk/storage/azure_storage_blob/src/generated/models/enums.rs b/sdk/storage/azure_storage_blob/src/generated/models/enums.rs index e38b41e502..809c623384 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/enums.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/enums.rs @@ -42,7 +42,7 @@ create_extensible_enum!( (Premium, "Premium") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The account kind."#] AccountKind, #[doc = r#"/// The storage account is a blob storage account."#] @@ -68,7 +68,7 @@ create_extensible_enum!( (RehydratePendingToHot, "rehydrate-pending-to-hot") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The type of blob deletions."#] BlobDeleteType, #[doc = r#"/// Permanently delete the blob."#] @@ -88,7 +88,7 @@ create_extensible_enum!( (RelativeToNow, "RelativeToNow") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The immutability policy mode."#] BlobImmutabilityPolicyMode, #[doc = r#"/// The immutability policy is locked."#] @@ -99,7 +99,7 @@ create_extensible_enum!( (Unlocked, "Unlocked") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The blob type."#] BlobType, #[doc = r#"/// The blob is an append blob."#] @@ -110,7 +110,7 @@ create_extensible_enum!( (PageBlob, "PageBlob") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The block list types."#] BlockListType, #[doc = r#"/// Both lists together."#] @@ -121,7 +121,7 @@ create_extensible_enum!( (Uncommitted, "uncommitted") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The copy status."#] CopyStatus, #[doc = r#"/// The copy operation is aborted."#] @@ -134,7 +134,7 @@ create_extensible_enum!( (Success, "success") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The delete snapshots option type."#] DeleteSnapshotsOptionType, #[doc = r#"/// The delete snapshots include option is include."#] @@ -143,7 +143,7 @@ create_extensible_enum!( (Only, "only") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The algorithm used to produce the encryption key hash. Currently, the only accepted value is \"AES256\". Must be provided /// if the x-ms-encryption-key header is provided."#] EncryptionAlgorithmType, @@ -158,7 +158,7 @@ create_extensible_enum!( (Backup, "backup") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The filter blobs includes."#] FilterBlobsIncludeItem, #[doc = r#"/// The filter includes no versions."#] @@ -178,7 +178,16 @@ create_extensible_enum!( (Unavailable, "unavailable") ); -create_extensible_enum!( +create_enum!( + #[doc = r#"/// The immutability policy mode used in requests."#] + ImmutabilityPolicyMode, + #[doc = r#"/// The immutability policy is locked."#] + (Locked, "Locked"), + #[doc = r#"/// The immutability policy is unlocked."#] + (Unlocked, "Unlocked") +); + +create_enum!( #[doc = r#"/// The lease duration."#] LeaseDuration, #[doc = r#"/// The lease is of fixed duration."#] @@ -187,7 +196,7 @@ create_extensible_enum!( (Infinite, "infinite") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The lease state."#] LeaseState, #[doc = r#"/// The lease is available."#] @@ -202,7 +211,7 @@ create_extensible_enum!( (Leased, "leased") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The lease status."#] LeaseStatus, #[doc = r#"/// The lease is locked."#] @@ -211,7 +220,7 @@ create_extensible_enum!( (Unlocked, "unlocked") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The list blob includes parameter values."#] ListBlobsIncludeItem, #[doc = r#"/// The include copies."#] @@ -236,7 +245,7 @@ create_extensible_enum!( (Versions, "versions") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// Include this parameter to specify that the container's metadata be returned as part of the response body."#] ListContainersIncludeType, #[doc = r#"/// Include deleted"#] @@ -283,14 +292,14 @@ create_extensible_enum!( (Container, "container") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The query request, note only SQL supported"#] QueryRequestType, #[doc = r#"/// The SQL request query type."#] (SQL, "SQL") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The query format type."#] QueryType, #[doc = r#"/// The query format type is Apache Arrow."#] @@ -313,7 +322,7 @@ create_extensible_enum!( (Standard, "Standard") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The sequence number actions."#] SequenceNumberActionType, #[doc = r#"/// Increment the sequence number."#] @@ -324,7 +333,7 @@ create_extensible_enum!( (Update, "update") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The SKU types"#] SkuName, #[doc = r#"/// The premium LRS SKU."#] diff --git a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs index d20578c3c0..db63938bed 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs @@ -60,7 +60,6 @@ const BLOB_SEALED: HeaderName = HeaderName::from_static("x-ms-blob-sealed"); const BLOB_SEQUENCE_NUMBER: HeaderName = HeaderName::from_static("x-ms-blob-sequence-number"); const BLOB_TYPE: HeaderName = HeaderName::from_static("x-ms-blob-type"); const CACHE_CONTROL: HeaderName = HeaderName::from_static("cache-control"); -const CLIENT_REQUEST_ID: HeaderName = HeaderName::from_static("x-ms-client-request-id"); const CONTENT_CRC64: HeaderName = HeaderName::from_static("x-ms-content-crc64"); const CONTENT_DISPOSITION: HeaderName = HeaderName::from_static("content-disposition"); const CONTENT_ENCODING: HeaderName = HeaderName::from_static("content-encoding"); @@ -74,8 +73,6 @@ const COPY_DESTINATION_SNAPSHOT: HeaderName = const COPY_ID: HeaderName = HeaderName::from_static("x-ms-copy-id"); const COPY_PROGRESS: HeaderName = HeaderName::from_static("x-ms-copy-progress"); const COPY_SOURCE: HeaderName = HeaderName::from_static("x-ms-copy-source"); -const COPY_SOURCE_ERROR_CODE: HeaderName = HeaderName::from_static("x-ms-copy-source-error-code"); -const COPY_SOURCE_STATUS_CODE: HeaderName = HeaderName::from_static("x-ms-copy-source-status-code"); const COPY_STATUS: HeaderName = HeaderName::from_static("x-ms-copy-status"); const COPY_STATUS_DESCRIPTION: HeaderName = HeaderName::from_static("x-ms-copy-status-description"); const CREATION_TIME: HeaderName = HeaderName::from_static("x-ms-creation-time"); @@ -111,7 +108,6 @@ const META: &str = "x-ms-meta-"; const OR: &str = "x-ms-or-"; const OR_POLICY_ID: HeaderName = HeaderName::from_static("x-ms-or-policy-id"); const REHYDRATE_PRIORITY: HeaderName = HeaderName::from_static("x-ms-rehydrate-priority"); -const REQUEST_ID: HeaderName = HeaderName::from_static("x-ms-request-id"); const REQUEST_SERVER_ENCRYPTED: HeaderName = HeaderName::from_static("x-ms-request-server-encrypted"); const SERVER_ENCRYPTED: HeaderName = HeaderName::from_static("x-ms-server-encrypted"); @@ -119,6 +115,7 @@ const SKU_NAME: HeaderName = HeaderName::from_static("x-ms-sku-name"); const SNAPSHOT: HeaderName = HeaderName::from_static("x-ms-snapshot"); const STRUCTURED_BODY: HeaderName = HeaderName::from_static("x-ms-structured-body"); const TAG_COUNT: HeaderName = HeaderName::from_static("x-ms-tag-count"); +const VERSION: HeaderName = HeaderName::from_static("x-ms-version"); const VERSION_ID: HeaderName = HeaderName::from_static("x-ms-version-id"); /// Provides access to typed response headers for `AppendBlobClient::append_block_from_url()` @@ -129,14 +126,11 @@ pub trait AppendBlobClientAppendBlockFromUrlResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn blob_append_offset(&self) -> Result>; fn blob_committed_block_count(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; - fn copy_source_error_code(&self) -> Result>; - fn copy_source_status_code(&self) -> Result>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; - fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn version(&self) -> Result>; } impl AppendBlobClientAppendBlockFromUrlResultHeaders @@ -176,11 +170,6 @@ impl AppendBlobClientAppendBlockFromUrlResultHeaders Headers::get_optional_as(self.headers(), &BLOB_COMMITTED_BLOCK_COUNT) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -188,16 +177,6 @@ impl AppendBlobClientAppendBlockFromUrlResultHeaders }) } - /// The error code for the copy source. - fn copy_source_error_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) - } - - /// The status code for the copy source. - fn copy_source_status_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) - } - /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted /// with a customer-provided key. fn encryption_key_sha256(&self) -> Result> { @@ -211,16 +190,16 @@ impl AppendBlobClientAppendBlockFromUrlResultHeaders Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// 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. fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } + + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for `AppendBlobClient::append_block()` @@ -231,13 +210,12 @@ pub trait AppendBlobClientAppendBlockResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn blob_append_offset(&self) -> Result>; fn blob_committed_block_count(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; - fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn structured_body_type(&self) -> Result>; + fn version(&self) -> Result>; } impl AppendBlobClientAppendBlockResultHeaders @@ -277,11 +255,6 @@ impl AppendBlobClientAppendBlockResultHeaders Headers::get_optional_as(self.headers(), &BLOB_COMMITTED_BLOCK_COUNT) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -302,11 +275,6 @@ impl AppendBlobClientAppendBlockResultHeaders Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// 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. fn is_server_encrypted(&self) -> Result> { @@ -317,6 +285,11 @@ impl AppendBlobClientAppendBlockResultHeaders fn structured_body_type(&self) -> Result> { Headers::get_optional_as(self.headers(), &STRUCTURED_BODY) } + + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for `AppendBlobClient::create()` @@ -328,6 +301,7 @@ pub trait AppendBlobClientCreateResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -374,6 +348,11 @@ impl AppendBlobClientCreateResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -387,8 +366,7 @@ pub trait AppendBlobClientSealResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn is_sealed(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl AppendBlobClientSealResultHeaders for Response { @@ -414,22 +392,16 @@ impl AppendBlobClientSealResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobClient::abort_copy_from_url()` pub trait BlobClientAbortCopyFromUrlResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientAbortCopyFromUrlResultHeaders @@ -440,14 +412,9 @@ impl BlobClientAbortCopyFromUrlResultHeaders Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -456,9 +423,8 @@ pub trait BlobClientAcquireLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientAcquireLeaseResultHeaders for Response { @@ -479,19 +445,14 @@ impl BlobClientAcquireLeaseResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -500,9 +461,8 @@ pub trait BlobClientBreakLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn lease_time(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientBreakLeaseResultHeaders for Response { @@ -523,19 +483,14 @@ impl BlobClientBreakLeaseResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Approximate time remaining in the lease period, in seconds. fn lease_time(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_TIME) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -544,9 +499,8 @@ pub trait BlobClientChangeLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientChangeLeaseResultHeaders for Response { @@ -567,19 +521,14 @@ impl BlobClientChangeLeaseResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -589,14 +538,11 @@ pub trait BlobClientCopyFromUrlResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn copy_id(&self) -> Result>; - fn copy_source_error_code(&self) -> Result>; - fn copy_source_status_code(&self) -> Result>; fn copy_status(&self) -> Result>; fn encryption_scope(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -624,11 +570,6 @@ impl BlobClientCopyFromUrlResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -642,16 +583,6 @@ impl BlobClientCopyFromUrlResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) - } - - /// The status code for the copy source. - fn copy_source_status_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) - } - /// State of the copy operation identified by x-ms-copy-id. fn copy_status(&self) -> Result> { Headers::get_optional_as(self.headers(), ©_STATUS) @@ -664,9 +595,9 @@ impl BlobClientCopyFromUrlResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob @@ -681,10 +612,9 @@ pub trait BlobClientCreateSnapshotResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn snapshot(&self) -> Result>; + fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -706,16 +636,6 @@ impl BlobClientCreateSnapshotResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// 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. fn is_server_encrypted(&self) -> Result> { @@ -728,6 +648,11 @@ impl BlobClientCreateSnapshotResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -738,8 +663,7 @@ impl BlobClientCreateSnapshotResultHeaders for Response Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientDeleteImmutabilityPolicyResultHeaders @@ -750,32 +674,21 @@ impl BlobClientDeleteImmutabilityPolicyResultHeaders Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobClient::delete()` pub trait BlobClientDeleteResultHeaders: private::Sealed { - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientDeleteResultHeaders for Response { - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -795,7 +708,6 @@ pub trait BlobClientDownloadResultHeaders: private::Sealed { fn is_sealed(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; fn blob_type(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn copy_completion_time(&self) -> Result>; fn copy_id(&self) -> Result>; @@ -817,9 +729,9 @@ pub trait BlobClientDownloadResultHeaders: private::Sealed { fn metadata(&self) -> Result>; fn object_replication_rules(&self) -> Result>; fn object_replication_policy_id(&self) -> Result>; - fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn tag_count(&self) -> Result>; + fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -905,11 +817,6 @@ impl BlobClientDownloadResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -1057,11 +964,6 @@ impl BlobClientDownloadResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// 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. fn is_server_encrypted(&self) -> Result> { @@ -1073,6 +975,11 @@ impl BlobClientDownloadResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -1084,10 +991,9 @@ impl BlobClientDownloadResultHeaders for Response Result>; fn account_kind(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn is_hierarchical_namespace_enabled(&self) -> Result>; - fn request_id(&self) -> Result>; fn sku_name(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientGetAccountInfoResultHeaders for Response { @@ -1101,25 +1007,20 @@ impl BlobClientGetAccountInfoResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. fn is_hierarchical_namespace_enabled(&self) -> Result> { Headers::get_optional_as(self.headers(), &IS_HNS_ENABLED) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// Identifies the sku name of the account fn sku_name(&self) -> Result> { Headers::get_optional_as(self.headers(), &SKU_NAME) } + + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for `BlobClient::get_properties()` @@ -1166,6 +1067,7 @@ pub trait BlobClientGetPropertiesResultHeaders: private::Sealed { fn rehydrate_priority(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn tag_count(&self) -> Result>; + fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -1436,6 +1338,11 @@ impl BlobClientGetPropertiesResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -1448,8 +1355,7 @@ pub trait BlobClientReleaseLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientReleaseLeaseResultHeaders for Response { @@ -1470,14 +1376,9 @@ impl BlobClientReleaseLeaseResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -1486,9 +1387,8 @@ pub trait BlobClientRenewLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientRenewLeaseResultHeaders for Response { @@ -1509,19 +1409,14 @@ impl BlobClientRenewLeaseResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -1530,8 +1425,7 @@ pub trait BlobClientSetExpiryResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientSetExpiryResultHeaders for Response { @@ -1552,24 +1446,18 @@ impl BlobClientSetExpiryResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobClient::set_immutability_policy()` pub trait BlobClientSetImmutabilityPolicyResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn immutability_policy_mode(&self) -> Result>; fn immutability_policy_expires_on(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientSetImmutabilityPolicyResultHeaders @@ -1580,11 +1468,6 @@ impl BlobClientSetImmutabilityPolicyResultHeaders Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Indicates the immutability policy mode of the blob. fn immutability_policy_mode(&self) -> Result> { Headers::get_optional_as(self.headers(), &IMMUTABILITY_POLICY_MODE) @@ -1597,18 +1480,17 @@ impl BlobClientSetImmutabilityPolicyResultHeaders }) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobClient::set_legal_hold()` pub trait BlobClientSetLegalHoldResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn legal_hold(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientSetLegalHoldResultHeaders for Response { @@ -1617,63 +1499,45 @@ impl BlobClientSetLegalHoldResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Specifies the legal hold status to set on the blob. fn legal_hold(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEGAL_HOLD) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobClient::set_metadata()` pub trait BlobClientSetMetadataResultHeaders: private::Sealed { - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientSetMetadataResultHeaders for Response { - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobClient::set_properties()` pub trait BlobClientSetPropertiesResultHeaders: private::Sealed { - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientSetPropertiesResultHeaders for Response { - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobClient::set_tags()` pub trait BlobClientSetTagsResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientSetTagsResultHeaders for Response { @@ -1682,32 +1546,21 @@ impl BlobClientSetTagsResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobClient::set_tier()` pub trait BlobClientSetTierResultHeaders: private::Sealed { - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientSetTierResultHeaders for Response { - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -1716,12 +1569,9 @@ pub trait BlobClientStartCopyFromUrlResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn copy_id(&self) -> Result>; - fn copy_source_error_code(&self) -> Result>; - fn copy_source_status_code(&self) -> Result>; fn copy_status(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -1745,35 +1595,20 @@ impl BlobClientStartCopyFromUrlResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// 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. fn copy_id(&self) -> Result> { Headers::get_optional_as(self.headers(), ©_ID) } - /// The error code for the copy source. - fn copy_source_error_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) - } - - /// The status code for the copy source. - fn copy_source_status_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) - } - /// State of the copy operation identified by x-ms-copy-id. fn copy_status(&self) -> Result> { Headers::get_optional_as(self.headers(), ©_STATUS) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob @@ -1786,8 +1621,7 @@ impl BlobClientStartCopyFromUrlResultHeaders /// Provides access to typed response headers for `BlobClient::undelete()` pub trait BlobClientUndeleteResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobClientUndeleteResultHeaders for Response { @@ -1796,14 +1630,9 @@ impl BlobClientUndeleteResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -1812,9 +1641,8 @@ pub trait BlobContainerClientAcquireLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientAcquireLeaseResultHeaders @@ -1837,19 +1665,14 @@ impl BlobContainerClientAcquireLeaseResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -1858,10 +1681,9 @@ pub trait BlobContainerClientBreakLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; fn lease_time(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientBreakLeaseResultHeaders @@ -1884,11 +1706,6 @@ impl BlobContainerClientBreakLeaseResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) @@ -1899,9 +1716,9 @@ impl BlobContainerClientBreakLeaseResultHeaders Headers::get_optional_as(self.headers(), &LEASE_TIME) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -1910,9 +1727,8 @@ pub trait BlobContainerClientChangeLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientChangeLeaseResultHeaders @@ -1935,59 +1751,42 @@ impl BlobContainerClientChangeLeaseResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobContainerClient::create()` pub trait BlobContainerClientCreateResultHeaders: private::Sealed { - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientCreateResultHeaders for Response { - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobContainerClient::delete()` pub trait BlobContainerClientDeleteResultHeaders: private::Sealed { - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientDeleteResultHeaders for Response { - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -1995,10 +1794,9 @@ impl BlobContainerClientDeleteResultHeaders pub trait BlobContainerClientGetAccountInfoResultHeaders: private::Sealed { fn date(&self) -> Result>; fn account_kind(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn is_hierarchical_namespace_enabled(&self) -> Result>; - fn request_id(&self) -> Result>; fn sku_name(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientGetAccountInfoResultHeaders @@ -2014,25 +1812,20 @@ impl BlobContainerClientGetAccountInfoResultHeaders Headers::get_optional_as(self.headers(), &ACCOUNT_KIND) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. fn is_hierarchical_namespace_enabled(&self) -> Result> { Headers::get_optional_as(self.headers(), &IS_HNS_ENABLED) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// Identifies the sku name of the account fn sku_name(&self) -> Result> { Headers::get_optional_as(self.headers(), &SKU_NAME) } + + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for `BlobContainerClient::get_properties()` @@ -2040,7 +1833,6 @@ pub trait BlobContainerClientGetPropertiesResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn access(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn default_encryption_scope(&self) -> Result>; fn prevent_encryption_scope_override(&self) -> Result>; fn has_immutability_policy(&self) -> Result>; @@ -2050,7 +1842,7 @@ pub trait BlobContainerClientGetPropertiesResultHeaders: private::Sealed { fn lease_state(&self) -> Result>; fn lease_status(&self) -> Result>; fn metadata(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientGetPropertiesResultHeaders @@ -2073,11 +1865,6 @@ impl BlobContainerClientGetPropertiesResultHeaders Headers::get_optional_as(self.headers(), &BLOB_PUBLIC_ACCESS) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// The default encryption scope for the container. fn default_encryption_scope(&self) -> Result> { Headers::get_optional_as(self.headers(), &DEFAULT_ENCRYPTION_SCOPE) @@ -2132,9 +1919,9 @@ impl BlobContainerClientGetPropertiesResultHeaders Ok(values) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -2143,8 +1930,7 @@ pub trait BlobContainerClientReleaseLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientReleaseLeaseResultHeaders @@ -2167,22 +1953,16 @@ impl BlobContainerClientReleaseLeaseResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobContainerClient::rename()` pub trait BlobContainerClientRenameResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientRenameResultHeaders @@ -2193,14 +1973,9 @@ impl BlobContainerClientRenameResultHeaders Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -2209,9 +1984,8 @@ pub trait BlobContainerClientRenewLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn lease_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientRenewLeaseResultHeaders @@ -2234,27 +2008,21 @@ impl BlobContainerClientRenewLeaseResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Uniquely identifies a blobs' lease fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobContainerClient::restore()` pub trait BlobContainerClientRestoreResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientRestoreResultHeaders @@ -2265,14 +2033,9 @@ impl BlobContainerClientRestoreResultHeaders Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -2281,8 +2044,7 @@ pub trait BlobContainerClientSetAccessPolicyResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientSetAccessPolicyResultHeaders @@ -2305,34 +2067,23 @@ impl BlobContainerClientSetAccessPolicyResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobContainerClient::set_metadata()` pub trait BlobContainerClientSetMetadataResultHeaders: private::Sealed { - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobContainerClientSetMetadataResultHeaders for Response { - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -2340,10 +2091,9 @@ impl BlobContainerClientSetMetadataResultHeaders pub trait BlobServiceClientGetAccountInfoResultHeaders: private::Sealed { fn date(&self) -> Result>; fn account_kind(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn is_hierarchical_namespace_enabled(&self) -> Result>; - fn request_id(&self) -> Result>; fn sku_name(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobServiceClientGetAccountInfoResultHeaders @@ -2359,52 +2109,40 @@ impl BlobServiceClientGetAccountInfoResultHeaders Headers::get_optional_as(self.headers(), &ACCOUNT_KIND) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace enabled. fn is_hierarchical_namespace_enabled(&self) -> Result> { Headers::get_optional_as(self.headers(), &IS_HNS_ENABLED) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// Identifies the sku name of the account fn sku_name(&self) -> Result> { Headers::get_optional_as(self.headers(), &SKU_NAME) } + + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for `BlobServiceClient::set_properties()` pub trait BlobServiceClientSetPropertiesResultHeaders: private::Sealed { - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobServiceClientSetPropertiesResultHeaders for Response { - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobClient::get_tags()` pub trait BlobTagsHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlobTagsHeaders for Response { @@ -2413,14 +2151,9 @@ impl BlobTagsHeaders for Response { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -2429,12 +2162,11 @@ pub trait BlockBlobClientCommitBlockListResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; - fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -2459,11 +2191,6 @@ impl BlockBlobClientCommitBlockListResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -2484,17 +2211,17 @@ impl BlockBlobClientCommitBlockListResultHeaders Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// 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. fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -2508,11 +2235,10 @@ pub trait BlockBlobClientPutBlobFromUrlResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn copy_source_error_code(&self) -> Result>; - fn copy_source_status_code(&self) -> Result>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -2542,16 +2268,6 @@ impl BlockBlobClientPutBlobFromUrlResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } - /// The error code for the copy source. - fn copy_source_error_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) - } - - /// The status code for the copy source. - fn copy_source_status_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) - } - /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted /// with a customer-provided key. fn encryption_key_sha256(&self) -> Result> { @@ -2571,6 +2287,11 @@ impl BlockBlobClientPutBlobFromUrlResultHeaders Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -2595,7 +2316,6 @@ pub trait BlockBlobClientQueryResultHeaders: private::Sealed { fn blob_content_md5(&self) -> Result>>; fn blob_sequence_number(&self) -> Result>; fn blob_type(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn copy_completion_time(&self) -> Result>; fn copy_id(&self) -> Result>; @@ -2609,8 +2329,8 @@ pub trait BlockBlobClientQueryResultHeaders: private::Sealed { fn lease_state(&self) -> Result>; fn lease_status(&self) -> Result>; fn metadata(&self) -> Result>; - fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn version(&self) -> Result>; } impl BlockBlobClientQueryResultHeaders for Response { @@ -2700,11 +2420,6 @@ impl BlockBlobClientQueryResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -2797,30 +2512,27 @@ impl BlockBlobClientQueryResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// 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. fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &SERVER_ENCRYPTED) } + + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for `BlockBlobClient::stage_block_from_url()` pub trait BlockBlobClientStageBlockFromUrlResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; - fn copy_source_error_code(&self) -> Result>; - fn copy_source_status_code(&self) -> Result>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; - fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn version(&self) -> Result>; } impl BlockBlobClientStageBlockFromUrlResultHeaders @@ -2837,11 +2549,6 @@ impl BlockBlobClientStageBlockFromUrlResultHeaders Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -2849,16 +2556,6 @@ impl BlockBlobClientStageBlockFromUrlResultHeaders }) } - /// The error code for the copy source. - fn copy_source_error_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) - } - - /// The status code for the copy source. - fn copy_source_status_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) - } - /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted /// with a customer-provided key. fn encryption_key_sha256(&self) -> Result> { @@ -2872,27 +2569,26 @@ impl BlockBlobClientStageBlockFromUrlResultHeaders Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// 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. fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } + + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for `BlockBlobClient::stage_block()` pub trait BlockBlobClientStageBlockResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; - fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; - fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn version(&self) -> Result>; } impl BlockBlobClientStageBlockResultHeaders @@ -2904,11 +2600,6 @@ impl BlockBlobClientStageBlockResultHeaders Headers::get_optional_with(self.headers(), &CONTENT_MD5, |h| base64::decode(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -2929,16 +2620,16 @@ impl BlockBlobClientStageBlockResultHeaders Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// 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. fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } + + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for `BlockBlobClient::upload()` @@ -2946,11 +2637,10 @@ pub trait BlockBlobClientUploadResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; - fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -2973,11 +2663,6 @@ impl BlockBlobClientUploadResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted /// with a customer-provided key. fn encryption_key_sha256(&self) -> Result> { @@ -2991,17 +2676,17 @@ impl BlockBlobClientUploadResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// 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. fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -3014,8 +2699,7 @@ pub trait BlockListHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_content_length(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl BlockListHeaders for Response { @@ -3037,14 +2721,9 @@ impl BlockListHeaders for Response { Headers::get_optional_as(self.headers(), &BLOB_CONTENT_LENGTH) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -3053,8 +2732,7 @@ impl BlockListHeaders for Response { /// * `BlobServiceClient::filter_blobs()` pub trait FilterBlobSegmentHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl FilterBlobSegmentHeaders for Response { @@ -3063,22 +2741,16 @@ impl FilterBlobSegmentHeaders for Response { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobContainerClient::list_blob_flat_segment()` pub trait ListBlobsFlatSegmentResponseHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl ListBlobsFlatSegmentResponseHeaders for Response { @@ -3087,22 +2759,16 @@ impl ListBlobsFlatSegmentResponseHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobContainerClient::list_blob_hierarchy_segment()` pub trait ListBlobsHierarchySegmentResponseHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl ListBlobsHierarchySegmentResponseHeaders @@ -3113,32 +2779,21 @@ impl ListBlobsHierarchySegmentResponseHeaders Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobServiceClient::list_containers_segment()` pub trait ListContainersSegmentResponseHeaders: private::Sealed { - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl ListContainersSegmentResponseHeaders for Response { - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -3150,6 +2805,7 @@ pub trait PageBlobClientClearPagesResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; fn content_crc64(&self) -> Result>>; + fn version(&self) -> Result>; } impl PageBlobClientClearPagesResultHeaders for Response { @@ -3187,6 +2843,11 @@ impl PageBlobClientClearPagesResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for `PageBlobClient::copy_incremental()` @@ -3194,10 +2855,9 @@ pub trait PageBlobClientCopyIncrementalResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn copy_id(&self) -> Result>; fn copy_status(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl PageBlobClientCopyIncrementalResultHeaders @@ -3220,11 +2880,6 @@ impl PageBlobClientCopyIncrementalResultHeaders Headers::get_optional_as(self.headers(), &ETAG) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// 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. fn copy_id(&self) -> Result> { @@ -3236,9 +2891,9 @@ impl PageBlobClientCopyIncrementalResultHeaders Headers::get_optional_as(self.headers(), ©_STATUS) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -3251,6 +2906,7 @@ pub trait PageBlobClientCreateResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -3297,6 +2953,11 @@ impl PageBlobClientCreateResultHeaders for Response Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } + /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -3310,8 +2971,7 @@ pub trait PageBlobClientResizeResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl PageBlobClientResizeResultHeaders for Response { @@ -3337,14 +2997,9 @@ impl PageBlobClientResizeResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -3354,8 +3009,7 @@ pub trait PageBlobClientUpdateSequenceNumberResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl PageBlobClientUpdateSequenceNumberResultHeaders @@ -3383,14 +3037,9 @@ impl PageBlobClientUpdateSequenceNumberResultHeaders Headers::get_optional_as(self.headers(), &BLOB_SEQUENCE_NUMBER) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -3402,11 +3051,10 @@ pub trait PageBlobClientUploadPagesFromUrlResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; fn content_crc64(&self) -> Result>>; - fn copy_source_error_code(&self) -> Result>; - fn copy_source_status_code(&self) -> Result>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; + fn version(&self) -> Result>; } impl PageBlobClientUploadPagesFromUrlResultHeaders @@ -3447,16 +3095,6 @@ impl PageBlobClientUploadPagesFromUrlResultHeaders }) } - /// The error code for the copy source. - fn copy_source_error_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_ERROR_CODE) - } - - /// The status code for the copy source. - fn copy_source_status_code(&self) -> Result> { - Headers::get_optional_as(self.headers(), ©_SOURCE_STATUS_CODE) - } - /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob was encrypted /// with a customer-provided key. fn encryption_key_sha256(&self) -> Result> { @@ -3475,6 +3113,11 @@ impl PageBlobClientUploadPagesFromUrlResultHeaders fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } + + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for `PageBlobClient::upload_pages()` @@ -3484,13 +3127,12 @@ pub trait PageBlobClientUploadPagesResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; - fn client_request_id(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; - fn request_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn structured_body_type(&self) -> Result>; + fn version(&self) -> Result>; } impl PageBlobClientUploadPagesResultHeaders @@ -3524,11 +3166,6 @@ impl PageBlobClientUploadPagesResultHeaders Headers::get_optional_as(self.headers(), &BLOB_SEQUENCE_NUMBER) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - /// This response header is returned so that the client can check for the integrity of the copied content. fn content_crc64(&self) -> Result>> { Headers::get_optional_with(self.headers(), &CONTENT_CRC64, |h| { @@ -3549,11 +3186,6 @@ impl PageBlobClientUploadPagesResultHeaders Headers::get_optional_as(self.headers(), &ENCRYPTION_SCOPE) } - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) - } - /// 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. fn is_server_encrypted(&self) -> Result> { @@ -3564,6 +3196,11 @@ impl PageBlobClientUploadPagesResultHeaders fn structured_body_type(&self) -> Result> { Headers::get_optional_as(self.headers(), &STRUCTURED_BODY) } + + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) + } } /// Provides access to typed response headers for the following methods: @@ -3574,8 +3211,7 @@ pub trait PageListHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_content_length(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl PageListHeaders for Response { @@ -3602,40 +3238,28 @@ impl PageListHeaders for Response { Headers::get_optional_as(self.headers(), &BLOB_CONTENT_LENGTH) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobServiceClient::get_properties()` pub trait StorageServicePropertiesHeaders: private::Sealed { - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl StorageServicePropertiesHeaders for Response { - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobServiceClient::get_statistics()` pub trait StorageServiceStatsHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl StorageServiceStatsHeaders for Response { @@ -3644,22 +3268,16 @@ impl StorageServiceStatsHeaders for Response { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } /// Provides access to typed response headers for `BlobServiceClient::get_user_delegation_key()` pub trait UserDelegationKeyHeaders: private::Sealed { fn date(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl UserDelegationKeyHeaders for Response { @@ -3668,14 +3286,9 @@ impl UserDelegationKeyHeaders for Response { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } @@ -3685,8 +3298,7 @@ pub trait VecSignedIdentifierHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn access(&self) -> Result>; - fn client_request_id(&self) -> Result>; - fn request_id(&self) -> Result>; + fn version(&self) -> Result>; } impl VecSignedIdentifierHeaders for Response, XmlFormat> { @@ -3712,14 +3324,9 @@ impl VecSignedIdentifierHeaders for Response, XmlFormat> { Headers::get_optional_as(self.headers(), &BLOB_PUBLIC_ACCESS) } - /// An opaque, globally-unique, client-generated string identifier for the request. - fn client_request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &CLIENT_REQUEST_ID) - } - - /// An opaque, globally-unique, server-generated string identifier for the request. - fn request_id(&self) -> Result> { - Headers::get_optional_as(self.headers(), &REQUEST_ID) + /// Specifies the version of the operation to use for this request. + fn version(&self) -> Result> { + Headers::get_optional_as(self.headers(), &VERSION) } } diff --git a/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs b/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs index e9b9ad00a4..8295ec7677 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs @@ -4,8 +4,8 @@ // Code generated by Microsoft (R) Rust Code Generator. DO NOT EDIT. use super::{ - AccessTier, BlobDeleteType, BlobImmutabilityPolicyMode, DeleteSnapshotsOptionType, - EncryptionAlgorithmType, FileShareTokenIntent, FilterBlobsIncludeItem, LeaseDuration, + AccessTier, BlobDeleteType, DeleteSnapshotsOptionType, EncryptionAlgorithmType, + FileShareTokenIntent, FilterBlobsIncludeItem, ImmutabilityPolicyMode, LeaseDuration, ListBlobsIncludeItem, ListContainersIncludeType, PremiumPageBlobAccessTier, PublicAccessType, RehydratePriority, }; @@ -242,7 +242,7 @@ pub struct AppendBlobClientCreateOptions<'a> { pub immutability_policy_expiry: Option, /// Specifies the immutability policy mode to set on the blob. - pub immutability_policy_mode: Option, + pub immutability_policy_mode: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. pub lease_id: Option, @@ -448,7 +448,7 @@ pub struct BlobClientCopyFromUrlOptions<'a> { pub immutability_policy_expiry: Option, /// Specifies the immutability policy mode to set on the blob. - pub immutability_policy_mode: Option, + pub immutability_policy_mode: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. pub lease_id: Option, @@ -846,7 +846,7 @@ pub struct BlobClientSetImmutabilityPolicyOptions<'a> { pub immutability_policy_expiry: Option, /// Specifies the immutability policy mode to set on the blob. - pub immutability_policy_mode: Option, + pub immutability_policy_mode: Option, /// Allows customization of the method call. pub method_options: ClientMethodOptions<'a>, @@ -1078,7 +1078,7 @@ pub struct BlobClientStartCopyFromUrlOptions<'a> { pub immutability_policy_expiry: Option, /// Specifies the immutability policy mode to set on the blob. - pub immutability_policy_mode: Option, + pub immutability_policy_mode: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. pub lease_id: Option, @@ -1745,7 +1745,7 @@ pub struct BlockBlobClientCommitBlockListOptions<'a> { pub immutability_policy_expiry: Option, /// Specifies the immutability policy mode to set on the blob. - pub immutability_policy_mode: Option, + pub immutability_policy_mode: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. pub lease_id: Option, @@ -2133,7 +2133,7 @@ pub struct BlockBlobClientUploadOptions<'a> { pub immutability_policy_expiry: Option, /// Specifies the immutability policy mode to set on the blob. - pub immutability_policy_mode: Option, + pub immutability_policy_mode: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. pub lease_id: Option, @@ -2328,7 +2328,7 @@ pub struct PageBlobClientCreateOptions<'a> { pub immutability_policy_expiry: Option, /// Specifies the immutability policy mode to set on the blob. - pub immutability_policy_mode: Option, + pub immutability_policy_mode: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. pub lease_id: Option, diff --git a/sdk/storage/azure_storage_blob/tsp-location.yaml b/sdk/storage/azure_storage_blob/tsp-location.yaml index 0c4d11d4f1..568b251083 100644 --- a/sdk/storage/azure_storage_blob/tsp-location.yaml +++ b/sdk/storage/azure_storage_blob/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storage/Microsoft.BlobStorage -commit: d5014d5141eb58eb0506823e46029e53786e2eb9 +commit: c695d4a9f025d4a56479a14d6db78d14d96c7c42 repo: Azure/azure-rest-api-specs additionalDirectories: From 3677c139fad6ad62cd69644ef8aefdd276492fdf Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Fri, 13 Jun 2025 13:10:21 -0700 Subject: [PATCH 4/7] Refactor all to compile and run --- .../src/clients/blob_client.rs | 19 ++++++------ .../src/clients/blob_container_client.rs | 15 ++++++---- .../src/clients/block_blob_client.rs | 6 ++-- sdk/storage/azure_storage_blob/src/lib.rs | 30 ++++++++++--------- .../azure_storage_blob_test/src/lib.rs | 4 +-- 5 files changed, 40 insertions(+), 34 deletions(-) diff --git a/sdk/storage/azure_storage_blob/src/clients/blob_client.rs b/sdk/storage/azure_storage_blob/src/clients/blob_client.rs index 3be91e2de5..449c30458b 100644 --- a/sdk/storage/azure_storage_blob/src/clients/blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/clients/blob_client.rs @@ -4,7 +4,8 @@ use crate::{ generated::clients::BlobClient as GeneratedBlobClient, generated::models::{ - BlobClientDownloadResult, BlobClientGetPropertiesResult, + BlobClientDeleteResult, BlobClientDownloadResult, BlobClientGetPropertiesResult, + BlobClientSetMetadataResult, BlobClientSetPropertiesResult, BlobClientSetTierResult, BlockBlobClientCommitBlockListResult, BlockBlobClientStageBlockResult, BlockBlobClientUploadResult, }, @@ -22,7 +23,7 @@ use azure_core::{ credentials::TokenCredential, http::{ policies::{BearerTokenCredentialPolicy, Policy}, - RequestContent, Response, Url, XmlFormat, + NoFormat, RequestContent, Response, Url, XmlFormat, }, Bytes, Result, }; @@ -116,7 +117,7 @@ impl BlobClient { pub async fn get_properties( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.get_properties(options).await } @@ -128,7 +129,7 @@ impl BlobClient { pub async fn set_properties( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.set_properties(options).await } @@ -138,7 +139,7 @@ impl BlobClient { pub async fn download( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.download(options).await } @@ -157,7 +158,7 @@ impl BlobClient { overwrite: bool, content_length: u64, options: Option>, - ) -> Result> { + ) -> Result> { let mut options = options.unwrap_or_default(); if !overwrite { @@ -181,7 +182,7 @@ impl BlobClient { pub async fn set_metadata( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.set_metadata(options).await } @@ -193,7 +194,7 @@ impl BlobClient { pub async fn delete( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.delete(options).await } @@ -208,7 +209,7 @@ impl BlobClient { &self, tier: AccessTier, options: Option>, - ) -> Result> { + ) -> Result> { self.client.set_tier(tier, options).await } } diff --git a/sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs b/sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs index 132d3b423f..4f6a183f87 100644 --- a/sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs +++ b/sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs @@ -3,7 +3,10 @@ use crate::{ generated::clients::BlobContainerClient as GeneratedBlobContainerClient, - generated::models::BlobContainerClientGetPropertiesResult, + generated::models::{ + BlobContainerClientCreateResult, BlobContainerClientDeleteResult, + BlobContainerClientGetPropertiesResult, BlobContainerClientSetMetadataResult, + }, models::{ BlobContainerClientCreateOptions, BlobContainerClientDeleteOptions, BlobContainerClientGetPropertiesOptions, BlobContainerClientListBlobFlatSegmentOptions, @@ -16,7 +19,7 @@ use azure_core::{ credentials::TokenCredential, http::{ policies::{BearerTokenCredentialPolicy, Policy}, - PageIterator, Pager, Response, Url, XmlFormat, + NoFormat, PageIterator, Pager, Response, Url, XmlFormat, }, Result, }; @@ -103,7 +106,7 @@ impl BlobContainerClient { pub async fn create_container( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.create(options).await } @@ -117,7 +120,7 @@ impl BlobContainerClient { pub async fn set_metadata( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.set_metadata(options).await } @@ -129,7 +132,7 @@ impl BlobContainerClient { pub async fn delete_container( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.delete(options).await } @@ -142,7 +145,7 @@ impl BlobContainerClient { pub async fn get_properties( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.get_properties(options).await } diff --git a/sdk/storage/azure_storage_blob/src/clients/block_blob_client.rs b/sdk/storage/azure_storage_blob/src/clients/block_blob_client.rs index cf0051ee1e..fcf32f0398 100644 --- a/sdk/storage/azure_storage_blob/src/clients/block_blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/clients/block_blob_client.rs @@ -22,7 +22,7 @@ use azure_core::{ credentials::TokenCredential, http::{ policies::{BearerTokenCredentialPolicy, Policy}, - RequestContent, Response, Url, XmlFormat, + NoFormat, RequestContent, Response, Url, XmlFormat, }, Bytes, Result, }; @@ -106,7 +106,7 @@ impl BlockBlobClient { &self, blocks: RequestContent, options: Option>, - ) -> Result> { + ) -> Result> { self.client.commit_block_list(blocks, options).await } @@ -125,7 +125,7 @@ impl BlockBlobClient { content_length: u64, body: RequestContent, options: Option>, - ) -> Result> { + ) -> Result> { self.client .stage_block(block_id, content_length, body, options) .await diff --git a/sdk/storage/azure_storage_blob/src/lib.rs b/sdk/storage/azure_storage_blob/src/lib.rs index 0e8fa822ae..3ee0c3e402 100644 --- a/sdk/storage/azure_storage_blob/src/lib.rs +++ b/sdk/storage/azure_storage_blob/src/lib.rs @@ -15,20 +15,22 @@ pub use clients::*; pub mod models { pub use crate::generated::models::{ - AccessTier, ArchiveStatus, BlobClientDeleteOptions, BlobClientDownloadOptions, - BlobClientDownloadResult, BlobClientDownloadResultHeaders, BlobClientGetPropertiesOptions, - BlobClientGetPropertiesResult, BlobClientGetPropertiesResultHeaders, - BlobClientSetMetadataOptions, BlobClientSetPropertiesOptions, BlobClientSetTierOptions, - BlobContainerClientCreateOptions, BlobContainerClientDeleteOptions, - BlobContainerClientGetPropertiesOptions, BlobContainerClientGetPropertiesResult, - BlobContainerClientGetPropertiesResultHeaders, + AccessTier, ArchiveStatus, BlobClientDeleteOptions, BlobClientDeleteResult, + BlobClientDownloadOptions, BlobClientDownloadResult, BlobClientDownloadResultHeaders, + BlobClientGetPropertiesOptions, BlobClientGetPropertiesResult, + BlobClientGetPropertiesResultHeaders, BlobClientSetMetadataOptions, + BlobClientSetMetadataResult, BlobClientSetPropertiesOptions, BlobClientSetPropertiesResult, + BlobClientSetTierOptions, BlobClientSetTierResult, BlobContainerClientCreateOptions, + BlobContainerClientCreateResult, BlobContainerClientDeleteOptions, + BlobContainerClientDeleteResult, BlobContainerClientGetPropertiesOptions, + BlobContainerClientGetPropertiesResult, BlobContainerClientGetPropertiesResultHeaders, BlobContainerClientListBlobFlatSegmentOptions, BlobContainerClientSetMetadataOptions, - BlobImmutabilityPolicyMode, BlobServiceClientGetPropertiesOptions, BlobType, - BlockBlobClientCommitBlockListOptions, BlockBlobClientCommitBlockListResult, - BlockBlobClientGetBlockListOptions, BlockBlobClientStageBlockOptions, - BlockBlobClientStageBlockResult, BlockBlobClientUploadOptions, BlockBlobClientUploadResult, - BlockList, BlockListType, BlockLookupList, CopyStatus, LeaseState, LeaseStatus, - ListBlobsFlatSegmentResponse, PublicAccessType, RehydratePriority, - StorageServiceProperties, + BlobContainerClientSetMetadataResult, BlobImmutabilityPolicyMode, + BlobServiceClientGetPropertiesOptions, BlobType, BlockBlobClientCommitBlockListOptions, + BlockBlobClientCommitBlockListResult, BlockBlobClientGetBlockListOptions, + BlockBlobClientStageBlockOptions, BlockBlobClientStageBlockResult, + BlockBlobClientUploadOptions, BlockBlobClientUploadResult, BlockList, BlockListType, + BlockLookupList, CopyStatus, LeaseState, LeaseStatus, ListBlobsFlatSegmentResponse, + PublicAccessType, RehydratePriority, StorageServiceProperties, }; } diff --git a/sdk/storage/azure_storage_blob_test/src/lib.rs b/sdk/storage/azure_storage_blob_test/src/lib.rs index d8fe702769..cb6b164896 100644 --- a/sdk/storage/azure_storage_blob_test/src/lib.rs +++ b/sdk/storage/azure_storage_blob_test/src/lib.rs @@ -2,7 +2,7 @@ // Licensed under the MIT License. use azure_core::{ - http::{ClientOptions, RequestContent, Response}, + http::{ClientOptions, NoFormat, RequestContent, Response}, Result, }; use azure_core_test::Recording; @@ -102,7 +102,7 @@ pub async fn get_container_client( /// * `blob_client` - A reference to a BlobClient instance. pub async fn create_test_blob( blob_client: &BlobClient, -) -> Result> { +) -> Result> { blob_client .upload( RequestContent::from(b"hello rusty world".to_vec()), From 738f0201fee274e4d72cf0adc188231be0753a13 Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Fri, 13 Jun 2025 17:23:28 -0700 Subject: [PATCH 5/7] Regenerate against changes --- .../src/generated/models/header_traits.rs | 13 ------------- .../src/generated/models/method_options.rs | 4 ++-- sdk/storage/azure_storage_blob/tsp-location.yaml | 2 +- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs index db63938bed..6a33a8482d 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs @@ -113,7 +113,6 @@ const REQUEST_SERVER_ENCRYPTED: HeaderName = const SERVER_ENCRYPTED: HeaderName = HeaderName::from_static("x-ms-server-encrypted"); const SKU_NAME: HeaderName = HeaderName::from_static("x-ms-sku-name"); const SNAPSHOT: HeaderName = HeaderName::from_static("x-ms-snapshot"); -const STRUCTURED_BODY: HeaderName = HeaderName::from_static("x-ms-structured-body"); const TAG_COUNT: HeaderName = HeaderName::from_static("x-ms-tag-count"); const VERSION: HeaderName = HeaderName::from_static("x-ms-version"); const VERSION_ID: HeaderName = HeaderName::from_static("x-ms-version-id"); @@ -214,7 +213,6 @@ pub trait AppendBlobClientAppendBlockResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn structured_body_type(&self) -> Result>; fn version(&self) -> Result>; } @@ -281,11 +279,6 @@ impl AppendBlobClientAppendBlockResultHeaders Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - /// Indicates the response body contains a structured message and specifies the message schema version and properties. - fn structured_body_type(&self) -> Result> { - Headers::get_optional_as(self.headers(), &STRUCTURED_BODY) - } - /// Specifies the version of the operation to use for this request. fn version(&self) -> Result> { Headers::get_optional_as(self.headers(), &VERSION) @@ -3131,7 +3124,6 @@ pub trait PageBlobClientUploadPagesResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn structured_body_type(&self) -> Result>; fn version(&self) -> Result>; } @@ -3192,11 +3184,6 @@ impl PageBlobClientUploadPagesResultHeaders Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - /// Indicates the response body contains a structured message and specifies the message schema version and properties. - fn structured_body_type(&self) -> Result> { - Headers::get_optional_as(self.headers(), &STRUCTURED_BODY) - } - /// Specifies the version of the operation to use for this request. fn version(&self) -> Result> { Headers::get_optional_as(self.headers(), &VERSION) diff --git a/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs b/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs index 8295ec7677..69c158b85f 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs @@ -1992,7 +1992,7 @@ pub struct BlockBlobClientStageBlockOptions<'a> { /// Required if the request body is a structured message. Specifies the length of the blob/file content inside the message /// body. Will always be smaller than Content-Length. - pub structured_content_length: Option, + pub structured_content_length: Option, /// The timeout parameter is expressed in seconds. For more information, see [Setting Timeouts for Blob Service Operations.](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations) pub timeout: Option, @@ -2152,7 +2152,7 @@ pub struct BlockBlobClientUploadOptions<'a> { /// Required if the request body is a structured message. Specifies the length of the blob/file content inside the message /// body. Will always be smaller than Content-Length. - pub structured_content_length: Option, + pub structured_content_length: Option, /// The tier to be set on the blob. pub tier: Option, diff --git a/sdk/storage/azure_storage_blob/tsp-location.yaml b/sdk/storage/azure_storage_blob/tsp-location.yaml index 568b251083..b2ba8c46e9 100644 --- a/sdk/storage/azure_storage_blob/tsp-location.yaml +++ b/sdk/storage/azure_storage_blob/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storage/Microsoft.BlobStorage -commit: c695d4a9f025d4a56479a14d6db78d14d96c7c42 +commit: a2781d2a3b39f0beff349f9686af794808a321ea repo: Azure/azure-rest-api-specs additionalDirectories: From 3e929fb929482d5c67fd5e8f0aab6bc57c25c2f0 Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Mon, 16 Jun 2025 11:58:03 -0700 Subject: [PATCH 6/7] Regen after merging feature/blob-tsp into access-internal branch --- .../src/generated/clients/blob_client.rs | 7 +- .../generated/clients/block_blob_client.rs | 2 +- .../src/generated/models/enums.rs | 44 +++ .../src/generated/models/header_traits.rs | 63 ++--- .../src/generated/models/method_options.rs | 254 +++++++++--------- .../src/generated/models/pub_models.rs | 4 +- .../azure_storage_blob/tsp-location.yaml | 2 +- 7 files changed, 208 insertions(+), 168 deletions(-) diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs index 276766cba0..bb2c9e3cca 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs @@ -6,7 +6,7 @@ use crate::generated::{ clients::{AppendBlobClient, BlockBlobClient, PageBlobClient}, models::{ - AccessTier, BlobClientAbortCopyFromUrlOptions, BlobClientAbortCopyFromUrlResult, + AccessTierOptional, BlobClientAbortCopyFromUrlOptions, BlobClientAbortCopyFromUrlResult, BlobClientAcquireLeaseOptions, BlobClientAcquireLeaseResult, BlobClientBreakLeaseOptions, BlobClientBreakLeaseResult, BlobClientChangeLeaseOptions, BlobClientChangeLeaseResult, BlobClientCopyFromUrlOptions, BlobClientCopyFromUrlResult, BlobClientCreateSnapshotOptions, @@ -379,7 +379,7 @@ impl BlobClient { request.insert_header("x-ms-copy-source-authorization", copy_source_authorization); } if let Some(copy_source_tags) = options.copy_source_tags { - request.insert_header("x-ms-copy-source-tag-option", copy_source_tags); + request.insert_header("x-ms-copy-source-tag-option", copy_source_tags.to_string()); } if let Some(encryption_scope) = options.encryption_scope { request.insert_header("x-ms-encryption-scope", encryption_scope); @@ -413,6 +413,7 @@ impl BlobClient { request.insert_header(format!("x-ms-meta-{}", k), v); } } + request.insert_header("x-ms-requires-sync", "true"); if let Some(source_content_md5) = options.source_content_md5 { request.insert_header( "x-ms-source-content-md5", @@ -1344,7 +1345,7 @@ impl BlobClient { /// * `options` - Optional parameters for the request. pub async fn set_tier( &self, - tier: AccessTier, + tier: AccessTierOptional, options: Option>, ) -> Result> { let options = options.unwrap_or_default(); diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs index f5b10efdaa..b3ffd6047c 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/block_blob_client.rs @@ -356,7 +356,7 @@ impl BlockBlobClient { ); } if let Some(copy_source_tags) = options.copy_source_tags { - request.insert_header("x-ms-copy-source-tag-option", copy_source_tags); + request.insert_header("x-ms-copy-source-tag-option", copy_source_tags.to_string()); } if let Some(encryption_algorithm) = options.encryption_algorithm { request.insert_header( diff --git a/sdk/storage/azure_storage_blob/src/generated/models/enums.rs b/sdk/storage/azure_storage_blob/src/generated/models/enums.rs index 809c623384..a1d63e5cd6 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/enums.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/enums.rs @@ -42,6 +42,41 @@ create_extensible_enum!( (Premium, "Premium") ); +create_extensible_enum!( + #[doc = r#"/// The access tiers."#] + AccessTierOptional, + #[doc = r#"/// The archive access tier."#] + (Archive, "Archive"), + #[doc = r#"/// The Cold access tier."#] + (Cold, "Cold"), + #[doc = r#"/// The cool access tier."#] + (Cool, "Cool"), + #[doc = r#"/// The hot access tier."#] + (Hot, "Hot"), + #[doc = r#"/// The hot P10 tier."#] + (P10, "P10"), + #[doc = r#"/// The hot P15 tier."#] + (P15, "P15"), + #[doc = r#"/// The hot P20 tier."#] + (P20, "P20"), + #[doc = r#"/// The hot P30 tier."#] + (P30, "P30"), + #[doc = r#"/// The hot P4 tier."#] + (P4, "P4"), + #[doc = r#"/// The hot P40 tier."#] + (P40, "P40"), + #[doc = r#"/// The hot P50 tier."#] + (P50, "P50"), + #[doc = r#"/// The hot P6 tier."#] + (P6, "P6"), + #[doc = r#"/// The hot P60 tier."#] + (P60, "P60"), + #[doc = r#"/// The hot P70 tier."#] + (P70, "P70"), + #[doc = r#"/// The hot P80 tier."#] + (P80, "P80") +); + create_enum!( #[doc = r#"/// The account kind."#] AccountKind, @@ -68,6 +103,15 @@ create_extensible_enum!( (RehydratePendingToHot, "rehydrate-pending-to-hot") ); +create_enum!( + #[doc = r#"/// The blob copy source tags types."#] + BlobCopySourceTags, + #[doc = r#"/// The copy blob source tags option."#] + (Copy, "COPY"), + #[doc = r#"/// The replace blob source tags option."#] + (Replace, "REPLACE") +); + create_enum!( #[doc = r#"/// The type of blob deletions."#] BlobDeleteType, diff --git a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs index 6a33a8482d..69541d9086 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs @@ -4,31 +4,30 @@ // Code generated by Microsoft (R) Rust Code Generator. DO NOT EDIT. use super::{ - AccessTier, AccountKind, AppendBlobClientAppendBlockFromUrlResult, - AppendBlobClientAppendBlockResult, AppendBlobClientCreateResult, AppendBlobClientSealResult, - ArchiveStatus, BlobClientAbortCopyFromUrlResult, BlobClientAcquireLeaseResult, - BlobClientBreakLeaseResult, BlobClientChangeLeaseResult, BlobClientCopyFromUrlResult, - BlobClientCreateSnapshotResult, BlobClientDeleteImmutabilityPolicyResult, - BlobClientDeleteResult, BlobClientDownloadResult, BlobClientGetAccountInfoResult, - BlobClientGetPropertiesResult, BlobClientReleaseLeaseResult, BlobClientRenewLeaseResult, - BlobClientSetExpiryResult, BlobClientSetImmutabilityPolicyResult, BlobClientSetLegalHoldResult, - BlobClientSetMetadataResult, BlobClientSetPropertiesResult, BlobClientSetTagsResult, - BlobClientSetTierResult, BlobClientStartCopyFromUrlResult, BlobClientUndeleteResult, - BlobContainerClientAcquireLeaseResult, BlobContainerClientBreakLeaseResult, - BlobContainerClientChangeLeaseResult, BlobContainerClientCreateResult, - BlobContainerClientDeleteResult, BlobContainerClientGetAccountInfoResult, - BlobContainerClientGetPropertiesResult, BlobContainerClientReleaseLeaseResult, - BlobContainerClientRenameResult, BlobContainerClientRenewLeaseResult, - BlobContainerClientRestoreResult, BlobContainerClientSetAccessPolicyResult, - BlobContainerClientSetMetadataResult, BlobImmutabilityPolicyMode, - BlobServiceClientGetAccountInfoResult, BlobServiceClientSetPropertiesResult, BlobTags, - BlobType, BlockBlobClientCommitBlockListResult, BlockBlobClientPutBlobFromUrlResult, - BlockBlobClientQueryResult, BlockBlobClientStageBlockFromUrlResult, - BlockBlobClientStageBlockResult, BlockBlobClientUploadResult, BlockList, CopyStatus, - FilterBlobSegment, LeaseDuration, LeaseState, LeaseStatus, ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, ListContainersSegmentResponse, - PageBlobClientClearPagesResult, PageBlobClientCopyIncrementalResult, - PageBlobClientCreateResult, PageBlobClientResizeResult, + AccountKind, AppendBlobClientAppendBlockFromUrlResult, AppendBlobClientAppendBlockResult, + AppendBlobClientCreateResult, AppendBlobClientSealResult, ArchiveStatus, + BlobClientAbortCopyFromUrlResult, BlobClientAcquireLeaseResult, BlobClientBreakLeaseResult, + BlobClientChangeLeaseResult, BlobClientCopyFromUrlResult, BlobClientCreateSnapshotResult, + BlobClientDeleteImmutabilityPolicyResult, BlobClientDeleteResult, BlobClientDownloadResult, + BlobClientGetAccountInfoResult, BlobClientGetPropertiesResult, BlobClientReleaseLeaseResult, + BlobClientRenewLeaseResult, BlobClientSetExpiryResult, BlobClientSetImmutabilityPolicyResult, + BlobClientSetLegalHoldResult, BlobClientSetMetadataResult, BlobClientSetPropertiesResult, + BlobClientSetTagsResult, BlobClientSetTierResult, BlobClientStartCopyFromUrlResult, + BlobClientUndeleteResult, BlobContainerClientAcquireLeaseResult, + BlobContainerClientBreakLeaseResult, BlobContainerClientChangeLeaseResult, + BlobContainerClientCreateResult, BlobContainerClientDeleteResult, + BlobContainerClientGetAccountInfoResult, BlobContainerClientGetPropertiesResult, + BlobContainerClientReleaseLeaseResult, BlobContainerClientRenameResult, + BlobContainerClientRenewLeaseResult, BlobContainerClientRestoreResult, + BlobContainerClientSetAccessPolicyResult, BlobContainerClientSetMetadataResult, + BlobImmutabilityPolicyMode, BlobServiceClientGetAccountInfoResult, + BlobServiceClientSetPropertiesResult, BlobTags, BlobType, BlockBlobClientCommitBlockListResult, + BlockBlobClientPutBlobFromUrlResult, BlockBlobClientQueryResult, + BlockBlobClientStageBlockFromUrlResult, BlockBlobClientStageBlockResult, + BlockBlobClientUploadResult, BlockList, CopyStatus, FilterBlobSegment, LeaseDuration, + LeaseState, LeaseStatus, ListBlobsFlatSegmentResponse, ListBlobsHierarchySegmentResponse, + ListContainersSegmentResponse, PageBlobClientClearPagesResult, + PageBlobClientCopyIncrementalResult, PageBlobClientCreateResult, PageBlobClientResizeResult, PageBlobClientUpdateSequenceNumberResult, PageBlobClientUploadPagesFromUrlResult, PageBlobClientUploadPagesResult, PageList, PublicAccessType, RehydratePriority, SignedIdentifier, SkuName, StorageServiceProperties, StorageServiceStats, UserDelegationKey, @@ -533,7 +532,6 @@ pub trait BlobClientCopyFromUrlResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn content_crc64(&self) -> Result>>; fn copy_id(&self) -> Result>; - fn copy_status(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn version(&self) -> Result>; fn version_id(&self) -> Result>; @@ -576,11 +574,6 @@ impl BlobClientCopyFromUrlResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), ©_STATUS) - } - /// 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 @@ -1026,7 +1019,7 @@ pub trait BlobClientGetPropertiesResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn tier(&self) -> Result>; + fn access_tier(&self) -> Result>; fn access_tier_change_time(&self) -> Result>; fn access_tier_inferred(&self) -> Result>; fn archive_status(&self) -> Result>; @@ -1111,8 +1104,10 @@ impl BlobClientGetPropertiesResultHeaders for Response Result> { + /// 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 . For blob storage + /// LRS accounts, valid values are Hot/Cool/Archive. + fn access_tier(&self) -> Result> { Headers::get_optional_as(self.headers(), &ACCESS_TIER) } diff --git a/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs b/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs index 69c158b85f..402e665a92 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/method_options.rs @@ -4,8 +4,8 @@ // Code generated by Microsoft (R) Rust Code Generator. DO NOT EDIT. use super::{ - AccessTier, BlobDeleteType, DeleteSnapshotsOptionType, EncryptionAlgorithmType, - FileShareTokenIntent, FilterBlobsIncludeItem, ImmutabilityPolicyMode, LeaseDuration, + AccessTierOptional, BlobCopySourceTags, BlobDeleteType, DeleteSnapshotsOptionType, + EncryptionAlgorithmType, FileShareTokenIntent, FilterBlobsIncludeItem, ImmutabilityPolicyMode, ListBlobsIncludeItem, ListContainersIncludeType, PremiumPageBlobAccessTier, PublicAccessType, RehydratePriority, }; @@ -41,19 +41,19 @@ pub struct AppendBlobClientAppendBlockOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -119,19 +119,19 @@ pub struct AppendBlobClientAppendBlockFromUrlOptions<'a> { /// Valid value is backup pub file_request_intent: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -223,19 +223,19 @@ pub struct AppendBlobClientCreateOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Specifies the date time when the blobs immutability policy is set to expire. @@ -271,16 +271,16 @@ pub struct AppendBlobClientSealOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -317,21 +317,21 @@ pub struct BlobClientAcquireLeaseOptions<'a> { /// 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. - pub duration: Option, + pub duration: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Allows customization of the method call. @@ -357,19 +357,19 @@ pub struct BlobClientBreakLeaseOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Allows customization of the method call. @@ -385,19 +385,19 @@ pub struct BlobClientChangeLeaseOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Allows customization of the method call. @@ -420,7 +420,7 @@ pub struct BlobClientCopyFromUrlOptions<'a> { pub copy_source_authorization: Option, /// Optional, default 'replace'. Indicates if source tags should be copied or replaced with the tags specified by x-ms-tags. - pub copy_source_tags: Option, + pub copy_source_tags: Option, /// Optional. Version 2019-07-07 and later. Specifies the encryption scope to use to encrypt the data provided in the request. /// If not specified, the request will be encrypted with the root account key. @@ -429,19 +429,19 @@ pub struct BlobClientCopyFromUrlOptions<'a> { /// Valid value is backup pub file_request_intent: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Specifies the date time when the blobs immutability policy is set to expire. @@ -478,7 +478,7 @@ pub struct BlobClientCopyFromUrlOptions<'a> { pub source_if_unmodified_since: Option, /// The tier to be set on the blob. - pub tier: Option, + pub tier: Option, /// The timeout parameter is expressed in seconds. For more information, see [Setting Timeouts for Blob Service Operations.](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations) pub timeout: Option, @@ -507,19 +507,19 @@ pub struct BlobClientCreateSnapshotOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -548,19 +548,19 @@ pub struct BlobClientDeleteOptions<'a> { /// and all of its snapshots. only: Delete only the blob's snapshots and not the blob itself pub delete_snapshots: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -701,19 +701,19 @@ pub struct BlobClientGetPropertiesOptions<'a> { /// with a client token, this header should be specified using the SHA256 hash of the encryption key. pub encryption_key_sha256: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -767,19 +767,19 @@ pub struct BlobClientReleaseLeaseOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Allows customization of the method call. @@ -795,19 +795,19 @@ pub struct BlobClientRenewLeaseOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Allows customization of the method call. @@ -907,19 +907,19 @@ pub struct BlobClientSetMetadataOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -964,19 +964,19 @@ pub struct BlobClientSetPropertiesOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -1059,19 +1059,19 @@ pub struct BlobClientStartCopyFromUrlOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Specifies the date time when the blobs immutability policy is set to expire. @@ -1115,7 +1115,7 @@ pub struct BlobClientStartCopyFromUrlOptions<'a> { pub source_if_unmodified_since: Option, /// The tier to be set on the blob. - pub tier: Option, + pub tier: Option, /// The timeout parameter is expressed in seconds. For more information, see [Setting Timeouts for Blob Service Operations.](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations) pub timeout: Option, @@ -1142,7 +1142,7 @@ pub struct BlobContainerClientAcquireLeaseOptions<'a> { /// 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. - pub duration: Option, + pub duration: Option, /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, @@ -1726,19 +1726,19 @@ pub struct BlockBlobClientCommitBlockListOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Specifies the date time when the blobs immutability policy is set to expire. @@ -1760,7 +1760,7 @@ pub struct BlockBlobClientCommitBlockListOptions<'a> { pub method_options: ClientMethodOptions<'a>, /// The tier to be set on the blob. - pub tier: Option, + pub tier: Option, /// The timeout parameter is expressed in seconds. For more information, see [Setting Timeouts for Blob Service Operations.](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations) pub timeout: Option, @@ -1835,7 +1835,7 @@ pub struct BlockBlobClientPutBlobFromUrlOptions<'a> { pub copy_source_blob_properties: Option, /// Optional, default 'replace'. Indicates if source tags should be copied or replaced with the tags specified by x-ms-tags. - pub copy_source_tags: Option, + pub copy_source_tags: Option, /// Optional. Version 2019-07-07 and later. Specifies the algorithm to use for encryption. If not specified, the default is /// AES256. @@ -1857,19 +1857,19 @@ pub struct BlockBlobClientPutBlobFromUrlOptions<'a> { /// Valid value is backup pub file_request_intent: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -1900,7 +1900,7 @@ pub struct BlockBlobClientPutBlobFromUrlOptions<'a> { pub source_if_unmodified_since: Option, /// The tier to be set on the blob. - pub tier: Option, + pub tier: Option, /// The timeout parameter is expressed in seconds. For more information, see [Setting Timeouts for Blob Service Operations.](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations) pub timeout: Option, @@ -1929,19 +1929,19 @@ pub struct BlockBlobClientQueryOptions<'a> { /// with a client token, this header should be specified using the SHA256 hash of the encryption key. pub encryption_key_sha256: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -2114,19 +2114,19 @@ pub struct BlockBlobClientUploadOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Specifies the date time when the blobs immutability policy is set to expire. @@ -2155,7 +2155,7 @@ pub struct BlockBlobClientUploadOptions<'a> { pub structured_content_length: Option, /// The tier to be set on the blob. - pub tier: Option, + pub tier: Option, /// The timeout parameter is expressed in seconds. For more information, see [Setting Timeouts for Blob Service Operations.](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations) pub timeout: Option, @@ -2191,13 +2191,13 @@ pub struct PageBlobClientClearPagesOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify this header value to operate only on a blob if it has the specified sequence number. @@ -2212,7 +2212,7 @@ pub struct PageBlobClientClearPagesOptions<'a> { /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -2234,19 +2234,19 @@ pub struct PageBlobClientCopyIncrementalOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Allows customization of the method call. @@ -2309,19 +2309,19 @@ pub struct PageBlobClientCreateOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// Specifies the date time when the blobs immutability policy is set to expire. @@ -2355,19 +2355,19 @@ pub struct PageBlobClientGetPageRangesOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -2403,19 +2403,19 @@ pub struct PageBlobClientGetPageRangesDiffOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -2478,19 +2478,19 @@ pub struct PageBlobClientResizeOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -2513,19 +2513,19 @@ pub struct PageBlobClientUpdateSequenceNumberOptions<'a> { /// An opaque, globally-unique, client-generated string identifier for the request. pub client_request_id: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -2561,13 +2561,13 @@ pub struct PageBlobClientUploadPagesOptions<'a> { /// If not specified, the request will be encrypted with the root account key. pub encryption_scope: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify this header value to operate only on a blob if it has the specified sequence number. @@ -2582,7 +2582,7 @@ pub struct PageBlobClientUploadPagesOptions<'a> { /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. @@ -2641,13 +2641,13 @@ pub struct PageBlobClientUploadPagesFromUrlOptions<'a> { /// Valid value is backup pub file_request_intent: Option, - /// The request should only proceed if an entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_match: Option, - /// The request should only proceed if the entity was modified after this time. + /// A date-time value. A request is made under the condition that the resource has been modified since the specified date-time. pub if_modified_since: Option, - /// The request should only proceed if no entity matches this string. + /// A condition that must be met in order for the request to be processed. pub if_none_match: Option, /// Specify this header value to operate only on a blob if it has the specified sequence number. @@ -2662,7 +2662,7 @@ pub struct PageBlobClientUploadPagesFromUrlOptions<'a> { /// Specify a SQL where clause on blob tags to operate only on blobs with a matching value. pub if_tags: Option, - /// The request should only proceed if the entity was not modified after this time. + /// A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time. pub if_unmodified_since: Option, /// If specified, the operation only succeeds if the resource's lease is active and matches this ID. diff --git a/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs b/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs index 9e6d67aff6..48739da20c 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs @@ -27,7 +27,7 @@ pub struct AccessPolicy { default, rename = "Expiry", skip_serializing_if = "Option::is_none", - with = "azure_core::date::rfc3339::option" + with = "azure_core::date::rfc7231::option" )] pub expiry: Option, @@ -40,7 +40,7 @@ pub struct AccessPolicy { default, rename = "Start", skip_serializing_if = "Option::is_none", - with = "azure_core::date::rfc3339::option" + with = "azure_core::date::rfc7231::option" )] pub start: Option, } diff --git a/sdk/storage/azure_storage_blob/tsp-location.yaml b/sdk/storage/azure_storage_blob/tsp-location.yaml index b2ba8c46e9..1a8f6e2896 100644 --- a/sdk/storage/azure_storage_blob/tsp-location.yaml +++ b/sdk/storage/azure_storage_blob/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storage/Microsoft.BlobStorage -commit: a2781d2a3b39f0beff349f9686af794808a321ea +commit: d3e25dc2c1868f33cad0a204bf0739d18593b41d repo: Azure/azure-rest-api-specs additionalDirectories: From 0488b519eb34ad76b9b0109794134a620c3d8637 Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Mon, 16 Jun 2025 12:22:52 -0700 Subject: [PATCH 7/7] Regenerate after api-version omission, refactor --- .../src/clients/blob_client.rs | 15 +- .../src/clients/blob_container_client.rs | 11 +- .../src/generated/clients/blob_client.rs | 15 +- .../clients/blob_container_client.rs | 13 +- .../generated/clients/blob_service_client.rs | 7 +- .../src/generated/models/header_traits.rs | 514 +----------------- .../src/generated/models/pub_models.rs | 32 -- sdk/storage/azure_storage_blob/src/lib.rs | 30 +- .../azure_storage_blob/tests/blob_client.rs | 12 +- .../azure_storage_blob/tsp-location.yaml | 2 +- 10 files changed, 67 insertions(+), 584 deletions(-) diff --git a/sdk/storage/azure_storage_blob/src/clients/blob_client.rs b/sdk/storage/azure_storage_blob/src/clients/blob_client.rs index 449c30458b..a8fda105c3 100644 --- a/sdk/storage/azure_storage_blob/src/clients/blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/clients/blob_client.rs @@ -4,13 +4,12 @@ use crate::{ generated::clients::BlobClient as GeneratedBlobClient, generated::models::{ - BlobClientDeleteResult, BlobClientDownloadResult, BlobClientGetPropertiesResult, - BlobClientSetMetadataResult, BlobClientSetPropertiesResult, BlobClientSetTierResult, + BlobClientDownloadResult, BlobClientGetPropertiesResult, BlockBlobClientCommitBlockListResult, BlockBlobClientStageBlockResult, BlockBlobClientUploadResult, }, models::{ - AccessTier, BlobClientDeleteOptions, BlobClientDownloadOptions, + AccessTierOptional, BlobClientDeleteOptions, BlobClientDownloadOptions, BlobClientGetPropertiesOptions, BlobClientSetMetadataOptions, BlobClientSetPropertiesOptions, BlobClientSetTierOptions, BlockBlobClientCommitBlockListOptions, BlockBlobClientUploadOptions, BlockList, @@ -129,7 +128,7 @@ impl BlobClient { pub async fn set_properties( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.set_properties(options).await } @@ -182,7 +181,7 @@ impl BlobClient { pub async fn set_metadata( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.set_metadata(options).await } @@ -194,7 +193,7 @@ impl BlobClient { pub async fn delete( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.delete(options).await } @@ -207,9 +206,9 @@ impl BlobClient { /// * `options` - Optional configuration for the request. pub async fn set_tier( &self, - tier: AccessTier, + tier: AccessTierOptional, options: Option>, - ) -> Result> { + ) -> Result> { self.client.set_tier(tier, options).await } } diff --git a/sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs b/sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs index 4f6a183f87..83a13f632c 100644 --- a/sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs +++ b/sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs @@ -3,10 +3,7 @@ use crate::{ generated::clients::BlobContainerClient as GeneratedBlobContainerClient, - generated::models::{ - BlobContainerClientCreateResult, BlobContainerClientDeleteResult, - BlobContainerClientGetPropertiesResult, BlobContainerClientSetMetadataResult, - }, + generated::models::BlobContainerClientGetPropertiesResult, models::{ BlobContainerClientCreateOptions, BlobContainerClientDeleteOptions, BlobContainerClientGetPropertiesOptions, BlobContainerClientListBlobFlatSegmentOptions, @@ -106,7 +103,7 @@ impl BlobContainerClient { pub async fn create_container( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.create(options).await } @@ -120,7 +117,7 @@ impl BlobContainerClient { pub async fn set_metadata( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.set_metadata(options).await } @@ -132,7 +129,7 @@ impl BlobContainerClient { pub async fn delete_container( &self, options: Option>, - ) -> Result> { + ) -> Result> { self.client.delete(options).await } diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs index bb2c9e3cca..69d08dc344 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs @@ -11,7 +11,7 @@ use crate::generated::{ BlobClientBreakLeaseResult, BlobClientChangeLeaseOptions, BlobClientChangeLeaseResult, BlobClientCopyFromUrlOptions, BlobClientCopyFromUrlResult, BlobClientCreateSnapshotOptions, BlobClientCreateSnapshotResult, BlobClientDeleteImmutabilityPolicyOptions, - BlobClientDeleteImmutabilityPolicyResult, BlobClientDeleteOptions, BlobClientDeleteResult, + BlobClientDeleteImmutabilityPolicyResult, BlobClientDeleteOptions, BlobClientDownloadOptions, BlobClientDownloadResult, BlobClientGetAccountInfoOptions, BlobClientGetAccountInfoResult, BlobClientGetPropertiesOptions, BlobClientGetPropertiesResult, BlobClientGetTagsOptions, BlobClientReleaseLeaseOptions, @@ -19,9 +19,8 @@ use crate::generated::{ BlobClientSetExpiryOptions, BlobClientSetExpiryResult, BlobClientSetImmutabilityPolicyOptions, BlobClientSetImmutabilityPolicyResult, BlobClientSetLegalHoldOptions, BlobClientSetLegalHoldResult, BlobClientSetMetadataOptions, - BlobClientSetMetadataResult, BlobClientSetPropertiesOptions, BlobClientSetPropertiesResult, - BlobClientSetTagsOptions, BlobClientSetTagsResult, BlobClientSetTierOptions, - BlobClientSetTierResult, BlobClientStartCopyFromUrlOptions, + BlobClientSetPropertiesOptions, BlobClientSetTagsOptions, BlobClientSetTagsResult, + BlobClientSetTierOptions, BlobClientStartCopyFromUrlOptions, BlobClientStartCopyFromUrlResult, BlobClientUndeleteOptions, BlobClientUndeleteResult, BlobExpiryOptions, BlobTags, }, @@ -533,7 +532,7 @@ impl BlobClient { pub async fn delete( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1147,7 +1146,7 @@ impl BlobClient { pub async fn set_metadata( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1219,7 +1218,7 @@ impl BlobClient { pub async fn set_properties( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -1347,7 +1346,7 @@ impl BlobClient { &self, tier: AccessTierOptional, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs index fb6d920592..1a18d5cb51 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs @@ -9,8 +9,7 @@ use crate::generated::{ BlobContainerClientAcquireLeaseOptions, BlobContainerClientAcquireLeaseResult, BlobContainerClientBreakLeaseOptions, BlobContainerClientBreakLeaseResult, BlobContainerClientChangeLeaseOptions, BlobContainerClientChangeLeaseResult, - BlobContainerClientCreateOptions, BlobContainerClientCreateResult, - BlobContainerClientDeleteOptions, BlobContainerClientDeleteResult, + BlobContainerClientCreateOptions, BlobContainerClientDeleteOptions, BlobContainerClientFilterBlobsOptions, BlobContainerClientGetAccessPolicyOptions, BlobContainerClientGetAccountInfoOptions, BlobContainerClientGetAccountInfoResult, BlobContainerClientGetPropertiesOptions, BlobContainerClientGetPropertiesResult, @@ -21,8 +20,8 @@ use crate::generated::{ BlobContainerClientRenewLeaseResult, BlobContainerClientRestoreOptions, BlobContainerClientRestoreResult, BlobContainerClientSetAccessPolicyOptions, BlobContainerClientSetAccessPolicyResult, BlobContainerClientSetMetadataOptions, - BlobContainerClientSetMetadataResult, FilterBlobSegment, ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, SignedIdentifier, + FilterBlobSegment, ListBlobsFlatSegmentResponse, ListBlobsHierarchySegmentResponse, + SignedIdentifier, }, }; use azure_core::{ @@ -251,7 +250,7 @@ impl BlobContainerClient { pub async fn create( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -297,7 +296,7 @@ impl BlobContainerClient { pub async fn delete( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); @@ -890,7 +889,7 @@ impl BlobContainerClient { pub async fn set_metadata( &self, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); diff --git a/sdk/storage/azure_storage_blob/src/generated/clients/blob_service_client.rs b/sdk/storage/azure_storage_blob/src/generated/clients/blob_service_client.rs index 9f602632ca..de2175cb81 100644 --- a/sdk/storage/azure_storage_blob/src/generated/clients/blob_service_client.rs +++ b/sdk/storage/azure_storage_blob/src/generated/clients/blob_service_client.rs @@ -10,9 +10,8 @@ use crate::generated::{ BlobServiceClientGetAccountInfoResult, BlobServiceClientGetPropertiesOptions, BlobServiceClientGetStatisticsOptions, BlobServiceClientGetUserDelegationKeyOptions, BlobServiceClientListContainersSegmentOptions, BlobServiceClientSetPropertiesOptions, - BlobServiceClientSetPropertiesResult, FilterBlobSegment, KeyInfo, - ListContainersSegmentResponse, StorageServiceProperties, StorageServiceStats, - UserDelegationKey, + FilterBlobSegment, KeyInfo, ListContainersSegmentResponse, StorageServiceProperties, + StorageServiceStats, UserDelegationKey, }, }; use azure_core::{ @@ -361,7 +360,7 @@ impl BlobServiceClient { &self, storage_service_properties: RequestContent, options: Option>, - ) -> Result> { + ) -> Result> { let options = options.unwrap_or_default(); let ctx = Context::with_context(&options.method_options.context); let mut url = self.endpoint.clone(); diff --git a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs index 69541d9086..4f6c6a5141 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs @@ -8,29 +8,26 @@ use super::{ AppendBlobClientCreateResult, AppendBlobClientSealResult, ArchiveStatus, BlobClientAbortCopyFromUrlResult, BlobClientAcquireLeaseResult, BlobClientBreakLeaseResult, BlobClientChangeLeaseResult, BlobClientCopyFromUrlResult, BlobClientCreateSnapshotResult, - BlobClientDeleteImmutabilityPolicyResult, BlobClientDeleteResult, BlobClientDownloadResult, + BlobClientDeleteImmutabilityPolicyResult, BlobClientDownloadResult, BlobClientGetAccountInfoResult, BlobClientGetPropertiesResult, BlobClientReleaseLeaseResult, BlobClientRenewLeaseResult, BlobClientSetExpiryResult, BlobClientSetImmutabilityPolicyResult, - BlobClientSetLegalHoldResult, BlobClientSetMetadataResult, BlobClientSetPropertiesResult, - BlobClientSetTagsResult, BlobClientSetTierResult, BlobClientStartCopyFromUrlResult, + BlobClientSetLegalHoldResult, BlobClientSetTagsResult, BlobClientStartCopyFromUrlResult, BlobClientUndeleteResult, BlobContainerClientAcquireLeaseResult, BlobContainerClientBreakLeaseResult, BlobContainerClientChangeLeaseResult, - BlobContainerClientCreateResult, BlobContainerClientDeleteResult, BlobContainerClientGetAccountInfoResult, BlobContainerClientGetPropertiesResult, BlobContainerClientReleaseLeaseResult, BlobContainerClientRenameResult, BlobContainerClientRenewLeaseResult, BlobContainerClientRestoreResult, - BlobContainerClientSetAccessPolicyResult, BlobContainerClientSetMetadataResult, - BlobImmutabilityPolicyMode, BlobServiceClientGetAccountInfoResult, - BlobServiceClientSetPropertiesResult, BlobTags, BlobType, BlockBlobClientCommitBlockListResult, - BlockBlobClientPutBlobFromUrlResult, BlockBlobClientQueryResult, - BlockBlobClientStageBlockFromUrlResult, BlockBlobClientStageBlockResult, - BlockBlobClientUploadResult, BlockList, CopyStatus, FilterBlobSegment, LeaseDuration, - LeaseState, LeaseStatus, ListBlobsFlatSegmentResponse, ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, PageBlobClientClearPagesResult, + BlobContainerClientSetAccessPolicyResult, BlobImmutabilityPolicyMode, + BlobServiceClientGetAccountInfoResult, BlobTags, BlobType, + BlockBlobClientCommitBlockListResult, BlockBlobClientPutBlobFromUrlResult, + BlockBlobClientQueryResult, BlockBlobClientStageBlockFromUrlResult, + BlockBlobClientStageBlockResult, BlockBlobClientUploadResult, BlockList, CopyStatus, + FilterBlobSegment, LeaseDuration, LeaseState, LeaseStatus, ListBlobsFlatSegmentResponse, + ListBlobsHierarchySegmentResponse, PageBlobClientClearPagesResult, PageBlobClientCopyIncrementalResult, PageBlobClientCreateResult, PageBlobClientResizeResult, PageBlobClientUpdateSequenceNumberResult, PageBlobClientUploadPagesFromUrlResult, PageBlobClientUploadPagesResult, PageList, PublicAccessType, RehydratePriority, - SignedIdentifier, SkuName, StorageServiceProperties, StorageServiceStats, UserDelegationKey, + SignedIdentifier, SkuName, StorageServiceStats, UserDelegationKey, }; use azure_core::{ base64, date, @@ -113,7 +110,6 @@ const SERVER_ENCRYPTED: HeaderName = HeaderName::from_static("x-ms-server-encryp const SKU_NAME: HeaderName = HeaderName::from_static("x-ms-sku-name"); const SNAPSHOT: HeaderName = HeaderName::from_static("x-ms-snapshot"); const TAG_COUNT: HeaderName = HeaderName::from_static("x-ms-tag-count"); -const VERSION: HeaderName = HeaderName::from_static("x-ms-version"); const VERSION_ID: HeaderName = HeaderName::from_static("x-ms-version-id"); /// Provides access to typed response headers for `AppendBlobClient::append_block_from_url()` @@ -128,7 +124,6 @@ pub trait AppendBlobClientAppendBlockFromUrlResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; } impl AppendBlobClientAppendBlockFromUrlResultHeaders @@ -193,11 +188,6 @@ impl AppendBlobClientAppendBlockFromUrlResultHeaders fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `AppendBlobClient::append_block()` @@ -212,7 +202,6 @@ pub trait AppendBlobClientAppendBlockResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; } impl AppendBlobClientAppendBlockResultHeaders @@ -277,11 +266,6 @@ impl AppendBlobClientAppendBlockResultHeaders fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `AppendBlobClient::create()` @@ -293,7 +277,6 @@ pub trait AppendBlobClientCreateResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -340,11 +323,6 @@ impl AppendBlobClientCreateResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -358,7 +336,6 @@ pub trait AppendBlobClientSealResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn is_sealed(&self) -> Result>; - fn version(&self) -> Result>; } impl AppendBlobClientSealResultHeaders for Response { @@ -383,17 +360,11 @@ impl AppendBlobClientSealResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &BLOB_SEALED) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::abort_copy_from_url()` pub trait BlobClientAbortCopyFromUrlResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientAbortCopyFromUrlResultHeaders @@ -403,11 +374,6 @@ impl BlobClientAbortCopyFromUrlResultHeaders fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::acquire_lease()` @@ -416,7 +382,6 @@ pub trait BlobClientAcquireLeaseResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn lease_id(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientAcquireLeaseResultHeaders for Response { @@ -441,11 +406,6 @@ impl BlobClientAcquireLeaseResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::break_lease()` @@ -454,7 +414,6 @@ pub trait BlobClientBreakLeaseResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn lease_time(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientBreakLeaseResultHeaders for Response { @@ -479,11 +438,6 @@ impl BlobClientBreakLeaseResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &LEASE_TIME) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::change_lease()` @@ -492,7 +446,6 @@ pub trait BlobClientChangeLeaseResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn lease_id(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientChangeLeaseResultHeaders for Response { @@ -517,11 +470,6 @@ impl BlobClientChangeLeaseResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::copy_from_url()` @@ -533,7 +481,6 @@ pub trait BlobClientCopyFromUrlResultHeaders: private::Sealed { fn content_crc64(&self) -> Result>>; fn copy_id(&self) -> Result>; fn encryption_scope(&self) -> Result>; - fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -581,11 +528,6 @@ impl BlobClientCopyFromUrlResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -600,7 +542,6 @@ pub trait BlobClientCreateSnapshotResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn snapshot(&self) -> Result>; - fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -634,11 +575,6 @@ impl BlobClientCreateSnapshotResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -649,7 +585,6 @@ impl BlobClientCreateSnapshotResultHeaders for Response Result>; - fn version(&self) -> Result>; } impl BlobClientDeleteImmutabilityPolicyResultHeaders @@ -659,23 +594,6 @@ impl BlobClientDeleteImmutabilityPolicyResultHeaders fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } -} - -/// Provides access to typed response headers for `BlobClient::delete()` -pub trait BlobClientDeleteResultHeaders: private::Sealed { - fn version(&self) -> Result>; -} - -impl BlobClientDeleteResultHeaders for Response { - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::download()` @@ -717,7 +635,6 @@ pub trait BlobClientDownloadResultHeaders: private::Sealed { fn object_replication_policy_id(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn tag_count(&self) -> Result>; - fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -961,11 +878,6 @@ impl BlobClientDownloadResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -979,7 +891,6 @@ pub trait BlobClientGetAccountInfoResultHeaders: private::Sealed { fn account_kind(&self) -> Result>; fn is_hierarchical_namespace_enabled(&self) -> Result>; fn sku_name(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientGetAccountInfoResultHeaders for Response { @@ -1002,11 +913,6 @@ impl BlobClientGetAccountInfoResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &SKU_NAME) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::get_properties()` @@ -1053,7 +959,6 @@ pub trait BlobClientGetPropertiesResultHeaders: private::Sealed { fn rehydrate_priority(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; fn tag_count(&self) -> Result>; - fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -1326,11 +1231,6 @@ impl BlobClientGetPropertiesResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -1343,7 +1243,6 @@ pub trait BlobClientReleaseLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientReleaseLeaseResultHeaders for Response { @@ -1363,11 +1262,6 @@ impl BlobClientReleaseLeaseResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &ETAG) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::renew_lease()` @@ -1376,7 +1270,6 @@ pub trait BlobClientRenewLeaseResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn lease_id(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientRenewLeaseResultHeaders for Response { @@ -1401,11 +1294,6 @@ impl BlobClientRenewLeaseResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::set_expiry()` @@ -1413,7 +1301,6 @@ pub trait BlobClientSetExpiryResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientSetExpiryResultHeaders for Response { @@ -1433,11 +1320,6 @@ impl BlobClientSetExpiryResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &ETAG) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::set_immutability_policy()` @@ -1445,7 +1327,6 @@ pub trait BlobClientSetImmutabilityPolicyResultHeaders: private::Sealed { fn date(&self) -> Result>; fn immutability_policy_mode(&self) -> Result>; fn immutability_policy_expires_on(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientSetImmutabilityPolicyResultHeaders @@ -1467,18 +1348,12 @@ impl BlobClientSetImmutabilityPolicyResultHeaders date::parse_rfc7231(h.as_str()) }) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::set_legal_hold()` pub trait BlobClientSetLegalHoldResultHeaders: private::Sealed { fn date(&self) -> Result>; fn legal_hold(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientSetLegalHoldResultHeaders for Response { @@ -1491,41 +1366,11 @@ impl BlobClientSetLegalHoldResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &LEGAL_HOLD) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } -} - -/// Provides access to typed response headers for `BlobClient::set_metadata()` -pub trait BlobClientSetMetadataResultHeaders: private::Sealed { - fn version(&self) -> Result>; -} - -impl BlobClientSetMetadataResultHeaders for Response { - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } -} - -/// Provides access to typed response headers for `BlobClient::set_properties()` -pub trait BlobClientSetPropertiesResultHeaders: private::Sealed { - fn version(&self) -> Result>; -} - -impl BlobClientSetPropertiesResultHeaders for Response { - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::set_tags()` pub trait BlobClientSetTagsResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientSetTagsResultHeaders for Response { @@ -1533,23 +1378,6 @@ impl BlobClientSetTagsResultHeaders for Response Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } -} - -/// Provides access to typed response headers for `BlobClient::set_tier()` -pub trait BlobClientSetTierResultHeaders: private::Sealed { - fn version(&self) -> Result>; -} - -impl BlobClientSetTierResultHeaders for Response { - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::start_copy_from_url()` @@ -1559,7 +1387,6 @@ pub trait BlobClientStartCopyFromUrlResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn copy_id(&self) -> Result>; fn copy_status(&self) -> Result>; - fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -1594,11 +1421,6 @@ impl BlobClientStartCopyFromUrlResultHeaders Headers::get_optional_as(self.headers(), ©_STATUS) } - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -1609,7 +1431,6 @@ impl BlobClientStartCopyFromUrlResultHeaders /// Provides access to typed response headers for `BlobClient::undelete()` pub trait BlobClientUndeleteResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobClientUndeleteResultHeaders for Response { @@ -1617,11 +1438,6 @@ impl BlobClientUndeleteResultHeaders for Response Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::acquire_lease()` @@ -1630,7 +1446,6 @@ pub trait BlobContainerClientAcquireLeaseResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn lease_id(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobContainerClientAcquireLeaseResultHeaders @@ -1657,11 +1472,6 @@ impl BlobContainerClientAcquireLeaseResultHeaders fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::break_lease()` @@ -1671,7 +1481,6 @@ pub trait BlobContainerClientBreakLeaseResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn lease_id(&self) -> Result>; fn lease_time(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobContainerClientBreakLeaseResultHeaders @@ -1703,11 +1512,6 @@ impl BlobContainerClientBreakLeaseResultHeaders fn lease_time(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_TIME) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::change_lease()` @@ -1716,7 +1520,6 @@ pub trait BlobContainerClientChangeLeaseResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn lease_id(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobContainerClientChangeLeaseResultHeaders @@ -1743,39 +1546,6 @@ impl BlobContainerClientChangeLeaseResultHeaders fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } -} - -/// Provides access to typed response headers for `BlobContainerClient::create()` -pub trait BlobContainerClientCreateResultHeaders: private::Sealed { - fn version(&self) -> Result>; -} - -impl BlobContainerClientCreateResultHeaders - for Response -{ - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } -} - -/// Provides access to typed response headers for `BlobContainerClient::delete()` -pub trait BlobContainerClientDeleteResultHeaders: private::Sealed { - fn version(&self) -> Result>; -} - -impl BlobContainerClientDeleteResultHeaders - for Response -{ - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::get_account_info()` @@ -1784,7 +1554,6 @@ pub trait BlobContainerClientGetAccountInfoResultHeaders: private::Sealed { fn account_kind(&self) -> Result>; fn is_hierarchical_namespace_enabled(&self) -> Result>; fn sku_name(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobContainerClientGetAccountInfoResultHeaders @@ -1809,11 +1578,6 @@ impl BlobContainerClientGetAccountInfoResultHeaders fn sku_name(&self) -> Result> { Headers::get_optional_as(self.headers(), &SKU_NAME) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::get_properties()` @@ -1830,7 +1594,6 @@ pub trait BlobContainerClientGetPropertiesResultHeaders: private::Sealed { fn lease_state(&self) -> Result>; fn lease_status(&self) -> Result>; fn metadata(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobContainerClientGetPropertiesResultHeaders @@ -1906,11 +1669,6 @@ impl BlobContainerClientGetPropertiesResultHeaders } Ok(values) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::release_lease()` @@ -1918,7 +1676,6 @@ pub trait BlobContainerClientReleaseLeaseResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobContainerClientReleaseLeaseResultHeaders @@ -1940,17 +1697,11 @@ impl BlobContainerClientReleaseLeaseResultHeaders fn etag(&self) -> Result> { Headers::get_optional_as(self.headers(), &ETAG) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::rename()` pub trait BlobContainerClientRenameResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobContainerClientRenameResultHeaders @@ -1960,11 +1711,6 @@ impl BlobContainerClientRenameResultHeaders fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::renew_lease()` @@ -1973,7 +1719,6 @@ pub trait BlobContainerClientRenewLeaseResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn lease_id(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobContainerClientRenewLeaseResultHeaders @@ -2000,17 +1745,11 @@ impl BlobContainerClientRenewLeaseResultHeaders fn lease_id(&self) -> Result> { Headers::get_optional_as(self.headers(), &LEASE_ID) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::restore()` pub trait BlobContainerClientRestoreResultHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobContainerClientRestoreResultHeaders @@ -2020,11 +1759,6 @@ impl BlobContainerClientRestoreResultHeaders fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::set_access_policy()` @@ -2032,7 +1766,6 @@ pub trait BlobContainerClientSetAccessPolicyResultHeaders: private::Sealed { fn date(&self) -> Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobContainerClientSetAccessPolicyResultHeaders @@ -2054,25 +1787,6 @@ impl BlobContainerClientSetAccessPolicyResultHeaders fn etag(&self) -> Result> { Headers::get_optional_as(self.headers(), &ETAG) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } -} - -/// Provides access to typed response headers for `BlobContainerClient::set_metadata()` -pub trait BlobContainerClientSetMetadataResultHeaders: private::Sealed { - fn version(&self) -> Result>; -} - -impl BlobContainerClientSetMetadataResultHeaders - for Response -{ - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobServiceClient::get_account_info()` @@ -2081,7 +1795,6 @@ pub trait BlobServiceClientGetAccountInfoResultHeaders: private::Sealed { fn account_kind(&self) -> Result>; fn is_hierarchical_namespace_enabled(&self) -> Result>; fn sku_name(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobServiceClientGetAccountInfoResultHeaders @@ -2106,31 +1819,11 @@ impl BlobServiceClientGetAccountInfoResultHeaders fn sku_name(&self) -> Result> { Headers::get_optional_as(self.headers(), &SKU_NAME) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } -} - -/// Provides access to typed response headers for `BlobServiceClient::set_properties()` -pub trait BlobServiceClientSetPropertiesResultHeaders: private::Sealed { - fn version(&self) -> Result>; -} - -impl BlobServiceClientSetPropertiesResultHeaders - for Response -{ - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobClient::get_tags()` pub trait BlobTagsHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl BlobTagsHeaders for Response { @@ -2138,11 +1831,6 @@ impl BlobTagsHeaders for Response { fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlockBlobClient::commit_block_list()` @@ -2154,7 +1842,6 @@ pub trait BlockBlobClientCommitBlockListResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -2205,11 +1892,6 @@ impl BlockBlobClientCommitBlockListResultHeaders Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -2226,7 +1908,6 @@ pub trait BlockBlobClientPutBlobFromUrlResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -2275,11 +1956,6 @@ impl BlockBlobClientPutBlobFromUrlResultHeaders Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -2318,7 +1994,6 @@ pub trait BlockBlobClientQueryResultHeaders: private::Sealed { fn lease_status(&self) -> Result>; fn metadata(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; } impl BlockBlobClientQueryResultHeaders for Response { @@ -2505,11 +2180,6 @@ impl BlockBlobClientQueryResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &SERVER_ENCRYPTED) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlockBlobClient::stage_block_from_url()` @@ -2520,7 +2190,6 @@ pub trait BlockBlobClientStageBlockFromUrlResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; } impl BlockBlobClientStageBlockFromUrlResultHeaders @@ -2562,11 +2231,6 @@ impl BlockBlobClientStageBlockFromUrlResultHeaders fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlockBlobClient::stage_block()` @@ -2576,7 +2240,6 @@ pub trait BlockBlobClientStageBlockResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; } impl BlockBlobClientStageBlockResultHeaders @@ -2613,11 +2276,6 @@ impl BlockBlobClientStageBlockResultHeaders fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlockBlobClient::upload()` @@ -2628,7 +2286,6 @@ pub trait BlockBlobClientUploadResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -2670,11 +2327,6 @@ impl BlockBlobClientUploadResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -2687,7 +2339,6 @@ pub trait BlockListHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_content_length(&self) -> Result>; - fn version(&self) -> Result>; } impl BlockListHeaders for Response { @@ -2708,11 +2359,6 @@ impl BlockListHeaders for Response { fn blob_content_length(&self) -> Result> { Headers::get_optional_as(self.headers(), &BLOB_CONTENT_LENGTH) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for the following methods: @@ -2720,7 +2366,6 @@ impl BlockListHeaders for Response { /// * `BlobServiceClient::filter_blobs()` pub trait FilterBlobSegmentHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl FilterBlobSegmentHeaders for Response { @@ -2728,17 +2373,11 @@ impl FilterBlobSegmentHeaders for Response { fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::list_blob_flat_segment()` pub trait ListBlobsFlatSegmentResponseHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl ListBlobsFlatSegmentResponseHeaders for Response { @@ -2746,17 +2385,11 @@ impl ListBlobsFlatSegmentResponseHeaders for Response Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::list_blob_hierarchy_segment()` pub trait ListBlobsHierarchySegmentResponseHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl ListBlobsHierarchySegmentResponseHeaders @@ -2766,23 +2399,6 @@ impl ListBlobsHierarchySegmentResponseHeaders fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } -} - -/// Provides access to typed response headers for `BlobServiceClient::list_containers_segment()` -pub trait ListContainersSegmentResponseHeaders: private::Sealed { - fn version(&self) -> Result>; -} - -impl ListContainersSegmentResponseHeaders for Response { - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `PageBlobClient::clear_pages()` @@ -2793,7 +2409,6 @@ pub trait PageBlobClientClearPagesResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; fn content_crc64(&self) -> Result>>; - fn version(&self) -> Result>; } impl PageBlobClientClearPagesResultHeaders for Response { @@ -2831,11 +2446,6 @@ impl PageBlobClientClearPagesResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `PageBlobClient::copy_incremental()` @@ -2845,7 +2455,6 @@ pub trait PageBlobClientCopyIncrementalResultHeaders: private::Sealed { fn etag(&self) -> Result>; fn copy_id(&self) -> Result>; fn copy_status(&self) -> Result>; - fn version(&self) -> Result>; } impl PageBlobClientCopyIncrementalResultHeaders @@ -2878,11 +2487,6 @@ impl PageBlobClientCopyIncrementalResultHeaders fn copy_status(&self) -> Result> { Headers::get_optional_as(self.headers(), ©_STATUS) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `PageBlobClient::create()` @@ -2894,7 +2498,6 @@ pub trait PageBlobClientCreateResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; fn version_id(&self) -> Result>; } @@ -2941,11 +2544,6 @@ impl PageBlobClientCreateResultHeaders for Response Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } - /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicates the blob /// version, and may be used in subsequent requests to access this version of the blob. fn version_id(&self) -> Result> { @@ -2959,7 +2557,6 @@ pub trait PageBlobClientResizeResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; - fn version(&self) -> Result>; } impl PageBlobClientResizeResultHeaders for Response { @@ -2984,11 +2581,6 @@ impl PageBlobClientResizeResultHeaders for Response Result> { Headers::get_optional_as(self.headers(), &BLOB_SEQUENCE_NUMBER) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `PageBlobClient::update_sequence_number()` @@ -2997,7 +2589,6 @@ pub trait PageBlobClientUpdateSequenceNumberResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_sequence_number(&self) -> Result>; - fn version(&self) -> Result>; } impl PageBlobClientUpdateSequenceNumberResultHeaders @@ -3024,11 +2615,6 @@ impl PageBlobClientUpdateSequenceNumberResultHeaders fn blob_sequence_number(&self) -> Result> { Headers::get_optional_as(self.headers(), &BLOB_SEQUENCE_NUMBER) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `PageBlobClient::upload_pages_from_url()` @@ -3042,7 +2628,6 @@ pub trait PageBlobClientUploadPagesFromUrlResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; } impl PageBlobClientUploadPagesFromUrlResultHeaders @@ -3101,11 +2686,6 @@ impl PageBlobClientUploadPagesFromUrlResultHeaders fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `PageBlobClient::upload_pages()` @@ -3119,7 +2699,6 @@ pub trait PageBlobClientUploadPagesResultHeaders: private::Sealed { fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&self) -> Result>; fn is_server_encrypted(&self) -> Result>; - fn version(&self) -> Result>; } impl PageBlobClientUploadPagesResultHeaders @@ -3178,11 +2757,6 @@ impl PageBlobClientUploadPagesResultHeaders fn is_server_encrypted(&self) -> Result> { Headers::get_optional_as(self.headers(), &REQUEST_SERVER_ENCRYPTED) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for the following methods: @@ -3193,7 +2767,6 @@ pub trait PageListHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_content_length(&self) -> Result>; - fn version(&self) -> Result>; } impl PageListHeaders for Response { @@ -3219,29 +2792,11 @@ impl PageListHeaders for Response { fn blob_content_length(&self) -> Result> { Headers::get_optional_as(self.headers(), &BLOB_CONTENT_LENGTH) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } -} - -/// Provides access to typed response headers for `BlobServiceClient::get_properties()` -pub trait StorageServicePropertiesHeaders: private::Sealed { - fn version(&self) -> Result>; -} - -impl StorageServicePropertiesHeaders for Response { - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobServiceClient::get_statistics()` pub trait StorageServiceStatsHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl StorageServiceStatsHeaders for Response { @@ -3249,17 +2804,11 @@ impl StorageServiceStatsHeaders for Response { fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobServiceClient::get_user_delegation_key()` pub trait UserDelegationKeyHeaders: private::Sealed { fn date(&self) -> Result>; - fn version(&self) -> Result>; } impl UserDelegationKeyHeaders for Response { @@ -3267,11 +2816,6 @@ impl UserDelegationKeyHeaders for Response { fn date(&self) -> Result> { Headers::get_optional_with(self.headers(), &DATE, |h| date::parse_rfc7231(h.as_str())) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } /// Provides access to typed response headers for `BlobContainerClient::get_access_policy()` @@ -3280,7 +2824,6 @@ pub trait VecSignedIdentifierHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn access(&self) -> Result>; - fn version(&self) -> Result>; } impl VecSignedIdentifierHeaders for Response, XmlFormat> { @@ -3305,11 +2848,6 @@ impl VecSignedIdentifierHeaders for Response, XmlFormat> { fn access(&self) -> Result> { Headers::get_optional_as(self.headers(), &BLOB_PUBLIC_ACCESS) } - - /// Specifies the version of the operation to use for this request. - fn version(&self) -> Result> { - Headers::get_optional_as(self.headers(), &VERSION) - } } mod private { @@ -3318,29 +2856,25 @@ mod private { AppendBlobClientCreateResult, AppendBlobClientSealResult, BlobClientAbortCopyFromUrlResult, BlobClientAcquireLeaseResult, BlobClientBreakLeaseResult, BlobClientChangeLeaseResult, BlobClientCopyFromUrlResult, BlobClientCreateSnapshotResult, - BlobClientDeleteImmutabilityPolicyResult, BlobClientDeleteResult, BlobClientDownloadResult, + BlobClientDeleteImmutabilityPolicyResult, BlobClientDownloadResult, BlobClientGetAccountInfoResult, BlobClientGetPropertiesResult, BlobClientReleaseLeaseResult, BlobClientRenewLeaseResult, BlobClientSetExpiryResult, BlobClientSetImmutabilityPolicyResult, BlobClientSetLegalHoldResult, - BlobClientSetMetadataResult, BlobClientSetPropertiesResult, BlobClientSetTagsResult, - BlobClientSetTierResult, BlobClientStartCopyFromUrlResult, BlobClientUndeleteResult, + BlobClientSetTagsResult, BlobClientStartCopyFromUrlResult, BlobClientUndeleteResult, BlobContainerClientAcquireLeaseResult, BlobContainerClientBreakLeaseResult, - BlobContainerClientChangeLeaseResult, BlobContainerClientCreateResult, - BlobContainerClientDeleteResult, BlobContainerClientGetAccountInfoResult, + BlobContainerClientChangeLeaseResult, BlobContainerClientGetAccountInfoResult, BlobContainerClientGetPropertiesResult, BlobContainerClientReleaseLeaseResult, BlobContainerClientRenameResult, BlobContainerClientRenewLeaseResult, BlobContainerClientRestoreResult, BlobContainerClientSetAccessPolicyResult, - BlobContainerClientSetMetadataResult, BlobServiceClientGetAccountInfoResult, - BlobServiceClientSetPropertiesResult, BlobTags, BlockBlobClientCommitBlockListResult, + BlobServiceClientGetAccountInfoResult, BlobTags, BlockBlobClientCommitBlockListResult, BlockBlobClientPutBlobFromUrlResult, BlockBlobClientQueryResult, BlockBlobClientStageBlockFromUrlResult, BlockBlobClientStageBlockResult, BlockBlobClientUploadResult, BlockList, FilterBlobSegment, ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, ListContainersSegmentResponse, - PageBlobClientClearPagesResult, PageBlobClientCopyIncrementalResult, - PageBlobClientCreateResult, PageBlobClientResizeResult, - PageBlobClientUpdateSequenceNumberResult, PageBlobClientUploadPagesFromUrlResult, - PageBlobClientUploadPagesResult, PageList, SignedIdentifier, StorageServiceProperties, - StorageServiceStats, UserDelegationKey, + ListBlobsHierarchySegmentResponse, PageBlobClientClearPagesResult, + PageBlobClientCopyIncrementalResult, PageBlobClientCreateResult, + PageBlobClientResizeResult, PageBlobClientUpdateSequenceNumberResult, + PageBlobClientUploadPagesFromUrlResult, PageBlobClientUploadPagesResult, PageList, + SignedIdentifier, StorageServiceStats, UserDelegationKey, }; use azure_core::http::{NoFormat, Response, XmlFormat}; @@ -3357,7 +2891,6 @@ mod private { impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} - impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} @@ -3366,17 +2899,12 @@ mod private { impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} impl Sealed for Response {} - impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} - impl Sealed for Response {} - impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} @@ -3384,9 +2912,7 @@ mod private { impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} - impl Sealed for Response {} impl Sealed for Response {} - impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} @@ -3398,7 +2924,6 @@ mod private { impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} - impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} @@ -3407,7 +2932,6 @@ mod private { impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} - impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response {} impl Sealed for Response, XmlFormat> {} diff --git a/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs b/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs index 48739da20c..32c8a1577c 100644 --- a/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs +++ b/sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs @@ -124,10 +124,6 @@ pub struct BlobClientCreateSnapshotResult; #[derive(SafeDebug)] pub struct BlobClientDeleteImmutabilityPolicyResult; -/// Contains results for `BlobClient::delete()` -#[derive(SafeDebug)] -pub struct BlobClientDeleteResult; - /// Contains results for `BlobClient::download()` #[derive(SafeDebug)] pub struct BlobClientDownloadResult; @@ -160,22 +156,10 @@ pub struct BlobClientSetImmutabilityPolicyResult; #[derive(SafeDebug)] pub struct BlobClientSetLegalHoldResult; -/// Contains results for `BlobClient::set_metadata()` -#[derive(SafeDebug)] -pub struct BlobClientSetMetadataResult; - -/// Contains results for `BlobClient::set_properties()` -#[derive(SafeDebug)] -pub struct BlobClientSetPropertiesResult; - /// Contains results for `BlobClient::set_tags()` #[derive(SafeDebug)] pub struct BlobClientSetTagsResult; -/// Contains results for `BlobClient::set_tier()` -#[derive(SafeDebug)] -pub struct BlobClientSetTierResult; - /// Contains results for `BlobClient::start_copy_from_url()` #[derive(SafeDebug)] pub struct BlobClientStartCopyFromUrlResult; @@ -196,14 +180,6 @@ pub struct BlobContainerClientBreakLeaseResult; #[derive(SafeDebug)] pub struct BlobContainerClientChangeLeaseResult; -/// Contains results for `BlobContainerClient::create()` -#[derive(SafeDebug)] -pub struct BlobContainerClientCreateResult; - -/// Contains results for `BlobContainerClient::delete()` -#[derive(SafeDebug)] -pub struct BlobContainerClientDeleteResult; - /// Contains results for `BlobContainerClient::get_account_info()` #[derive(SafeDebug)] pub struct BlobContainerClientGetAccountInfoResult; @@ -232,10 +208,6 @@ pub struct BlobContainerClientRestoreResult; #[derive(SafeDebug)] pub struct BlobContainerClientSetAccessPolicyResult; -/// Contains results for `BlobContainerClient::set_metadata()` -#[derive(SafeDebug)] -pub struct BlobContainerClientSetMetadataResult; - /// The blob flat list segment. #[derive(Clone, Default, Deserialize, SafeDebug, Serialize)] #[non_exhaustive] @@ -575,10 +547,6 @@ pub struct BlobPropertiesInternal { #[derive(SafeDebug)] pub struct BlobServiceClientGetAccountInfoResult; -/// Contains results for `BlobServiceClient::set_properties()` -#[derive(SafeDebug)] -pub struct BlobServiceClientSetPropertiesResult; - /// The blob tags. #[derive(Clone, Default, Deserialize, SafeDebug, Serialize)] #[serde(rename = "Tag")] diff --git a/sdk/storage/azure_storage_blob/src/lib.rs b/sdk/storage/azure_storage_blob/src/lib.rs index 3ee0c3e402..efb4c243cb 100644 --- a/sdk/storage/azure_storage_blob/src/lib.rs +++ b/sdk/storage/azure_storage_blob/src/lib.rs @@ -15,22 +15,20 @@ pub use clients::*; pub mod models { pub use crate::generated::models::{ - AccessTier, ArchiveStatus, BlobClientDeleteOptions, BlobClientDeleteResult, - BlobClientDownloadOptions, BlobClientDownloadResult, BlobClientDownloadResultHeaders, - BlobClientGetPropertiesOptions, BlobClientGetPropertiesResult, - BlobClientGetPropertiesResultHeaders, BlobClientSetMetadataOptions, - BlobClientSetMetadataResult, BlobClientSetPropertiesOptions, BlobClientSetPropertiesResult, - BlobClientSetTierOptions, BlobClientSetTierResult, BlobContainerClientCreateOptions, - BlobContainerClientCreateResult, BlobContainerClientDeleteOptions, - BlobContainerClientDeleteResult, BlobContainerClientGetPropertiesOptions, - BlobContainerClientGetPropertiesResult, BlobContainerClientGetPropertiesResultHeaders, + AccessTierOptional, ArchiveStatus, BlobClientDeleteOptions, BlobClientDownloadOptions, + BlobClientDownloadResult, BlobClientDownloadResultHeaders, BlobClientGetPropertiesOptions, + BlobClientGetPropertiesResult, BlobClientGetPropertiesResultHeaders, + BlobClientSetMetadataOptions, BlobClientSetPropertiesOptions, BlobClientSetTierOptions, + BlobContainerClientCreateOptions, BlobContainerClientDeleteOptions, + BlobContainerClientGetPropertiesOptions, BlobContainerClientGetPropertiesResult, + BlobContainerClientGetPropertiesResultHeaders, BlobContainerClientListBlobFlatSegmentOptions, BlobContainerClientSetMetadataOptions, - BlobContainerClientSetMetadataResult, BlobImmutabilityPolicyMode, - BlobServiceClientGetPropertiesOptions, BlobType, BlockBlobClientCommitBlockListOptions, - BlockBlobClientCommitBlockListResult, BlockBlobClientGetBlockListOptions, - BlockBlobClientStageBlockOptions, BlockBlobClientStageBlockResult, - BlockBlobClientUploadOptions, BlockBlobClientUploadResult, BlockList, BlockListType, - BlockLookupList, CopyStatus, LeaseState, LeaseStatus, ListBlobsFlatSegmentResponse, - PublicAccessType, RehydratePriority, StorageServiceProperties, + BlobImmutabilityPolicyMode, BlobServiceClientGetPropertiesOptions, BlobType, + BlockBlobClientCommitBlockListOptions, BlockBlobClientCommitBlockListResult, + BlockBlobClientGetBlockListOptions, BlockBlobClientStageBlockOptions, + BlockBlobClientStageBlockResult, BlockBlobClientUploadOptions, BlockBlobClientUploadResult, + BlockList, BlockListType, BlockLookupList, CopyStatus, LeaseState, LeaseStatus, + ListBlobsFlatSegmentResponse, PublicAccessType, RehydratePriority, + StorageServiceProperties, }; } diff --git a/sdk/storage/azure_storage_blob/tests/blob_client.rs b/sdk/storage/azure_storage_blob/tests/blob_client.rs index 16a9d3a2de..ef95fbbb0b 100644 --- a/sdk/storage/azure_storage_blob/tests/blob_client.rs +++ b/sdk/storage/azure_storage_blob/tests/blob_client.rs @@ -7,7 +7,7 @@ use azure_core::{ }; use azure_core_test::{recorded, TestContext}; use azure_storage_blob::models::{ - AccessTier, BlobClientDownloadResultHeaders, BlobClientGetPropertiesResultHeaders, + AccessTierOptional, BlobClientDownloadResultHeaders, BlobClientGetPropertiesResultHeaders, BlobClientSetMetadataOptions, BlobClientSetPropertiesOptions, BlockBlobClientUploadOptions, LeaseState, }; @@ -262,16 +262,16 @@ async fn test_set_access_tier(ctx: TestContext) -> Result<(), Box> { create_test_blob(&blob_client).await?; let original_response = blob_client.get_properties(None).await?; - let og_access_tier = original_response.tier()?; - assert_eq!(AccessTier::Hot, og_access_tier.unwrap()); + let og_access_tier = original_response.access_tier()?; + assert_eq!(AccessTierOptional::Hot.to_string(), og_access_tier.unwrap()); // Set Standard Blob Tier (Cold) - blob_client.set_tier(AccessTier::Cold, None).await?; + blob_client.set_tier(AccessTierOptional::Cold, None).await?; let response = blob_client.get_properties(None).await?; // Assert - let access_tier = response.tier()?; - assert_eq!(AccessTier::Cold, access_tier.unwrap()); + let access_tier = response.access_tier()?; + assert_eq!(AccessTierOptional::Cold.to_string(), access_tier.unwrap()); container_client.delete_container(None).await?; Ok(()) diff --git a/sdk/storage/azure_storage_blob/tsp-location.yaml b/sdk/storage/azure_storage_blob/tsp-location.yaml index 1a8f6e2896..641cc5052a 100644 --- a/sdk/storage/azure_storage_blob/tsp-location.yaml +++ b/sdk/storage/azure_storage_blob/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storage/Microsoft.BlobStorage -commit: d3e25dc2c1868f33cad0a204bf0739d18593b41d +commit: 37843c7f2116830dccd5883d6960bc05c66d30b1 repo: Azure/azure-rest-api-specs additionalDirectories: