From 61e3dae3529a889d89b18251fcad2ad58b93d8ee Mon Sep 17 00:00:00 2001 From: JinmingHu Date: Thu, 29 Apr 2021 17:08:24 +0800 Subject: [PATCH] reorder model types (#2174) --- .../blobs/protocol/blob_rest_client.hpp | 1252 ++++++++--------- .../src/blob_rest_client.cpp | 94 +- 2 files changed, 673 insertions(+), 673 deletions(-) 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 953dfcbb0..f3ca3ef15 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 @@ -35,9 +35,237 @@ namespace Azure { namespace Storage { namespace Blobs { namespace Models { - struct AbortBlobCopyFromUriResult + class AccountKind { + public: + AccountKind() = default; + explicit AccountKind(std::string value) : m_value(std::move(value)) {} + bool operator==(const AccountKind& other) const { return m_value == other.m_value; } + bool operator!=(const AccountKind& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind Storage; + AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind BlobStorage; + AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind StorageV2; + AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind FileStorage; + AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind BlockBlobStorage; + + private: + std::string m_value; + }; // extensible enum AccountKind + + struct BlobBlock { - }; // struct AbortBlobCopyFromUriResult + std::string Name; + int64_t Size = 0; + }; // struct BlobBlock + + class CopyStatus { + public: + CopyStatus() = default; + explicit CopyStatus(std::string value) : m_value(std::move(value)) {} + bool operator==(const CopyStatus& other) const { return m_value == other.m_value; } + bool operator!=(const CopyStatus& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static CopyStatus Success; + AZ_STORAGE_BLOBS_DLLEXPORT const static CopyStatus Pending; + + private: + std::string m_value; + }; // extensible enum CopyStatus + + class GeoReplicationStatus { + public: + GeoReplicationStatus() = default; + explicit GeoReplicationStatus(std::string value) : m_value(std::move(value)) {} + bool operator==(const GeoReplicationStatus& other) const { return m_value == other.m_value; } + bool operator!=(const GeoReplicationStatus& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static GeoReplicationStatus Live; + AZ_STORAGE_BLOBS_DLLEXPORT const static GeoReplicationStatus Bootstrap; + AZ_STORAGE_BLOBS_DLLEXPORT const static GeoReplicationStatus Unavailable; + + private: + std::string m_value; + }; // extensible enum GeoReplicationStatus + + class LeaseDurationType { + public: + LeaseDurationType() = default; + explicit LeaseDurationType(std::string value) : m_value(std::move(value)) {} + bool operator==(const LeaseDurationType& other) const { return m_value == other.m_value; } + bool operator!=(const LeaseDurationType& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseDurationType Infinite; + AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseDurationType Fixed; + + private: + std::string m_value; + }; // extensible enum LeaseDurationType + + class LeaseState { + public: + LeaseState() = default; + explicit LeaseState(std::string value) : m_value(std::move(value)) {} + bool operator==(const LeaseState& other) const { return m_value == other.m_value; } + bool operator!=(const LeaseState& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Available; + AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Leased; + AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Expired; + AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Breaking; + AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Broken; + + private: + std::string m_value; + }; // extensible enum LeaseState + + class LeaseStatus { + public: + LeaseStatus() = default; + explicit LeaseStatus(std::string value) : m_value(std::move(value)) {} + bool operator==(const LeaseStatus& other) const { return m_value == other.m_value; } + bool operator!=(const LeaseStatus& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseStatus Locked; + AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseStatus Unlocked; + + private: + std::string m_value; + }; // extensible enum LeaseStatus + + class ObjectReplicationStatus { + public: + ObjectReplicationStatus() = default; + explicit ObjectReplicationStatus(std::string value) : m_value(std::move(value)) {} + bool operator==(const ObjectReplicationStatus& other) const + { + return m_value == other.m_value; + } + bool operator!=(const ObjectReplicationStatus& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static ObjectReplicationStatus Complete; + AZ_STORAGE_BLOBS_DLLEXPORT const static ObjectReplicationStatus Failed; + + private: + std::string m_value; + }; // extensible enum ObjectReplicationStatus + + class PublicAccessType { + public: + PublicAccessType() = default; + explicit PublicAccessType(std::string value) : m_value(std::move(value)) {} + bool operator==(const PublicAccessType& other) const { return m_value == other.m_value; } + bool operator!=(const PublicAccessType& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static PublicAccessType BlobContainer; + AZ_STORAGE_BLOBS_DLLEXPORT const static PublicAccessType Blob; + AZ_STORAGE_BLOBS_DLLEXPORT const static PublicAccessType None; + + private: + std::string m_value; + }; // extensible enum PublicAccessType + + struct RetentionPolicy + { + bool IsEnabled = false; + Azure::Nullable Days; + }; // struct RetentionPolicy + + struct SignedIdentifier + { + std::string Id; + Azure::DateTime StartsOn; + Azure::DateTime ExpiresOn; + std::string Permissions; + }; // struct SignedIdentifier + + class SkuName { + public: + SkuName() = default; + explicit SkuName(std::string value) : m_value(std::move(value)) {} + bool operator==(const SkuName& other) const { return m_value == other.m_value; } + bool operator!=(const SkuName& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardLrs; + AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardGrs; + AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardRagrs; + AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardZrs; + AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName PremiumLrs; + AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName PremiumZrs; + AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardGzrs; + AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardRagzrs; + + private: + std::string m_value; + }; // extensible enum SkuName + + struct TaggedBlobItem + { + std::string BlobName; + std::string BlobContainerName; + }; // struct TaggedBlobItem + + struct AnalyticsLogging + { + std::string Version; + bool Delete = false; + bool Read = false; + bool Write = false; + Models::RetentionPolicy RetentionPolicy; + }; // struct AnalyticsLogging + + struct BlobContainerItemDetails + { + Azure::ETag ETag; + Azure::DateTime LastModified; + Storage::Metadata Metadata; + PublicAccessType AccessType = PublicAccessType::None; + bool HasImmutabilityPolicy = false; + bool HasLegalHold = false; + Azure::Nullable LeaseDuration; + Models::LeaseState LeaseState = Models::LeaseState::Available; + Models::LeaseStatus LeaseStatus = Models::LeaseStatus::Unlocked; + std::string DefaultEncryptionScope; + bool PreventEncryptionScopeOverride = false; + Azure::Nullable RemainingRetentionDays; + Azure::Nullable DeletedOn; + }; // struct BlobContainerItemDetails + + struct CorsRule + { + std::string AllowedOrigins; + std::string AllowedMethods; + std::string AllowedHeaders; + std::string ExposedHeaders; + int32_t MaxAgeInSeconds = 0; + }; // struct CorsRule + + struct GeoReplication + { + GeoReplicationStatus Status; + Azure::Nullable LastSyncedOn; + }; // struct GeoReplication + + struct Metrics + { + std::string Version; + bool IsEnabled = false; + Models::RetentionPolicy RetentionPolicy; + Azure::Nullable IncludeApis; + }; // struct Metrics + + struct ObjectReplicationRule + { + std::string RuleId; + ObjectReplicationStatus ReplicationStatus; + }; // struct ObjectReplicationRule + + struct StaticWebsite + { + bool IsEnabled = false; + Azure::Nullable IndexDocument; + Azure::Nullable DefaultIndexDocumentPath; + Azure::Nullable ErrorDocument404Path; + }; // struct StaticWebsite class AccessTier { public: @@ -68,41 +296,6 @@ namespace Azure { namespace Storage { namespace Blobs { std::string m_value; }; // extensible enum AccessTier - class AccountKind { - public: - AccountKind() = default; - explicit AccountKind(std::string value) : m_value(std::move(value)) {} - bool operator==(const AccountKind& other) const { return m_value == other.m_value; } - bool operator!=(const AccountKind& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind Storage; - AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind BlobStorage; - AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind StorageV2; - AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind FileStorage; - AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind BlockBlobStorage; - - private: - std::string m_value; - }; // extensible enum AccountKind - - namespace _detail { - struct AcquireBlobContainerLeaseResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - std::string LeaseId; - }; // struct AcquireBlobContainerLeaseResult - } // namespace _detail - - namespace _detail { - struct AcquireBlobLeaseResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - std::string LeaseId; - }; // struct AcquireBlobLeaseResult - } // namespace _detail - class ArchiveStatus { public: ArchiveStatus() = default; @@ -117,11 +310,23 @@ namespace Azure { namespace Storage { namespace Blobs { std::string m_value; }; // extensible enum ArchiveStatus - struct BlobBlock + struct BlobContainerItem { std::string Name; - int64_t Size = 0; - }; // struct BlobBlock + bool IsDeleted = false; + Azure::Nullable VersionId; + BlobContainerItemDetails Details; + }; // struct BlobContainerItem + + struct BlobHttpHeaders + { + std::string ContentType; + std::string ContentEncoding; + std::string ContentLanguage; + Storage::ContentHash ContentHash; + std::string CacheControl; + std::string ContentDisposition; + }; // struct BlobHttpHeaders class BlobType { public: @@ -138,6 +343,203 @@ namespace Azure { namespace Storage { namespace Blobs { std::string m_value; }; // extensible enum BlobType + struct ObjectReplicationPolicy + { + std::string PolicyId; + std::vector Rules; + }; // struct ObjectReplicationPolicy + + class RehydratePriority { + public: + RehydratePriority() = default; + explicit RehydratePriority(std::string value) : m_value(std::move(value)) {} + bool operator==(const RehydratePriority& other) const { return m_value == other.m_value; } + bool operator!=(const RehydratePriority& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static RehydratePriority High; + AZ_STORAGE_BLOBS_DLLEXPORT const static RehydratePriority Standard; + + private: + std::string m_value; + }; // extensible enum RehydratePriority + + struct BlobItemDetails + { + BlobHttpHeaders HttpHeaders; + Storage::Metadata Metadata; + Azure::DateTime CreatedOn; + Azure::Nullable ExpiresOn; + Azure::Nullable LastAccessedOn; + Azure::DateTime LastModified; + Azure::ETag ETag; + Azure::Nullable AccessTier; + Azure::Nullable IsAccessTierInferred; + Models::LeaseStatus LeaseStatus = Models::LeaseStatus::Unlocked; + Models::LeaseState LeaseState = Models::LeaseState::Available; + Azure::Nullable LeaseDuration; + bool IsServerEncrypted = false; + Azure::Nullable> EncryptionKeySha256; + Azure::Nullable EncryptionScope; + Azure::Nullable SequenceNumber; // only for page blobd + Azure::Nullable IsSealed; // only for append blob + std::vector + ObjectReplicationSourceProperties; // only valid for replication source blob + }; // struct BlobItemDetails + + struct DownloadBlobDetails + { + Azure::ETag ETag; + Azure::DateTime LastModified; + Azure::DateTime CreatedOn; + Azure::Nullable ExpiresOn; + Azure::Nullable LastAccessedOn; + BlobHttpHeaders HttpHeaders; + Storage::Metadata Metadata; + Azure::Nullable SequenceNumber; // only for page blob + Azure::Nullable CommittedBlockCount; // only for append blob + Azure::Nullable IsSealed; // only for append blob + Azure::Nullable LeaseDuration; + Azure::Nullable LeaseState; + Azure::Nullable LeaseStatus; + bool IsServerEncrypted = false; + Azure::Nullable> EncryptionKeySha256; + Azure::Nullable EncryptionScope; + Azure::Nullable + ObjectReplicationDestinationPolicyId; // only valid for replication destination blob + std::vector + ObjectReplicationSourceProperties; // only valid for replication source blob + Azure::Nullable TagCount; + Azure::Nullable CopyId; + Azure::Nullable CopySource; + Azure::Nullable CopyStatus; + Azure::Nullable CopyStatusDescription; + Azure::Nullable CopyProgress; + Azure::Nullable CopyCompletedOn; + Azure::Nullable VersionId; + Azure::Nullable IsCurrentVersion; + }; // struct DownloadBlobDetails + + struct BlobItem + { + std::string Name; + int64_t BlobSize = 0; + Models::BlobType BlobType; + bool IsDeleted = false; + std::string Snapshot; + Azure::Nullable VersionId; + Azure::Nullable IsCurrentVersion; + BlobItemDetails Details; + }; // struct BlobItem + + struct AbortBlobCopyFromUriResult + { + }; // struct AbortBlobCopyFromUriResult + + struct AccountInfo + { + Models::SkuName SkuName; + Models::AccountKind AccountKind; + bool IsHierarchicalNamespaceEnabled = false; + }; // struct AccountInfo + + struct AppendBlockFromUriResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + Azure::Nullable TransactionalContentHash; + int64_t AppendOffset = 0; + int64_t CommittedBlockCount = 0; + bool IsServerEncrypted = false; + Azure::Nullable> EncryptionKeySha256; + Azure::Nullable EncryptionScope; + }; // struct AppendBlockFromUriResult + + struct AppendBlockResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + Azure::Nullable TransactionalContentHash; + int64_t AppendOffset = 0; + int64_t CommittedBlockCount = 0; + bool IsServerEncrypted = false; + Azure::Nullable> EncryptionKeySha256; + Azure::Nullable EncryptionScope; + }; // struct AppendBlockResult + + struct BlobContainerAccessPolicy + { + PublicAccessType AccessType = PublicAccessType::None; + std::vector SignedIdentifiers; + }; // struct BlobContainerAccessPolicy + + struct BlobContainerProperties + { + Azure::ETag ETag; + Azure::DateTime LastModified; + Storage::Metadata Metadata; + PublicAccessType AccessType = PublicAccessType::None; + bool HasImmutabilityPolicy = false; + bool HasLegalHold = false; + Azure::Nullable LeaseDuration; + Models::LeaseState LeaseState = Models::LeaseState::Available; + Models::LeaseStatus LeaseStatus = Models::LeaseStatus::Unlocked; + std::string DefaultEncryptionScope; + bool PreventEncryptionScopeOverride = false; + }; // struct BlobContainerProperties + + struct BlobProperties + { + Azure::ETag ETag; + Azure::DateTime LastModified; + Azure::DateTime CreatedOn; + Azure::Nullable ExpiresOn; + Azure::Nullable LastAccessedOn; + Storage::Metadata Metadata; + Models::BlobType BlobType; + Azure::Nullable LeaseDuration; + Azure::Nullable LeaseState; + Azure::Nullable LeaseStatus; + int64_t BlobSize = 0; + BlobHttpHeaders HttpHeaders; + Azure::Nullable SequenceNumber; // only for page blob + Azure::Nullable CommittedBlockCount; // only for append blob + Azure::Nullable IsSealed; // only for append blob + bool IsServerEncrypted = false; + Azure::Nullable> EncryptionKeySha256; + Azure::Nullable EncryptionScope; + Azure::Nullable AccessTier; + Azure::Nullable IsAccessTierInferred; + Azure::Nullable ArchiveStatus; + Azure::Nullable RehydratePriority; + Azure::Nullable AccessTierChangedOn; + Azure::Nullable CopyId; + Azure::Nullable CopySource; + Azure::Nullable CopyStatus; + Azure::Nullable CopyStatusDescription; + Azure::Nullable IsIncrementalCopy; + Azure::Nullable IncrementalCopyDestinationSnapshot; + Azure::Nullable CopyProgress; + Azure::Nullable CopyCompletedOn; + Azure::Nullable + ObjectReplicationDestinationPolicyId; // only valid for replication destination blob + std::vector + ObjectReplicationSourceProperties; // only valid for replication source blob + Azure::Nullable TagCount; + Azure::Nullable VersionId; + Azure::Nullable IsCurrentVersion; + }; // struct BlobProperties + + struct BlobServiceProperties + { + AnalyticsLogging Logging; + Metrics HourMetrics; + Metrics MinuteMetrics; + std::vector Cors; + Azure::Nullable DefaultServiceVersion; + RetentionPolicy DeleteRetentionPolicy; + Models::StaticWebsite StaticWebsite; + }; // struct BlobServiceProperties + class BlockListType { public: BlockListType() = default; @@ -168,42 +570,6 @@ namespace Azure { namespace Storage { namespace Blobs { std::string m_value; }; // extensible enum BlockType - namespace _detail { - struct BreakBlobContainerLeaseResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - int32_t LeaseTime = 0; - }; // struct BreakBlobContainerLeaseResult - } // namespace _detail - - namespace _detail { - struct BreakBlobLeaseResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - int32_t LeaseTime = 0; - }; // struct BreakBlobLeaseResult - } // namespace _detail - - namespace _detail { - struct ChangeBlobContainerLeaseResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - std::string LeaseId; - }; // struct ChangeBlobContainerLeaseResult - } // namespace _detail - - namespace _detail { - struct ChangeBlobLeaseResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - std::string LeaseId; - }; // struct ChangeBlobLeaseResult - } // namespace _detail - struct ClearPagesResult { Azure::ETag ETag; @@ -211,28 +577,16 @@ namespace Azure { namespace Storage { namespace Blobs { int64_t SequenceNumber = 0; }; // struct ClearPagesResult - class CopyStatus { - public: - CopyStatus() = default; - explicit CopyStatus(std::string value) : m_value(std::move(value)) {} - bool operator==(const CopyStatus& other) const { return m_value == other.m_value; } - bool operator!=(const CopyStatus& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static CopyStatus Success; - AZ_STORAGE_BLOBS_DLLEXPORT const static CopyStatus Pending; - - private: - std::string m_value; - }; // extensible enum CopyStatus - - struct CorsRule + struct CommitBlockListResult { - std::string AllowedOrigins; - std::string AllowedMethods; - std::string AllowedHeaders; - std::string ExposedHeaders; - int32_t MaxAgeInSeconds = 0; - }; // struct CorsRule + Azure::ETag ETag; + Azure::DateTime LastModified; + Azure::Nullable VersionId; + bool IsServerEncrypted = false; + Azure::Nullable> EncryptionKeySha256; + Azure::Nullable EncryptionScope; + Azure::Nullable TransactionalContentHash; + }; // struct CommitBlockListResult struct CreateAppendBlobResult { @@ -299,6 +653,16 @@ namespace Azure { namespace Storage { namespace Blobs { std::string m_value; }; // extensible enum DeleteSnapshotsOption + struct DownloadBlobResult + { + std::unique_ptr BodyStream; + Azure::Core::Http::HttpRange ContentRange; + int64_t BlobSize = 0; + Models::BlobType BlobType; + Azure::Nullable TransactionalContentHash; // hash for the downloaded range + DownloadBlobDetails Details; + }; // struct DownloadBlobResult + class EncryptionAlgorithmType { public: EncryptionAlgorithmType() = default; @@ -315,27 +679,15 @@ namespace Azure { namespace Storage { namespace Blobs { std::string m_value; }; // extensible enum EncryptionAlgorithmType - class GeoReplicationStatus { - public: - GeoReplicationStatus() = default; - explicit GeoReplicationStatus(std::string value) : m_value(std::move(value)) {} - bool operator==(const GeoReplicationStatus& other) const { return m_value == other.m_value; } - bool operator!=(const GeoReplicationStatus& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static GeoReplicationStatus Live; - AZ_STORAGE_BLOBS_DLLEXPORT const static GeoReplicationStatus Bootstrap; - AZ_STORAGE_BLOBS_DLLEXPORT const static GeoReplicationStatus Unavailable; - - private: - std::string m_value; - }; // extensible enum GeoReplicationStatus - - namespace _detail { - struct GetBlobTagsResult - { - std::map Tags; - }; // struct GetBlobTagsResult - } // namespace _detail + struct GetBlockListResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + std::string ContentType; + int64_t BlobSize = 0; + std::vector CommittedBlocks; + std::vector UncommittedBlocks; + }; // struct GetBlockListResult struct GetPageRangesResult { @@ -346,51 +698,6 @@ namespace Azure { namespace Storage { namespace Blobs { std::vector ClearRanges; }; // struct GetPageRangesResult - class LeaseDurationType { - public: - LeaseDurationType() = default; - explicit LeaseDurationType(std::string value) : m_value(std::move(value)) {} - bool operator==(const LeaseDurationType& other) const { return m_value == other.m_value; } - bool operator!=(const LeaseDurationType& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseDurationType Infinite; - AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseDurationType Fixed; - - private: - std::string m_value; - }; // extensible enum LeaseDurationType - - class LeaseState { - public: - LeaseState() = default; - explicit LeaseState(std::string value) : m_value(std::move(value)) {} - bool operator==(const LeaseState& other) const { return m_value == other.m_value; } - bool operator!=(const LeaseState& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Available; - AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Leased; - AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Expired; - AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Breaking; - AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Broken; - - private: - std::string m_value; - }; // extensible enum LeaseState - - class LeaseStatus { - public: - LeaseStatus() = default; - explicit LeaseStatus(std::string value) : m_value(std::move(value)) {} - bool operator==(const LeaseStatus& other) const { return m_value == other.m_value; } - bool operator!=(const LeaseStatus& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseStatus Locked; - AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseStatus Unlocked; - - private: - std::string m_value; - }; // extensible enum LeaseStatus - enum class ListBlobContainersIncludeFlags { None = 0, @@ -467,87 +774,6 @@ namespace Azure { namespace Storage { namespace Blobs { return lhs; } - class ObjectReplicationStatus { - public: - ObjectReplicationStatus() = default; - explicit ObjectReplicationStatus(std::string value) : m_value(std::move(value)) {} - bool operator==(const ObjectReplicationStatus& other) const - { - return m_value == other.m_value; - } - bool operator!=(const ObjectReplicationStatus& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static ObjectReplicationStatus Complete; - AZ_STORAGE_BLOBS_DLLEXPORT const static ObjectReplicationStatus Failed; - - private: - std::string m_value; - }; // extensible enum ObjectReplicationStatus - - class PublicAccessType { - public: - PublicAccessType() = default; - explicit PublicAccessType(std::string value) : m_value(std::move(value)) {} - bool operator==(const PublicAccessType& other) const { return m_value == other.m_value; } - bool operator!=(const PublicAccessType& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static PublicAccessType BlobContainer; - AZ_STORAGE_BLOBS_DLLEXPORT const static PublicAccessType Blob; - AZ_STORAGE_BLOBS_DLLEXPORT const static PublicAccessType None; - - private: - std::string m_value; - }; // extensible enum PublicAccessType - - class RehydratePriority { - public: - RehydratePriority() = default; - explicit RehydratePriority(std::string value) : m_value(std::move(value)) {} - bool operator==(const RehydratePriority& other) const { return m_value == other.m_value; } - bool operator!=(const RehydratePriority& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static RehydratePriority High; - AZ_STORAGE_BLOBS_DLLEXPORT const static RehydratePriority Standard; - - private: - std::string m_value; - }; // extensible enum RehydratePriority - - namespace _detail { - struct ReleaseBlobContainerLeaseResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - }; // struct ReleaseBlobContainerLeaseResult - } // namespace _detail - - namespace _detail { - struct ReleaseBlobLeaseResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - Azure::Nullable SequenceNumber; - }; // struct ReleaseBlobLeaseResult - } // namespace _detail - - namespace _detail { - struct RenewBlobContainerLeaseResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - std::string LeaseId; - }; // struct RenewBlobContainerLeaseResult - } // namespace _detail - - namespace _detail { - struct RenewBlobLeaseResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - std::string LeaseId; - }; // struct RenewBlobLeaseResult - } // namespace _detail - struct ResizePageBlobResult { Azure::ETag ETag; @@ -555,12 +781,6 @@ namespace Azure { namespace Storage { namespace Blobs { int64_t SequenceNumber = 0; }; // struct ResizePageBlobResult - struct RetentionPolicy - { - bool IsEnabled = false; - Azure::Nullable Days; - }; // struct RetentionPolicy - class ScheduleBlobExpiryOriginType { public: ScheduleBlobExpiryOriginType() = default; @@ -587,6 +807,11 @@ namespace Azure { namespace Storage { namespace Blobs { bool IsSealed = true; }; // struct SealAppendBlobResult + struct ServiceStatistics + { + Models::GeoReplication GeoReplication; + }; // struct ServiceStatistics + struct SetBlobAccessTierResult { }; // struct SetBlobAccessTierResult @@ -629,266 +854,6 @@ namespace Azure { namespace Storage { namespace Blobs { { }; // struct SetServicePropertiesResult - struct SignedIdentifier - { - std::string Id; - Azure::DateTime StartsOn; - Azure::DateTime ExpiresOn; - std::string Permissions; - }; // struct SignedIdentifier - - class SkuName { - public: - SkuName() = default; - explicit SkuName(std::string value) : m_value(std::move(value)) {} - bool operator==(const SkuName& other) const { return m_value == other.m_value; } - bool operator!=(const SkuName& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardLrs; - AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardGrs; - AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardRagrs; - AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardZrs; - AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName PremiumLrs; - AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName PremiumZrs; - AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardGzrs; - AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardRagzrs; - - private: - std::string m_value; - }; // extensible enum SkuName - - struct StaticWebsite - { - bool IsEnabled = false; - Azure::Nullable IndexDocument; - Azure::Nullable DefaultIndexDocumentPath; - Azure::Nullable ErrorDocument404Path; - }; // struct StaticWebsite - - namespace _detail { - struct SubmitBlobBatchResult - { - std::string ContentType; - }; // struct SubmitBlobBatchResult - } // namespace _detail - - struct TaggedBlobItem - { - std::string BlobName; - std::string BlobContainerName; - }; // struct TaggedBlobItem - - namespace _detail { - struct UndeleteBlobContainerResult - { - }; // struct UndeleteBlobContainerResult - } // namespace _detail - - struct UndeleteBlobResult - { - }; // struct UndeleteBlobResult - - struct UserDelegationKey - { - std::string SignedObjectId; - std::string SignedTenantId; - Azure::DateTime SignedStartsOn; - Azure::DateTime SignedExpiresOn; - std::string SignedService; - std::string SignedVersion; - std::string Value; - }; // struct UserDelegationKey - - struct AccountInfo - { - Models::SkuName SkuName; - Models::AccountKind AccountKind; - bool IsHierarchicalNamespaceEnabled = false; - }; // struct AccountInfo - - struct AnalyticsLogging - { - std::string Version; - bool Delete = false; - bool Read = false; - bool Write = false; - Models::RetentionPolicy RetentionPolicy; - }; // struct AnalyticsLogging - - struct BlobContainerAccessPolicy - { - PublicAccessType AccessType = PublicAccessType::None; - std::vector SignedIdentifiers; - }; // struct BlobContainerAccessPolicy - - struct BlobContainerItemDetails - { - Azure::ETag ETag; - Azure::DateTime LastModified; - Storage::Metadata Metadata; - PublicAccessType AccessType = PublicAccessType::None; - bool HasImmutabilityPolicy = false; - bool HasLegalHold = false; - Azure::Nullable LeaseDuration; - Models::LeaseState LeaseState = Models::LeaseState::Available; - Models::LeaseStatus LeaseStatus = Models::LeaseStatus::Unlocked; - std::string DefaultEncryptionScope; - bool PreventEncryptionScopeOverride = false; - Azure::Nullable RemainingRetentionDays; - Azure::Nullable DeletedOn; - }; // struct BlobContainerItemDetails - - struct BlobContainerProperties - { - Azure::ETag ETag; - Azure::DateTime LastModified; - Storage::Metadata Metadata; - PublicAccessType AccessType = PublicAccessType::None; - bool HasImmutabilityPolicy = false; - bool HasLegalHold = false; - Azure::Nullable LeaseDuration; - Models::LeaseState LeaseState = Models::LeaseState::Available; - Models::LeaseStatus LeaseStatus = Models::LeaseStatus::Unlocked; - std::string DefaultEncryptionScope; - bool PreventEncryptionScopeOverride = false; - }; // struct BlobContainerProperties - - namespace _detail { - struct FindBlobsByTagsResult - { - std::string ServiceEndpoint; - Azure::Nullable ContinuationToken; - std::vector Items; - }; // struct FindBlobsByTagsResult - } // namespace _detail - - struct GeoReplication - { - GeoReplicationStatus Status; - Azure::Nullable LastSyncedOn; - }; // struct GeoReplication - - struct GetBlockListResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - std::string ContentType; - int64_t BlobSize = 0; - std::vector CommittedBlocks; - std::vector UncommittedBlocks; - }; // struct GetBlockListResult - - struct Metrics - { - std::string Version; - bool IsEnabled = false; - Models::RetentionPolicy RetentionPolicy; - Azure::Nullable IncludeApis; - }; // struct Metrics - - struct ObjectReplicationRule - { - std::string RuleId; - ObjectReplicationStatus ReplicationStatus; - }; // struct ObjectReplicationRule - - namespace _detail { - struct StartBlobCopyFromUriResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - std::string CopyId; - Models::CopyStatus CopyStatus; - Azure::Nullable VersionId; - }; // struct StartBlobCopyFromUriResult - } // namespace _detail - - namespace _detail { - struct StartBlobCopyIncrementalResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - std::string CopyId; - Models::CopyStatus CopyStatus; - Azure::Nullable VersionId; - }; // struct StartBlobCopyIncrementalResult - } // namespace _detail - - struct AppendBlockFromUriResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - Azure::Nullable TransactionalContentHash; - int64_t AppendOffset = 0; - int64_t CommittedBlockCount = 0; - bool IsServerEncrypted = false; - Azure::Nullable> EncryptionKeySha256; - Azure::Nullable EncryptionScope; - }; // struct AppendBlockFromUriResult - - struct AppendBlockResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - Azure::Nullable TransactionalContentHash; - int64_t AppendOffset = 0; - int64_t CommittedBlockCount = 0; - bool IsServerEncrypted = false; - Azure::Nullable> EncryptionKeySha256; - Azure::Nullable EncryptionScope; - }; // struct AppendBlockResult - - struct BlobContainerItem - { - std::string Name; - bool IsDeleted = false; - Azure::Nullable VersionId; - BlobContainerItemDetails Details; - }; // struct BlobContainerItem - - struct BlobHttpHeaders - { - std::string ContentType; - std::string ContentEncoding; - std::string ContentLanguage; - Storage::ContentHash ContentHash; - std::string CacheControl; - std::string ContentDisposition; - }; // struct BlobHttpHeaders - - struct BlobServiceProperties - { - AnalyticsLogging Logging; - Metrics HourMetrics; - Metrics MinuteMetrics; - std::vector Cors; - Azure::Nullable DefaultServiceVersion; - RetentionPolicy DeleteRetentionPolicy; - Models::StaticWebsite StaticWebsite; - }; // struct BlobServiceProperties - - struct CommitBlockListResult - { - Azure::ETag ETag; - Azure::DateTime LastModified; - Azure::Nullable VersionId; - bool IsServerEncrypted = false; - Azure::Nullable> EncryptionKeySha256; - Azure::Nullable EncryptionScope; - Azure::Nullable TransactionalContentHash; - }; // struct CommitBlockListResult - - struct ObjectReplicationPolicy - { - std::string PolicyId; - std::vector Rules; - }; // struct ObjectReplicationPolicy - - struct ServiceStatistics - { - Models::GeoReplication GeoReplication; - }; // struct ServiceStatistics - struct StageBlockFromUriResult { Azure::Nullable TransactionalContentHash; @@ -905,6 +870,10 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable EncryptionScope; }; // struct StageBlockResult + struct UndeleteBlobResult + { + }; // struct UndeleteBlobResult + struct UploadBlockBlobResult { Azure::ETag ETag; @@ -938,103 +907,86 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable EncryptionScope; }; // struct UploadPagesResult - struct BlobItemDetails + struct UserDelegationKey { - BlobHttpHeaders HttpHeaders; - Storage::Metadata Metadata; - Azure::DateTime CreatedOn; - Azure::Nullable ExpiresOn; - Azure::Nullable LastAccessedOn; - Azure::DateTime LastModified; - Azure::ETag ETag; - Azure::Nullable AccessTier; - Azure::Nullable IsAccessTierInferred; - Models::LeaseStatus LeaseStatus = Models::LeaseStatus::Unlocked; - Models::LeaseState LeaseState = Models::LeaseState::Available; - Azure::Nullable LeaseDuration; - bool IsServerEncrypted = false; - Azure::Nullable> EncryptionKeySha256; - Azure::Nullable EncryptionScope; - Azure::Nullable SequenceNumber; // only for page blobd - Azure::Nullable IsSealed; // only for append blob - std::vector - ObjectReplicationSourceProperties; // only valid for replication source blob - }; // struct BlobItemDetails + std::string SignedObjectId; + std::string SignedTenantId; + Azure::DateTime SignedStartsOn; + Azure::DateTime SignedExpiresOn; + std::string SignedService; + std::string SignedVersion; + std::string Value; + }; // struct UserDelegationKey - struct BlobProperties - { - Azure::ETag ETag; - Azure::DateTime LastModified; - Azure::DateTime CreatedOn; - Azure::Nullable ExpiresOn; - Azure::Nullable LastAccessedOn; - Storage::Metadata Metadata; - Models::BlobType BlobType; - Azure::Nullable LeaseDuration; - Azure::Nullable LeaseState; - Azure::Nullable LeaseStatus; - int64_t BlobSize = 0; - BlobHttpHeaders HttpHeaders; - Azure::Nullable SequenceNumber; // only for page blob - Azure::Nullable CommittedBlockCount; // only for append blob - Azure::Nullable IsSealed; // only for append blob - bool IsServerEncrypted = false; - Azure::Nullable> EncryptionKeySha256; - Azure::Nullable EncryptionScope; - Azure::Nullable AccessTier; - Azure::Nullable IsAccessTierInferred; - Azure::Nullable ArchiveStatus; - Azure::Nullable RehydratePriority; - Azure::Nullable AccessTierChangedOn; - Azure::Nullable CopyId; - Azure::Nullable CopySource; - Azure::Nullable CopyStatus; - Azure::Nullable CopyStatusDescription; - Azure::Nullable IsIncrementalCopy; - Azure::Nullable IncrementalCopyDestinationSnapshot; - Azure::Nullable CopyProgress; - Azure::Nullable CopyCompletedOn; - Azure::Nullable - ObjectReplicationDestinationPolicyId; // only valid for replication destination blob - std::vector - ObjectReplicationSourceProperties; // only valid for replication source blob - Azure::Nullable TagCount; - Azure::Nullable VersionId; - Azure::Nullable IsCurrentVersion; - }; // struct BlobProperties + namespace _detail { + struct AcquireBlobContainerLeaseResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + std::string LeaseId; + }; // struct AcquireBlobContainerLeaseResult + } // namespace _detail - struct DownloadBlobDetails - { - Azure::ETag ETag; - Azure::DateTime LastModified; - Azure::DateTime CreatedOn; - Azure::Nullable ExpiresOn; - Azure::Nullable LastAccessedOn; - BlobHttpHeaders HttpHeaders; - Storage::Metadata Metadata; - Azure::Nullable SequenceNumber; // only for page blob - Azure::Nullable CommittedBlockCount; // only for append blob - Azure::Nullable IsSealed; // only for append blob - Azure::Nullable LeaseDuration; - Azure::Nullable LeaseState; - Azure::Nullable LeaseStatus; - bool IsServerEncrypted = false; - Azure::Nullable> EncryptionKeySha256; - Azure::Nullable EncryptionScope; - Azure::Nullable - ObjectReplicationDestinationPolicyId; // only valid for replication destination blob - std::vector - ObjectReplicationSourceProperties; // only valid for replication source blob - Azure::Nullable TagCount; - Azure::Nullable CopyId; - Azure::Nullable CopySource; - Azure::Nullable CopyStatus; - Azure::Nullable CopyStatusDescription; - Azure::Nullable CopyProgress; - Azure::Nullable CopyCompletedOn; - Azure::Nullable VersionId; - Azure::Nullable IsCurrentVersion; - }; // struct DownloadBlobDetails + namespace _detail { + struct AcquireBlobLeaseResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + std::string LeaseId; + }; // struct AcquireBlobLeaseResult + } // namespace _detail + + namespace _detail { + struct BreakBlobContainerLeaseResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + int32_t LeaseTime = 0; + }; // struct BreakBlobContainerLeaseResult + } // namespace _detail + + namespace _detail { + struct BreakBlobLeaseResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + int32_t LeaseTime = 0; + }; // struct BreakBlobLeaseResult + } // namespace _detail + + namespace _detail { + struct ChangeBlobContainerLeaseResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + std::string LeaseId; + }; // struct ChangeBlobContainerLeaseResult + } // namespace _detail + + namespace _detail { + struct ChangeBlobLeaseResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + std::string LeaseId; + }; // struct ChangeBlobLeaseResult + } // namespace _detail + + namespace _detail { + struct FindBlobsByTagsResult + { + std::string ServiceEndpoint; + Azure::Nullable ContinuationToken; + std::vector Items; + }; // struct FindBlobsByTagsResult + } // namespace _detail + + namespace _detail { + struct GetBlobTagsResult + { + std::map Tags; + }; // struct GetBlobTagsResult + } // namespace _detail namespace _detail { struct ListBlobContainersResult @@ -1046,28 +998,6 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ListBlobContainersResult } // namespace _detail - struct BlobItem - { - std::string Name; - int64_t BlobSize = 0; - Models::BlobType BlobType; - bool IsDeleted = false; - std::string Snapshot; - Azure::Nullable VersionId; - Azure::Nullable IsCurrentVersion; - BlobItemDetails Details; - }; // struct BlobItem - - struct DownloadBlobResult - { - std::unique_ptr BodyStream; - Azure::Core::Http::HttpRange ContentRange; - int64_t BlobSize = 0; - Models::BlobType BlobType; - Azure::Nullable TransactionalContentHash; // hash for the downloaded range - DownloadBlobDetails Details; - }; // struct DownloadBlobResult - namespace _detail { struct ListBlobsByHierarchyResult { @@ -1092,6 +1022,76 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ListBlobsResult } // namespace _detail + namespace _detail { + struct ReleaseBlobContainerLeaseResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + }; // struct ReleaseBlobContainerLeaseResult + } // namespace _detail + + namespace _detail { + struct ReleaseBlobLeaseResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + Azure::Nullable SequenceNumber; + }; // struct ReleaseBlobLeaseResult + } // namespace _detail + + namespace _detail { + struct RenewBlobContainerLeaseResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + std::string LeaseId; + }; // struct RenewBlobContainerLeaseResult + } // namespace _detail + + namespace _detail { + struct RenewBlobLeaseResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + std::string LeaseId; + }; // struct RenewBlobLeaseResult + } // namespace _detail + + namespace _detail { + struct StartBlobCopyFromUriResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + std::string CopyId; + Models::CopyStatus CopyStatus; + Azure::Nullable VersionId; + }; // struct StartBlobCopyFromUriResult + } // namespace _detail + + namespace _detail { + struct StartBlobCopyIncrementalResult + { + Azure::ETag ETag; + Azure::DateTime LastModified; + std::string CopyId; + Models::CopyStatus CopyStatus; + Azure::Nullable VersionId; + }; // struct StartBlobCopyIncrementalResult + } // namespace _detail + + namespace _detail { + struct SubmitBlobBatchResult + { + std::string ContentType; + }; // struct SubmitBlobBatchResult + } // namespace _detail + + namespace _detail { + struct UndeleteBlobContainerResult + { + }; // struct UndeleteBlobContainerResult + } // namespace _detail + } // namespace Models namespace _detail { diff --git a/sdk/storage/azure-storage-blobs/src/blob_rest_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_rest_client.cpp index 1930fa821..82254dc99 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_rest_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_rest_client.cpp @@ -5,53 +5,15 @@ namespace Azure { namespace Storage { namespace Blobs { namespace Models { - const AccessTier AccessTier::P1("P1"); - const AccessTier AccessTier::P2("P2"); - const AccessTier AccessTier::P3("P3"); - const AccessTier AccessTier::P4("P4"); - const AccessTier AccessTier::P6("P6"); - const AccessTier AccessTier::P10("P10"); - const AccessTier AccessTier::P15("P15"); - const AccessTier AccessTier::P20("P20"); - const AccessTier AccessTier::P30("P30"); - const AccessTier AccessTier::P40("P40"); - const AccessTier AccessTier::P50("P50"); - const AccessTier AccessTier::P60("P60"); - const AccessTier AccessTier::P70("P70"); - const AccessTier AccessTier::P80("P80"); - const AccessTier AccessTier::Hot("Hot"); - const AccessTier AccessTier::Cool("Cool"); - const AccessTier AccessTier::Archive("Archive"); - const AccountKind AccountKind::Storage("Storage"); const AccountKind AccountKind::BlobStorage("BlobStorage"); const AccountKind AccountKind::StorageV2("StorageV2"); const AccountKind AccountKind::FileStorage("FileStorage"); const AccountKind AccountKind::BlockBlobStorage("BlockBlobStorage"); - const ArchiveStatus ArchiveStatus::RehydratePendingToHot("rehydrate-pending-to-hot"); - const ArchiveStatus ArchiveStatus::RehydratePendingToCool("rehydrate-pending-to-cool"); - - const BlobType BlobType::BlockBlob("BlockBlob"); - const BlobType BlobType::PageBlob("PageBlob"); - const BlobType BlobType::AppendBlob("AppendBlob"); - - const BlockListType BlockListType::Committed("committed"); - const BlockListType BlockListType::Uncommitted("uncommitted"); - const BlockListType BlockListType::All("all"); - - const BlockType BlockType::Committed("Committed"); - const BlockType BlockType::Uncommitted("Uncommitted"); - const BlockType BlockType::Latest("Latest"); - const CopyStatus CopyStatus::Success("success"); const CopyStatus CopyStatus::Pending("pending"); - const DeleteSnapshotsOption DeleteSnapshotsOption::IncludeSnapshots("include"); - const DeleteSnapshotsOption DeleteSnapshotsOption::OnlySnapshots("only"); - - const EncryptionAlgorithmType EncryptionAlgorithmType::Aes256("AES256"); - const GeoReplicationStatus GeoReplicationStatus::Live("live"); const GeoReplicationStatus GeoReplicationStatus::Bootstrap("bootstrap"); const GeoReplicationStatus GeoReplicationStatus::Unavailable("unavailable"); @@ -75,15 +37,6 @@ namespace Azure { namespace Storage { namespace Blobs { namespace Models { const PublicAccessType PublicAccessType::Blob("blob"); const PublicAccessType PublicAccessType::None(""); - const RehydratePriority RehydratePriority::High("High"); - const RehydratePriority RehydratePriority::Standard("Standard"); - - const ScheduleBlobExpiryOriginType ScheduleBlobExpiryOriginType::NeverExpire("NeverExpire"); - const ScheduleBlobExpiryOriginType ScheduleBlobExpiryOriginType::RelativeToCreation( - "RelativeToCreation"); - const ScheduleBlobExpiryOriginType ScheduleBlobExpiryOriginType::RelativeToNow("RelativeToNow"); - const ScheduleBlobExpiryOriginType ScheduleBlobExpiryOriginType::Absolute("Absolute"); - const SkuName SkuName::StandardLrs("Standard_LRS"); const SkuName SkuName::StandardGrs("Standard_GRS"); const SkuName SkuName::StandardRagrs("Standard_RAGRS"); @@ -93,4 +46,51 @@ namespace Azure { namespace Storage { namespace Blobs { namespace Models { const SkuName SkuName::StandardGzrs("Standard_GZRS"); const SkuName SkuName::StandardRagzrs("Standard_RAGZRS"); + const AccessTier AccessTier::P1("P1"); + const AccessTier AccessTier::P2("P2"); + const AccessTier AccessTier::P3("P3"); + const AccessTier AccessTier::P4("P4"); + const AccessTier AccessTier::P6("P6"); + const AccessTier AccessTier::P10("P10"); + const AccessTier AccessTier::P15("P15"); + const AccessTier AccessTier::P20("P20"); + const AccessTier AccessTier::P30("P30"); + const AccessTier AccessTier::P40("P40"); + const AccessTier AccessTier::P50("P50"); + const AccessTier AccessTier::P60("P60"); + const AccessTier AccessTier::P70("P70"); + const AccessTier AccessTier::P80("P80"); + const AccessTier AccessTier::Hot("Hot"); + const AccessTier AccessTier::Cool("Cool"); + const AccessTier AccessTier::Archive("Archive"); + + const ArchiveStatus ArchiveStatus::RehydratePendingToHot("rehydrate-pending-to-hot"); + const ArchiveStatus ArchiveStatus::RehydratePendingToCool("rehydrate-pending-to-cool"); + + const BlobType BlobType::BlockBlob("BlockBlob"); + const BlobType BlobType::PageBlob("PageBlob"); + const BlobType BlobType::AppendBlob("AppendBlob"); + + const RehydratePriority RehydratePriority::High("High"); + const RehydratePriority RehydratePriority::Standard("Standard"); + + const BlockListType BlockListType::Committed("committed"); + const BlockListType BlockListType::Uncommitted("uncommitted"); + const BlockListType BlockListType::All("all"); + + const BlockType BlockType::Committed("Committed"); + const BlockType BlockType::Uncommitted("Uncommitted"); + const BlockType BlockType::Latest("Latest"); + + const DeleteSnapshotsOption DeleteSnapshotsOption::IncludeSnapshots("include"); + const DeleteSnapshotsOption DeleteSnapshotsOption::OnlySnapshots("only"); + + const EncryptionAlgorithmType EncryptionAlgorithmType::Aes256("AES256"); + + const ScheduleBlobExpiryOriginType ScheduleBlobExpiryOriginType::NeverExpire("NeverExpire"); + const ScheduleBlobExpiryOriginType ScheduleBlobExpiryOriginType::RelativeToCreation( + "RelativeToCreation"); + const ScheduleBlobExpiryOriginType ScheduleBlobExpiryOriginType::RelativeToNow("RelativeToNow"); + const ScheduleBlobExpiryOriginType ScheduleBlobExpiryOriginType::Absolute("Absolute"); + }}}} // namespace Azure::Storage::Blobs::Models