From 3cfbf194768d51b9c7aa2fcf726fdeaaa7f5278c Mon Sep 17 00:00:00 2001 From: microzchang Date: Mon, 20 Feb 2023 14:53:20 +0800 Subject: [PATCH 1/3] storage stg87 protocol layer --- .../storage/files/datalake/rest_client.hpp | 2 + .../src/rest_client.cpp | 8 + .../swagger/README.md | 1 + .../storage/files/shares/rest_client.hpp | 80 +++- .../src/rest_client.cpp | 394 +++++++++++++++--- .../swagger/README.md | 6 +- 6 files changed, 440 insertions(+), 51 deletions(-) diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/rest_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/rest_client.hpp index 79878e13f8..8cf70b3eb8 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/rest_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/rest_client.hpp @@ -99,6 +99,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Nullable EncryptionScope; Nullable CreatedOn; Nullable ExpiresOn; + Nullable EncryptionContext; std::string ETag; }; /** @@ -412,6 +413,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Nullable LeaseDuration; Nullable ExpiryOptions; Nullable ExpiresOn; + Nullable EncryptionContext; }; static Response Create( Core::Http::_internal::HttpPipeline& pipeline, diff --git a/sdk/storage/azure-storage-files-datalake/src/rest_client.cpp b/sdk/storage/azure-storage-files-datalake/src/rest_client.cpp index ff40ae8d81..6aaf59f61b 100644 --- a/sdk/storage/azure-storage-files-datalake/src/rest_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/rest_client.cpp @@ -126,6 +126,10 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { vectorElement2.ExpiresOn = var0["expiryTime"].get(); } + if (var0.count("EncryptionContext") != 0) + { + vectorElement2.EncryptionContext = var0["EncryptionContext"].get(); + } if (var0.count("etag") != 0) { vectorElement2.ETag = var0["etag"].get(); @@ -297,6 +301,10 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { request.SetHeader("x-ms-expiry-time", options.ExpiresOn.Value()); } + if (options.EncryptionContext.HasValue() && !options.EncryptionContext.Value().empty()) + { + request.SetHeader("x-ms-encryption-context", options.EncryptionContext.Value()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) diff --git a/sdk/storage/azure-storage-files-datalake/swagger/README.md b/sdk/storage/azure-storage-files-datalake/swagger/README.md index 467d8e1890..55560fbfb6 100644 --- a/sdk/storage/azure-storage-files-datalake/swagger/README.md +++ b/sdk/storage/azure-storage-files-datalake/swagger/README.md @@ -234,6 +234,7 @@ directive: $.Path.properties["contentLength"]["x-ms-client-name"] = "FileSize"; $.Path.properties["isDirectory"]["x-ms-client-default"] = false; $.Path.properties["EncryptionScope"]["x-nullable"] = true; + $.Path.properties["EncryptionContext"]["x-nullable"] = true; $.Path.properties["creationTime"] = {"type": "string", "x-ms-client-name": "CreatedOn", "x-nullable": true}; $.Path.properties["expiryTime"] = {"type": "string", "x-ms-client-name": "ExpiresOn", "x-nullable": true}; $.Path.properties["etag"] = {"type": "string", "x-ms-format": "string", "x-ms-client-default": "", "x-ms-client-name": "ETag"}; diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp index 78c2d8b5f0..f38f0444a4 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp @@ -31,7 +31,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * The version used for the operations to Azure storage services. */ - constexpr static const char* ApiVersion = "2021-12-02"; + constexpr static const char* ApiVersion = "2022-11-02"; } // namespace _detail namespace Models { /** @@ -627,6 +627,25 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { */ DateTime LastModified; }; + /** + * @brief Valid value is backup. + */ + class ShareFileRequestIntent final { + public: + ShareFileRequestIntent() = default; + explicit ShareFileRequestIntent(std::string value) : m_value(std::move(value)) {} + bool operator==(const ShareFileRequestIntent& other) const + { + return m_value == other.m_value; + } + bool operator!=(const ShareFileRequestIntent& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareFileRequestIntent None; + AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareFileRequestIntent Backup; + + private: + std::string m_value; + }; /** * @brief Response type for #Azure::Storage::Files::Shares::ShareClient::CreatePermission. */ @@ -1942,6 +1961,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct CreateSharePermissionOptions final { Models::_detail::SharePermission SharePermission; + Nullable FileRequestIntent; }; static Response CreatePermission( Core::Http::_internal::HttpPipeline& pipeline, @@ -1951,6 +1971,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct GetSharePermissionOptions final { std::string FilePermissionKey; + Nullable FileRequestIntent; }; static Response GetPermission( Core::Http::_internal::HttpPipeline& pipeline, @@ -2012,6 +2033,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { public: struct CreateDirectoryOptions final { + Nullable AllowTrailingDot; std::map Metadata; Nullable FilePermission; Nullable FilePermissionKey; @@ -2019,6 +2041,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FileCreationTime; Nullable FileLastWriteTime; Nullable FileChangeTime; + Nullable FileRequestIntent; }; static Response Create( Core::Http::_internal::HttpPipeline& pipeline, @@ -2027,7 +2050,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context); struct GetDirectoryPropertiesOptions final { + Nullable AllowTrailingDot; Nullable Sharesnapshot; + Nullable FileRequestIntent; }; static Response GetProperties( Core::Http::_internal::HttpPipeline& pipeline, @@ -2036,6 +2061,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context); struct DeleteDirectoryOptions final { + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response Delete( Core::Http::_internal::HttpPipeline& pipeline, @@ -2050,6 +2077,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FileCreationTime; Nullable FileLastWriteTime; Nullable FileChangeTime; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response SetProperties( Core::Http::_internal::HttpPipeline& pipeline, @@ -2059,6 +2088,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct SetDirectoryMetadataOptions final { std::map Metadata; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response SetMetadata( Core::Http::_internal::HttpPipeline& pipeline, @@ -2073,6 +2104,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable MaxResults; Nullable Include; Nullable IncludeExtendedInfo; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response ListFilesAndDirectoriesSegment( @@ -2086,6 +2119,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable MaxResults; Nullable Sharesnapshot; Nullable Recursive; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response ListHandles( Core::Http::_internal::HttpPipeline& pipeline, @@ -2098,6 +2133,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Sharesnapshot; std::string HandleId; Nullable Recursive; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response ForceCloseHandles( Core::Http::_internal::HttpPipeline& pipeline, @@ -2118,6 +2155,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FilePermission; Nullable FilePermissionKey; std::map Metadata; + Nullable AllowTrailingDot; + Nullable AllowSourceTrailingDot; + Nullable FileRequestIntent; }; static Response Rename( Core::Http::_internal::HttpPipeline& pipeline, @@ -2129,6 +2169,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { public: struct CreateFileOptions final { + Nullable AllowTrailingDot; int64_t FileContentLength = int64_t(); Nullable FileContentType; Nullable FileContentEncoding; @@ -2144,6 +2185,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FileLastWriteTime; Nullable FileChangeTime; Nullable LeaseId; + Nullable FileRequestIntent; }; static Response Create( Core::Http::_internal::HttpPipeline& pipeline, @@ -2152,9 +2194,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context); struct DownloadFileOptions final { + Nullable AllowTrailingDot; Nullable Range; Nullable RangeGetContentMD5; Nullable LeaseId; + Nullable FileRequestIntent; }; static Response Download( Core::Http::_internal::HttpPipeline& pipeline, @@ -2163,8 +2207,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context); struct GetFilePropertiesOptions final { + Nullable AllowTrailingDot; Nullable Sharesnapshot; Nullable LeaseId; + Nullable FileRequestIntent; }; static Response GetProperties( Core::Http::_internal::HttpPipeline& pipeline, @@ -2173,7 +2219,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context); struct DeleteFileOptions final { + Nullable AllowTrailingDot; Nullable LeaseId; + Nullable FileRequestIntent; }; static Response Delete( Core::Http::_internal::HttpPipeline& pipeline, @@ -2196,6 +2244,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FileLastWriteTime; Nullable FileChangeTime; Nullable LeaseId; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response SetHttpHeaders( Core::Http::_internal::HttpPipeline& pipeline, @@ -2206,6 +2256,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { std::map Metadata; Nullable LeaseId; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response SetMetadata( Core::Http::_internal::HttpPipeline& pipeline, @@ -2216,6 +2268,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { Nullable Duration; Nullable ProposedLeaseId; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response AcquireLease( Core::Http::_internal::HttpPipeline& pipeline, @@ -2225,6 +2279,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct ReleaseFileLeaseOptions final { std::string LeaseId; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response ReleaseLease( Core::Http::_internal::HttpPipeline& pipeline, @@ -2235,6 +2291,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { std::string LeaseId; Nullable ProposedLeaseId; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response ChangeLease( Core::Http::_internal::HttpPipeline& pipeline, @@ -2244,6 +2302,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct BreakFileLeaseOptions final { Nullable LeaseId; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response BreakLease( Core::Http::_internal::HttpPipeline& pipeline, @@ -2257,6 +2317,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable> ContentMD5; Nullable LeaseId; Nullable FileLastWrittenMode; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response UploadRange( Core::Http::_internal::HttpPipeline& pipeline, @@ -2275,6 +2337,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable LeaseId; Nullable CopySourceAuthorization; Nullable FileLastWrittenMode; + Nullable AllowTrailingDot; + Nullable AllowSourceTrailingDot; }; static Response UploadRangeFromUri( Core::Http::_internal::HttpPipeline& pipeline, @@ -2287,6 +2351,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Prevsharesnapshot; Nullable Range; Nullable LeaseId; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response GetRangeList( Core::Http::_internal::HttpPipeline& pipeline, @@ -2307,6 +2373,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FileChangeTime; Nullable SetArchiveAttribute; Nullable LeaseId; + Nullable AllowTrailingDot; + Nullable AllowSourceTrailingDot; + Nullable FileRequestIntent; }; static Response StartCopy( Core::Http::_internal::HttpPipeline& pipeline, @@ -2317,6 +2386,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { std::string CopyId; Nullable LeaseId; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response AbortCopy( Core::Http::_internal::HttpPipeline& pipeline, @@ -2328,6 +2399,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Marker; Nullable MaxResults; Nullable Sharesnapshot; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response ListHandles( Core::Http::_internal::HttpPipeline& pipeline, @@ -2339,6 +2412,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Marker; Nullable Sharesnapshot; std::string HandleId; + Nullable AllowTrailingDot; + Nullable FileRequestIntent; }; static Response ForceCloseHandles( Core::Http::_internal::HttpPipeline& pipeline, @@ -2360,6 +2435,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FilePermissionKey; std::map Metadata; Nullable FileContentType; + Nullable AllowTrailingDot; + Nullable AllowSourceTrailingDot; + Nullable FileRequestIntent; }; static Response Rename( Core::Http::_internal::HttpPipeline& pipeline, diff --git a/sdk/storage/azure-storage-files-shares/src/rest_client.cpp b/sdk/storage/azure-storage-files-shares/src/rest_client.cpp index 746db51fe0..ac712a6651 100644 --- a/sdk/storage/azure-storage-files-shares/src/rest_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/rest_client.cpp @@ -106,6 +106,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const ShareRootSquash ShareRootSquash::RootSquash("RootSquash"); const ShareRootSquash ShareRootSquash::AllSquash("AllSquash"); const DeleteSnapshotsOption DeleteSnapshotsOption::Include("include"); + const ShareFileRequestIntent ShareFileRequestIntent::None("none"); + const ShareFileRequestIntent ShareFileRequestIntent::Backup("backup"); FileAttributes::FileAttributes(const std::string& value) { const std::string delimiter = " | "; @@ -312,7 +314,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { request.SetHeader("Content-Length", std::to_string(requestBody.Length())); request.GetUrl().AppendQueryParameter("restype", "service"); request.GetUrl().AppendQueryParameter("comp", "properties"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -332,7 +334,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url); request.GetUrl().AppendQueryParameter("restype", "service"); request.GetUrl().AppendQueryParameter("comp", "properties"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); (void)options; auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); @@ -564,7 +566,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { _internal::UrlEncodeQueryParameter( ListSharesIncludeFlagsToString(options.Include.Value()))); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -917,7 +919,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-access-tier", options.AccessTier.Value().ToString()); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.EnabledProtocols.HasValue() && !options.EnabledProtocols.Value().ToString().empty()) { @@ -952,7 +954,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { request.GetUrl().AppendQueryParameter( "sharesnapshot", _internal::UrlEncodeQueryParameter(options.Sharesnapshot.Value())); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); @@ -1054,7 +1056,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { request.GetUrl().AppendQueryParameter( "sharesnapshot", _internal::UrlEncodeQueryParameter(options.Sharesnapshot.Value())); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.DeleteSnapshots.HasValue() && !options.DeleteSnapshots.Value().ToString().empty()) { request.SetHeader("x-ms-delete-snapshots", options.DeleteSnapshots.Value().ToString()); @@ -1090,7 +1092,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-proposed-lease-id", options.ProposedLeaseId.Value()); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.Sharesnapshot.HasValue() && !options.Sharesnapshot.Value().empty()) { request.GetUrl().AppendQueryParameter( @@ -1124,7 +1126,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-lease-id", options.LeaseId); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.Sharesnapshot.HasValue() && !options.Sharesnapshot.Value().empty()) { request.GetUrl().AppendQueryParameter( @@ -1161,7 +1163,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-proposed-lease-id", options.ProposedLeaseId.Value()); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.Sharesnapshot.HasValue() && !options.Sharesnapshot.Value().empty()) { request.GetUrl().AppendQueryParameter( @@ -1195,7 +1197,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-lease-id", options.LeaseId); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.Sharesnapshot.HasValue() && !options.Sharesnapshot.Value().empty()) { request.GetUrl().AppendQueryParameter( @@ -1233,7 +1235,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.Sharesnapshot.HasValue() && !options.Sharesnapshot.Value().empty()) { request.GetUrl().AppendQueryParameter( @@ -1266,7 +1268,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-meta-" + p.first, p.second); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -1300,7 +1302,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { request.SetHeader("Content-Length", std::to_string(requestBody.Length())); request.GetUrl().AppendQueryParameter("restype", "share"); request.GetUrl().AppendQueryParameter("comp", "filepermission"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -1325,7 +1332,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-file-permission-key", options.FilePermissionKey); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1351,7 +1363,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("restype", "share"); request.GetUrl().AppendQueryParameter("comp", "properties"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.Quota.HasValue()) { request.SetHeader("x-ms-share-quota", std::to_string(options.Quota.Value())); @@ -1394,7 +1406,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-meta-" + p.first, p.second); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); @@ -1420,7 +1432,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url); request.GetUrl().AppendQueryParameter("restype", "share"); request.GetUrl().AppendQueryParameter("comp", "acl"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); @@ -1567,7 +1579,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { request.SetHeader("Content-Length", std::to_string(requestBody.Length())); request.GetUrl().AppendQueryParameter("restype", "share"); request.GetUrl().AppendQueryParameter("comp", "acl"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); @@ -1594,7 +1606,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url); request.GetUrl().AppendQueryParameter("restype", "share"); request.GetUrl().AppendQueryParameter("comp", "stats"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); @@ -1665,11 +1677,16 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("restype", "directory"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } for (const auto& p : options.Metadata) { request.SetHeader("x-ms-meta-" + p.first, p.second); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.FilePermission.HasValue() && !options.FilePermission.Value().empty()) { request.SetHeader("x-ms-file-permission", options.FilePermission.Value()); @@ -1694,6 +1711,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-file-change-time", options.FileChangeTime.Value()); } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -1743,12 +1765,22 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url); request.GetUrl().AppendQueryParameter("restype", "directory"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } if (options.Sharesnapshot.HasValue() && !options.Sharesnapshot.Value().empty()) { request.GetUrl().AppendQueryParameter( "sharesnapshot", _internal::UrlEncodeQueryParameter(options.Sharesnapshot.Value())); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1804,8 +1836,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { auto request = Core::Http::Request(Core::Http::HttpMethod::Delete, url); request.GetUrl().AppendQueryParameter("restype", "directory"); - request.SetHeader("x-ms-version", "2021-12-02"); - (void)options; + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -1824,7 +1865,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("restype", "directory"); request.GetUrl().AppendQueryParameter("comp", "properties"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.FilePermission.HasValue() && !options.FilePermission.Value().empty()) { request.SetHeader("x-ms-file-permission", options.FilePermission.Value()); @@ -1849,6 +1890,16 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-file-change-time", options.FileChangeTime.Value()); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1904,7 +1955,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-meta-" + p.first, p.second); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1948,7 +2009,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { request.GetUrl().AppendQueryParameter( "maxresults", std::to_string(options.MaxResults.Value())); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.Include.HasValue() && !ListFilesIncludeFlagsToString(options.Include.Value()).empty()) { @@ -1962,6 +2023,16 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { request.SetHeader( "x-ms-file-extended-info", options.IncludeExtendedInfo.Value() ? "true" : "false"); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -2331,7 +2402,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-recursive", options.Recursive.Value() ? "true" : "false"); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -2503,7 +2584,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-recursive", options.Recursive.Value() ? "true" : "false"); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -2531,7 +2622,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("restype", "directory"); request.GetUrl().AppendQueryParameter("comp", "rename"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (!options.RenameSource.empty()) { request.SetHeader("x-ms-file-rename-source", options.RenameSource); @@ -2583,6 +2674,22 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-meta-" + p.first, p.second); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.AllowSourceTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-source-allow-trailing-dot", + options.AllowSourceTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -2618,7 +2725,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context) { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); - request.SetHeader("x-ms-version", "2021-12-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + request.SetHeader("x-ms-version", "2022-11-02"); request.SetHeader("x-ms-content-length", std::to_string(options.FileContentLength)); request.SetHeader("x-ms-type", "file"); if (options.FileContentType.HasValue() && !options.FileContentType.Value().empty()) @@ -2680,6 +2792,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -2728,7 +2845,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context) { auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url, false); - request.SetHeader("x-ms-version", "2021-12-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + request.SetHeader("x-ms-version", "2022-11-02"); if (options.Range.HasValue() && !options.Range.Value().empty()) { request.SetHeader("x-ms-range", options.Range.Value()); @@ -2742,6 +2864,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (!(httpStatusCode == Core::Http::HttpStatusCode::Ok @@ -2898,16 +3025,26 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context) { auto request = Core::Http::Request(Core::Http::HttpMethod::Head, url); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } if (options.Sharesnapshot.HasValue() && !options.Sharesnapshot.Value().empty()) { request.GetUrl().AppendQueryParameter( "sharesnapshot", _internal::UrlEncodeQueryParameter(options.Sharesnapshot.Value())); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -3031,11 +3168,21 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context) { auto request = Core::Http::Request(Core::Http::HttpMethod::Delete, url); - request.SetHeader("x-ms-version", "2021-12-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -3053,7 +3200,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("comp", "properties"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.FileContentLength.HasValue()) { request.SetHeader("x-ms-content-length", std::to_string(options.FileContentLength.Value())); @@ -3113,6 +3260,16 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -3167,11 +3324,21 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-meta-" + p.first, p.second); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -3201,7 +3368,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-proposed-lease-id", options.ProposedLeaseId.Value()); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -3229,7 +3406,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-lease-id", options.LeaseId); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -3260,7 +3447,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-proposed-lease-id", options.ProposedLeaseId.Value()); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -3288,7 +3485,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -3325,7 +3532,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("Content-MD5", Core::Convert::Base64Encode(options.ContentMD5.Value())); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); @@ -3336,6 +3543,16 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { request.SetHeader( "x-ms-file-last-write-time", options.FileLastWrittenMode.Value().ToString()); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -3402,7 +3619,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { "x-ms-source-if-none-match-crc64", Core::Convert::Base64Encode(options.SourceIfNoneMatchCrc64.Value())); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); @@ -3419,6 +3636,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { request.SetHeader( "x-ms-file-last-write-time", options.FileLastWrittenMode.Value().ToString()); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.AllowSourceTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-source-allow-trailing-dot", + options.AllowSourceTrailingDot.Value() ? "true" : "false"); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -3462,7 +3690,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { "prevsharesnapshot", _internal::UrlEncodeQueryParameter(options.Prevsharesnapshot.Value())); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.Range.HasValue() && !options.Range.Value().empty()) { request.SetHeader("x-ms-range", options.Range.Value()); @@ -3471,6 +3699,16 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -3576,7 +3814,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context) { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); for (const auto& p : options.Metadata) { request.SetHeader("x-ms-meta-" + p.first, p.second); @@ -3629,6 +3867,22 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.AllowSourceTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-source-allow-trailing-dot", + options.AllowSourceTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -3658,11 +3912,21 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { "copyid", _internal::UrlEncodeQueryParameter(options.CopyId)); } request.SetHeader("x-ms-copy-action", "abort"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::NoContent) @@ -3695,7 +3959,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { request.GetUrl().AppendQueryParameter( "sharesnapshot", _internal::UrlEncodeQueryParameter(options.Sharesnapshot.Value())); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -3863,7 +4137,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-handle-id", options.HandleId); } - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -3890,7 +4174,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("comp", "rename"); - request.SetHeader("x-ms-version", "2021-12-02"); + request.SetHeader("x-ms-version", "2022-11-02"); if (!options.RenameSource.empty()) { request.SetHeader("x-ms-file-rename-source", options.RenameSource); @@ -3946,6 +4230,22 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { request.SetHeader("x-ms-content-type", options.FileContentType.Value()); } + if (options.AllowTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-allow-trailing-dot", options.AllowTrailingDot.Value() ? "true" : "false"); + } + if (options.AllowSourceTrailingDot.HasValue()) + { + request.SetHeader( + "x-ms-source-allow-trailing-dot", + options.AllowSourceTrailingDot.Value() ? "true" : "false"); + } + if (options.FileRequestIntent.HasValue() + && !options.FileRequestIntent.Value().ToString().empty()) + { + request.SetHeader("x-ms-file-request-intent", options.FileRequestIntent.Value().ToString()); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) diff --git a/sdk/storage/azure-storage-files-shares/swagger/README.md b/sdk/storage/azure-storage-files-shares/swagger/README.md index d35b2a83fb..b860bd5669 100644 --- a/sdk/storage/azure-storage-files-shares/swagger/README.md +++ b/sdk/storage/azure-storage-files-shares/swagger/README.md @@ -9,7 +9,7 @@ package-name: azure-storage-files-shares namespace: Azure::Storage::Files::Shares output-folder: generated clear-output-folder: true -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Microsoft.FileStorage/preview/2021-12-02/file.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Microsoft.FileStorage/preview/2022-11-02/file.json ``` ## ModelFour Options @@ -79,13 +79,13 @@ directive: "name": "ApiVersion", "modelAsString": false }, - "enum": ["2021-12-02"], + "enum": ["2022-11-02"], "description": "The version used for the operations to Azure storage services." }; - from: swagger-document where: $.parameters transform: > - $.ApiVersionParameter.enum[0] = "2021-12-02"; + $.ApiVersionParameter.enum[0] = "2022-11-02"; ``` ### Rename Operations From 11c240f3c31358adaba7cf815ed9467a977a69e6 Mon Sep 17 00:00:00 2001 From: microzchang Date: Tue, 21 Feb 2023 14:55:46 +0800 Subject: [PATCH 2/3] Renamed ShareFileRequestIntent --- .../storage/files/shares/rest_client.hpp | 73 +++++++++---------- .../src/rest_client.cpp | 4 +- .../swagger/README.md | 1 + 3 files changed, 38 insertions(+), 40 deletions(-) diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp index f38f0444a4..ab701e0dc1 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp @@ -630,18 +630,15 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * @brief Valid value is backup. */ - class ShareFileRequestIntent final { + class ShareTokenIntent final { public: - ShareFileRequestIntent() = default; - explicit ShareFileRequestIntent(std::string value) : m_value(std::move(value)) {} - bool operator==(const ShareFileRequestIntent& other) const - { - return m_value == other.m_value; - } - bool operator!=(const ShareFileRequestIntent& other) const { return !(*this == other); } + ShareTokenIntent() = default; + explicit ShareTokenIntent(std::string value) : m_value(std::move(value)) {} + bool operator==(const ShareTokenIntent& other) const { return m_value == other.m_value; } + bool operator!=(const ShareTokenIntent& other) const { return !(*this == other); } const std::string& ToString() const { return m_value; } - AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareFileRequestIntent None; - AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareFileRequestIntent Backup; + AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareTokenIntent Backup; + AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareTokenIntent None; private: std::string m_value; @@ -1961,7 +1958,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct CreateSharePermissionOptions final { Models::_detail::SharePermission SharePermission; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response CreatePermission( Core::Http::_internal::HttpPipeline& pipeline, @@ -1971,7 +1968,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct GetSharePermissionOptions final { std::string FilePermissionKey; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response GetPermission( Core::Http::_internal::HttpPipeline& pipeline, @@ -2041,7 +2038,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FileCreationTime; Nullable FileLastWriteTime; Nullable FileChangeTime; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response Create( Core::Http::_internal::HttpPipeline& pipeline, @@ -2052,7 +2049,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { Nullable AllowTrailingDot; Nullable Sharesnapshot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response GetProperties( Core::Http::_internal::HttpPipeline& pipeline, @@ -2062,7 +2059,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct DeleteDirectoryOptions final { Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response Delete( Core::Http::_internal::HttpPipeline& pipeline, @@ -2078,7 +2075,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FileLastWriteTime; Nullable FileChangeTime; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response SetProperties( Core::Http::_internal::HttpPipeline& pipeline, @@ -2089,7 +2086,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { std::map Metadata; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response SetMetadata( Core::Http::_internal::HttpPipeline& pipeline, @@ -2105,7 +2102,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Include; Nullable IncludeExtendedInfo; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response ListFilesAndDirectoriesSegment( @@ -2120,7 +2117,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Sharesnapshot; Nullable Recursive; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response ListHandles( Core::Http::_internal::HttpPipeline& pipeline, @@ -2134,7 +2131,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { std::string HandleId; Nullable Recursive; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response ForceCloseHandles( Core::Http::_internal::HttpPipeline& pipeline, @@ -2157,7 +2154,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { std::map Metadata; Nullable AllowTrailingDot; Nullable AllowSourceTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response Rename( Core::Http::_internal::HttpPipeline& pipeline, @@ -2185,7 +2182,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FileLastWriteTime; Nullable FileChangeTime; Nullable LeaseId; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response Create( Core::Http::_internal::HttpPipeline& pipeline, @@ -2198,7 +2195,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Range; Nullable RangeGetContentMD5; Nullable LeaseId; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response Download( Core::Http::_internal::HttpPipeline& pipeline, @@ -2210,7 +2207,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable AllowTrailingDot; Nullable Sharesnapshot; Nullable LeaseId; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response GetProperties( Core::Http::_internal::HttpPipeline& pipeline, @@ -2221,7 +2218,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { Nullable AllowTrailingDot; Nullable LeaseId; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response Delete( Core::Http::_internal::HttpPipeline& pipeline, @@ -2245,7 +2242,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FileChangeTime; Nullable LeaseId; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response SetHttpHeaders( Core::Http::_internal::HttpPipeline& pipeline, @@ -2257,7 +2254,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { std::map Metadata; Nullable LeaseId; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response SetMetadata( Core::Http::_internal::HttpPipeline& pipeline, @@ -2269,7 +2266,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Duration; Nullable ProposedLeaseId; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response AcquireLease( Core::Http::_internal::HttpPipeline& pipeline, @@ -2280,7 +2277,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { std::string LeaseId; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response ReleaseLease( Core::Http::_internal::HttpPipeline& pipeline, @@ -2292,7 +2289,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { std::string LeaseId; Nullable ProposedLeaseId; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response ChangeLease( Core::Http::_internal::HttpPipeline& pipeline, @@ -2303,7 +2300,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { Nullable LeaseId; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response BreakLease( Core::Http::_internal::HttpPipeline& pipeline, @@ -2318,7 +2315,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable LeaseId; Nullable FileLastWrittenMode; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response UploadRange( Core::Http::_internal::HttpPipeline& pipeline, @@ -2352,7 +2349,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Range; Nullable LeaseId; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response GetRangeList( Core::Http::_internal::HttpPipeline& pipeline, @@ -2375,7 +2372,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable LeaseId; Nullable AllowTrailingDot; Nullable AllowSourceTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response StartCopy( Core::Http::_internal::HttpPipeline& pipeline, @@ -2387,7 +2384,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { std::string CopyId; Nullable LeaseId; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response AbortCopy( Core::Http::_internal::HttpPipeline& pipeline, @@ -2400,7 +2397,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable MaxResults; Nullable Sharesnapshot; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response ListHandles( Core::Http::_internal::HttpPipeline& pipeline, @@ -2413,7 +2410,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Sharesnapshot; std::string HandleId; Nullable AllowTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response ForceCloseHandles( Core::Http::_internal::HttpPipeline& pipeline, @@ -2437,7 +2434,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable FileContentType; Nullable AllowTrailingDot; Nullable AllowSourceTrailingDot; - Nullable FileRequestIntent; + Nullable FileRequestIntent; }; static Response Rename( Core::Http::_internal::HttpPipeline& pipeline, diff --git a/sdk/storage/azure-storage-files-shares/src/rest_client.cpp b/sdk/storage/azure-storage-files-shares/src/rest_client.cpp index ac712a6651..b93b238d6b 100644 --- a/sdk/storage/azure-storage-files-shares/src/rest_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/rest_client.cpp @@ -106,8 +106,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const ShareRootSquash ShareRootSquash::RootSquash("RootSquash"); const ShareRootSquash ShareRootSquash::AllSquash("AllSquash"); const DeleteSnapshotsOption DeleteSnapshotsOption::Include("include"); - const ShareFileRequestIntent ShareFileRequestIntent::None("none"); - const ShareFileRequestIntent ShareFileRequestIntent::Backup("backup"); + const ShareTokenIntent ShareTokenIntent::Backup("backup"); + const ShareTokenIntent ShareTokenIntent::None(""); FileAttributes::FileAttributes(const std::string& value) { const std::string delimiter = " | "; diff --git a/sdk/storage/azure-storage-files-shares/swagger/README.md b/sdk/storage/azure-storage-files-shares/swagger/README.md index b860bd5669..2468eca3a7 100644 --- a/sdk/storage/azure-storage-files-shares/swagger/README.md +++ b/sdk/storage/azure-storage-files-shares/swagger/README.md @@ -222,6 +222,7 @@ directive: $.ShareEnabledProtocols["x-ms-enum"]["values"] = [{"value": "SMB", "name": "Smb"},{"value": "NFS", "name": "Nfs"}]; delete $.FileChangeTime.format; $.FileLastWriteTimeMode["x-ms-enum"]["values"] = [{"value": "now", "name": "Now"},{"value": "preserve", "name": "Preserve"}]; + $.FileRequestIntent["x-ms-enum"]["values"] = [{"value": "backup", "name": "Backup"}, {"value": "", "name": "None"}]; - from: swagger-document where: $.definitions transform: > From f2ec463323dbc50273c05bab474d553af7a95dfb Mon Sep 17 00:00:00 2001 From: microzchang Date: Tue, 21 Feb 2023 15:36:05 +0800 Subject: [PATCH 3/3] remove None enumerator --- .../inc/azure/storage/files/shares/rest_client.hpp | 1 - sdk/storage/azure-storage-files-shares/src/rest_client.cpp | 1 - sdk/storage/azure-storage-files-shares/swagger/README.md | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp index ab701e0dc1..3319678ce7 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp @@ -638,7 +638,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { bool operator!=(const ShareTokenIntent& other) const { return !(*this == other); } const std::string& ToString() const { return m_value; } AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareTokenIntent Backup; - AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareTokenIntent None; private: std::string m_value; diff --git a/sdk/storage/azure-storage-files-shares/src/rest_client.cpp b/sdk/storage/azure-storage-files-shares/src/rest_client.cpp index b93b238d6b..83c3c74282 100644 --- a/sdk/storage/azure-storage-files-shares/src/rest_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/rest_client.cpp @@ -107,7 +107,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const ShareRootSquash ShareRootSquash::AllSquash("AllSquash"); const DeleteSnapshotsOption DeleteSnapshotsOption::Include("include"); const ShareTokenIntent ShareTokenIntent::Backup("backup"); - const ShareTokenIntent ShareTokenIntent::None(""); FileAttributes::FileAttributes(const std::string& value) { const std::string delimiter = " | "; diff --git a/sdk/storage/azure-storage-files-shares/swagger/README.md b/sdk/storage/azure-storage-files-shares/swagger/README.md index 2468eca3a7..1ba2ae6de5 100644 --- a/sdk/storage/azure-storage-files-shares/swagger/README.md +++ b/sdk/storage/azure-storage-files-shares/swagger/README.md @@ -222,7 +222,7 @@ directive: $.ShareEnabledProtocols["x-ms-enum"]["values"] = [{"value": "SMB", "name": "Smb"},{"value": "NFS", "name": "Nfs"}]; delete $.FileChangeTime.format; $.FileLastWriteTimeMode["x-ms-enum"]["values"] = [{"value": "now", "name": "Now"},{"value": "preserve", "name": "Preserve"}]; - $.FileRequestIntent["x-ms-enum"]["values"] = [{"value": "backup", "name": "Backup"}, {"value": "", "name": "None"}]; + $.FileRequestIntent["x-ms-enum"]["values"] = [{"value": "__placeHolder", "name": "__placeHolder"}, {"value": "backup", "name": "Backup"}]; - from: swagger-document where: $.definitions transform: >