Rename Enabled to IsEnabled (#1348)
closes https://github.com/Azure/azure-sdk-for-cpp/issues/1129 # Pull Request Checklist Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly: See the detailed list in the [contributing guide](https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#pull-requests). - [x] [C++ Guidelines](https://azure.github.io/azure-sdk/cpp_introduction.html) - [x] Doxygen docs - [x] Unit tests - [x] No unwanted commits/changes - [x] Descriptive title/description - [x] PR is single purpose - [x] Related issue listed - [x] Comments in source - [x] No typos - [x] Update changelog - [x] Not work-in-progress - [x] External references or docs updated - [x] Self review of PR done - [x] Any breaking changes?
This commit is contained in:
parent
c750289f90
commit
0a4924393c
@ -70,6 +70,7 @@
|
||||
- Remove Blob Batch.
|
||||
- `DownloadBlobResult::Content-Range` is changed to an `Azure::Core::Http::Range`, an extra field `BlobSize` is added.
|
||||
- Remove `Undelete` from `BlobContainerClient`.
|
||||
- `BlobRetentionPolicy::Enabled` is renamed to `BlobRetentionPolicy::IsEnabled`, `BlobStaticWebsite::Enabled` is renamed to `BlobStaticWebsite::IsEnabled`.
|
||||
|
||||
## 12.0.0-beta.5 (2020-11-13)
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
|
||||
struct BlobRetentionPolicy
|
||||
{
|
||||
bool Enabled = false;
|
||||
bool IsEnabled = false;
|
||||
Azure::Core::Nullable<int32_t> Days;
|
||||
}; // struct BlobRetentionPolicy
|
||||
|
||||
@ -195,7 +195,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
|
||||
struct BlobStaticWebsite
|
||||
{
|
||||
bool Enabled = false;
|
||||
bool IsEnabled = false;
|
||||
Azure::Core::Nullable<std::string> IndexDocument;
|
||||
Azure::Core::Nullable<std::string> DefaultIndexDocumentPath;
|
||||
Azure::Core::Nullable<std::string> ErrorDocument404Path;
|
||||
@ -2527,7 +2527,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
if (path.size() == 1 && path[0] == XmlTagName::k_Enabled)
|
||||
{
|
||||
ret.Enabled = std::strcmp(node.Value, "true") == 0;
|
||||
ret.IsEnabled = std::strcmp(node.Value, "true") == 0;
|
||||
}
|
||||
else if (path.size() == 1 && path[0] == XmlTagName::k_Days)
|
||||
{
|
||||
@ -2595,7 +2595,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
if (path.size() == 1 && path[0] == XmlTagName::k_Enabled)
|
||||
{
|
||||
ret.Enabled = std::strcmp(node.Value, "true") == 0;
|
||||
ret.IsEnabled = std::strcmp(node.Value, "true") == 0;
|
||||
}
|
||||
else if (path.size() == 1 && path[0] == XmlTagName::k_IndexDocument)
|
||||
{
|
||||
@ -2893,7 +2893,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
writer.Write(
|
||||
Storage::Details::XmlNode{Storage::Details::XmlNodeType::StartTag, "Enabled"});
|
||||
writer.Write(Storage::Details::XmlNode{
|
||||
Storage::Details::XmlNodeType::Text, nullptr, options.Enabled ? "true" : "false"});
|
||||
Storage::Details::XmlNodeType::Text, nullptr, options.IsEnabled ? "true" : "false"});
|
||||
writer.Write(Storage::Details::XmlNode{Storage::Details::XmlNodeType::EndTag});
|
||||
if (options.Days.HasValue())
|
||||
{
|
||||
@ -2914,7 +2914,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
writer.Write(
|
||||
Storage::Details::XmlNode{Storage::Details::XmlNodeType::StartTag, "Enabled"});
|
||||
writer.Write(Storage::Details::XmlNode{
|
||||
Storage::Details::XmlNodeType::Text, nullptr, options.Enabled ? "true" : "false"});
|
||||
Storage::Details::XmlNodeType::Text, nullptr, options.IsEnabled ? "true" : "false"});
|
||||
writer.Write(Storage::Details::XmlNode{Storage::Details::XmlNodeType::EndTag});
|
||||
if (options.IndexDocument.HasValue())
|
||||
{
|
||||
|
||||
@ -11,7 +11,7 @@ namespace Azure { namespace Storage { namespace Blobs { namespace Models {
|
||||
|
||||
bool operator==(const BlobRetentionPolicy& lhs, const BlobRetentionPolicy& rhs)
|
||||
{
|
||||
if (lhs.Enabled != rhs.Enabled)
|
||||
if (lhs.IsEnabled != rhs.IsEnabled)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -35,7 +35,7 @@ namespace Azure { namespace Storage { namespace Blobs { namespace Models {
|
||||
|
||||
bool operator==(const BlobStaticWebsite& lhs, const BlobStaticWebsite& rhs)
|
||||
{
|
||||
if (lhs.Enabled != rhs.Enabled)
|
||||
if (lhs.IsEnabled != rhs.IsEnabled)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -170,7 +170,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
auto properties = *ret;
|
||||
auto logging = properties.Logging;
|
||||
EXPECT_FALSE(logging.Version.empty());
|
||||
if (logging.RetentionPolicy.Enabled)
|
||||
if (logging.RetentionPolicy.IsEnabled)
|
||||
{
|
||||
EXPECT_TRUE(logging.RetentionPolicy.Days.HasValue());
|
||||
}
|
||||
@ -178,7 +178,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
if (hourMetrics.IsEnabled)
|
||||
{
|
||||
EXPECT_FALSE(hourMetrics.Version.empty());
|
||||
if (hourMetrics.RetentionPolicy.Enabled)
|
||||
if (hourMetrics.RetentionPolicy.IsEnabled)
|
||||
{
|
||||
EXPECT_TRUE(hourMetrics.RetentionPolicy.Days.HasValue());
|
||||
}
|
||||
@ -187,13 +187,13 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
if (minuteMetrics.IsEnabled)
|
||||
{
|
||||
EXPECT_FALSE(minuteMetrics.Version.empty());
|
||||
if (minuteMetrics.RetentionPolicy.Enabled)
|
||||
if (minuteMetrics.RetentionPolicy.IsEnabled)
|
||||
{
|
||||
EXPECT_TRUE(minuteMetrics.RetentionPolicy.Days.HasValue());
|
||||
}
|
||||
}
|
||||
auto deleteRetentionPolicy = properties.DeleteRetentionPolicy;
|
||||
if (deleteRetentionPolicy.Enabled)
|
||||
if (deleteRetentionPolicy.IsEnabled)
|
||||
{
|
||||
EXPECT_TRUE(deleteRetentionPolicy.Days.HasValue());
|
||||
}
|
||||
@ -216,22 +216,22 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
properties.Logging.Delete = !properties.Logging.Delete;
|
||||
properties.Logging.Read = !properties.Logging.Read;
|
||||
properties.Logging.Write = !properties.Logging.Write;
|
||||
properties.Logging.RetentionPolicy.Enabled = true;
|
||||
properties.Logging.RetentionPolicy.IsEnabled = true;
|
||||
properties.Logging.RetentionPolicy.Days = 3;
|
||||
|
||||
properties.HourMetrics.IsEnabled = true;
|
||||
properties.HourMetrics.RetentionPolicy.Enabled = true;
|
||||
properties.HourMetrics.RetentionPolicy.IsEnabled = true;
|
||||
properties.HourMetrics.RetentionPolicy.Days = 4;
|
||||
properties.HourMetrics.IncludeApis = true;
|
||||
|
||||
properties.MinuteMetrics.IsEnabled = true;
|
||||
properties.MinuteMetrics.RetentionPolicy.Enabled = true;
|
||||
properties.MinuteMetrics.RetentionPolicy.IsEnabled = true;
|
||||
properties.MinuteMetrics.RetentionPolicy.Days = 4;
|
||||
properties.MinuteMetrics.IncludeApis = true;
|
||||
|
||||
properties.DefaultServiceVersion = Blobs::Details::ApiVersion;
|
||||
|
||||
properties.StaticWebsite.Enabled = true;
|
||||
properties.StaticWebsite.IsEnabled = true;
|
||||
properties.StaticWebsite.IndexDocument = "index.html";
|
||||
properties.StaticWebsite.ErrorDocument404Path = "404.html";
|
||||
properties.StaticWebsite.DefaultIndexDocumentPath.Reset();
|
||||
@ -251,7 +251,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
corsRule.MaxAgeInSeconds = 20;
|
||||
properties.Cors.emplace_back(corsRule);
|
||||
|
||||
properties.DeleteRetentionPolicy.Enabled = true;
|
||||
properties.DeleteRetentionPolicy.IsEnabled = true;
|
||||
properties.DeleteRetentionPolicy.Days = 7;
|
||||
|
||||
EXPECT_NO_THROW(m_blobServiceClient.SetProperties(properties));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user