update uint64 to int64_t (#2398)
This commit is contained in:
parent
05ef02de90
commit
8f8c4e55ce
@ -26,7 +26,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace _internal
|
||||
* @param unixTime The number of seconds since 1970.
|
||||
* @return Calculated #Azure::Core::DateTime.
|
||||
*/
|
||||
static inline Azure::DateTime UnixTimeToDatetime(uint64_t unixTime)
|
||||
static inline Azure::DateTime UnixTimeToDatetime(int64_t unixTime)
|
||||
{
|
||||
return Azure::DateTime(1970) + std::chrono::seconds(unixTime);
|
||||
}
|
||||
@ -36,7 +36,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace _internal
|
||||
*
|
||||
* @param dateTime The date time to convert.
|
||||
*/
|
||||
static inline uint64_t DatetimeToUnixTime(Azure::DateTime dateTime)
|
||||
static inline int64_t DatetimeToUnixTime(Azure::DateTime dateTime)
|
||||
{
|
||||
// This count starts at the Unix epoch which is January 1st, 1970 UTC.
|
||||
auto secondsSince1970
|
||||
|
||||
@ -2,6 +2,11 @@
|
||||
|
||||
## 4.0.0-beta.3 (Unreleased)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- Updated `CreateRsaKeyOptions::KeySize` type from `uint64_t` to `int64_t`.
|
||||
- Updated `CreateRsaKeyOptions::PublicExponent` type from `uint64_t` to `int64_t`.
|
||||
- Updated `CreateOctKeyOptions::KeySize` type from `uint64_t` to `int64_t`.
|
||||
|
||||
## 4.0.0-beta.2 (2021-05-18)
|
||||
|
||||
|
||||
@ -32,8 +32,8 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys { nam
|
||||
|
||||
public:
|
||||
Azure::Nullable<KeyCurveName> Curve;
|
||||
Azure::Nullable<uint64_t> KeySize;
|
||||
Azure::Nullable<uint64_t> PublicExponent;
|
||||
Azure::Nullable<int64_t> KeySize;
|
||||
Azure::Nullable<int64_t> PublicExponent;
|
||||
|
||||
explicit KeyRequestParameters(
|
||||
KeyProperties const& key,
|
||||
|
||||
@ -149,7 +149,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
|
||||
* @remark If null, the service default is used.
|
||||
*
|
||||
*/
|
||||
Azure::Nullable<uint64_t> KeySize;
|
||||
Azure::Nullable<int64_t> KeySize;
|
||||
|
||||
/**
|
||||
* @brief Gets or sets the public exponent for a RSA key.
|
||||
@ -157,7 +157,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
|
||||
* @remark If null, the service default is used.
|
||||
*
|
||||
*/
|
||||
Azure::Nullable<uint64_t> PublicExponent;
|
||||
Azure::Nullable<int64_t> PublicExponent;
|
||||
|
||||
/**
|
||||
* @brief Create a RSA Key Options object.
|
||||
@ -221,7 +221,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
|
||||
* @remark If null, the service default is used.
|
||||
*
|
||||
*/
|
||||
Azure::Nullable<uint64_t> KeySize;
|
||||
Azure::Nullable<int64_t> KeySize;
|
||||
|
||||
/**
|
||||
* @brief Create a AES Key Options object.
|
||||
|
||||
@ -38,12 +38,12 @@ DeletedKey _detail::DeletedKeySerializer::DeletedKeyDeserialize(
|
||||
deletedKey.Properties.RecoveryLevel
|
||||
= jsonParser[_detail::RecoveryLevelPropertyName].get<std::string>();
|
||||
}
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
deletedKey.DeletedDate,
|
||||
jsonParser,
|
||||
_detail::DeletedOnPropertyName,
|
||||
UnixTimeConverter::UnixTimeToDatetime);
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
deletedKey.ScheduledPurgeDate,
|
||||
jsonParser,
|
||||
_detail::ScheduledPurgeDatePropertyName,
|
||||
|
||||
@ -32,7 +32,7 @@ Azure::Security::KeyVault::Keys::_detail::ImportKeyOptionsSerializer::ImportKeyO
|
||||
importKeyOptions.HardwareProtected, payload, _detail::HsmPropertyName);
|
||||
|
||||
// attributes
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, uint64_t>(
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, int64_t>(
|
||||
importKeyOptions.Properties.CreatedOn,
|
||||
payload[_detail::AttributesPropertyName],
|
||||
_detail::CreatedPropertyName,
|
||||
@ -41,12 +41,12 @@ Azure::Security::KeyVault::Keys::_detail::ImportKeyOptionsSerializer::ImportKeyO
|
||||
importKeyOptions.Properties.Enabled,
|
||||
payload[_detail::AttributesPropertyName],
|
||||
_detail::EnabledPropertyName);
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, uint64_t>(
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, int64_t>(
|
||||
importKeyOptions.Properties.ExpiresOn,
|
||||
payload[_detail::AttributesPropertyName],
|
||||
_detail::ExpPropertyName,
|
||||
UnixTimeConverter::DatetimeToUnixTime);
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, uint64_t>(
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, int64_t>(
|
||||
importKeyOptions.Properties.NotBefore,
|
||||
payload[_detail::AttributesPropertyName],
|
||||
_detail::NbfPropertyName,
|
||||
@ -58,7 +58,7 @@ Azure::Security::KeyVault::Keys::_detail::ImportKeyOptionsSerializer::ImportKeyO
|
||||
|
||||
payload[_detail::RecoveryLevelPropertyName] = importKeyOptions.Properties.RecoveryLevel;
|
||||
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, uint64_t>(
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, int64_t>(
|
||||
importKeyOptions.Properties.UpdatedOn,
|
||||
payload[_detail::AttributesPropertyName],
|
||||
_detail::UpdatedPropertyName,
|
||||
|
||||
@ -39,13 +39,13 @@ std::string KeyRequestParameters::Serialize() const
|
||||
}
|
||||
|
||||
// attributes
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, uint64_t>(
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, int64_t>(
|
||||
m_options.ExpiresOn,
|
||||
payload[_detail::AttributesPropertyName],
|
||||
_detail::ExpPropertyName,
|
||||
UnixTimeConverter::DatetimeToUnixTime);
|
||||
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, uint64_t>(
|
||||
JsonOptional::SetFromNullable<Azure::DateTime, int64_t>(
|
||||
m_options.NotBefore,
|
||||
payload[_detail::AttributesPropertyName],
|
||||
_detail::NbfPropertyName,
|
||||
|
||||
@ -59,22 +59,22 @@ void _detail::KeyVaultKeySerializer::KeyVaultKeyDeserialize(
|
||||
|
||||
JsonOptional::SetIfExists(key.Properties.Enabled, attributes, _detail::EnabledPropertyName);
|
||||
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
key.Properties.NotBefore,
|
||||
attributes,
|
||||
_detail::NbfPropertyName,
|
||||
UnixTimeConverter::UnixTimeToDatetime);
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
key.Properties.ExpiresOn,
|
||||
attributes,
|
||||
_detail::ExpPropertyName,
|
||||
UnixTimeConverter::UnixTimeToDatetime);
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
key.Properties.CreatedOn,
|
||||
attributes,
|
||||
_detail::CreatedPropertyName,
|
||||
UnixTimeConverter::UnixTimeToDatetime);
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
key.Properties.UpdatedOn,
|
||||
attributes,
|
||||
_detail::UpdatedPropertyName,
|
||||
|
||||
@ -40,22 +40,22 @@ _detail::KeyPropertiesPageResultSerializer::KeyPropertiesPageResultDeserialize(
|
||||
auto attributes = key[_detail::AttributesPropertyName];
|
||||
|
||||
JsonOptional::SetIfExists(keyProperties.Enabled, attributes, _detail::EnabledPropertyName);
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
keyProperties.NotBefore,
|
||||
attributes,
|
||||
_detail::NbfPropertyName,
|
||||
UnixTimeConverter::UnixTimeToDatetime);
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
keyProperties.ExpiresOn,
|
||||
attributes,
|
||||
_detail::ExpPropertyName,
|
||||
UnixTimeConverter::UnixTimeToDatetime);
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
keyProperties.CreatedOn,
|
||||
attributes,
|
||||
_detail::CreatedPropertyName,
|
||||
UnixTimeConverter::UnixTimeToDatetime);
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
keyProperties.UpdatedOn,
|
||||
attributes,
|
||||
_detail::UpdatedPropertyName,
|
||||
@ -111,12 +111,12 @@ DeletedKeyPageResult _detail::KeyPropertiesPageResultSerializer::DeletedKeyPageR
|
||||
= key[_detail::AttributesPropertyName][_detail::RecoveryLevelPropertyName]
|
||||
.get<std::string>();
|
||||
}
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
deletedKey.DeletedDate,
|
||||
key,
|
||||
_detail::DeletedOnPropertyName,
|
||||
UnixTimeConverter::UnixTimeToDatetime);
|
||||
JsonOptional::SetIfExists<uint64_t, Azure::DateTime>(
|
||||
JsonOptional::SetIfExists<int64_t, Azure::DateTime>(
|
||||
deletedKey.ScheduledPurgeDate,
|
||||
key,
|
||||
_detail::ScheduledPurgeDatePropertyName,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user