From 76870c44144cc426f0a0c4d3104eeb915ac002b6 Mon Sep 17 00:00:00 2001 From: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Date: Wed, 10 Mar 2021 14:44:09 -0800 Subject: [PATCH] Azure::Core::DateTime => Azure::DateTime (#1836) Co-authored-by: Anton Kolesnyk --- sdk/core/azure-core/CHANGELOG.md | 1 + .../azure-core/inc/azure/core/datetime.hpp | 452 ++++++------ .../inc/azure/core/modified_conditions.hpp | 4 +- sdk/core/azure-core/src/datetime.cpp | 16 +- .../src/environment_log_level_listener.cpp | 2 +- sdk/core/azure-core/test/ut/datetime.cpp | 2 +- .../azure-core/test/ut/simplified_header.cpp | 2 +- .../common/internal/unix_time_helper.hpp | 4 +- .../inc/azure/keyvault/keys/deleted_key.hpp | 4 +- .../keyvault/keys/key_create_options.hpp | 4 +- .../azure/keyvault/keys/key_properties.hpp | 8 +- .../inc/azure/storage/blobs/blob_options.hpp | 4 +- .../azure/storage/blobs/blob_responses.hpp | 12 +- .../azure/storage/blobs/blob_sas_builder.hpp | 4 +- .../storage/blobs/blob_service_client.hpp | 2 +- .../blobs/protocol/blob_rest_client.hpp | 698 ++++++++---------- .../src/blob_sas_builder.cpp | 33 +- .../src/blob_service_client.cpp | 2 +- .../test/ut/blob_sas_test.cpp | 2 +- .../test/ut/block_blob_client_test.cpp | 2 +- .../test/ut/storage_retry_policy_test.cpp | 16 +- .../storage/common/account_sas_builder.hpp | 4 +- .../src/account_sas_builder.cpp | 11 +- .../src/storage_per_retry_policy.cpp | 4 +- .../azure-storage-common/test/test_base.cpp | 2 +- .../azure-storage-common/test/test_base.hpp | 2 +- .../files/datalake/datalake_options.hpp | 2 +- .../files/datalake/datalake_responses.hpp | 40 +- .../files/datalake/datalake_sas_builder.hpp | 4 +- .../datalake/datalake_service_client.hpp | 2 +- .../protocol/datalake_rest_client.hpp | 82 +- .../src/datalake_file_client.cpp | 2 +- .../src/datalake_sas_builder.cpp | 33 +- .../test/datalake_file_client_test.cpp | 4 +- .../test/datalake_file_system_client_test.cpp | 2 +- .../test/datalake_sas_test.cpp | 2 +- .../shares/protocol/share_rest_client.hpp | 374 +++++----- .../storage/files/shares/share_responses.hpp | 14 +- .../files/shares/share_sas_builder.hpp | 4 +- .../src/share_directory_client.cpp | 12 +- .../src/share_file_client.cpp | 30 +- .../src/share_sas_builder.cpp | 16 +- .../test/share_client_test.cpp | 26 +- .../test/share_directory_client_test.cpp | 2 +- .../test/share_sas_test.cpp | 2 +- 45 files changed, 916 insertions(+), 1034 deletions(-) diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index aa44ebb0c..6dac8b251 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -39,6 +39,7 @@ - Moved `Azure::Core::Response` to `Azure::Response`. - Moved types in the `Azure::IO` namespace like `BodyStream` to `Azure::Core::IO`. - Moved `Azure::Core::ETag` to `Azure::ETag`. +- Moved `Azure::Core::DateTime` to `Azure::DateTime`. ### Bug Fixes diff --git a/sdk/core/azure-core/inc/azure/core/datetime.hpp b/sdk/core/azure-core/inc/azure/core/datetime.hpp index dfc35b23d..90a016ed4 100644 --- a/sdk/core/azure-core/inc/azure/core/datetime.hpp +++ b/sdk/core/azure-core/inc/azure/core/datetime.hpp @@ -14,252 +14,254 @@ #include #include -namespace Azure { namespace Core { - namespace _detail { - class Clock { - public: - using rep = int64_t; - using period = std::ratio<1, 10000000>; - using duration = std::chrono::duration; - using time_point = std::chrono::time_point; +namespace Azure { - // since now() calls system_clock::now(), we have the same to say about the clock steadiness. - // system_clock is not a steady clock. It is calendar-based, which means it can be adjusted, - // and it may go backwards in time after adjustments, or jump forward faster than the actual - // time passes, if you catch the moment before and after syncing the clock. - // Steady clock would be good for measuring elapsed time without reboots (or hybernation?). - // Steady clock's epoch = boot time, and it would only go forward in steady fashion, after the - // system has started. - // Using this clock in combination with system_clock is common scenario. - // It would not be possible to base this clock on steady_clock and provide an implementation - // that universally works in any context in predictable manner. However, it does not mean that - // implementation can't use steady_clock in conjunction with this clock: an author can get a - // duration between two time_points of this clock (or between system_clock::time point at - // this clock's time_point), and add that duration to steady clock's time_point to get a new - // time_point in the steady clock's "coordinate system". - static constexpr bool is_steady = std::chrono::system_clock::is_steady; - static time_point now() noexcept; - }; - } // namespace _detail +namespace _detail { + class Clock { + public: + using rep = int64_t; + using period = std::ratio<1, 10000000>; + using duration = std::chrono::duration; + using time_point = std::chrono::time_point; + + // since now() calls system_clock::now(), we have the same to say about the clock steadiness. + // system_clock is not a steady clock. It is calendar-based, which means it can be adjusted, + // and it may go backwards in time after adjustments, or jump forward faster than the actual + // time passes, if you catch the moment before and after syncing the clock. + // Steady clock would be good for measuring elapsed time without reboots (or hybernation?). + // Steady clock's epoch = boot time, and it would only go forward in steady fashion, after the + // system has started. + // Using this clock in combination with system_clock is common scenario. + // It would not be possible to base this clock on steady_clock and provide an implementation + // that universally works in any context in predictable manner. However, it does not mean that + // implementation can't use steady_clock in conjunction with this clock: an author can get a + // duration between two time_points of this clock (or between system_clock::time point at + // this clock's time_point), and add that duration to steady clock's time_point to get a new + // time_point in the steady clock's "coordinate system". + static constexpr bool is_steady = std::chrono::system_clock::is_steady; + static time_point now() noexcept; + }; +} // namespace _detail + +/** + * @brief Manages date and time in standardized string formats. + * @details Supports date range from year 0001 to end of year 9999 with 100ns (7 decimal places + * for fractional second) precision. + * @remark `std::chrono::system_clock::time_point` can't be used, because there is no guarantees + * for the date range and precision. + * @remark This class is supposed to be able to handle a DateTime that comes over the wire. + */ +class DateTime : public _detail::Clock::time_point { + AZ_CORE_DLLEXPORT static DateTime const SystemClockEpoch; + +public: + /** + * @brief Construct a default instance of #Azure::DateTime (00:00:00.0000000 on Janualy + * 1st, 0001). + */ + constexpr DateTime() : time_point() {} + +private: + DateTime( + int16_t year, + int8_t month, + int8_t day, + int8_t hour, + int8_t minute, + int8_t second, + int32_t fracSec, + int8_t dayOfWeek, + int8_t localDiffHours, + int8_t localDiffMinutes, + bool roundFracSecUp = false); + + void ThrowIfUnsupportedYear() const; + + void GetDateTimeParts( + int16_t* year, + int8_t* month, + int8_t* day, + int8_t* hour, + int8_t* minute, + int8_t* second, + int32_t* fracSec, + int8_t* dayOfWeek) const; + + std::string ToStringRfc1123() const; + +public: + /** + * @brief Construct an instance of #Azure::DateTime. + * + * @param year Year. + * @param month Month. + * @param day Day. + * @param hour Hour. + * @param minute Minute. + * @param second Seconds. + * + * @throw std::invalid_argument If any parameter is invalid. + */ + explicit DateTime( + int16_t year, + int8_t month = 1, + int8_t day = 1, + int8_t hour = 0, + int8_t minute = 0, + int8_t second = 0) + : DateTime(year, month, day, hour, minute, second, 0, -1, 0, 0) + { + } /** - * @brief Manages date and time in standardized string formats. - * @details Supports date range from year 0001 to end of year 9999 with 100ns (7 decimal places - * for fractional second) precision. - * @remark `std::chrono::system_clock::time_point` can't be used, because there is no guarantees - * for the date range and precision. - * @remark This class is supposed to be able to handle a DateTime that comes over the wire. + * @brief Construct an instance of #Azure::DateTime from base class. */ - class DateTime : public _detail::Clock::time_point { - AZ_CORE_DLLEXPORT static DateTime const SystemClockEpoch; + constexpr DateTime(time_point const& timePoint) : time_point(timePoint) {} - public: - /** - * @brief Construct a default instance of #Azure::Core::DateTime (00:00:00.0000000 on Janualy - * 1st, 0001). - */ - constexpr DateTime() : time_point() {} + /** + * @brief Construct an instance of #Azure::DateTime from + * `std::chrono::system_clock::time_point`. + * @param systemTime A value of `std::chrono::system_clock::time_point`. + */ + DateTime(std::chrono::system_clock::time_point const& systemTime) + : DateTime( + SystemClockEpoch + std::chrono::duration_cast(systemTime.time_since_epoch())) + { + } - private: - DateTime( - int16_t year, - int8_t month, - int8_t day, - int8_t hour, - int8_t minute, - int8_t second, - int32_t fracSec, - int8_t dayOfWeek, - int8_t localDiffHours, - int8_t localDiffMinutes, - bool roundFracSecUp = false); + /** + * @brief Convert an instance of #Azure::DateTime to + * `std::chrono::system_clock::time_point`. + * @throw std::invalid_argument if #Azure::DateTime is outside of the range that can be + * represented. + */ + explicit operator std::chrono::system_clock::time_point() const; - void ThrowIfUnsupportedYear() const; + /** + * @brief Defines the format applied to the fraction part of any #Azure::DateTime. + */ + enum class TimeFractionFormat + { + /// Include only meaningful fractional time digits, up to and excluding trailing zeroes. + DropTrailingZeros, - void GetDateTimeParts( - int16_t* year, - int8_t* month, - int8_t* day, - int8_t* hour, - int8_t* minute, - int8_t* second, - int32_t* fracSec, - int8_t* dayOfWeek) const; + /// Include all the fractional time digits up to maximum precision, even if the entire value + /// is zero. + AllDigits, - std::string ToStringRfc1123() const; - - public: - /** - * @brief Construct an instance of #Azure::Core::DateTime. - * - * @param year Year. - * @param month Month. - * @param day Day. - * @param hour Hour. - * @param minute Minute. - * @param second Seconds. - * - * @throw std::invalid_argument If any parameter is invalid. - */ - explicit DateTime( - int16_t year, - int8_t month = 1, - int8_t day = 1, - int8_t hour = 0, - int8_t minute = 0, - int8_t second = 0) - : DateTime(year, month, day, hour, minute, second, 0, -1, 0, 0) - { - } - - /** - * @brief Construct an instance of #Azure::Core::DateTime from base class. - */ - constexpr DateTime(time_point const& timePoint) : time_point(timePoint) {} - - /** - * @brief Construct an instance of #Azure::Core::DateTime from - * `std::chrono::system_clock::time_point`. - * @param systemTime A value of `std::chrono::system_clock::time_point`. - */ - DateTime(std::chrono::system_clock::time_point const& systemTime) - : DateTime( - SystemClockEpoch + std::chrono::duration_cast(systemTime.time_since_epoch())) - { - } - - /** - * @brief Convert an instance of #Azure::Core::DateTime to - * `std::chrono::system_clock::time_point`. - * @throw std::invalid_argument if #Azure::Core::DateTime is outside of the range that can be - * represented. - */ - explicit operator std::chrono::system_clock::time_point() const; - - /** - * @brief Defines the format applied to the fraction part of any #Azure::Core::DateTime. - */ - enum class TimeFractionFormat - { - /// Include only meaningful fractional time digits, up to and excluding trailing zeroes. - DropTrailingZeros, - - /// Include all the fractional time digits up to maximum precision, even if the entire value - /// is zero. - AllDigits, - - /// Drop all the fractional time digits. - Truncate - }; - - /** - * @brief Defines the supported date and time string formats. - */ - enum class DateFormat - { - /// RFC 1123. - Rfc1123, - - /// RFC 3339. - Rfc3339, - }; - - /** - * @brief Create #Azure::Core::DateTime from a string representing time in UTC in the specified - * format. - * - * @param dateTime A string with the date and time. - * @param format A format to which \p dateTime string adheres to. - * - * @return #Azure::Core::DateTime that was constructed from the \p dateTime string. - * - * @throw std::invalid_argument If \p format is not recognized, or if parsing error. - */ - static DateTime Parse(std::string const& dateTime, DateFormat format); - - /** - * @brief Get a string representation of the #Azure::Core::DateTime. - * - * @param format The representation format to use, defaulted to use RFC 3339. - * - * @throw std::invalid_argument If year exceeds 9999, or if \p format is not recognized. - */ - std::string ToString(DateFormat format = DateFormat::Rfc3339) const; - - /** - * @brief Get a string representation of the #Azure::Core::DateTime. - * - * @param format The representation format to use. - * @param fractionFormat The format for the fraction part of the DateTime. Only - * supported by RFC3339. - * - * @throw std::invalid_argument If year exceeds 9999, or if \p format is not recognized. - */ - std::string ToString(DateFormat format, TimeFractionFormat fractionFormat) const; + /// Drop all the fractional time digits. + Truncate }; - inline _detail::Clock::time_point _detail::Clock::now() noexcept + /** + * @brief Defines the supported date and time string formats. + */ + enum class DateFormat { - return DateTime(std::chrono::system_clock::now()); - } + /// RFC 1123. + Rfc1123, - inline bool operator==(DateTime const& dt, std::chrono::system_clock::time_point const& tp) - { - return dt == DateTime(tp); - } + /// RFC 3339. + Rfc3339, + }; - inline bool operator<(DateTime const& dt, std::chrono::system_clock::time_point const& tp) - { - return dt < DateTime(tp); - } + /** + * @brief Create #Azure::DateTime from a string representing time in UTC in the specified + * format. + * + * @param dateTime A string with the date and time. + * @param format A format to which \p dateTime string adheres to. + * + * @return #Azure::DateTime that was constructed from the \p dateTime string. + * + * @throw std::invalid_argument If \p format is not recognized, or if parsing error. + */ + static DateTime Parse(std::string const& dateTime, DateFormat format); - inline bool operator<=(DateTime const& dt, std::chrono::system_clock::time_point const& tp) - { - return dt <= DateTime(tp); - } + /** + * @brief Get a string representation of the #Azure::DateTime. + * + * @param format The representation format to use, defaulted to use RFC 3339. + * + * @throw std::invalid_argument If year exceeds 9999, or if \p format is not recognized. + */ + std::string ToString(DateFormat format = DateFormat::Rfc3339) const; - inline bool operator!=(DateTime const& dt, std::chrono::system_clock::time_point const& tp) - { - return !(dt == tp); - } + /** + * @brief Get a string representation of the #Azure::DateTime. + * + * @param format The representation format to use. + * @param fractionFormat The format for the fraction part of the DateTime. Only + * supported by RFC3339. + * + * @throw std::invalid_argument If year exceeds 9999, or if \p format is not recognized. + */ + std::string ToString(DateFormat format, TimeFractionFormat fractionFormat) const; +}; - inline bool operator>(DateTime const& dt, std::chrono::system_clock::time_point const& tp) - { - return !(dt <= tp); - } +inline _detail::Clock::time_point _detail::Clock::now() noexcept +{ + return DateTime(std::chrono::system_clock::now()); +} - inline bool operator>=(DateTime const& dt, std::chrono::system_clock::time_point const& tp) - { - return !(dt < tp); - } +inline bool operator==(DateTime const& dt, std::chrono::system_clock::time_point const& tp) +{ + return dt == DateTime(tp); +} - inline bool operator==(std::chrono::system_clock::time_point const& tp, DateTime const& dt) - { - return dt == tp; - } +inline bool operator<(DateTime const& dt, std::chrono::system_clock::time_point const& tp) +{ + return dt < DateTime(tp); +} - inline bool operator!=(std::chrono::system_clock::time_point const& tp, DateTime const& dt) - { - return dt != tp; - } +inline bool operator<=(DateTime const& dt, std::chrono::system_clock::time_point const& tp) +{ + return dt <= DateTime(tp); +} - inline bool operator<(std::chrono::system_clock::time_point const& tp, DateTime const& dt) - { - return (dt > tp); - } +inline bool operator!=(DateTime const& dt, std::chrono::system_clock::time_point const& tp) +{ + return !(dt == tp); +} - inline bool operator<=(std::chrono::system_clock::time_point const& tp, DateTime const& dt) - { - return (dt >= tp); - } +inline bool operator>(DateTime const& dt, std::chrono::system_clock::time_point const& tp) +{ + return !(dt <= tp); +} - inline bool operator>(std::chrono::system_clock::time_point const& tp, DateTime const& dt) - { - return (dt < tp); - } +inline bool operator>=(DateTime const& dt, std::chrono::system_clock::time_point const& tp) +{ + return !(dt < tp); +} - inline bool operator>=(std::chrono::system_clock::time_point const& tp, DateTime const& dt) - { - return (dt <= tp); - } -}} // namespace Azure::Core +inline bool operator==(std::chrono::system_clock::time_point const& tp, DateTime const& dt) +{ + return dt == tp; +} + +inline bool operator!=(std::chrono::system_clock::time_point const& tp, DateTime const& dt) +{ + return dt != tp; +} + +inline bool operator<(std::chrono::system_clock::time_point const& tp, DateTime const& dt) +{ + return (dt > tp); +} + +inline bool operator<=(std::chrono::system_clock::time_point const& tp, DateTime const& dt) +{ + return (dt >= tp); +} + +inline bool operator>(std::chrono::system_clock::time_point const& tp, DateTime const& dt) +{ + return (dt < tp); +} + +inline bool operator>=(std::chrono::system_clock::time_point const& tp, DateTime const& dt) +{ + return (dt <= tp); +} + +} // namespace Azure diff --git a/sdk/core/azure-core/inc/azure/core/modified_conditions.hpp b/sdk/core/azure-core/inc/azure/core/modified_conditions.hpp index 0df8197a8..0c97c5e03 100644 --- a/sdk/core/azure-core/inc/azure/core/modified_conditions.hpp +++ b/sdk/core/azure-core/inc/azure/core/modified_conditions.hpp @@ -24,11 +24,11 @@ struct ModifiedConditions * @brief Optionally limit requests to resources that have only been modified since this point * in time. */ - Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfModifiedSince; /** * @brief Optionally limit requests to resources that have remained unmodified. */ - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; }; } // namespace Azure diff --git a/sdk/core/azure-core/src/datetime.cpp b/sdk/core/azure-core/src/datetime.cpp index 2e81eabc4..f5b6bff9e 100644 --- a/sdk/core/azure-core/src/datetime.cpp +++ b/sdk/core/azure-core/src/datetime.cpp @@ -12,7 +12,7 @@ #include #include -using namespace Azure::Core; +using namespace Azure; namespace { DateTime GetSystemClockEpoch() @@ -61,7 +61,7 @@ void ValidateDateElementRange( if (outOfRange != 0) { throw std::invalid_argument( - "Azure::Core::DateTime " + valueName + " (" + std::to_string(value) + ") cannot be " + "Azure::DateTime " + valueName + " (" + std::to_string(value) + ") cannot be " + (outOfRange < 0 ? std::string("less than ") + std::to_string(minValue) : std::string("greater than ") + std::to_string(maxValue)) + "."); @@ -174,14 +174,14 @@ void ValidateDate( if (day > maxDay) { throw std::invalid_argument( - "Azure::Core::DateTime: invalid month day number (month: " + std::to_string(month) + "Azure::DateTime: invalid month day number (month: " + std::to_string(month) + ", day: " + std::to_string(day) + ", maximum: " + std::to_string(maxDay) + ")."); } if (!IsLeapYear(year) && month == 2 && day == 29) { throw std::invalid_argument( - "Azure::Core::DateTime: year " + std::to_string(year) + "Azure::DateTime: year " + std::to_string(year) + "is not a leap year, and therefore does not have February 29th."); } @@ -192,8 +192,8 @@ void ValidateDate( if (dayOfWeek != expectedDayOfWeek) { throw std::invalid_argument( - "Azure::Core::DateTime: incorrect day of week specified (actual: " - + std::to_string(dayOfWeek) + ", expected: " + std::to_string(expectedDayOfWeek) + ")."); + "Azure::DateTime: incorrect day of week specified (actual: " + std::to_string(dayOfWeek) + + ", expected: " + std::to_string(expectedDayOfWeek) + ")."); } } @@ -424,7 +424,7 @@ DateTime::operator std::chrono::system_clock::time_point() const if (outOfRange != 0) { throw std::invalid_argument( - std::string("Cannot represent Azure::Core::DateTime as " + std::string("Cannot represent Azure::DateTime as " "std::chrono::system_clock::time_point: value is too ") + (outOfRange < 0 ? "small." : "big.")); } @@ -747,7 +747,7 @@ void DateTime::ThrowIfUnsupportedYear() const if (outOfRange != 0) { throw std::invalid_argument( - std::string("Cannot represent Azure::Core::DateTime as std::string: the date is ") + std::string("Cannot represent Azure::DateTime as std::string: the date is ") + (outOfRange < 0 ? "before 0001-01-01." : "after 9999-12-31 23:59:59.9999999.")); } } diff --git a/sdk/core/azure-core/src/environment_log_level_listener.cpp b/sdk/core/azure-core/src/environment_log_level_listener.cpp index 35a1d7cc2..c6b5c5daa 100644 --- a/sdk/core/azure-core/src/environment_log_level_listener.cpp +++ b/sdk/core/azure-core/src/environment_log_level_listener.cpp @@ -133,7 +133,7 @@ Logger::Listener EnvironmentLogLevelListener::GetLogListener() static Logger::Listener const consoleLogger = [](auto level, auto message) { std::cerr << '[' - << Azure::Core::DateTime(std::chrono::system_clock::now()) + << Azure::DateTime(std::chrono::system_clock::now()) .ToString( DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits) << "] " << LogLevelToConsoleString(level) << " : " << message << std::endl; diff --git a/sdk/core/azure-core/test/ut/datetime.cpp b/sdk/core/azure-core/test/ut/datetime.cpp index db566e5e2..d1a074a15 100644 --- a/sdk/core/azure-core/test/ut/datetime.cpp +++ b/sdk/core/azure-core/test/ut/datetime.cpp @@ -8,7 +8,7 @@ #include #include -using namespace Azure::Core; +using namespace Azure; TEST(DateTime, ParseDateAndTimeBasic) { diff --git a/sdk/core/azure-core/test/ut/simplified_header.cpp b/sdk/core/azure-core/test/ut/simplified_header.cpp index 36e50ec31..0434c8230 100644 --- a/sdk/core/azure-core/test/ut/simplified_header.cpp +++ b/sdk/core/azure-core/test/ut/simplified_header.cpp @@ -31,7 +31,7 @@ TEST(SimplifiedHeader, core) EXPECT_NO_THROW(Azure::Core::CaseInsensitiveMap imap); EXPECT_NO_THROW(Azure::Core::CaseInsensitiveSet iset); EXPECT_NO_THROW(Azure::Core::Context c); - EXPECT_NO_THROW(Azure::Core::DateTime(2020, 11, 03, 15, 30, 44)); + EXPECT_NO_THROW(Azure::DateTime(2020, 11, 03, 15, 30, 44)); EXPECT_NO_THROW(Azure::ETag e); EXPECT_NO_THROW(Azure::Core::Base64Decode("foo")); EXPECT_NO_THROW(Azure::Core::Cryptography::Md5Hash m); diff --git a/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/unix_time_helper.hpp b/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/unix_time_helper.hpp index 034f5ddd5..b337686a0 100644 --- a/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/unix_time_helper.hpp +++ b/sdk/keyvault/azure-security-keyvault-common/inc/azure/keyvault/common/internal/unix_time_helper.hpp @@ -25,9 +25,9 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Common { n * @param unixTime The number of seconds since 1970. * @return Calculated Datetime. */ - static inline Azure::Core::DateTime UnixTimeToDatetime(uint64_t unixTime) + static inline Azure::DateTime UnixTimeToDatetime(uint64_t unixTime) { - return Azure::Core::DateTime(1970) + std::chrono::seconds(unixTime); + return Azure::DateTime(1970) + std::chrono::seconds(unixTime); } }; }}}}} // namespace Azure::Security::KeyVault::Common::_internal diff --git a/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/deleted_key.hpp b/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/deleted_key.hpp index 405321f2b..083e4c6f3 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/deleted_key.hpp +++ b/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/deleted_key.hpp @@ -45,13 +45,13 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys { * @brief Indicate when the key was deleted. * */ - Azure::Core::DateTime DeletedDate; + Azure::DateTime DeletedDate; /** * @brief Indicate when the deleted key will be purged. * */ - Azure::Core::DateTime ScheduledPurgeDate; + Azure::DateTime ScheduledPurgeDate; }; /*********************** Deserializer / Serializer ******************************/ diff --git a/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_create_options.hpp b/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_create_options.hpp index d19fd7a1c..7c51a85ed 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_create_options.hpp +++ b/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_create_options.hpp @@ -39,13 +39,13 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys { * @brief Indicates when the key will be valid and can be used for cryptographic operations. * */ - Azure::Core::Nullable NotBefore; + Azure::Core::Nullable NotBefore; /** * @brief Indicates when the key will expire and cannot be used for cryptographic operations. * */ - Azure::Core::Nullable ExpiresOn; + Azure::Core::Nullable ExpiresOn; /** * @brief whether the key is enabled and useable for cryptographic operations. diff --git a/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_properties.hpp b/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_properties.hpp index 4a511d068..1d2a40105 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_properties.hpp +++ b/sdk/keyvault/azure-security-keyvault-keys/inc/azure/keyvault/keys/key_properties.hpp @@ -71,25 +71,25 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys { * @brief Indicate when the key will be valid and can be used for cryptographic operations. * */ - Azure::Core::Nullable NotBefore; + Azure::Core::Nullable NotBefore; /** * @brief Indicate when the key will expire and cannot be used for cryptographic operations. * */ - Azure::Core::Nullable ExpiresOn; + Azure::Core::Nullable ExpiresOn; /** * @brief Indicate when the key was created. * */ - Azure::Core::Nullable CreatedOn; + Azure::Core::Nullable CreatedOn; /** * @brief Indicate when the key was updated. * */ - Azure::Core::Nullable UpdatedOn; + Azure::Core::Nullable UpdatedOn; /** * @brief The number of days a key is retained before being deleted for a soft delete-enabled diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp index 16956594d..c16dcf061 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp @@ -193,7 +193,7 @@ namespace Azure { namespace Storage { namespace Blobs { * @brief Start time for the key's validity. The time should be specified in UTC, and * will be truncated to second. */ - Azure::Core::DateTime startsOn = std::chrono::system_clock::now(); + Azure::DateTime startsOn = std::chrono::system_clock::now(); }; /** @@ -319,7 +319,7 @@ namespace Azure { namespace Storage { namespace Blobs { * @brief Specify this header to perform the operation only if the resource has been * modified since the specified time. This timestamp will be truncated to second. */ - Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfModifiedSince; } AccessConditions; }; diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp index 7952fc801..5418fe4b6 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp @@ -34,7 +34,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string LeaseId; }; @@ -42,14 +42,14 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; }; struct ChangeBlobLeaseResult { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string LeaseId; }; @@ -57,14 +57,14 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; }; struct RenewBlobLeaseResult { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string LeaseId; }; @@ -74,7 +74,7 @@ namespace Azure { namespace Storage { namespace Blobs { public: std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string CopyId; Models::CopyStatus CopyStatus; Azure::Core::Nullable VersionId; diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp index 46a4dac87..8b8c9c48a 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp @@ -184,14 +184,14 @@ namespace Azure { namespace Storage { namespace Sas { * @brief Optionally specify the time at which the shared access signature becomes * valid. This timestamp will be truncated to second. */ - Azure::Core::Nullable StartsOn; + Azure::Core::Nullable StartsOn; /** * @brief The time at which the shared access signature becomes invalid. This field must * be omitted if it has been specified in an associated stored access policy. This timestamp * will be truncated to second. */ - Azure::Core::DateTime ExpiresOn; + Azure::DateTime ExpiresOn; /** * @brief Specifies an IP address or a range of IP addresses from which to accept diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp index 8b0f4903a..5df4adb00 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp @@ -112,7 +112,7 @@ namespace Azure { namespace Storage { namespace Blobs { * @return A deserialized GetUserDelegationKeyResult instance. */ Azure::Response GetUserDelegationKey( - const Azure::Core::DateTime& expiresOn, + const Azure::DateTime& expiresOn, const GetUserDelegationKeyOptions& options = GetUserDelegationKeyOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/protocol/blob_rest_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/protocol/blob_rest_client.hpp index 2b4aab2bd..7d51d10a8 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/protocol/blob_rest_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/protocol/blob_rest_client.hpp @@ -91,7 +91,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string LeaseId; }; // struct AcquireBlobContainerLeaseResult } // namespace _detail @@ -101,7 +101,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string LeaseId; }; // struct AcquireBlobLeaseResult } // namespace _detail @@ -207,8 +207,8 @@ namespace Azure { namespace Storage { namespace Blobs { struct BlobSignedIdentifier { std::string Id; - Azure::Core::DateTime StartsOn; - Azure::Core::DateTime ExpiresOn; + Azure::DateTime StartsOn; + Azure::DateTime ExpiresOn; std::string Permissions; }; // struct BlobSignedIdentifier @@ -270,7 +270,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; int32_t LeaseTime = 0; }; // struct BreakBlobContainerLeaseResult } // namespace _detail @@ -280,7 +280,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; int32_t LeaseTime = 0; }; // struct BreakBlobLeaseResult } // namespace _detail @@ -290,7 +290,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string LeaseId; }; // struct ChangeBlobContainerLeaseResult } // namespace _detail @@ -300,7 +300,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string LeaseId; }; // struct ChangeBlobLeaseResult } // namespace _detail @@ -309,7 +309,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; int64_t SequenceNumber = 0; }; // struct ClearPageBlobPagesResult @@ -332,7 +332,7 @@ namespace Azure { namespace Storage { namespace Blobs { std::string RequestId; bool Created = true; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable VersionId; bool IsServerEncrypted = false; Azure::Core::Nullable> EncryptionKeySha256; @@ -344,7 +344,7 @@ namespace Azure { namespace Storage { namespace Blobs { std::string RequestId; bool Created = true; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; }; // struct CreateBlobContainerResult struct CreateBlobSnapshotResult @@ -352,7 +352,7 @@ namespace Azure { namespace Storage { namespace Blobs { std::string RequestId; std::string Snapshot; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable VersionId; bool IsServerEncrypted = false; Azure::Core::Nullable> EncryptionKeySha256; @@ -364,7 +364,7 @@ namespace Azure { namespace Storage { namespace Blobs { std::string RequestId; bool Created = true; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable VersionId; bool IsServerEncrypted = false; Azure::Core::Nullable> EncryptionKeySha256; @@ -430,7 +430,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; int64_t BlobSize = 0; std::vector PageRanges; std::vector ClearRanges; @@ -563,7 +563,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; }; // struct ReleaseBlobContainerLeaseResult } // namespace _detail @@ -572,7 +572,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable SequenceNumber; }; // struct ReleaseBlobLeaseResult } // namespace _detail @@ -582,7 +582,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string LeaseId; }; // struct RenewBlobContainerLeaseResult } // namespace _detail @@ -592,7 +592,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string LeaseId; }; // struct RenewBlobLeaseResult } // namespace _detail @@ -601,7 +601,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; int64_t SequenceNumber = 0; }; // struct ResizePageBlobResult @@ -628,7 +628,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; bool IsSealed = true; }; // struct SealAppendBlobResult @@ -641,14 +641,14 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; }; // struct SetBlobContainerAccessPolicyResult struct SetBlobContainerMetadataResult { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; }; // struct SetBlobContainerMetadataResult struct SetBlobExpiryResult @@ -660,7 +660,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable SequenceNumber; }; // struct SetBlobHttpHeadersResult @@ -668,7 +668,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable SequenceNumber; }; // struct SetBlobMetadataResult @@ -724,8 +724,8 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string SignedObjectId; std::string SignedTenantId; - Azure::Core::DateTime SignedStartsOn; - Azure::Core::DateTime SignedExpiresOn; + Azure::DateTime SignedStartsOn; + Azure::DateTime SignedExpiresOn; std::string SignedService; std::string SignedVersion; std::string Value; @@ -743,7 +743,7 @@ namespace Azure { namespace Storage { namespace Blobs { struct BlobContainerItemDetails { Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Storage::Metadata Metadata; PublicAccessType AccessType = PublicAccessType::None; bool HasImmutabilityPolicy = false; @@ -754,13 +754,13 @@ namespace Azure { namespace Storage { namespace Blobs { std::string DefaultEncryptionScope; bool PreventEncryptionScopeOverride = false; Azure::Core::Nullable RemainingRetentionDays; - Azure::Core::Nullable DeletedOn; + Azure::Core::Nullable DeletedOn; }; // struct BlobContainerItemDetails struct BlobGeoReplication { BlobGeoReplicationStatus Status; - Azure::Core::Nullable LastSyncedOn; + Azure::Core::Nullable LastSyncedOn; }; // struct BlobGeoReplication struct BlobMetrics @@ -792,7 +792,7 @@ namespace Azure { namespace Storage { namespace Blobs { std::string RequestId; PublicAccessType AccessType = PublicAccessType::None; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::vector SignedIdentifiers; }; // struct GetBlobContainerAccessPolicyResult @@ -800,7 +800,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Storage::Metadata Metadata; PublicAccessType AccessType = PublicAccessType::None; bool HasImmutabilityPolicy = false; @@ -816,7 +816,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string ContentType; int64_t BlobSize = 0; std::vector CommittedBlocks; @@ -840,7 +840,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string CopyId; Models::CopyStatus CopyStatus; Azure::Core::Nullable VersionId; @@ -852,7 +852,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string CopyId; Models::CopyStatus CopyStatus; Azure::Core::Nullable VersionId; @@ -863,7 +863,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable TransactionalContentHash; int64_t AppendOffset = 0; int64_t CommittedBlockCount = 0; @@ -876,7 +876,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable TransactionalContentHash; int64_t AppendOffset = 0; int64_t CommittedBlockCount = 0; @@ -918,7 +918,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable VersionId; bool IsServerEncrypted = false; Azure::Core::Nullable> EncryptionKeySha256; @@ -972,7 +972,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable VersionId; bool IsServerEncrypted = false; Azure::Core::Nullable> EncryptionKeySha256; @@ -984,7 +984,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable TransactionalContentHash; int64_t SequenceNumber = 0; bool IsServerEncrypted = false; @@ -996,7 +996,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Azure::Core::Nullable TransactionalContentHash; int64_t SequenceNumber = 0; bool IsServerEncrypted = false; @@ -1008,10 +1008,10 @@ namespace Azure { namespace Storage { namespace Blobs { { BlobHttpHeaders HttpHeaders; Storage::Metadata Metadata; - Azure::Core::DateTime CreatedOn; - Azure::Core::Nullable ExpiresOn; - Azure::Core::Nullable LastAccessedOn; - Azure::Core::DateTime LastModified; + Azure::DateTime CreatedOn; + Azure::Core::Nullable ExpiresOn; + Azure::Core::Nullable LastAccessedOn; + Azure::DateTime LastModified; Azure::ETag ETag; Azure::Core::Nullable Tier; Azure::Core::Nullable IsAccessTierInferred; @@ -1030,10 +1030,10 @@ namespace Azure { namespace Storage { namespace Blobs { struct DownloadBlobDetails { Azure::ETag ETag; - Azure::Core::DateTime LastModified; - Azure::Core::DateTime CreatedOn; - Azure::Core::Nullable ExpiresOn; - Azure::Core::Nullable LastAccessedOn; + Azure::DateTime LastModified; + Azure::DateTime CreatedOn; + Azure::Core::Nullable ExpiresOn; + Azure::Core::Nullable LastAccessedOn; BlobHttpHeaders HttpHeaders; Storage::Metadata Metadata; Azure::Core::Nullable SequenceNumber; // only for page blob @@ -1055,7 +1055,7 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable CopyStatus; Azure::Core::Nullable CopyStatusDescription; Azure::Core::Nullable CopyProgress; - Azure::Core::Nullable CopyCompletedOn; + Azure::Core::Nullable CopyCompletedOn; Azure::Core::Nullable VersionId; Azure::Core::Nullable IsCurrentVersion; }; // struct DownloadBlobDetails @@ -1064,10 +1064,10 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; - Azure::Core::DateTime CreatedOn; - Azure::Core::Nullable ExpiresOn; - Azure::Core::Nullable LastAccessedOn; + Azure::DateTime LastModified; + Azure::DateTime CreatedOn; + Azure::Core::Nullable ExpiresOn; + Azure::Core::Nullable LastAccessedOn; Storage::Metadata Metadata; Models::BlobType BlobType; Azure::Core::Nullable LeaseDuration; @@ -1085,7 +1085,7 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable IsAccessTierInferred; Azure::Core::Nullable ArchiveStatus; Azure::Core::Nullable RehydratePriority; - Azure::Core::Nullable AccessTierChangedOn; + Azure::Core::Nullable AccessTierChangedOn; Azure::Core::Nullable CopyId; Azure::Core::Nullable CopySource; Azure::Core::Nullable CopyStatus; @@ -1093,7 +1093,7 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable IsIncrementalCopy; Azure::Core::Nullable IncrementalCopyDestinationSnapshot; Azure::Core::Nullable CopyProgress; - Azure::Core::Nullable CopyCompletedOn; + Azure::Core::Nullable CopyCompletedOn; Azure::Core::Nullable ObjectReplicationDestinationPolicyId; // only valid for replication destination blob std::vector @@ -1298,8 +1298,8 @@ namespace Azure { namespace Storage { namespace Blobs { struct GetUserDelegationKeyOptions { Azure::Core::Nullable Timeout; - Azure::Core::DateTime StartsOn; - Azure::Core::DateTime ExpiresOn; + Azure::DateTime StartsOn; + Azure::DateTime ExpiresOn; }; // struct GetUserDelegationKeyOptions static Azure::Response GetUserDelegationKey( @@ -2216,8 +2216,8 @@ namespace Azure { namespace Storage { namespace Blobs { path.size() == 2 && path[0] == XmlTagName::k_Properties && path[1] == XmlTagName::k_LastModified) { - ret.Details.LastModified = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc1123); + ret.Details.LastModified + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc1123); } else if ( path.size() == 2 && path[0] == XmlTagName::k_Properties @@ -2279,8 +2279,8 @@ namespace Azure { namespace Storage { namespace Blobs { path.size() == 2 && path[0] == XmlTagName::k_Properties && path[1] == XmlTagName::k_DeletedTime) { - ret.Details.DeletedOn = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc1123); + ret.Details.DeletedOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc1123); } else if ( path.size() == 2 && path[0] == XmlTagName::k_Properties @@ -2429,8 +2429,8 @@ namespace Azure { namespace Storage { namespace Blobs { } else if (path.size() == 1 && path[0] == XmlTagName::k_LastSyncTime) { - ret.LastSyncedOn = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc1123); + ret.LastSyncedOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc1123); } } } @@ -2786,13 +2786,13 @@ namespace Azure { namespace Storage { namespace Blobs { } else if (path.size() == 1 && path[0] == XmlTagName::k_SignedStart) { - ret.SignedStartsOn = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc3339); + ret.SignedStartsOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc3339); } else if (path.size() == 1 && path[0] == XmlTagName::k_SignedExpiry) { - ret.SignedExpiresOn = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc3339); + ret.SignedExpiresOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc3339); } else if (path.size() == 1 && path[0] == XmlTagName::k_SignedService) { @@ -2857,8 +2857,8 @@ namespace Azure { namespace Storage { namespace Blobs { nullptr, options.StartsOn .ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) + Azure::DateTime::DateFormat::Rfc3339, + Azure::DateTime::TimeFractionFormat::Truncate) .data()}); writer.Write(Storage::_detail::XmlNode{Storage::_detail::XmlNodeType::EndTag}); writer.Write( @@ -2868,8 +2868,8 @@ namespace Azure { namespace Storage { namespace Blobs { nullptr, options.ExpiresOn .ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) + Azure::DateTime::DateFormat::Rfc3339, + Azure::DateTime::TimeFractionFormat::Truncate) .data()}); writer.Write(Storage::_detail::XmlNode{Storage::_detail::XmlNodeType::EndTag}); writer.Write(Storage::_detail::XmlNode{Storage::_detail::XmlNodeType::EndTag}); @@ -3143,9 +3143,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); return Azure::Response( std::move(response), std::move(pHttpResponse)); } @@ -3154,8 +3153,8 @@ namespace Azure { namespace Storage { namespace Blobs { { Azure::Core::Nullable Timeout; Azure::Core::Nullable LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; }; // struct DeleteBlobContainerOptions static Azure::Response Delete( @@ -3181,15 +3180,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -3284,9 +3282,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); for (auto i = httpResponse.GetHeaders().lower_bound("x-ms-meta-"); i != httpResponse.GetHeaders().end() && i->first.substr(0, 10) == "x-ms-meta-"; ++i) @@ -3323,7 +3320,7 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Timeout; Storage::Metadata Metadata; Azure::Core::Nullable LeaseId; - Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfModifiedSince; }; // struct SetBlobContainerMetadataOptions static Azure::Response SetMetadata( @@ -3355,8 +3352,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -3370,9 +3366,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); return Azure::Response( std::move(response), std::move(pHttpResponse)); } @@ -3560,9 +3555,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); auto x_ms_blob_public_access__iterator = httpResponse.GetHeaders().find("x-ms-blob-public-access"); if (x_ms_blob_public_access__iterator != httpResponse.GetHeaders().end()) @@ -3578,8 +3572,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Timeout; PublicAccessType AccessType = PublicAccessType::None; Azure::Core::Nullable LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; std::vector SignedIdentifiers; }; // struct SetBlobContainerAccessPolicyOptions @@ -3622,15 +3616,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -3644,9 +3637,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); return Azure::Response( std::move(response), std::move(pHttpResponse)); } @@ -3656,8 +3648,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Timeout; std::chrono::seconds LeaseDuration; Azure::Core::Nullable ProposedLeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; }; // struct AcquireBlobContainerLeaseOptions static Azure::Response AcquireLease( @@ -3687,15 +3679,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -3709,9 +3700,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.LeaseId = httpResponse.GetHeaders().at("x-ms-lease-id"); return Azure::Response( std::move(response), std::move(pHttpResponse)); @@ -3721,8 +3711,8 @@ namespace Azure { namespace Storage { namespace Blobs { { Azure::Core::Nullable Timeout; std::string LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; }; // struct RenewBlobContainerLeaseOptions static Azure::Response RenewLease( @@ -3748,15 +3738,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -3770,9 +3759,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.LeaseId = httpResponse.GetHeaders().at("x-ms-lease-id"); return Azure::Response( std::move(response), std::move(pHttpResponse)); @@ -3783,8 +3771,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Timeout; std::string LeaseId; std::string ProposedLeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; }; // struct ChangeBlobContainerLeaseOptions static Azure::Response ChangeLease( @@ -3811,15 +3799,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -3833,9 +3820,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.LeaseId = httpResponse.GetHeaders().at("x-ms-lease-id"); return Azure::Response( std::move(response), std::move(pHttpResponse)); @@ -3845,8 +3831,8 @@ namespace Azure { namespace Storage { namespace Blobs { { Azure::Core::Nullable Timeout; std::string LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; }; // struct ReleaseBlobContainerLeaseOptions static Azure::Response ReleaseLease( @@ -3872,15 +3858,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -3894,9 +3879,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); return Azure::Response( std::move(response), std::move(pHttpResponse)); } @@ -3905,8 +3889,8 @@ namespace Azure { namespace Storage { namespace Blobs { { Azure::Core::Nullable Timeout; Azure::Core::Nullable BreakPeriod; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; }; // struct BreakBlobContainerLeaseOptions static Azure::Response BreakLease( @@ -3936,15 +3920,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -3958,9 +3941,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.LeaseTime = std::stoi(httpResponse.GetHeaders().at("x-ms-lease-time")); return Azure::Response( std::move(response), std::move(pHttpResponse)); @@ -4502,29 +4484,29 @@ namespace Azure { namespace Storage { namespace Blobs { path.size() == 2 && path[0] == XmlTagName::k_Properties && path[1] == XmlTagName::k_CreationTime) { - ret.Details.CreatedOn = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc1123); + ret.Details.CreatedOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc1123); } else if ( path.size() == 2 && path[0] == XmlTagName::k_Properties && path[1] == XmlTagName::k_ExpiryTime) { - ret.Details.ExpiresOn = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc1123); + ret.Details.ExpiresOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc1123); } else if ( path.size() == 2 && path[0] == XmlTagName::k_Properties && path[1] == XmlTagName::k_LastAccessTime) { - ret.Details.LastAccessedOn = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc1123); + ret.Details.LastAccessedOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc1123); } else if ( path.size() == 2 && path[0] == XmlTagName::k_Properties && path[1] == XmlTagName::k_LastModified) { - ret.Details.LastModified = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc1123); + ret.Details.LastModified + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc1123); } else if ( path.size() == 2 && path[0] == XmlTagName::k_Properties @@ -4671,15 +4653,15 @@ namespace Azure { namespace Storage { namespace Blobs { path.size() == 2 && path[0] == XmlTagName::k_AccessPolicy && path[1] == XmlTagName::k_Start) { - ret.StartsOn = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc3339); + ret.StartsOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc3339); } else if ( path.size() == 2 && path[0] == XmlTagName::k_AccessPolicy && path[1] == XmlTagName::k_Expiry) { - ret.ExpiresOn = Azure::Core::DateTime::Parse( - node.Value, Azure::Core::DateTime::DateFormat::Rfc3339); + ret.ExpiresOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc3339); } else if ( path.size() == 2 && path[0] == XmlTagName::k_AccessPolicy @@ -4809,8 +4791,8 @@ namespace Azure { namespace Storage { namespace Blobs { nullptr, options.StartsOn .ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::AllDigits) + Azure::DateTime::DateFormat::Rfc3339, + Azure::DateTime::TimeFractionFormat::AllDigits) .data()}); writer.Write(Storage::_detail::XmlNode{Storage::_detail::XmlNodeType::EndTag}); writer.Write( @@ -4820,8 +4802,8 @@ namespace Azure { namespace Storage { namespace Blobs { nullptr, options.ExpiresOn .ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::AllDigits) + Azure::DateTime::DateFormat::Rfc3339, + Azure::DateTime::TimeFractionFormat::AllDigits) .data()}); writer.Write(Storage::_detail::XmlNode{Storage::_detail::XmlNodeType::EndTag}); writer.Write( @@ -4846,8 +4828,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -4897,15 +4879,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -4996,9 +4977,8 @@ namespace Azure { namespace Storage { namespace Blobs { response.BlobSize = std::stoll(httpResponse.GetHeaders().at("content-length")); } response.Details.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.Details.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.Details.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); auto content_type__iterator = httpResponse.GetHeaders().find("content-type"); if (content_type__iterator != httpResponse.GetHeaders().end()) { @@ -5076,22 +5056,21 @@ namespace Azure { namespace Storage { namespace Blobs { response.Details.LeaseDuration = BlobLeaseDurationType(x_ms_lease_duration__iterator->second); } - response.Details.CreatedOn = Azure::Core::DateTime::Parse( + response.Details.CreatedOn = Azure::DateTime::Parse( httpResponse.GetHeaders().at("x-ms-creation-time"), - Azure::Core::DateTime::DateFormat::Rfc1123); + Azure::DateTime::DateFormat::Rfc1123); auto x_ms_expiry_time__iterator = httpResponse.GetHeaders().find("x-ms-expiry-time"); if (x_ms_expiry_time__iterator != httpResponse.GetHeaders().end()) { - response.Details.ExpiresOn = Azure::Core::DateTime::Parse( - x_ms_expiry_time__iterator->second, Azure::Core::DateTime::DateFormat::Rfc1123); + response.Details.ExpiresOn = Azure::DateTime::Parse( + x_ms_expiry_time__iterator->second, Azure::DateTime::DateFormat::Rfc1123); } auto x_ms_last_access_time__iterator = httpResponse.GetHeaders().find("x-ms-last-access-time"); if (x_ms_last_access_time__iterator != httpResponse.GetHeaders().end()) { - response.Details.LastAccessedOn = Azure::Core::DateTime::Parse( - x_ms_last_access_time__iterator->second, - Azure::Core::DateTime::DateFormat::Rfc1123); + response.Details.LastAccessedOn = Azure::DateTime::Parse( + x_ms_last_access_time__iterator->second, Azure::DateTime::DateFormat::Rfc1123); } auto x_ms_blob_sequence_number__iterator = httpResponse.GetHeaders().find("x-ms-blob-sequence-number"); @@ -5182,9 +5161,8 @@ namespace Azure { namespace Storage { namespace Blobs { = httpResponse.GetHeaders().find("x-ms-copy-completion-time"); if (x_ms_copy_completion_time__iterator != httpResponse.GetHeaders().end()) { - response.Details.CopyCompletedOn = Azure::Core::DateTime::Parse( - x_ms_copy_completion_time__iterator->second, - Azure::Core::DateTime::DateFormat::Rfc1123); + response.Details.CopyCompletedOn = Azure::DateTime::Parse( + x_ms_copy_completion_time__iterator->second, Azure::DateTime::DateFormat::Rfc1123); } auto x_ms_version_id__iterator = httpResponse.GetHeaders().find("x-ms-version-id"); if (x_ms_version_id__iterator != httpResponse.GetHeaders().end()) @@ -5205,8 +5183,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Timeout; Azure::Core::Nullable DeleteSnapshots; Azure::Core::Nullable LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -5237,15 +5215,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -5376,8 +5353,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -5420,15 +5397,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -5454,25 +5430,23 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); - response.CreatedOn = Azure::Core::DateTime::Parse( + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); + response.CreatedOn = Azure::DateTime::Parse( httpResponse.GetHeaders().at("x-ms-creation-time"), - Azure::Core::DateTime::DateFormat::Rfc1123); + Azure::DateTime::DateFormat::Rfc1123); auto x_ms_expiry_time__iterator = httpResponse.GetHeaders().find("x-ms-expiry-time"); if (x_ms_expiry_time__iterator != httpResponse.GetHeaders().end()) { - response.ExpiresOn = Azure::Core::DateTime::Parse( - x_ms_expiry_time__iterator->second, Azure::Core::DateTime::DateFormat::Rfc1123); + response.ExpiresOn = Azure::DateTime::Parse( + x_ms_expiry_time__iterator->second, Azure::DateTime::DateFormat::Rfc1123); } auto x_ms_last_access_time__iterator = httpResponse.GetHeaders().find("x-ms-last-access-time"); if (x_ms_last_access_time__iterator != httpResponse.GetHeaders().end()) { - response.LastAccessedOn = Azure::Core::DateTime::Parse( - x_ms_last_access_time__iterator->second, - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastAccessedOn = Azure::DateTime::Parse( + x_ms_last_access_time__iterator->second, Azure::DateTime::DateFormat::Rfc1123); } for (auto i = httpResponse.GetHeaders().lower_bound("x-ms-meta-"); i != httpResponse.GetHeaders().end() && i->first.substr(0, 10) == "x-ms-meta-"; @@ -5598,9 +5572,9 @@ namespace Azure { namespace Storage { namespace Blobs { = httpResponse.GetHeaders().find("x-ms-access-tier-change-time"); if (x_ms_access_tier_change_time__iterator != httpResponse.GetHeaders().end()) { - response.AccessTierChangedOn = Azure::Core::DateTime::Parse( + response.AccessTierChangedOn = Azure::DateTime::Parse( x_ms_access_tier_change_time__iterator->second, - Azure::Core::DateTime::DateFormat::Rfc1123); + Azure::DateTime::DateFormat::Rfc1123); } auto x_ms_copy_id__iterator = httpResponse.GetHeaders().find("x-ms-copy-id"); if (x_ms_copy_id__iterator != httpResponse.GetHeaders().end()) @@ -5645,9 +5619,8 @@ namespace Azure { namespace Storage { namespace Blobs { = httpResponse.GetHeaders().find("x-ms-copy-completion-time"); if (x_ms_copy_completion_time__iterator != httpResponse.GetHeaders().end()) { - response.CopyCompletedOn = Azure::Core::DateTime::Parse( - x_ms_copy_completion_time__iterator->second, - Azure::Core::DateTime::DateFormat::Rfc1123); + response.CopyCompletedOn = Azure::DateTime::Parse( + x_ms_copy_completion_time__iterator->second, Azure::DateTime::DateFormat::Rfc1123); } auto x_ms_or_policy_id__iterator = httpResponse.GetHeaders().find("x-ms-or-policy-id"); if (x_ms_or_policy_id__iterator != httpResponse.GetHeaders().end()) @@ -5708,8 +5681,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Timeout; BlobHttpHeaders HttpHeaders; Azure::Core::Nullable LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -5766,15 +5739,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -5800,9 +5772,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); auto x_ms_blob_sequence_number__iterator = httpResponse.GetHeaders().find("x-ms-blob-sequence-number"); if (x_ms_blob_sequence_number__iterator != httpResponse.GetHeaders().end()) @@ -5822,8 +5793,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; Azure::Core::Nullable LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -5876,15 +5847,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -5910,9 +5880,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); return Azure::Response( std::move(response), std::move(pHttpResponse)); } @@ -5991,13 +5960,13 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable SourceLeaseId; Azure::Core::Nullable Tier; Azure::Core::Nullable RehydratePriority; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; - Azure::Core::Nullable SourceIfModifiedSince; - Azure::Core::Nullable SourceIfUnmodifiedSince; + Azure::Core::Nullable SourceIfModifiedSince; + Azure::Core::Nullable SourceIfUnmodifiedSince; Azure::ETag SourceIfMatch; Azure::ETag SourceIfNoneMatch; Azure::Core::Nullable SourceIfTags; @@ -6050,15 +6019,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -6077,14 +6045,14 @@ namespace Azure { namespace Storage { namespace Blobs { request.SetHeader( "x-ms-source-if-modified-since", options.SourceIfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.SourceIfUnmodifiedSince.HasValue()) { request.SetHeader( "x-ms-source-if-unmodified-since", options.SourceIfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.SourceIfMatch.HasValue() && !options.SourceIfMatch.ToString().empty()) { @@ -6110,9 +6078,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.CopyId = httpResponse.GetHeaders().at("x-ms-copy-id"); response.CopyStatus = CopyStatus(httpResponse.GetHeaders().at("x-ms-copy-status")); auto x_ms_version_id__iterator = httpResponse.GetHeaders().find("x-ms-version-id"); @@ -6178,8 +6145,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -6232,15 +6199,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -6266,9 +6232,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.IsServerEncrypted = httpResponse.GetHeaders().at("x-ms-request-server-encrypted") == "true"; auto x_ms_encryption_key_sha256__iterator @@ -6396,8 +6361,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Timeout; std::chrono::seconds LeaseDuration; Azure::Core::Nullable ProposedLeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -6429,15 +6394,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -6463,9 +6427,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.LeaseId = httpResponse.GetHeaders().at("x-ms-lease-id"); return Azure::Response( std::move(response), std::move(pHttpResponse)); @@ -6475,8 +6438,8 @@ namespace Azure { namespace Storage { namespace Blobs { { Azure::Core::Nullable Timeout; std::string LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -6504,15 +6467,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -6538,9 +6500,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.LeaseId = httpResponse.GetHeaders().at("x-ms-lease-id"); return Azure::Response( std::move(response), std::move(pHttpResponse)); @@ -6551,8 +6512,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Timeout; std::string LeaseId; std::string ProposedLeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -6581,15 +6542,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -6615,9 +6575,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.LeaseId = httpResponse.GetHeaders().at("x-ms-lease-id"); return Azure::Response( std::move(response), std::move(pHttpResponse)); @@ -6627,8 +6586,8 @@ namespace Azure { namespace Storage { namespace Blobs { { Azure::Core::Nullable Timeout; std::string LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -6656,15 +6615,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -6690,9 +6648,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); auto x_ms_blob_sequence_number__iterator = httpResponse.GetHeaders().find("x-ms-blob-sequence-number"); if (x_ms_blob_sequence_number__iterator != httpResponse.GetHeaders().end()) @@ -6707,8 +6664,8 @@ namespace Azure { namespace Storage { namespace Blobs { { Azure::Core::Nullable Timeout; Azure::Core::Nullable BreakPeriod; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -6740,15 +6697,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -6774,9 +6730,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.LeaseTime = std::stoi(httpResponse.GetHeaders().at("x-ms-lease-time")); return Azure::Response( std::move(response), std::move(pHttpResponse)); @@ -6930,8 +6885,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -7032,15 +6987,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -7066,9 +7020,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); { const auto& headers = httpResponse.GetHeaders(); auto content_md5_iterator = headers.find("content-md5"); @@ -7242,8 +7195,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable SourceIfModifiedSince; - Azure::Core::Nullable SourceIfUnmodifiedSince; + Azure::Core::Nullable SourceIfModifiedSince; + Azure::Core::Nullable SourceIfUnmodifiedSince; Azure::ETag SourceIfMatch; Azure::ETag SourceIfNoneMatch; }; // struct StageBlockFromUriOptions @@ -7322,14 +7275,14 @@ namespace Azure { namespace Storage { namespace Blobs { request.SetHeader( "x-ms-source-if-modified-since", options.SourceIfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.SourceIfUnmodifiedSince.HasValue()) { request.SetHeader( "x-ms-source-if-unmodified-since", options.SourceIfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.SourceIfMatch.HasValue() && !options.SourceIfMatch.ToString().empty()) { @@ -7399,8 +7352,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -7495,15 +7448,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -7529,9 +7481,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); auto x_ms_version_id__iterator = httpResponse.GetHeaders().find("x-ms-version-id"); if (x_ms_version_id__iterator != httpResponse.GetHeaders().end()) { @@ -7608,9 +7559,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.ContentType = httpResponse.GetHeaders().at("content-type"); response.BlobSize = std::stoll(httpResponse.GetHeaders().at("x-ms-blob-content-length")); return Azure::Response(std::move(response), std::move(pHttpResponse)); @@ -7781,8 +7731,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -7872,15 +7822,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -7906,9 +7855,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); auto x_ms_version_id__iterator = httpResponse.GetHeaders().find("x-ms-version-id"); if (x_ms_version_id__iterator != httpResponse.GetHeaders().end()) { @@ -7946,8 +7894,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -8041,15 +7989,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -8075,9 +8022,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); { const auto& headers = httpResponse.GetHeaders(); auto content_md5_iterator = headers.find("content-md5"); @@ -8133,8 +8079,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -8236,15 +8182,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -8270,9 +8215,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); { const auto& headers = httpResponse.GetHeaders(); auto content_md5_iterator = headers.find("content-md5"); @@ -8325,8 +8269,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -8403,15 +8347,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -8437,9 +8380,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.SequenceNumber = std::stoll(httpResponse.GetHeaders().at("x-ms-blob-sequence-number")); return Azure::Response( @@ -8458,8 +8400,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -8527,15 +8469,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -8561,9 +8502,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.SequenceNumber = std::stoll(httpResponse.GetHeaders().at("x-ms-blob-sequence-number")); return Azure::Response( @@ -8577,8 +8517,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable PreviousSnapshotUrl; Azure::Core::Nullable Range; Azure::Core::Nullable LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -8628,15 +8568,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -8668,9 +8607,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.BlobSize = std::stoll(httpResponse.GetHeaders().at("x-ms-blob-content-length")); return Azure::Response( std::move(response), std::move(pHttpResponse)); @@ -8680,8 +8618,8 @@ namespace Azure { namespace Storage { namespace Blobs { { Azure::Core::Nullable Timeout; std::string CopySource; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -8709,15 +8647,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -8743,9 +8680,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); response.CopyId = httpResponse.GetHeaders().at("x-ms-copy-id"); response.CopyStatus = CopyStatus(httpResponse.GetHeaders().at("x-ms-copy-status")); auto x_ms_version_id__iterator = httpResponse.GetHeaders().find("x-ms-version-id"); @@ -8951,8 +8887,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -9032,15 +8968,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -9066,9 +9001,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); auto x_ms_version_id__iterator = httpResponse.GetHeaders().find("x-ms-version-id"); if (x_ms_version_id__iterator != httpResponse.GetHeaders().end()) { @@ -9104,8 +9038,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -9181,15 +9115,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -9215,9 +9148,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); { const auto& headers = httpResponse.GetHeaders(); auto content_md5_iterator = headers.find("content-md5"); @@ -9272,8 +9204,8 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable EncryptionAlgorithm; Azure::Core::Nullable EncryptionScope; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -9360,15 +9292,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -9394,9 +9325,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); { const auto& headers = httpResponse.GetHeaders(); auto content_md5_iterator = headers.find("content-md5"); @@ -9443,8 +9373,8 @@ namespace Azure { namespace Storage { namespace Blobs { { Azure::Core::Nullable Timeout; Azure::Core::Nullable LeaseId; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; Azure::Core::Nullable IfTags; @@ -9475,15 +9405,14 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader( "If-Modified-Since", - options.IfModifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + options.IfModifiedSince.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( "If-Unmodified-Since", options.IfUnmodifiedSince.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime::DateFormat::Rfc1123)); } if (options.IfMatch.HasValue() && !options.IfMatch.ToString().empty()) { @@ -9514,9 +9443,8 @@ namespace Azure { namespace Storage { namespace Blobs { } response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::Core::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), - Azure::Core::DateTime::DateFormat::Rfc1123); + response.LastModified = Azure::DateTime::Parse( + httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); return Azure::Response( std::move(response), std::move(pHttpResponse)); } diff --git a/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp b/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp index 3ec3bc914..b4221c8d1 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp @@ -128,14 +128,14 @@ namespace Azure { namespace Storage { namespace Sas { snapshotVersion = BlobVersionId; } - std::string startsOnStr = StartsOn.HasValue() ? StartsOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) - : ""; - std::string expiresOnStr = Identifier.empty() ? ExpiresOn.ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) - : ""; + std::string startsOnStr = StartsOn.HasValue() + ? StartsOn.GetValue().ToString( + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate) + : ""; + std::string expiresOnStr = Identifier.empty() + ? ExpiresOn.ToString( + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate) + : ""; std::string stringToSign = Permissions + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" + canonicalName + "\n" + Identifier + "\n" + (IPRange.HasValue() ? IPRange.GetValue() : "") @@ -224,19 +224,16 @@ namespace Azure { namespace Storage { namespace Sas { snapshotVersion = BlobVersionId; } - std::string startsOnStr = StartsOn.HasValue() ? StartsOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) - : ""; + std::string startsOnStr = StartsOn.HasValue() + ? StartsOn.GetValue().ToString( + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate) + : ""; std::string expiresOnStr = ExpiresOn.ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate); + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate); std::string signedStartsOnStr = userDelegationKey.SignedStartsOn.ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate); + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate); std::string signedExpiresOnStr = userDelegationKey.SignedExpiresOn.ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate); + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate); std::string stringToSign = Permissions + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" + canonicalName + "\n" + userDelegationKey.SignedObjectId + "\n" diff --git a/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp index 73747219d..f6abd7cf6 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp @@ -148,7 +148,7 @@ namespace Azure { namespace Storage { namespace Blobs { } Azure::Response BlobServiceClient::GetUserDelegationKey( - const Azure::Core::DateTime& expiresOn, + const Azure::DateTime& expiresOn, const GetUserDelegationKeyOptions& options, const Azure::Core::Context& context) const { diff --git a/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp index 4c2832da9..77ecba71e 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp @@ -381,7 +381,7 @@ namespace Azure { namespace Storage { namespace Test { Sas::BlobSasBuilder builder2 = blobSasBuilder; builder2.StartsOn.Reset(); - builder2.ExpiresOn = Azure::Core::DateTime(); + builder2.ExpiresOn = Azure::DateTime(); builder2.SetPermissions(static_cast(0)); builder2.Identifier = identifier.Id; diff --git a/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp index e31bc4ca0..934557056 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp @@ -152,7 +152,7 @@ namespace Azure { namespace Storage { namespace Test { EXPECT_TRUE(IsValidTime(res->LastAccessedOn.GetValue())); } { - Azure::Core::DateTime lastAccessedOn; + Azure::DateTime lastAccessedOn; Azure::Storage::Blobs::ListBlobsSinglePageOptions options; options.Prefix = m_blobName; diff --git a/sdk/storage/azure-storage-blobs/test/ut/storage_retry_policy_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/storage_retry_policy_test.cpp index 35633c36b..38e5250e9 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/storage_retry_policy_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/storage_retry_policy_test.cpp @@ -90,8 +90,8 @@ namespace Azure { namespace Storage { namespace Test { response->SetHeader("x-ms-error-code", "BlobNotFound"); response->SetHeader( "date", - Azure::Core::DateTime(std::chrono::system_clock::now()) - .ToString(Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime(std::chrono::system_clock::now()) + .ToString(Azure::DateTime::DateFormat::Rfc1123)); return response; }; auto ConstructPreconditionFailedResponse = []() { @@ -115,8 +115,8 @@ namespace Azure { namespace Storage { namespace Test { response->SetHeader("x-ms-error-code", "ConditionNotMet"); response->SetHeader( "date", - Azure::Core::DateTime(std::chrono::system_clock::now()) - .ToString(Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime(std::chrono::system_clock::now()) + .ToString(Azure::DateTime::DateFormat::Rfc1123)); return response; }; auto ConstructPrimaryResponse @@ -145,8 +145,8 @@ namespace Azure { namespace Storage { namespace Test { response->SetHeader("x-ms-server-encrypted", "true"); response->SetHeader( "date", - Azure::Core::DateTime(std::chrono::system_clock::now()) - .ToString(Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime(std::chrono::system_clock::now()) + .ToString(Azure::DateTime::DateFormat::Rfc1123)); return response; }; auto ConstructSecondaryResponse = @@ -175,8 +175,8 @@ namespace Azure { namespace Storage { namespace Test { response->SetHeader("x-ms-server-encrypted", "true"); response->SetHeader( "date", - Azure::Core::DateTime(std::chrono::system_clock::now()) - .ToString(Azure::Core::DateTime::DateFormat::Rfc1123)); + Azure::DateTime(std::chrono::system_clock::now()) + .ToString(Azure::DateTime::DateFormat::Rfc1123)); return response; }; diff --git a/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp b/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp index e2cf9496a..20a867a60 100644 --- a/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp +++ b/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp @@ -217,13 +217,13 @@ namespace Azure { namespace Storage { namespace Sas { * @brief Optionally specify the time at which the shared access signature becomes * valid. */ - Azure::Core::Nullable StartsOn; + Azure::Core::Nullable StartsOn; /** * @brief The time at which the shared access signature becomes invalid. This field must * be omitted if it has been specified in an associated stored access policy. */ - Azure::Core::DateTime ExpiresOn; + Azure::DateTime ExpiresOn; /** * @brief Specifies an IP address or a range of IP addresses from which to accept diff --git a/sdk/storage/azure-storage-common/src/account_sas_builder.cpp b/sdk/storage/azure-storage-common/src/account_sas_builder.cpp index 68ff40b89..962189bab 100644 --- a/sdk/storage/azure-storage-common/src/account_sas_builder.cpp +++ b/sdk/storage/azure-storage-common/src/account_sas_builder.cpp @@ -91,13 +91,12 @@ namespace Azure { namespace Storage { namespace Sas { resourceTypes += "o"; } - std::string startsOnStr = StartsOn.HasValue() ? StartsOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) - : ""; + std::string startsOnStr = StartsOn.HasValue() + ? StartsOn.GetValue().ToString( + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate) + : ""; std::string expiresOnStr = ExpiresOn.ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate); + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate); std::string stringToSign = credential.AccountName + "\n" + Permissions + "\n" + services + "\n" + resourceTypes + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" diff --git a/sdk/storage/azure-storage-common/src/storage_per_retry_policy.cpp b/sdk/storage/azure-storage-common/src/storage_per_retry_policy.cpp index 3017c606a..e64bc7962 100644 --- a/sdk/storage/azure-storage-common/src/storage_per_retry_policy.cpp +++ b/sdk/storage/azure-storage-common/src/storage_per_retry_policy.cpp @@ -24,8 +24,8 @@ namespace Azure { namespace Storage { namespace _detail { // add x-ms-date header in RFC1123 format request.SetHeader( HttpHeaderXMsDate, - Core::DateTime(std::chrono::system_clock::now()) - .ToString(Azure::Core::DateTime::DateFormat::Rfc1123)); + DateTime(std::chrono::system_clock::now()) + .ToString(Azure::DateTime::DateFormat::Rfc1123)); } return nextHttpPolicy.Send(request, ctx); diff --git a/sdk/storage/azure-storage-common/test/test_base.cpp b/sdk/storage/azure-storage-common/test/test_base.cpp index 5c8f48cff..cc1cf71e6 100644 --- a/sdk/storage/azure-storage-common/test/test_base.cpp +++ b/sdk/storage/azure-storage-common/test/test_base.cpp @@ -253,7 +253,7 @@ namespace Azure { namespace Storage { namespace Test { return secondaryUri.GetAbsoluteUrl(); } - bool IsValidTime(const Azure::Core::DateTime& datetime) + bool IsValidTime(const Azure::DateTime& datetime) { // We assume datetime within a week is valid. const auto minTime = std::chrono::system_clock::now() - std::chrono::hours(24 * 7); diff --git a/sdk/storage/azure-storage-common/test/test_base.hpp b/sdk/storage/azure-storage-common/test/test_base.hpp index 29920bea1..c3e0a31a2 100644 --- a/sdk/storage/azure-storage-common/test/test_base.hpp +++ b/sdk/storage/azure-storage-common/test/test_base.hpp @@ -82,7 +82,7 @@ namespace Azure { namespace Storage { namespace Test { std::string InferSecondaryUrl(const std::string primaryUri); - bool IsValidTime(const Azure::Core::DateTime& datetime); + bool IsValidTime(const Azure::DateTime& datetime); inline std::string Base64EncodeText(const std::string& text) { diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp index 52bf73e86..ac28298d5 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp @@ -624,7 +624,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * @brief The expiry time in RFC1123 format. Only work if ExpiryOrigin is * ScheduleFileExpiryOriginType::Absolute. */ - Azure::Core::Nullable ExpiresOn; + Azure::Core::Nullable ExpiresOn; }; using AcquireDataLakeLeaseOptions = Blobs::AcquireBlobLeaseOptions; diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp index 15d06662d..c023da424 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp @@ -21,7 +21,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam struct FileSystemItemDetails { Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; Storage::Metadata Metadata; PublicAccessType AccessType = PublicAccessType::None; bool HasImmutabilityPolicy = false; @@ -56,7 +56,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam { PublicAccessType AccessType = PublicAccessType::None; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::vector SignedIdentifiers; std::string RequestId; }; // struct GetDataLakeFileSystemAccessPolicyResult @@ -66,7 +66,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam struct GetDataLakeFileSystemPropertiesResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; Storage::Metadata Metadata; std::string RequestId; }; @@ -75,7 +75,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam { bool Created = true; Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; @@ -88,7 +88,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam struct SetDataLakeFileSystemMetadataResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; @@ -147,8 +147,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam struct GetDataLakePathPropertiesResult { Azure::ETag ETag; - Core::DateTime LastModified; - Core::DateTime CreatedOn; + DateTime LastModified; + DateTime CreatedOn; int64_t FileSize = 0; Storage::Metadata Metadata; Azure::Core::Nullable LeaseDuration; @@ -158,14 +158,14 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam Azure::Core::Nullable IsServerEncrypted; Azure::Core::Nullable> EncryptionKeySha256; Azure::Core::Nullable IsAccessTierInferred; - Azure::Core::Nullable AccessTierChangedOn; + Azure::Core::Nullable AccessTierChangedOn; Azure::Core::Nullable CopyId; Azure::Core::Nullable CopySource; Azure::Core::Nullable CopyStatus; Azure::Core::Nullable CopyProgress; - Azure::Core::Nullable CopyCompletedOn; - Azure::Core::Nullable ExpiresOn; - Azure::Core::Nullable LastAccessedOn; + Azure::Core::Nullable CopyCompletedOn; + Azure::Core::Nullable ExpiresOn; + Azure::Core::Nullable LastAccessedOn; bool IsDirectory = false; Azure::Core::Nullable ArchiveStatus; Azure::Core::Nullable RehydratePriority; @@ -180,7 +180,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam struct GetDataLakePathAccessControlListResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string Owner; std::string Group; std::string Permissions; @@ -191,14 +191,14 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam struct SetDataLakePathHttpHeadersResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; struct SetDataLakePathMetadataResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; @@ -206,7 +206,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam { bool Created = true; Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; Azure::Core::Nullable FileSize; std::string RequestId; }; @@ -225,21 +225,21 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam struct DownloadDataLakeFileDetails { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; Azure::Core::Nullable LeaseDuration; LeaseStateType LeaseState; LeaseStatusType LeaseStatus; PathHttpHeaders HttpHeaders; Storage::Metadata Metadata; - Core::DateTime CreatedOn; - Azure::Core::Nullable ExpiresOn; - Azure::Core::Nullable LastAccessedOn; + DateTime CreatedOn; + Azure::Core::Nullable ExpiresOn; + Azure::Core::Nullable LastAccessedOn; Azure::Core::Nullable CopyId; Azure::Core::Nullable CopySource; Azure::Core::Nullable CopyStatus; Azure::Core::Nullable CopyStatusDescription; Azure::Core::Nullable CopyProgress; - Azure::Core::Nullable CopyCompletedOn; + Azure::Core::Nullable CopyCompletedOn; Azure::Core::Nullable VersionId; Azure::Core::Nullable IsCurrentVersion; bool IsServerEncrypted = false; diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_sas_builder.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_sas_builder.hpp index 1a1dcfdd3..6493f7205 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_sas_builder.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_sas_builder.hpp @@ -188,14 +188,14 @@ namespace Azure { namespace Storage { namespace Sas { * @brief Optionally specify the time at which the shared access signature becomes * valid. This timestamp will be truncated to second. */ - Azure::Core::Nullable StartsOn; + Azure::Core::Nullable StartsOn; /** * @brief The time at which the shared access signature becomes invalid. This field must * be omitted if it has been specified in an associated stored access policy. This timestamp * will be truncated to second. */ - Azure::Core::DateTime ExpiresOn; + Azure::DateTime ExpiresOn; /** * @brief Specifies an IP address or a range of IP addresses from which to accept diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp index b5dfb6bbe..f5d6e7a1a 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp @@ -103,7 +103,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * @remark This request is sent to blob endpoint. */ Azure::Response GetUserDelegationKey( - const Azure::Core::DateTime& expiresOn, + const Azure::DateTime& expiresOn, const GetUserDelegationKeyOptions& options = GetUserDelegationKeyOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const { diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/protocol/datalake_rest_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/protocol/datalake_rest_client.hpp index 73823d0fd..6802d297a 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/protocol/datalake_rest_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/protocol/datalake_rest_client.hpp @@ -111,7 +111,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { std::string Name; bool IsDirectory = bool(); - Core::DateTime LastModified; + DateTime LastModified; std::string ETag; int64_t FileSize = int64_t(); std::string Owner; @@ -332,7 +332,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { struct PathCreateResult { Azure::ETag ETag; - Azure::Core::Nullable LastModified; + Azure::Core::Nullable LastModified; std::string RequestId; Azure::Core::Nullable ContentLength; }; @@ -342,7 +342,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Azure::Core::Nullable AcceptRanges; PathHttpHeaders HttpHeaders; Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; Azure::Core::Nullable ResourceType; Azure::Core::Nullable Properties; @@ -364,7 +364,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { struct PathSetAccessControlResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; @@ -381,7 +381,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { struct PathFlushDataResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; int64_t ContentLength = int64_t(); std::string RequestId; }; @@ -499,8 +499,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { result.IsDirectory = (node["isDirectory"].get() == "true"); } - result.LastModified = Core::DateTime::Parse( - node["lastModified"].get(), Core::DateTime::DateFormat::Rfc1123); + result.LastModified = DateTime::Parse( + node["lastModified"].get(), DateTime::DateFormat::Rfc1123); result.ETag = node["etag"].get(); if (node.contains("contentLength")) { @@ -553,12 +553,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Azure::Core::Nullable Umask; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; Azure::ETag SourceIfMatch; Azure::ETag SourceIfNoneMatch; - Azure::Core::Nullable SourceIfModifiedSince; - Azure::Core::Nullable SourceIfUnmodifiedSince; + Azure::Core::Nullable SourceIfModifiedSince; + Azure::Core::Nullable SourceIfUnmodifiedSince; }; static Azure::Response Create( @@ -657,15 +657,13 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { request.SetHeader( _detail::HeaderIfModifiedSince, - createOptions.IfModifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + createOptions.IfModifiedSince.GetValue().ToString(DateTime::DateFormat::Rfc1123)); } if (createOptions.IfUnmodifiedSince.HasValue()) { request.SetHeader( _detail::HeaderIfUnmodifiedSince, - createOptions.IfUnmodifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + createOptions.IfUnmodifiedSince.GetValue().ToString(DateTime::DateFormat::Rfc1123)); } if (createOptions.SourceIfMatch.HasValue()) { @@ -681,14 +679,14 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { request.SetHeader( _detail::HeaderSourceIfModifiedSince, createOptions.SourceIfModifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + DateTime::DateFormat::Rfc1123)); } if (createOptions.SourceIfUnmodifiedSince.HasValue()) { request.SetHeader( _detail::HeaderSourceIfUnmodifiedSince, createOptions.SourceIfUnmodifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + DateTime::DateFormat::Rfc1123)); } return CreateParseResult(context, pipeline.Send(request, context)); } @@ -702,8 +700,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Azure::Core::Nullable LeaseIdOptional; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; }; static Azure::Response GetProperties( @@ -754,14 +752,14 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { request.SetHeader( _detail::HeaderIfModifiedSince, getPropertiesOptions.IfModifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + DateTime::DateFormat::Rfc1123)); } if (getPropertiesOptions.IfUnmodifiedSince.HasValue()) { request.SetHeader( _detail::HeaderIfUnmodifiedSince, getPropertiesOptions.IfUnmodifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + DateTime::DateFormat::Rfc1123)); } return GetPropertiesParseResult(context, pipeline.Send(request, context)); } @@ -775,8 +773,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Azure::Core::Nullable LeaseIdOptional; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; }; static Azure::Response Delete( @@ -824,15 +822,13 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { request.SetHeader( _detail::HeaderIfModifiedSince, - deleteOptions.IfModifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + deleteOptions.IfModifiedSince.GetValue().ToString(DateTime::DateFormat::Rfc1123)); } if (deleteOptions.IfUnmodifiedSince.HasValue()) { request.SetHeader( _detail::HeaderIfUnmodifiedSince, - deleteOptions.IfUnmodifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + deleteOptions.IfUnmodifiedSince.GetValue().ToString(DateTime::DateFormat::Rfc1123)); } return DeleteParseResult(context, pipeline.Send(request, context)); } @@ -847,8 +843,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Azure::Core::Nullable Acl; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; std::string ApiVersionParameter = _detail::DefaultServiceApiVersion; }; @@ -903,14 +899,14 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { request.SetHeader( _detail::HeaderIfModifiedSince, setAccessControlOptions.IfModifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + DateTime::DateFormat::Rfc1123)); } if (setAccessControlOptions.IfUnmodifiedSince.HasValue()) { request.SetHeader( _detail::HeaderIfUnmodifiedSince, setAccessControlOptions.IfUnmodifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + DateTime::DateFormat::Rfc1123)); } request.SetHeader(_detail::HeaderVersion, setAccessControlOptions.ApiVersionParameter); return SetAccessControlParseResult(context, pipeline.Send(request, context)); @@ -992,8 +988,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Azure::Core::Nullable ContentLanguage; Azure::ETag IfMatch; Azure::ETag IfNoneMatch; - Azure::Core::Nullable IfModifiedSince; - Azure::Core::Nullable IfUnmodifiedSince; + Azure::Core::Nullable IfModifiedSince; + Azure::Core::Nullable IfUnmodifiedSince; std::string ApiVersionParameter = _detail::DefaultServiceApiVersion; }; @@ -1086,14 +1082,14 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { request.SetHeader( _detail::HeaderIfModifiedSince, flushDataOptions.IfModifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + DateTime::DateFormat::Rfc1123)); } if (flushDataOptions.IfUnmodifiedSince.HasValue()) { request.SetHeader( _detail::HeaderIfUnmodifiedSince, flushDataOptions.IfUnmodifiedSince.GetValue().ToString( - Core::DateTime::DateFormat::Rfc1123)); + DateTime::DateFormat::Rfc1123)); } request.SetHeader(_detail::HeaderVersion, flushDataOptions.ApiVersionParameter); return FlushDataParseResult(context, pipeline.Send(request, context)); @@ -1179,9 +1175,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { if (response.GetHeaders().find(_detail::HeaderLastModified) != response.GetHeaders().end()) { - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); } result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); if (response.GetHeaders().find(_detail::HeaderContentLength) @@ -1247,9 +1243,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { if (response.GetHeaders().find(_detail::HeaderLastModified) != response.GetHeaders().end()) { - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); } result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); if (response.GetHeaders().find(_detail::HeaderResourceType) @@ -1347,9 +1343,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { if (response.GetHeaders().find(_detail::HeaderLastModified) != response.GetHeaders().end()) { - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); } result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( @@ -1444,9 +1440,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { if (response.GetHeaders().find(_detail::HeaderLastModified) != response.GetHeaders().end()) { - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); } if (response.GetHeaders().find(_detail::HeaderContentLength) != response.GetHeaders().end()) diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp index 78fb9342b..d0d378dd3 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp @@ -390,7 +390,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { if (options.ExpiresOn.HasValue()) { protocolLayerOptions.ExpiryTime - = options.ExpiresOn.GetValue().ToString(Azure::Core::DateTime::DateFormat::Rfc1123); + = options.ExpiresOn.GetValue().ToString(Azure::DateTime::DateFormat::Rfc1123); } else if (options.TimeToExpire.HasValue()) { diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_sas_builder.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_sas_builder.cpp index 3d9b4ebb2..cbcd33c89 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_sas_builder.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_sas_builder.cpp @@ -123,14 +123,14 @@ namespace Azure { namespace Storage { namespace Sas { std::string protocol = _detail::SasProtocolToString(Protocol); std::string resource = DataLakeSasResourceToString(Resource); - std::string startsOnStr = StartsOn.HasValue() ? StartsOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) - : ""; - std::string expiresOnStr = Identifier.empty() ? ExpiresOn.ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) - : ""; + std::string startsOnStr = StartsOn.HasValue() + ? StartsOn.GetValue().ToString( + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate) + : ""; + std::string expiresOnStr = Identifier.empty() + ? ExpiresOn.ToString( + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate) + : ""; std::string stringToSign = Permissions + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" + canonicalName + "\n" + Identifier + "\n" + (IPRange.HasValue() ? IPRange.GetValue() : "") @@ -208,19 +208,16 @@ namespace Azure { namespace Storage { namespace Sas { std::string protocol = _detail::SasProtocolToString(Protocol); std::string resource = DataLakeSasResourceToString(Resource); - std::string startsOnStr = StartsOn.HasValue() ? StartsOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) - : ""; + std::string startsOnStr = StartsOn.HasValue() + ? StartsOn.GetValue().ToString( + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate) + : ""; std::string expiresOnStr = ExpiresOn.ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate); + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate); std::string signedStartsOnStr = userDelegationKey.SignedStartsOn.ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate); + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate); std::string signedExpiresOnStr = userDelegationKey.SignedExpiresOn.ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate); + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate); std::string stringToSign = Permissions + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" + canonicalName + "\n" + userDelegationKey.SignedObjectId + "\n" diff --git a/sdk/storage/azure-storage-files-datalake/test/datalake_file_client_test.cpp b/sdk/storage/azure-storage-files-datalake/test/datalake_file_client_test.cpp index 3e762620b..df97f62f9 100644 --- a/sdk/storage/azure-storage-files-datalake/test/datalake_file_client_test.cpp +++ b/sdk/storage/azure-storage-files-datalake/test/datalake_file_client_test.cpp @@ -447,8 +447,8 @@ namespace Azure { namespace Storage { namespace Test { client.ScheduleDeletion( Files::DataLake::ScheduleDataLakeFileExpiryOriginType::Absolute, options), StorageException); - options.ExpiresOn = Azure::Core::DateTime::Parse( - "Wed, 29 Sep 2100 09:53:03 GMT", Azure::Core::DateTime::DateFormat::Rfc1123); + options.ExpiresOn = Azure::DateTime::Parse( + "Wed, 29 Sep 2100 09:53:03 GMT", Azure::DateTime::DateFormat::Rfc1123); options.TimeToExpire = Azure::Core::Nullable(); EXPECT_NO_THROW(client.ScheduleDeletion( Files::DataLake::ScheduleDataLakeFileExpiryOriginType::Absolute, options)); diff --git a/sdk/storage/azure-storage-files-datalake/test/datalake_file_system_client_test.cpp b/sdk/storage/azure-storage-files-datalake/test/datalake_file_system_client_test.cpp index 57409d4b2..acf3bb75e 100644 --- a/sdk/storage/azure-storage-files-datalake/test/datalake_file_system_client_test.cpp +++ b/sdk/storage/azure-storage-files-datalake/test/datalake_file_system_client_test.cpp @@ -173,7 +173,7 @@ namespace Azure { namespace Storage { namespace Test { auto createResult = client.CreateIfNotExists(); EXPECT_FALSE(createResult->Created); EXPECT_FALSE(createResult->ETag.HasValue()); - EXPECT_EQ(Core::DateTime(), createResult->LastModified); + EXPECT_EQ(DateTime(), createResult->LastModified); auto deleted = client.Delete()->Deleted; EXPECT_TRUE(deleted); } diff --git a/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp b/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp index 3d5b9757a..854ea28fd 100644 --- a/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp +++ b/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp @@ -396,7 +396,7 @@ namespace Azure { namespace Storage { namespace Test { Sas::DataLakeSasBuilder builder2 = fileSasBuilder; builder2.StartsOn.Reset(); - builder2.ExpiresOn = Azure::Core::DateTime(); + builder2.ExpiresOn = Azure::DateTime(); builder2.SetPermissions(static_cast(0)); builder2.Identifier = identifier.Id; diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/protocol/share_rest_client.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/protocol/share_rest_client.hpp index 248e24c2e..165d30471 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/protocol/share_rest_client.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/protocol/share_rest_client.hpp @@ -57,17 +57,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * @brief Creation time for the file/directory. */ - Azure::Core::Nullable CreatedOn; + Azure::Core::Nullable CreatedOn; /** * @brief Last write time for the file/directory. */ - Azure::Core::Nullable LastWrittenOn; + Azure::Core::Nullable LastWrittenOn; /** * @brief Changed time for the file/directory. */ - Azure::Core::Nullable ChangedOn; + Azure::Core::Nullable ChangedOn; /** * @brief The fileId of the file. @@ -158,8 +158,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // An Access policy. struct AccessPolicy { - Core::DateTime StartsOn; // The date-time the policy is active. - Core::DateTime ExpiresOn; // The date-time the policy expires. + DateTime StartsOn; // The date-time the policy is active. + DateTime ExpiresOn; // The date-time the policy expires. std::string Permission; // The permissions for the ACL policy. }; @@ -217,9 +217,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { std::string ParentId; // ParentId uniquely identifies the parent directory of the object. std::string SessionId; // SMB session ID in context of which the file handle was opened std::string ClientIp; // Client IP that opened the handle - Core::DateTime OpenedOn; // Time when the session that previously opened the handle has last - // been reconnected. (UTC) - Core::DateTime LastReconnectedOn; // Time handle was last connected to (UTC) + DateTime OpenedOn; // Time when the session that previously opened the handle has last + // been reconnected. (UTC) + DateTime LastReconnectedOn; // Time handle was last connected to (UTC) }; // When a file or share is leased, specifies whether the lease is of infinite or fixed duration. @@ -276,17 +276,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Properties of a share. struct ShareItemDetails { - Core::DateTime LastModified; + DateTime LastModified; Azure::ETag Etag; int64_t Quota = int64_t(); Azure::Core::Nullable ProvisionedIops; Azure::Core::Nullable ProvisionedIngressMBps; Azure::Core::Nullable ProvisionedEgressMBps; - Azure::Core::Nullable NextAllowedQuotaDowngradeTime; - Azure::Core::Nullable DeletedOn; + Azure::Core::Nullable NextAllowedQuotaDowngradeTime; + Azure::Core::Nullable DeletedOn; int32_t RemainingRetentionDays = int32_t(); Azure::Core::Nullable AccessTier; // The access tier of the share. - Azure::Core::Nullable AccessTierChangedOn; + Azure::Core::Nullable AccessTierChangedOn; Azure::Core::Nullable AccessTierTransitionState; LeaseStatusType LeaseStatus; LeaseStateType LeaseState; @@ -682,7 +682,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct ShareCreateResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; @@ -690,18 +690,18 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { Storage::Metadata Metadata; Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; int64_t Quota = int64_t(); Azure::Core::Nullable ProvisionedIops; Azure::Core::Nullable ProvisionedIngressMBps; Azure::Core::Nullable ProvisionedEgressMBps; - Azure::Core::Nullable NextAllowedQuotaDowngradeTime; + Azure::Core::Nullable NextAllowedQuotaDowngradeTime; Azure::Core::Nullable LeaseDuration; Azure::Core::Nullable LeaseState; Azure::Core::Nullable LeaseStatus; Azure::Core::Nullable AccessTier; - Azure::Core::Nullable AccessTierChangedOn; + Azure::Core::Nullable AccessTierChangedOn; Azure::Core::Nullable AccessTierTransitionState; }; @@ -713,7 +713,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct ShareAcquireLeaseResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string LeaseId; std::string RequestId; }; @@ -721,14 +721,14 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct ShareReleaseLeaseResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; struct ShareChangeLeaseResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string LeaseId; std::string RequestId; }; @@ -736,7 +736,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct ShareRenewLeaseResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string LeaseId; std::string RequestId; }; @@ -744,7 +744,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct ShareBreakLeaseResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; @@ -752,7 +752,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { std::string Snapshot; Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; @@ -771,14 +771,14 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct ShareSetPropertiesResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; struct ShareSetMetadataResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; @@ -786,14 +786,14 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { std::vector SignedIdentifiers; Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; struct ShareSetAccessPolicyResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; @@ -801,21 +801,21 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { int64_t ShareUsageInBytes = int64_t(); Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; struct ShareRestoreResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; struct DirectoryCreateResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; bool IsServerEncrypted = bool(); FileSmbProperties SmbProperties; @@ -825,7 +825,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { Storage::Metadata Metadata; Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; bool IsServerEncrypted = bool(); FileSmbProperties SmbProperties; @@ -840,7 +840,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { Azure::ETag ETag; std::string RequestId; - Core::DateTime LastModified; + DateTime LastModified; bool IsServerEncrypted = bool(); FileSmbProperties SmbProperties; }; @@ -885,7 +885,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct FileCreateResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; bool IsServerEncrypted = bool(); FileSmbProperties SmbProperties; @@ -894,7 +894,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct FileDownloadResult { std::unique_ptr BodyStream; - Core::DateTime LastModified; + DateTime LastModified; Storage::Metadata Metadata; FileHttpHeaders HttpHeaders; Azure::Core::Http::Range ContentRange; @@ -903,7 +903,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Azure::Core::Nullable TransactionalContentHash; std::string RequestId; std::string AcceptRanges; - Azure::Core::Nullable CopyCompletedOn; + Azure::Core::Nullable CopyCompletedOn; Azure::Core::Nullable CopyStatusDescription; Azure::Core::Nullable CopyId; Azure::Core::Nullable CopyProgress; @@ -918,13 +918,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct FileGetPropertiesResult { - Core::DateTime LastModified; + DateTime LastModified; Storage::Metadata Metadata; int64_t FileSize = int64_t(); FileHttpHeaders HttpHeaders; Azure::ETag ETag; std::string RequestId; - Azure::Core::Nullable CopyCompletedOn; + Azure::Core::Nullable CopyCompletedOn; Azure::Core::Nullable CopyStatusDescription; Azure::Core::Nullable CopyId; Azure::Core::Nullable CopyProgress; @@ -945,7 +945,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct FileSetHttpHeadersResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; bool IsServerEncrypted = bool(); FileSmbProperties SmbProperties; @@ -961,7 +961,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct FileAcquireLeaseResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string LeaseId; std::string RequestId; }; @@ -969,14 +969,14 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct FileReleaseLeaseResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; struct FileChangeLeaseResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string LeaseId; std::string RequestId; }; @@ -984,7 +984,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct FileBreakLeaseResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; Azure::Core::Nullable LeaseId; std::string RequestId; }; @@ -992,7 +992,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct FileUploadRangeResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; Storage::ContentHash TransactionalContentHash; std::string RequestId; bool IsServerEncrypted = bool(); @@ -1001,7 +1001,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct FileUploadRangeFromUrlResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; Storage::ContentHash TransactionalContentHash; std::string RequestId; bool IsServerEncrypted = bool(); @@ -1011,7 +1011,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { std::vector Ranges; std::vector ClearRanges; - Core::DateTime LastModified; + DateTime LastModified; Azure::ETag ETag; int64_t FileSize = int64_t(); std::string RequestId; @@ -1020,7 +1020,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct FileStartCopyResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; std::string CopyId; CopyStatusType CopyStatus; @@ -2230,7 +2230,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { else if (path.size() == 1 && path[0] == XmlTagName::AccessTierChangeTime) { result.AccessTierChangedOn - = Core::DateTime::Parse(node.Value, Core::DateTime::DateFormat::Rfc1123); + = DateTime::Parse(node.Value, DateTime::DateFormat::Rfc1123); } else if (path.size() == 1 && path[0] == XmlTagName::AccessTierTransitionState) { @@ -2238,8 +2238,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { } else if (path.size() == 1 && path[0] == XmlTagName::DeletedTime) { - result.DeletedOn - = Core::DateTime::Parse(node.Value, Core::DateTime::DateFormat::Rfc1123); + result.DeletedOn = DateTime::Parse(node.Value, DateTime::DateFormat::Rfc1123); } else if (path.size() == 1 && path[0] == XmlTagName::Etag) { @@ -2247,13 +2246,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { } else if (path.size() == 1 && path[0] == XmlTagName::LastModified) { - result.LastModified - = Core::DateTime::Parse(node.Value, Core::DateTime::DateFormat::Rfc1123); + result.LastModified = DateTime::Parse(node.Value, DateTime::DateFormat::Rfc1123); } else if (path.size() == 1 && path[0] == XmlTagName::NextAllowedQuotaDowngradeTime) { result.NextAllowedQuotaDowngradeTime - = Core::DateTime::Parse(node.Value, Core::DateTime::DateFormat::Rfc1123); + = DateTime::Parse(node.Value, DateTime::DateFormat::Rfc1123); } else if (path.size() == 1 && path[0] == XmlTagName::ProvisionedEgressMBps) { @@ -3213,9 +3211,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Success, Share created. ShareCreateResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response(std::move(result), std::move(responsePtr)); } @@ -3244,9 +3242,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { result.Metadata.emplace(i->first.substr(10), i->second); } result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); result.Quota = std::stoll(response.GetHeaders().at(_detail::HeaderQuota)); if (response.GetHeaders().find(_detail::HeaderProvisionedIops) @@ -3270,9 +3268,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (response.GetHeaders().find(_detail::HeaderNextAllowedQuotaDowngradeTime) != response.GetHeaders().end()) { - result.NextAllowedQuotaDowngradeTime = Core::DateTime::Parse( + result.NextAllowedQuotaDowngradeTime = DateTime::Parse( response.GetHeaders().at(_detail::HeaderNextAllowedQuotaDowngradeTime), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); } if (response.GetHeaders().find(_detail::HeaderLeaseDuration) != response.GetHeaders().end()) @@ -3299,9 +3297,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (response.GetHeaders().find(_detail::HeaderAccessTierChangedOn) != response.GetHeaders().end()) { - result.AccessTierChangedOn = Core::DateTime::Parse( + result.AccessTierChangedOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderAccessTierChangedOn), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); } if (response.GetHeaders().find(_detail::HeaderAccessTierTransitionState) != response.GetHeaders().end()) @@ -3348,9 +3346,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // The Acquire operation completed successfully. ShareAcquireLeaseResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.LeaseId = response.GetHeaders().at(_detail::HeaderLeaseId); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( @@ -3373,9 +3371,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // The Release operation completed successfully. ShareReleaseLeaseResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( std::move(result), std::move(responsePtr)); @@ -3397,9 +3395,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // The Change operation completed successfully. ShareChangeLeaseResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.LeaseId = response.GetHeaders().at(_detail::HeaderLeaseId); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( @@ -3422,9 +3420,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // The Renew operation completed successfully. ShareRenewLeaseResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.LeaseId = response.GetHeaders().at(_detail::HeaderLeaseId); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( @@ -3447,9 +3445,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // The Break operation completed successfully. ShareBreakLeaseResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( std::move(result), std::move(responsePtr)); @@ -3472,9 +3470,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { ShareCreateSnapshotResult result; result.Snapshot = response.GetHeaders().at(_detail::HeaderSnapshot); result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( std::move(result), std::move(responsePtr)); @@ -3564,9 +3562,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Success ShareSetPropertiesResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( std::move(result), std::move(responsePtr)); @@ -3588,9 +3586,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Success ShareSetMetadataResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( std::move(result), std::move(responsePtr)); @@ -3617,9 +3615,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { ? ShareGetAccessPolicyResult() : ShareGetAccessPolicyResultFromSignedIdentifiers(SignedIdentifiersFromXml(reader)); result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( std::move(result), std::move(responsePtr)); @@ -3685,8 +3683,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { if (path.size() == 1 && path[0] == XmlTagName::Expiry) { - result.ExpiresOn - = Core::DateTime::Parse(node.Value, Core::DateTime::DateFormat::Rfc3339); + result.ExpiresOn = DateTime::Parse(node.Value, DateTime::DateFormat::Rfc3339); } else if (path.size() == 1 && path[0] == XmlTagName::Permission) { @@ -3694,8 +3691,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { } else if (path.size() == 1 && path[0] == XmlTagName::Start) { - result.StartsOn - = Core::DateTime::Parse(node.Value, Core::DateTime::DateFormat::Rfc3339); + result.StartsOn = DateTime::Parse(node.Value, DateTime::DateFormat::Rfc3339); } } } @@ -3842,9 +3838,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Success. ShareSetAccessPolicyResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( std::move(result), std::move(responsePtr)); @@ -3868,8 +3864,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { nullptr, object.StartsOn .ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits) + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits) .data()}); writer.Write(Storage::_detail::XmlNode{Storage::_detail::XmlNodeType::EndTag}); writer.Write( @@ -3879,8 +3874,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { nullptr, object.ExpiresOn .ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits) + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits) .data()}); writer.Write(Storage::_detail::XmlNode{Storage::_detail::XmlNodeType::EndTag}); writer.Write( @@ -3932,9 +3926,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { ? ShareGetStatisticsResult() : ShareGetStatisticsResultFromShareStats(ShareStatsFromXml(reader)); result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( std::move(result), std::move(responsePtr)); @@ -4020,9 +4014,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Created ShareRestoreResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response(std::move(result), std::move(responsePtr)); } @@ -4402,9 +4396,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Success, Directory created. DirectoryCreateResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); result.IsServerEncrypted = response.GetHeaders().at(_detail::HeaderRequestIsServerEncrypted) == "true"; @@ -4412,15 +4406,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { = response.GetHeaders().at(_detail::HeaderFilePermissionKey); result.SmbProperties.Attributes = FileAttributes(response.GetHeaders().at(_detail::HeaderAttributes)); - result.SmbProperties.CreatedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderCreatedOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.LastWrittenOn = Core::DateTime::Parse( + result.SmbProperties.CreatedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderCreatedOn), DateTime::DateFormat::Rfc3339); + result.SmbProperties.LastWrittenOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastWrittenOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.ChangedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderChangedOn), - Core::DateTime::DateFormat::Rfc3339); + DateTime::DateFormat::Rfc3339); + result.SmbProperties.ChangedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderChangedOn), DateTime::DateFormat::Rfc3339); result.SmbProperties.FileId = response.GetHeaders().at(_detail::HeaderFileId); result.SmbProperties.ParentFileId = response.GetHeaders().at(_detail::HeaderParentFileId); @@ -4452,23 +4444,21 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { result.Metadata.emplace(i->first.substr(10), i->second); } result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); result.IsServerEncrypted = response.GetHeaders().at(_detail::HeaderIsServerEncrypted) == "true"; result.SmbProperties.Attributes = FileAttributes(response.GetHeaders().at(_detail::HeaderAttributes)); - result.SmbProperties.CreatedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderCreatedOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.LastWrittenOn = Core::DateTime::Parse( + result.SmbProperties.CreatedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderCreatedOn), DateTime::DateFormat::Rfc3339); + result.SmbProperties.LastWrittenOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastWrittenOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.ChangedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderChangedOn), - Core::DateTime::DateFormat::Rfc3339); + DateTime::DateFormat::Rfc3339); + result.SmbProperties.ChangedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderChangedOn), DateTime::DateFormat::Rfc3339); result.SmbProperties.PermissionKey = response.GetHeaders().at(_detail::HeaderFilePermissionKey); result.SmbProperties.FileId = response.GetHeaders().at(_detail::HeaderFileId); @@ -4515,24 +4505,22 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { DirectorySetPropertiesResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.IsServerEncrypted = response.GetHeaders().at(_detail::HeaderRequestIsServerEncrypted) == "true"; result.SmbProperties.PermissionKey = response.GetHeaders().at(_detail::HeaderFilePermissionKey); result.SmbProperties.Attributes = FileAttributes(response.GetHeaders().at(_detail::HeaderAttributes)); - result.SmbProperties.CreatedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderCreatedOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.LastWrittenOn = Core::DateTime::Parse( + result.SmbProperties.CreatedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderCreatedOn), DateTime::DateFormat::Rfc3339); + result.SmbProperties.LastWrittenOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastWrittenOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.ChangedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderChangedOn), - Core::DateTime::DateFormat::Rfc3339); + DateTime::DateFormat::Rfc3339); + result.SmbProperties.ChangedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderChangedOn), DateTime::DateFormat::Rfc3339); result.SmbProperties.FileId = response.GetHeaders().at(_detail::HeaderFileId); result.SmbProperties.ParentFileId = response.GetHeaders().at(_detail::HeaderParentFileId); @@ -5077,12 +5065,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { else if (path.size() == 1 && path[0] == XmlTagName::LastReconnectTime) { result.LastReconnectedOn - = Core::DateTime::Parse(node.Value, Core::DateTime::DateFormat::Rfc1123); + = DateTime::Parse(node.Value, DateTime::DateFormat::Rfc1123); } else if (path.size() == 1 && path[0] == XmlTagName::OpenTime) { - result.OpenedOn - = Core::DateTime::Parse(node.Value, Core::DateTime::DateFormat::Rfc1123); + result.OpenedOn = DateTime::Parse(node.Value, DateTime::DateFormat::Rfc1123); } else if (path.size() == 1 && path[0] == XmlTagName::ParentId) { @@ -6090,9 +6077,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Success, File created. FileCreateResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); result.IsServerEncrypted = response.GetHeaders().at(_detail::HeaderRequestIsServerEncrypted) == "true"; @@ -6100,15 +6087,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { = response.GetHeaders().at(_detail::HeaderFilePermissionKey); result.SmbProperties.Attributes = FileAttributes(response.GetHeaders().at(_detail::HeaderAttributes)); - result.SmbProperties.CreatedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderCreatedOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.LastWrittenOn = Core::DateTime::Parse( + result.SmbProperties.CreatedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderCreatedOn), DateTime::DateFormat::Rfc3339); + result.SmbProperties.LastWrittenOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastWrittenOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.ChangedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderChangedOn), - Core::DateTime::DateFormat::Rfc3339); + DateTime::DateFormat::Rfc3339); + result.SmbProperties.ChangedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderChangedOn), DateTime::DateFormat::Rfc3339); result.SmbProperties.FileId = response.GetHeaders().at(_detail::HeaderFileId); result.SmbProperties.ParentFileId = response.GetHeaders().at(_detail::HeaderParentFileId); @@ -6131,9 +6116,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Succeeded to read the entire file. FileDownloadResult result; result.BodyStream = response.GetBodyStream(); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); for (auto i = response.GetHeaders().lower_bound(_detail::HeaderMetadata); i != response.GetHeaders().end() @@ -6210,9 +6195,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (response.GetHeaders().find(_detail::HeaderCopyCompletedOn) != response.GetHeaders().end()) { - result.CopyCompletedOn = Core::DateTime::Parse( + result.CopyCompletedOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderCopyCompletedOn), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); } if (response.GetHeaders().find(_detail::HeaderCopyStatusDescription) != response.GetHeaders().end()) @@ -6254,15 +6239,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { } result.SmbProperties.Attributes = FileAttributes(response.GetHeaders().at(_detail::HeaderAttributes)); - result.SmbProperties.CreatedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderCreatedOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.LastWrittenOn = Core::DateTime::Parse( + result.SmbProperties.CreatedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderCreatedOn), DateTime::DateFormat::Rfc3339); + result.SmbProperties.LastWrittenOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastWrittenOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.ChangedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderChangedOn), - Core::DateTime::DateFormat::Rfc3339); + DateTime::DateFormat::Rfc3339); + result.SmbProperties.ChangedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderChangedOn), DateTime::DateFormat::Rfc3339); result.SmbProperties.PermissionKey = response.GetHeaders().at(_detail::HeaderFilePermissionKey); result.SmbProperties.FileId = response.GetHeaders().at(_detail::HeaderFileId); @@ -6293,9 +6276,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Succeeded to read a specified range of the file. FileDownloadResult result; result.BodyStream = response.GetBodyStream(); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); for (auto i = response.GetHeaders().lower_bound(_detail::HeaderMetadata); i != response.GetHeaders().end() @@ -6372,9 +6355,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (response.GetHeaders().find(_detail::HeaderCopyCompletedOn) != response.GetHeaders().end()) { - result.CopyCompletedOn = Core::DateTime::Parse( + result.CopyCompletedOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderCopyCompletedOn), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); } if (response.GetHeaders().find(_detail::HeaderCopyStatusDescription) != response.GetHeaders().end()) @@ -6416,15 +6399,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { } result.SmbProperties.Attributes = FileAttributes(response.GetHeaders().at(_detail::HeaderAttributes)); - result.SmbProperties.CreatedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderCreatedOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.LastWrittenOn = Core::DateTime::Parse( + result.SmbProperties.CreatedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderCreatedOn), DateTime::DateFormat::Rfc3339); + result.SmbProperties.LastWrittenOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastWrittenOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.ChangedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderChangedOn), - Core::DateTime::DateFormat::Rfc3339); + DateTime::DateFormat::Rfc3339); + result.SmbProperties.ChangedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderChangedOn), DateTime::DateFormat::Rfc3339); result.SmbProperties.PermissionKey = response.GetHeaders().at(_detail::HeaderFilePermissionKey); result.SmbProperties.FileId = response.GetHeaders().at(_detail::HeaderFileId); @@ -6466,9 +6447,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { // Success. FileGetPropertiesResult result; - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); for (auto i = response.GetHeaders().lower_bound(_detail::HeaderMetadata); i != response.GetHeaders().end() @@ -6519,9 +6500,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (response.GetHeaders().find(_detail::HeaderCopyCompletedOn) != response.GetHeaders().end()) { - result.CopyCompletedOn = Core::DateTime::Parse( + result.CopyCompletedOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderCopyCompletedOn), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); } if (response.GetHeaders().find(_detail::HeaderCopyStatusDescription) != response.GetHeaders().end()) @@ -6557,15 +6538,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { } result.SmbProperties.Attributes = FileAttributes(response.GetHeaders().at(_detail::HeaderAttributes)); - result.SmbProperties.CreatedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderCreatedOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.LastWrittenOn = Core::DateTime::Parse( + result.SmbProperties.CreatedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderCreatedOn), DateTime::DateFormat::Rfc3339); + result.SmbProperties.LastWrittenOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastWrittenOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.ChangedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderChangedOn), - Core::DateTime::DateFormat::Rfc3339); + DateTime::DateFormat::Rfc3339); + result.SmbProperties.ChangedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderChangedOn), DateTime::DateFormat::Rfc3339); result.SmbProperties.PermissionKey = response.GetHeaders().at(_detail::HeaderFilePermissionKey); result.SmbProperties.FileId = response.GetHeaders().at(_detail::HeaderFileId); @@ -6628,9 +6607,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Success FileSetHttpHeadersResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); result.IsServerEncrypted = response.GetHeaders().at(_detail::HeaderRequestIsServerEncrypted) == "true"; @@ -6638,15 +6617,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { = response.GetHeaders().at(_detail::HeaderFilePermissionKey); result.SmbProperties.Attributes = FileAttributes(response.GetHeaders().at(_detail::HeaderAttributes)); - result.SmbProperties.CreatedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderCreatedOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.LastWrittenOn = Core::DateTime::Parse( + result.SmbProperties.CreatedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderCreatedOn), DateTime::DateFormat::Rfc3339); + result.SmbProperties.LastWrittenOn = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastWrittenOn), - Core::DateTime::DateFormat::Rfc3339); - result.SmbProperties.ChangedOn = Core::DateTime::Parse( - response.GetHeaders().at(_detail::HeaderChangedOn), - Core::DateTime::DateFormat::Rfc3339); + DateTime::DateFormat::Rfc3339); + result.SmbProperties.ChangedOn = DateTime::Parse( + response.GetHeaders().at(_detail::HeaderChangedOn), DateTime::DateFormat::Rfc3339); result.SmbProperties.FileId = response.GetHeaders().at(_detail::HeaderFileId); result.SmbProperties.ParentFileId = response.GetHeaders().at(_detail::HeaderParentFileId); @@ -6693,9 +6670,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // The Acquire operation completed successfully. FileAcquireLeaseResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.LeaseId = response.GetHeaders().at(_detail::HeaderLeaseId); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( @@ -6718,9 +6695,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // The Release operation completed successfully. FileReleaseLeaseResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( std::move(result), std::move(responsePtr)); @@ -6742,9 +6719,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // The Change operation completed successfully. FileChangeLeaseResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.LeaseId = response.GetHeaders().at(_detail::HeaderLeaseId); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); return Azure::Response( @@ -6767,9 +6744,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // The Break operation completed successfully. FileBreakLeaseResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); if (response.GetHeaders().find(_detail::HeaderLeaseId) != response.GetHeaders().end()) { result.LeaseId = response.GetHeaders().at(_detail::HeaderLeaseId); @@ -6794,9 +6771,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Success (Created). FileUploadRangeResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); if (response.GetHeaders().find(_detail::HeaderTransactionalContentHashMd5) != response.GetHeaders().end()) { @@ -6831,9 +6808,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // Success (Created). FileUploadRangeFromUrlResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.TransactionalContentHash = Storage::_detail::FromBase64String( response.GetHeaders().at(_detail::HeaderTransactionalContentHashCrc64), HashAlgorithm::Crc64); @@ -6864,9 +6841,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { FileGetRangeListResult result = bodyBuffer.empty() ? FileGetRangeListResult() : FileGetRangeListResultFromShareFileRangeList(ShareFileRangeListFromXml(reader)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); result.FileSize = std::stoll(response.GetHeaders().at(_detail::HeaderXMsContentLength)); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); @@ -6968,9 +6945,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { // The copy file has been accepted with the specified copy status. FileStartCopyResult result; result.ETag = Azure::ETag(response.GetHeaders().at(_detail::HeaderETag)); - result.LastModified = Core::DateTime::Parse( + result.LastModified = DateTime::Parse( response.GetHeaders().at(_detail::HeaderLastModified), - Core::DateTime::DateFormat::Rfc1123); + DateTime::DateFormat::Rfc1123); result.RequestId = response.GetHeaders().at(_detail::HeaderRequestId); if (response.GetHeaders().find(_detail::HeaderCopyId) != response.GetHeaders().end()) { @@ -7128,12 +7105,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { else if (path.size() == 1 && path[0] == XmlTagName::LastReconnectTime) { result.LastReconnectedOn - = Core::DateTime::Parse(node.Value, Core::DateTime::DateFormat::Rfc1123); + = DateTime::Parse(node.Value, DateTime::DateFormat::Rfc1123); } else if (path.size() == 1 && path[0] == XmlTagName::OpenTime) { - result.OpenedOn - = Core::DateTime::Parse(node.Value, Core::DateTime::DateFormat::Rfc1123); + result.OpenedOn = DateTime::Parse(node.Value, DateTime::DateFormat::Rfc1123); } else if (path.size() == 1 && path[0] == XmlTagName::ParentId) { diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_responses.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_responses.hpp index 3379ad4f5..b6aa32f71 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_responses.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_responses.hpp @@ -25,7 +25,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { bool Created = true; Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; }; @@ -54,7 +54,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct CreateShareDirectoryResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; bool IsServerEncrypted = bool(); FileSmbProperties SmbProperties; @@ -105,7 +105,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { bool Created = true; Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; bool IsServerEncrypted = bool(); FileSmbProperties SmbProperties; std::string RequestId; @@ -119,10 +119,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct DownloadShareFileDetails { - Core::DateTime LastModified; + DateTime LastModified; Storage::Metadata Metadata; Azure::ETag ETag; - Azure::Core::Nullable CopyCompletedOn; + Azure::Core::Nullable CopyCompletedOn; Azure::Core::Nullable CopyStatusDescription; Azure::Core::Nullable CopyId; Azure::Core::Nullable CopyProgress; @@ -156,7 +156,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct ClearShareFileRangeResult { Azure::ETag ETag; - Core::DateTime LastModified; + DateTime LastModified; std::string RequestId; bool IsServerEncrypted = bool(); }; @@ -190,7 +190,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { public: std::string RequestId; Azure::ETag ETag; - Azure::Core::DateTime LastModified; + Azure::DateTime LastModified; std::string CopyId; Models::CopyStatusType CopyStatus; Azure::Core::Nullable VersionId; diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_sas_builder.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_sas_builder.hpp index d51e905e0..5f0add749 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_sas_builder.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_sas_builder.hpp @@ -137,14 +137,14 @@ namespace Azure { namespace Storage { namespace Sas { * @brief Optionally specify the time at which the shared access signature becomes * valid. This timestamp will be truncated to second. */ - Azure::Core::Nullable StartsOn; + Azure::Core::Nullable StartsOn; /** * @brief The time at which the shared access signature becomes invalid. This field must * be omitted if it has been specified in an associated stored access policy. This timestamp * will be truncated to second. */ - Azure::Core::DateTime ExpiresOn; + Azure::DateTime ExpiresOn; /** * @brief Specifies an IP address or a range of IP addresses from which to accept diff --git a/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp index 1a2f0fb86..d86769c8e 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp @@ -133,8 +133,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (options.SmbProperties.CreatedOn.HasValue()) { protocolLayerOptions.FileCreationTime = options.SmbProperties.CreatedOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -144,8 +143,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { protocolLayerOptions.FileLastWriteTime = options.SmbProperties.LastWrittenOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -257,8 +255,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (smbProperties.CreatedOn.HasValue()) { protocolLayerOptions.FileCreationTime = smbProperties.CreatedOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -267,8 +264,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (smbProperties.LastWrittenOn.HasValue()) { protocolLayerOptions.FileLastWriteTime = smbProperties.LastWrittenOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { diff --git a/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp index 898dddd28..e003ab4b2 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp @@ -122,8 +122,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (options.SmbProperties.CreatedOn.HasValue()) { protocolLayerOptions.FileCreationTime = options.SmbProperties.CreatedOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -133,8 +132,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { protocolLayerOptions.FileLastWriteTime = options.SmbProperties.LastWrittenOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -339,8 +337,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { protocolLayerOptions.FileCopyFileCreationTime = options.SmbProperties.CreatedOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -350,8 +347,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { protocolLayerOptions.FileCopyFileLastWriteTime = options.SmbProperties.LastWrittenOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -436,8 +432,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (smbProperties.CreatedOn.HasValue()) { protocolLayerOptions.FileCreationTime = smbProperties.CreatedOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -446,8 +441,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (smbProperties.LastWrittenOn.HasValue()) { protocolLayerOptions.FileLastWriteTime = smbProperties.LastWrittenOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -862,8 +856,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (options.SmbProperties.CreatedOn.HasValue()) { protocolLayerOptions.FileCreationTime = options.SmbProperties.CreatedOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -873,8 +866,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { protocolLayerOptions.FileLastWriteTime = options.SmbProperties.LastWrittenOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -968,8 +960,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { if (options.SmbProperties.CreatedOn.HasValue()) { protocolLayerOptions.FileCreationTime = options.SmbProperties.CreatedOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { @@ -979,8 +970,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { protocolLayerOptions.FileLastWriteTime = options.SmbProperties.LastWrittenOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Core::DateTime::TimeFractionFormat::AllDigits); + Azure::DateTime::DateFormat::Rfc3339, DateTime::TimeFractionFormat::AllDigits); } else { diff --git a/sdk/storage/azure-storage-files-shares/src/share_sas_builder.cpp b/sdk/storage/azure-storage-files-shares/src/share_sas_builder.cpp index 1827bd3b0..f75262aad 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_sas_builder.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_sas_builder.cpp @@ -84,14 +84,14 @@ namespace Azure { namespace Storage { namespace Sas { std::string protocol = _detail::SasProtocolToString(Protocol); std::string resource = ShareSasResourceToString(Resource); - std::string startsOnStr = StartsOn.HasValue() ? StartsOn.GetValue().ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) - : ""; - std::string expiresOnStr = Identifier.empty() ? ExpiresOn.ToString( - Azure::Core::DateTime::DateFormat::Rfc3339, - Azure::Core::DateTime::TimeFractionFormat::Truncate) - : ""; + std::string startsOnStr = StartsOn.HasValue() + ? StartsOn.GetValue().ToString( + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate) + : ""; + std::string expiresOnStr = Identifier.empty() + ? ExpiresOn.ToString( + Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate) + : ""; std::string stringToSign = Permissions + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" + canonicalName + "\n" + Identifier + "\n" + (IPRange.HasValue() ? IPRange.GetValue() : "") diff --git a/sdk/storage/azure-storage-files-shares/test/share_client_test.cpp b/sdk/storage/azure-storage-files-shares/test/share_client_test.cpp index 4ba3b1f77..f1b85749c 100644 --- a/sdk/storage/azure-storage-files-shares/test/share_client_test.cpp +++ b/sdk/storage/azure-storage-files-shares/test/share_client_test.cpp @@ -98,7 +98,7 @@ namespace Azure { namespace Storage { namespace Test { auto createResult = client.CreateIfNotExists(); EXPECT_FALSE(createResult->Created); EXPECT_FALSE(createResult->ETag.HasValue()); - EXPECT_EQ(Core::DateTime(), createResult->LastModified); + EXPECT_EQ(DateTime(), createResult->LastModified); auto deleted = client.Delete()->Deleted; EXPECT_TRUE(deleted); } @@ -240,11 +240,11 @@ namespace Azure { namespace Storage { namespace Test { // auto aLease = *leaseClient.Acquire(leaseDuration); // EXPECT_FALSE(aLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), aLease.LastModified); + // EXPECT_NE(Azure::DateTime(), aLease.LastModified); // EXPECT_EQ(aLease.LeaseId, leaseId1); // aLease = *leaseClient.Acquire(leaseDuration); // EXPECT_FALSE(aLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), aLease.LastModified); + // EXPECT_NE(Azure::DateTime(), aLease.LastModified); // EXPECT_EQ(aLease.LeaseId, leaseId1); // auto properties = *m_shareClient->GetProperties(); @@ -255,19 +255,19 @@ namespace Azure { namespace Storage { namespace Test { // auto rLease = *leaseClient.Renew(); // EXPECT_FALSE(rLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), rLease.LastModified); + // EXPECT_NE(Azure::DateTime(), rLease.LastModified); // EXPECT_EQ(rLease.LeaseId, leaseId1); // std::string leaseId2 = CreateUniqueLeaseId(); // EXPECT_NE(leaseId1, leaseId2); // auto cLease = *leaseClient.Change(leaseId2); // EXPECT_FALSE(cLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), cLease.LastModified); + // EXPECT_NE(Azure::DateTime(), cLease.LastModified); // EXPECT_EQ(cLease.LeaseId, leaseId2); // auto relLease = *leaseClient.Release(); // EXPECT_FALSE(relLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), relLease.LastModified); + // EXPECT_NE(Azure::DateTime(), relLease.LastModified); // leaseClient = Files::Shares::ShareLeaseClient(*m_shareClient, CreateUniqueLeaseId()); // aLease = *leaseClient.Acquire(Files::Shares::ShareLeaseClient::InfiniteLeaseDuration); @@ -276,7 +276,7 @@ namespace Azure { namespace Storage { namespace Test { // Files::Shares::Models::LeaseDurationType::Infinite, properties.LeaseDuration.GetValue()); // auto brokenLease = *leaseClient.Break(); // EXPECT_FALSE(brokenLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), brokenLease.LastModified); + // EXPECT_NE(Azure::DateTime(), brokenLease.LastModified); // EXPECT_EQ(brokenLease.LeaseTime, 0); // Files::Shares::BreakShareLeaseOptions options; @@ -293,11 +293,11 @@ namespace Azure { namespace Storage { namespace Test { // auto shareSnapshotLeaseClient = Files::Shares::ShareLeaseClient(shareSnapshot, leaseId1); // auto aLease = *shareSnapshotLeaseClient.Acquire(leaseDuration); // EXPECT_FALSE(aLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), aLease.LastModified); + // EXPECT_NE(Azure::DateTime(), aLease.LastModified); // EXPECT_EQ(aLease.LeaseId, leaseId1); // aLease = *shareSnapshotLeaseClient.Acquire(leaseDuration); // EXPECT_FALSE(aLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), aLease.LastModified); + // EXPECT_NE(Azure::DateTime(), aLease.LastModified); // EXPECT_EQ(aLease.LeaseId, leaseId1); // auto properties = *shareSnapshot.GetProperties(); @@ -308,19 +308,19 @@ namespace Azure { namespace Storage { namespace Test { // auto rLease = *shareSnapshotLeaseClient.Renew(); // EXPECT_FALSE(rLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), rLease.LastModified); + // EXPECT_NE(Azure::DateTime(), rLease.LastModified); // EXPECT_EQ(rLease.LeaseId, leaseId1); // std::string leaseId2 = CreateUniqueLeaseId(); // EXPECT_NE(leaseId1, leaseId2); // auto cLease = *shareSnapshotLeaseClient.Change(leaseId2); // EXPECT_FALSE(cLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), cLease.LastModified); + // EXPECT_NE(Azure::DateTime(), cLease.LastModified); // EXPECT_EQ(cLease.LeaseId, leaseId2); // auto relLease = *shareSnapshotLeaseClient.Release(); // EXPECT_FALSE(relLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), relLease.LastModified); + // EXPECT_NE(Azure::DateTime(), relLease.LastModified); // shareSnapshotLeaseClient // = Files::Shares::ShareLeaseClient(shareSnapshot, CreateUniqueLeaseId()); @@ -332,7 +332,7 @@ namespace Azure { namespace Storage { namespace Test { // Files::Shares::Models::LeaseDurationType::Infinite, properties.LeaseDuration.GetValue()); // auto brokenLease = *shareSnapshotLeaseClient.Break(); // EXPECT_FALSE(brokenLease.ETag.empty()); - // EXPECT_NE(Azure::Core::DateTime(), brokenLease.LastModified); + // EXPECT_NE(Azure::DateTime(), brokenLease.LastModified); // EXPECT_EQ(brokenLease.LeaseTime, 0); // Files::Shares::BreakShareLeaseOptions options; diff --git a/sdk/storage/azure-storage-files-shares/test/share_directory_client_test.cpp b/sdk/storage/azure-storage-files-shares/test/share_directory_client_test.cpp index 64b0722a3..ec0567698 100644 --- a/sdk/storage/azure-storage-files-shares/test/share_directory_client_test.cpp +++ b/sdk/storage/azure-storage-files-shares/test/share_directory_client_test.cpp @@ -126,7 +126,7 @@ namespace Azure { namespace Storage { namespace Test { auto createResult = client.CreateIfNotExists(); EXPECT_FALSE(createResult->Created); EXPECT_FALSE(createResult->ETag.HasValue()); - EXPECT_EQ(Core::DateTime(), createResult->LastModified); + EXPECT_EQ(DateTime(), createResult->LastModified); auto deleted = client.Delete()->Deleted; EXPECT_TRUE(deleted); } diff --git a/sdk/storage/azure-storage-files-shares/test/share_sas_test.cpp b/sdk/storage/azure-storage-files-shares/test/share_sas_test.cpp index 908c36372..2a16920f1 100644 --- a/sdk/storage/azure-storage-files-shares/test/share_sas_test.cpp +++ b/sdk/storage/azure-storage-files-shares/test/share_sas_test.cpp @@ -180,7 +180,7 @@ namespace Azure { namespace Storage { namespace Test { Sas::ShareSasBuilder builder2 = fileSasBuilder; builder2.StartsOn.Reset(); - builder2.ExpiresOn = Azure::Core::DateTime(); + builder2.ExpiresOn = Azure::DateTime(); builder2.SetPermissions(static_cast(0)); builder2.Identifier = identifier.Id;