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..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, @@ -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); } @@ -366,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); } @@ -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..ee1f5cff93 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(); @@ -173,7 +174,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); } @@ -214,7 +214,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 +273,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 +331,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 +380,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 +448,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 +528,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 +592,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 +631,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 +717,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 +785,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 +900,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 +955,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 +1009,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 +1044,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 +1102,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 +1140,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 +1212,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 +1286,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 +1340,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 +1391,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 +1496,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 +1524,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..204597952b 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(); @@ -125,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)); } @@ -157,7 +157,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 +205,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 +248,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 +294,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 +418,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 +464,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 +556,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 +650,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 +679,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 +722,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 +759,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 +800,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 +839,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 +885,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 +923,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..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, @@ -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(); @@ -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); } @@ -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(); @@ -728,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); } @@ -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..6cf91816f3 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, @@ -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); } @@ -318,7 +316,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); } @@ -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..c71839d2ad 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, @@ -152,6 +152,13 @@ create_extensible_enum!( ); create_extensible_enum!( + #[doc = r#"/// The file share token intent types."#] + FileShareTokenIntent, + #[doc = r#"/// The file share token intent is backup."#] + (Backup, "backup") +); + +create_enum!( #[doc = r#"/// The filter blobs includes."#] FilterBlobsIncludeItem, #[doc = r#"/// The filter includes no versions."#] @@ -171,7 +178,7 @@ create_extensible_enum!( (Unavailable, "unavailable") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The lease duration."#] LeaseDuration, #[doc = r#"/// The lease is of fixed duration."#] @@ -180,7 +187,7 @@ create_extensible_enum!( (Infinite, "infinite") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The lease state."#] LeaseState, #[doc = r#"/// The lease is available."#] @@ -195,7 +202,7 @@ create_extensible_enum!( (Leased, "leased") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The lease status."#] LeaseStatus, #[doc = r#"/// The lease is locked."#] @@ -204,7 +211,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."#] @@ -229,7 +236,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"#] @@ -276,14 +283,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."#] @@ -306,7 +313,7 @@ create_extensible_enum!( (Standard, "Standard") ); -create_extensible_enum!( +create_enum!( #[doc = r#"/// The sequence number actions."#] SequenceNumberActionType, #[doc = r#"/// Increment the sequence number."#] @@ -317,7 +324,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 9199549c01..6746ad635c 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, }; @@ -69,6 +73,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"); @@ -106,9 +112,12 @@ 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_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"); @@ -121,13 +130,15 @@ pub trait AppendBlobClientAppendBlockFromUrlResultHeaders: private::Sealed { fn blob_append_offset(&self) -> Result>; fn blob_committed_block_count(&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 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. @@ -170,6 +181,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> { @@ -205,7 +226,9 @@ pub trait AppendBlobClientAppendBlockResultHeaders: private::Sealed { 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>> { @@ -284,7 +307,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>> { @@ -342,7 +365,7 @@ pub trait AppendBlobClientSealResultHeaders: private::Sealed { fn is_sealed(&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())) @@ -371,7 +394,9 @@ pub trait BlobClientAbortCopyFromUrlResultHeaders: private::Sealed { fn date(&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())) @@ -386,7 +411,7 @@ pub trait BlobClientAcquireLeaseResultHeaders: private::Sealed { fn lease_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())) @@ -418,7 +443,7 @@ pub trait BlobClientBreakLeaseResultHeaders: private::Sealed { fn lease_time(&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())) @@ -450,7 +475,7 @@ pub trait BlobClientChangeLeaseResultHeaders: private::Sealed { fn lease_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())) @@ -482,12 +507,14 @@ pub trait BlobClientCopyFromUrlResultHeaders: private::Sealed { fn etag(&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 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>> { @@ -524,6 +551,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) @@ -553,7 +590,7 @@ pub trait BlobClientCreateSnapshotResultHeaders: private::Sealed { 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())) @@ -596,7 +633,7 @@ pub trait BlobClientDeleteImmutabilityPolicyResultHeaders: private::Sealed { } 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> { @@ -604,6 +641,18 @@ impl BlobClientDeleteImmutabilityPolicyResultHeaders } } +/// Provides access to typed response headers for `BlobClient::delete()` +pub trait BlobClientDeleteResultHeaders: private::Sealed { + fn date(&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())) + } +} + /// Provides access to typed response headers for `BlobClient::download()` pub trait BlobClientDownloadResultHeaders: private::Sealed { fn accept_ranges(&self) -> Result>; @@ -643,11 +692,13 @@ pub trait BlobClientDownloadResultHeaders: private::Sealed { fn object_replication_rules(&self) -> Result>; fn object_replication_policy_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) @@ -884,7 +935,18 @@ impl BlobClientDownloadResultHeaders for Response { /// 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 @@ -907,7 +969,7 @@ pub trait BlobClientGetAccountInfoResultHeaders: private::Sealed { 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())) @@ -931,12 +993,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 +1040,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 +1080,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 +1309,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 @@ -1257,7 +1331,7 @@ pub trait BlobClientReleaseLeaseResultHeaders: private::Sealed { fn etag(&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())) @@ -1284,7 +1358,7 @@ pub trait BlobClientRenewLeaseResultHeaders: private::Sealed { fn lease_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())) @@ -1315,7 +1389,7 @@ pub trait BlobClientSetExpiryResultHeaders: private::Sealed { fn etag(&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())) @@ -1342,7 +1416,7 @@ pub trait BlobClientSetImmutabilityPolicyResultHeaders: private::Sealed { } 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> { @@ -1368,7 +1442,7 @@ pub trait BlobClientSetLegalHoldResultHeaders: private::Sealed { fn legal_hold(&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())) @@ -1380,12 +1454,111 @@ impl BlobClientSetLegalHoldResultHeaders for Response Result>; + fn last_modified(&self) -> Result>; + fn etag(&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 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) + } + + /// 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) + } + + /// 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>; +} + +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) + } +} + /// Provides access to typed response headers for `BlobClient::set_tags()` pub trait BlobClientSetTagsResultHeaders: private::Sealed { fn date(&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())) + } +} + +/// Provides access to typed response headers for `BlobClient::set_tier()` +pub trait BlobClientSetTierResultHeaders: private::Sealed { + fn date(&self) -> Result>; +} + +impl BlobClientSetTierResultHeaders 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())) @@ -1398,11 +1571,15 @@ pub trait BlobClientStartCopyFromUrlResultHeaders: private::Sealed { fn last_modified(&self) -> Result>; fn etag(&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 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())) @@ -1426,6 +1603,16 @@ impl BlobClientStartCopyFromUrlResultHeaders 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) @@ -1443,7 +1630,7 @@ pub trait BlobClientUndeleteResultHeaders: private::Sealed { fn date(&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())) @@ -1459,7 +1646,7 @@ pub trait BlobContainerClientAcquireLeaseResultHeaders: private::Sealed { } 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> { @@ -1493,7 +1680,9 @@ pub trait BlobContainerClientBreakLeaseResultHeaders: private::Sealed { fn lease_time(&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())) @@ -1531,7 +1720,7 @@ pub trait BlobContainerClientChangeLeaseResultHeaders: private::Sealed { } 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> { @@ -1556,6 +1745,48 @@ 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>; +} + +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) + } +} + +/// Provides access to typed response headers for `BlobContainerClient::delete()` +pub trait BlobContainerClientDeleteResultHeaders: private::Sealed { + fn date(&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())) + } +} + /// Provides access to typed response headers for `BlobContainerClient::get_account_info()` pub trait BlobContainerClientGetAccountInfoResultHeaders: private::Sealed { fn date(&self) -> Result>; @@ -1565,7 +1796,7 @@ pub trait BlobContainerClientGetAccountInfoResultHeaders: private::Sealed { } 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> { @@ -1590,6 +1821,7 @@ 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>; @@ -1605,8 +1837,13 @@ pub trait BlobContainerClientGetPropertiesResultHeaders: private::Sealed { } 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| { @@ -1687,7 +1924,7 @@ pub trait BlobContainerClientReleaseLeaseResultHeaders: private::Sealed { } 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> { @@ -1712,7 +1949,9 @@ pub trait BlobContainerClientRenameResultHeaders: private::Sealed { fn date(&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())) @@ -1727,7 +1966,9 @@ pub trait BlobContainerClientRenewLeaseResultHeaders: private::Sealed { fn lease_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())) @@ -1756,7 +1997,9 @@ pub trait BlobContainerClientRestoreResultHeaders: private::Sealed { fn date(&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())) @@ -1771,7 +2014,35 @@ pub trait BlobContainerClientSetAccessPolicyResultHeaders: private::Sealed { } 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> { + 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) + } +} + +/// 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>; +} + +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> { @@ -1800,7 +2071,7 @@ pub trait BlobServiceClientGetAccountInfoResultHeaders: private::Sealed { } 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> { @@ -1823,6 +2094,20 @@ impl BlobServiceClientGetAccountInfoResultHeaders } } +/// Provides access to typed response headers for `BlobServiceClient::set_properties()` +pub trait BlobServiceClientSetPropertiesResultHeaders: private::Sealed { + fn date(&self) -> Result>; +} + +impl BlobServiceClientSetPropertiesResultHeaders + 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())) + } +} + /// Provides access to typed response headers for `BlobClient::get_tags()` pub trait BlobTagsHeaders: private::Sealed { fn date(&self) -> Result>; @@ -1838,6 +2123,7 @@ 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 content_crc64(&self) -> Result>>; @@ -1848,7 +2134,7 @@ pub trait BlockBlobClientCommitBlockListResultHeaders: private::Sealed { } 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 +2142,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| { @@ -1907,13 +2198,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 +2232,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> { @@ -1996,7 +2301,7 @@ pub trait BlockBlobClientQueryResultHeaders: private::Sealed { 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) @@ -2178,7 +2483,7 @@ impl BlockBlobClientQueryResultHeaders for Response /// 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) } } @@ -2187,13 +2492,15 @@ pub trait BlockBlobClientStageBlockFromUrlResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; fn date(&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 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. @@ -2213,6 +2520,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> { @@ -2236,19 +2553,28 @@ 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 content_crc64(&self) -> Result>>; fn encryption_key_sha256(&self) -> Result>; fn encryption_scope(&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())) + } + /// 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| { @@ -2274,26 +2600,38 @@ impl BlockBlobClientStageBlockResultHeaders for Response 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 encryption_key_sha256(&self) -> Result>; fn encryption_scope(&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| { @@ -2325,6 +2663,11 @@ 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> { @@ -2334,12 +2677,18 @@ impl BlockBlobClientUploadResultHeaders for Response Result>; fn last_modified(&self) -> Result>; fn etag(&self) -> Result>; fn blob_content_length(&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| { @@ -2399,6 +2748,18 @@ impl ListBlobsHierarchySegmentResponseHeaders } } +/// Provides access to typed response headers for `BlobServiceClient::list_containers_segment()` +pub trait ListContainersSegmentResponseHeaders: private::Sealed { + fn date(&self) -> Result>; +} + +impl ListContainersSegmentResponseHeaders 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())) + } +} + /// Provides access to typed response headers for `PageBlobClient::clear_pages()` pub trait PageBlobClientClearPagesResultHeaders: private::Sealed { fn content_md5(&self) -> Result>>; @@ -2409,7 +2770,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>> { @@ -2455,7 +2816,9 @@ pub trait PageBlobClientCopyIncrementalResultHeaders: private::Sealed { fn copy_status(&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())) @@ -2497,7 +2860,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>> { @@ -2555,7 +2918,7 @@ pub trait PageBlobClientResizeResultHeaders: private::Sealed { fn blob_sequence_number(&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())) @@ -2588,7 +2951,7 @@ pub trait PageBlobClientUpdateSequenceNumberResultHeaders: private::Sealed { } 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> { @@ -2621,13 +2984,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 +3029,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> { @@ -2698,7 +3073,9 @@ pub trait PageBlobClientUploadPagesResultHeaders: private::Sealed { 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>> { @@ -2794,6 +3171,18 @@ impl PageListHeaders for Response { } } +/// Provides access to typed response headers for `BlobServiceClient::get_properties()` +pub trait StorageServicePropertiesHeaders: private::Sealed { + fn date(&self) -> Result>; +} + +impl StorageServicePropertiesHeaders 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())) + } +} + /// Provides access to typed response headers for `BlobServiceClient::get_statistics()` pub trait StorageServiceStatsHeaders: private::Sealed { fn date(&self) -> Result>; @@ -2856,82 +3245,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..7db70f77dd 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: 40aa4b227be3b5d2296577bbf2c12f300829705e repo: Azure/azure-rest-api-specs additionalDirectories: