diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp index 0278ca167c..e0682a4fc5 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -38,51 +39,35 @@ namespace Azure { namespace Storage { namespace Blobs { * @brief The algorithm used to produce the encryption key hash. Currently, the only accepted * value is "AES256". Must be provided if the x-ms-encryption-key header is provided. */ - class EncryptionAlgorithmType final { + class EncryptionAlgorithmType final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new EncryptionAlgorithmType instance */ EncryptionAlgorithmType() = default; /** Constructs a new EncryptionAlgorithmType from a string. */ - explicit EncryptionAlgorithmType(std::string value) : m_value(std::move(value)) {} - /** Compares with another EncryptionAlgorithmType. */ - bool operator==(const EncryptionAlgorithmType& other) const + explicit EncryptionAlgorithmType(std::string value) : ExtendableEnumeration(std::move(value)) { - return m_value == other.m_value; } - /** Compares with another EncryptionAlgorithmType. */ - bool operator!=(const EncryptionAlgorithmType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + /** Constant value of type EncryptionAlgorithmType: Aes256 */ AZ_STORAGE_BLOBS_DLLEXPORT const static EncryptionAlgorithmType Aes256; - - private: - std::string m_value; }; /** * @brief Extensible enum used to specify how the service should look for a block ID. */ - class BlockType final { + class BlockType final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new BlockType instance */ BlockType() = default; /** Constructs a new BlockType from a string. */ - explicit BlockType(std::string value) : m_value(std::move(value)) {} - /** Compares with another BlockType. */ - bool operator==(const BlockType& other) const { return m_value == other.m_value; } - /** Compares with another BlockType. */ - bool operator!=(const BlockType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit BlockType(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type BlockType: Committed */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlockType Committed; /** Constant value of type BlockType: Uncommitted */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlockType Uncommitted; /** Constant value of type BlockType: Latest */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlockType Latest; - - private: - std::string m_value; }; /** * @brief The retention policy which determines how long the associated data should persist. @@ -97,7 +82,7 @@ namespace Azure { namespace Storage { namespace Blobs { * Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. */ - Nullable Days; + Nullable Days; }; /** * @brief Azure Analytics Logging settings. @@ -180,7 +165,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * The maximum amount time that a browser should cache the preflight OPTIONS request. */ - int32_t MaxAgeInSeconds = int32_t(); + std::int32_t MaxAgeInSeconds = std::int32_t(); }; /** * @brief The properties that enable an account to host a static website. @@ -249,27 +234,20 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief The status of the secondary location. */ - class GeoReplicationStatus final { + class GeoReplicationStatus final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new GeoReplicationStatus instance */ GeoReplicationStatus() = default; /** Constructs a new GeoReplicationStatus from a string. */ - explicit GeoReplicationStatus(std::string value) : m_value(std::move(value)) {} - /** Compares with another GeoReplicationStatus. */ - bool operator==(const GeoReplicationStatus& other) const { return m_value == other.m_value; } - /** Compares with another GeoReplicationStatus. */ - bool operator!=(const GeoReplicationStatus& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit GeoReplicationStatus(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type GeoReplicationStatus: Live */ AZ_STORAGE_BLOBS_DLLEXPORT const static GeoReplicationStatus Live; /** Constant value of type GeoReplicationStatus: Bootstrap */ AZ_STORAGE_BLOBS_DLLEXPORT const static GeoReplicationStatus Bootstrap; /** Constant value of type GeoReplicationStatus: Unavailable */ AZ_STORAGE_BLOBS_DLLEXPORT const static GeoReplicationStatus Unavailable; - - private: - std::string m_value; }; /** * @brief Geo-Replication information for the Secondary Storage Service. @@ -300,41 +278,28 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief The current lease status of the blob. */ - class LeaseStatus final { + class LeaseStatus final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new LeaseStatus instance */ LeaseStatus() = default; /** Constructs a new LeaseStatus from a string. */ - explicit LeaseStatus(std::string value) : m_value(std::move(value)) {} - /** Compares with another LeaseStatus. */ - bool operator==(const LeaseStatus& other) const { return m_value == other.m_value; } - /** Compares with another LeaseStatus. */ - bool operator!=(const LeaseStatus& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit LeaseStatus(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type LeaseStatus: Locked */ AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseStatus Locked; /** Constant value of type LeaseStatus: Unlocked */ AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseStatus Unlocked; - - private: - std::string m_value; }; /** * @brief The current lease state of the blob. */ - class LeaseState final { + class LeaseState final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new LeaseState instance */ LeaseState() = default; /** Constructs a new LeaseState from a string. */ - explicit LeaseState(std::string value) : m_value(std::move(value)) {} - /** Compares with another LeaseState. */ - bool operator==(const LeaseState& other) const { return m_value == other.m_value; } - /** Compares with another LeaseState. */ - bool operator!=(const LeaseState& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit LeaseState(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type LeaseState: Available */ AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Available; /** Constant value of type LeaseState: Leased */ @@ -345,58 +310,40 @@ namespace Azure { namespace Storage { namespace Blobs { AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Breaking; /** Constant value of type LeaseState: Broken */ AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseState Broken; - - private: - std::string m_value; }; /** * @brief When a blob is leased, specifies whether the lease is of infinite or fixed duration. */ - class LeaseDurationType final { + class LeaseDurationType final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new LeaseDurationType instance */ LeaseDurationType() = default; /** Constructs a new LeaseDurationType from a string. */ - explicit LeaseDurationType(std::string value) : m_value(std::move(value)) {} - /** Compares with another LeaseDurationType. */ - bool operator==(const LeaseDurationType& other) const { return m_value == other.m_value; } - /** Compares with another LeaseDurationType. */ - bool operator!=(const LeaseDurationType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit LeaseDurationType(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type LeaseDurationType: Infinite */ AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseDurationType Infinite; /** Constant value of type LeaseDurationType: Fixed */ AZ_STORAGE_BLOBS_DLLEXPORT const static LeaseDurationType Fixed; - - private: - std::string m_value; }; /** * @brief Specifies whether data in the container may be accessed publicly and the level of * access. */ - class PublicAccessType final { + class PublicAccessType final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new PublicAccessType instance */ PublicAccessType() = default; /** Constructs a new PublicAccessType from a string. */ - explicit PublicAccessType(std::string value) : m_value(std::move(value)) {} - /** Compares with another PublicAccessType. */ - bool operator==(const PublicAccessType& other) const { return m_value == other.m_value; } - /** Compares with another PublicAccessType. */ - bool operator!=(const PublicAccessType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit PublicAccessType(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type PublicAccessType: BlobContainer */ AZ_STORAGE_BLOBS_DLLEXPORT const static PublicAccessType BlobContainer; /** Constant value of type PublicAccessType: Blob */ AZ_STORAGE_BLOBS_DLLEXPORT const static PublicAccessType Blob; /** Constant value of type PublicAccessType: None */ AZ_STORAGE_BLOBS_DLLEXPORT const static PublicAccessType None; - - private: - std::string m_value; }; /** * @brief Properties of a container. @@ -455,7 +402,7 @@ namespace Azure { namespace Storage { namespace Blobs { * Remaining days before this container will be permanently deleted. Only valid when this * container was deleted. */ - Nullable RemainingRetentionDays; + Nullable RemainingRetentionDays; /** * Indicates if version level worm is enabled on this container. */ @@ -594,18 +541,13 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief Identifies the sku name of the account. */ - class SkuName final { + class SkuName final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new SkuName instance */ SkuName() = default; /** Constructs a new SkuName from a string. */ - explicit SkuName(std::string value) : m_value(std::move(value)) {} - /** Compares with another SkuName. */ - bool operator==(const SkuName& other) const { return m_value == other.m_value; } - /** Compares with another SkuName. */ - bool operator!=(const SkuName& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit SkuName(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type SkuName: StandardLrs */ AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardLrs; /** Constant value of type SkuName: StandardGrs */ @@ -622,25 +564,17 @@ namespace Azure { namespace Storage { namespace Blobs { AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardGzrs; /** Constant value of type SkuName: StandardRagzrs */ AZ_STORAGE_BLOBS_DLLEXPORT const static SkuName StandardRagzrs; - - private: - std::string m_value; }; /** * @brief Identifies the account kind. */ - class AccountKind final { + class AccountKind final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new AccountKind instance */ AccountKind() = default; /** Constructs a new AccountKind from a string. */ - explicit AccountKind(std::string value) : m_value(std::move(value)) {} - /** Compares with another AccountKind. */ - bool operator==(const AccountKind& other) const { return m_value == other.m_value; } - /** Compares with another AccountKind. */ - bool operator!=(const AccountKind& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit AccountKind(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type AccountKind: Storage */ AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind Storage; /** Constant value of type AccountKind: BlobStorage */ @@ -651,9 +585,6 @@ namespace Azure { namespace Storage { namespace Blobs { AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind FileStorage; /** Constant value of type AccountKind: BlockBlobStorage */ AZ_STORAGE_BLOBS_DLLEXPORT const static AccountKind BlockBlobStorage; - - private: - std::string m_value; }; /** * @brief Blob info from a Filter Blobs API call. @@ -946,7 +877,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * Approximate time remaining in the lease period, in seconds. */ - int32_t LeaseTime = int32_t(); + std::int32_t LeaseTime = std::int32_t(); }; /** * @brief Response type for #Azure::Storage::Blobs::BlobContainerClient::ChangeLease. @@ -984,18 +915,13 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief Status of the copy operation. */ - class CopyStatus final { + class CopyStatus final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new CopyStatus instance */ CopyStatus() = default; /** Constructs a new CopyStatus from a string. */ - explicit CopyStatus(std::string value) : m_value(std::move(value)) {} - /** Compares with another CopyStatus. */ - bool operator==(const CopyStatus& other) const { return m_value == other.m_value; } - /** Compares with another CopyStatus. */ - bool operator!=(const CopyStatus& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit CopyStatus(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type CopyStatus: Pending */ AZ_STORAGE_BLOBS_DLLEXPORT const static CopyStatus Pending; /** Constant value of type CopyStatus: Success */ @@ -1004,25 +930,17 @@ namespace Azure { namespace Storage { namespace Blobs { AZ_STORAGE_BLOBS_DLLEXPORT const static CopyStatus Aborted; /** Constant value of type CopyStatus: Failed */ AZ_STORAGE_BLOBS_DLLEXPORT const static CopyStatus Failed; - - private: - std::string m_value; }; /** * @brief Optional. Indicates the tier to be set on the blob. */ - class AccessTier final { + class AccessTier final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new AccessTier instance */ AccessTier() = default; /** Constructs a new AccessTier from a string. */ - explicit AccessTier(std::string value) : m_value(std::move(value)) {} - /** Compares with another AccessTier. */ - bool operator==(const AccessTier& other) const { return m_value == other.m_value; } - /** Compares with another AccessTier. */ - bool operator!=(const AccessTier& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit AccessTier(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type AccessTier: P1 */ AZ_STORAGE_BLOBS_DLLEXPORT const static AccessTier P1; /** Constant value of type AccessTier: P2 */ @@ -1061,9 +979,6 @@ namespace Azure { namespace Storage { namespace Blobs { AZ_STORAGE_BLOBS_DLLEXPORT const static AccessTier Premium; /** Constant value of type AccessTier: Cold */ AZ_STORAGE_BLOBS_DLLEXPORT const static AccessTier Cold; - - private: - std::string m_value; }; /** * @brief For blob storage LRS accounts, valid values are @@ -1071,50 +986,35 @@ namespace Azure { namespace Storage { namespace Blobs { * not complete then this value indicates that rehydrate is pending and also tells the * destination tier. */ - class ArchiveStatus final { + class ArchiveStatus final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new ArchiveStatus instance */ ArchiveStatus() = default; /** Constructs a new ArchiveStatus from a string. */ - explicit ArchiveStatus(std::string value) : m_value(std::move(value)) {} - /** Compares with another ArchiveStatus. */ - bool operator==(const ArchiveStatus& other) const { return m_value == other.m_value; } - /** Compares with another ArchiveStatus. */ - bool operator!=(const ArchiveStatus& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit ArchiveStatus(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type ArchiveStatus: RehydratePendingToHot */ AZ_STORAGE_BLOBS_DLLEXPORT const static ArchiveStatus RehydratePendingToHot; /** Constant value of type ArchiveStatus: RehydratePendingToCool */ AZ_STORAGE_BLOBS_DLLEXPORT const static ArchiveStatus RehydratePendingToCool; /** Constant value of type ArchiveStatus: RehydratePendingToCold */ AZ_STORAGE_BLOBS_DLLEXPORT const static ArchiveStatus RehydratePendingToCold; - - private: - std::string m_value; }; /** * @brief Optional: Indicates the priority with which to rehydrate an archived blob. */ - class RehydratePriority final { + class RehydratePriority final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new RehydratePriority instance */ RehydratePriority() = default; /** Constructs a new RehydratePriority from a string. */ - explicit RehydratePriority(std::string value) : m_value(std::move(value)) {} - /** Compares with another RehydratePriority. */ - bool operator==(const RehydratePriority& other) const { return m_value == other.m_value; } - /** Compares with another RehydratePriority. */ - bool operator!=(const RehydratePriority& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit RehydratePriority(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type RehydratePriority: High */ AZ_STORAGE_BLOBS_DLLEXPORT const static RehydratePriority High; /** Constant value of type RehydratePriority: Standard */ AZ_STORAGE_BLOBS_DLLEXPORT const static RehydratePriority Standard; - - private: - std::string m_value; }; /** * @brief Standard HTTP properties supported by containers and blobs. @@ -1150,28 +1050,20 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief The replication status of blob with the given policy and rule identifiers. */ - class ObjectReplicationStatus final { + class ObjectReplicationStatus final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new ObjectReplicationStatus instance */ ObjectReplicationStatus() = default; /** Constructs a new ObjectReplicationStatus from a string. */ - explicit ObjectReplicationStatus(std::string value) : m_value(std::move(value)) {} - /** Compares with another ObjectReplicationStatus. */ - bool operator==(const ObjectReplicationStatus& other) const + explicit ObjectReplicationStatus(std::string value) : ExtendableEnumeration(std::move(value)) { - return m_value == other.m_value; } - /** Compares with another ObjectReplicationStatus. */ - bool operator!=(const ObjectReplicationStatus& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + /** Constant value of type ObjectReplicationStatus: Complete */ AZ_STORAGE_BLOBS_DLLEXPORT const static ObjectReplicationStatus Complete; /** Constant value of type ObjectReplicationStatus: Failed */ AZ_STORAGE_BLOBS_DLLEXPORT const static ObjectReplicationStatus Failed; - - private: - std::string m_value; }; /** * @brief Contains the object replication rule ID and replication status of a blob. @@ -1206,28 +1098,21 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief Specifies the immutability policy mode to set on the blob. */ - class BlobImmutabilityPolicyMode final { + class BlobImmutabilityPolicyMode final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new BlobImmutabilityPolicyMode instance */ BlobImmutabilityPolicyMode() = default; /** Constructs a new BlobImmutabilityPolicyMode from a string. */ - explicit BlobImmutabilityPolicyMode(std::string value) : m_value(std::move(value)) {} - /** Compares with another BlobImmutabilityPolicyMode. */ - bool operator==(const BlobImmutabilityPolicyMode& other) const + explicit BlobImmutabilityPolicyMode(std::string value) + : ExtendableEnumeration(std::move(value)) { - return m_value == other.m_value; } - /** Compares with another BlobImmutabilityPolicyMode. */ - bool operator!=(const BlobImmutabilityPolicyMode& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + /** Constant value of type BlobImmutabilityPolicyMode: Unlocked */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlobImmutabilityPolicyMode Unlocked; /** Constant value of type BlobImmutabilityPolicyMode: Locked */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlobImmutabilityPolicyMode Locked; - - private: - std::string m_value; }; /** * @brief Immutability policy associated with the blob. @@ -1264,7 +1149,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * The current sequence number for a page blob. */ - Nullable SequenceNumber; + Nullable SequenceNumber; /** * The current lease status of the blob. */ @@ -1343,7 +1228,7 @@ namespace Azure { namespace Storage { namespace Blobs { * Remaining days before this blob will be permanently deleted. Only valid when this blob was * deleted. */ - Nullable RemainingRetentionDays; + Nullable RemainingRetentionDays; /** * The tier of page blob on a premium storage account or tier of block blob on blob storage or * general purpose v2 account. @@ -1363,7 +1248,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * SHA-256 hash of the encryption key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * The name of the encryption scope under which the blob is encrypted. */ @@ -1419,27 +1304,19 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief Type of the blob. */ - class BlobType final { + class BlobType final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new BlobType instance */ BlobType() = default; /** Constructs a new BlobType from a string. */ - explicit BlobType(std::string value) : m_value(std::move(value)) {} - /** Compares with another BlobType. */ - bool operator==(const BlobType& other) const { return m_value == other.m_value; } - /** Compares with another BlobType. */ - bool operator!=(const BlobType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit BlobType(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type BlobType: BlockBlob */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlobType BlockBlob; /** Constant value of type BlobType: PageBlob */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlobType PageBlob; /** Constant value of type BlobType: AppendBlob */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlobType AppendBlob; - - private: - std::string m_value; }; namespace _detail { /** @@ -1478,7 +1355,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * Size in bytes. */ - int64_t BlobSize = int64_t(); + std::int64_t BlobSize = std::int64_t(); /** * Type of the blob. */ @@ -1601,11 +1478,11 @@ namespace Azure { namespace Storage { namespace Blobs { /** * The current sequence number for a page blob. */ - Nullable SequenceNumber; + Nullable SequenceNumber; /** * The number of committed blocks present in the blob. */ - Nullable CommittedBlockCount; + Nullable CommittedBlockCount; /** * If the blob has been sealed. This value is null for block blobs or page blobs. */ @@ -1631,7 +1508,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * SHA-256 hash of the encryption key used to encrypt the blob data and metadata. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Name of the encryption scope used to encrypt the blob data and metadata. */ @@ -1647,7 +1524,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * The number of tags associated with the blob. */ - Nullable TagCount; + Nullable TagCount; /** * String identifier for this copy operation. Use with Get Blob Properties to check the status * of this copy operation, or pass to Abort Copy Blob to abort a pending copy. @@ -1718,7 +1595,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * Size of the blob in bytes. */ - int64_t BlobSize = int64_t(); + std::int64_t BlobSize = std::int64_t(); /** * Indicates the range of bytes returned. */ @@ -1842,7 +1719,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * Size of the blob in bytes. */ - int64_t BlobSize = int64_t(); + std::int64_t BlobSize = std::int64_t(); /** * The ETag contains a value that you can use to perform operations conditionally. If the * request version is 2011-08-18 or newer, the ETag value will be in quotes. @@ -1852,12 +1729,12 @@ namespace Azure { namespace Storage { namespace Blobs { * The current sequence number for a page blob. This header is not returned for block blobs or * append blobs. */ - Nullable SequenceNumber; + Nullable SequenceNumber; /** * The number of committed blocks present in the blob. This header is returned only for append * blobs. */ - Nullable CommittedBlockCount; + Nullable CommittedBlockCount; /** * The value of this header is set to true if the blob data and application metadata are * completely encrypted using the specified algorithm. Otherwise, the value is set to false @@ -1869,7 +1746,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only * returned when the metadata was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -1915,7 +1792,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * The number of tags associated with the blob. */ - Nullable TagCount; + Nullable TagCount; /** * The time this blob will expire. */ @@ -1944,25 +1821,18 @@ namespace Azure { namespace Storage { namespace Blobs { * options: include: Delete the base blob and all of its snapshots. only: Delete only the blob's * snapshots and not the blob itself. */ - class DeleteSnapshotsOption final { + class DeleteSnapshotsOption final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new DeleteSnapshotsOption instance */ DeleteSnapshotsOption() = default; /** Constructs a new DeleteSnapshotsOption from a string. */ - explicit DeleteSnapshotsOption(std::string value) : m_value(std::move(value)) {} - /** Compares with another DeleteSnapshotsOption. */ - bool operator==(const DeleteSnapshotsOption& other) const { return m_value == other.m_value; } - /** Compares with another DeleteSnapshotsOption. */ - bool operator!=(const DeleteSnapshotsOption& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit DeleteSnapshotsOption(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type DeleteSnapshotsOption: IncludeSnapshots */ AZ_STORAGE_BLOBS_DLLEXPORT const static DeleteSnapshotsOption IncludeSnapshots; /** Constant value of type DeleteSnapshotsOption: OnlySnapshots */ AZ_STORAGE_BLOBS_DLLEXPORT const static DeleteSnapshotsOption OnlySnapshots; - - private: - std::string m_value; }; /** * @brief Response type for #Azure::Storage::Blobs::BlobClient::Delete. @@ -1983,21 +1853,17 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief Required. Indicates mode of the expiry time. */ - class ScheduleBlobExpiryOriginType final { + class ScheduleBlobExpiryOriginType final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new ScheduleBlobExpiryOriginType instance */ ScheduleBlobExpiryOriginType() = default; /** Constructs a new ScheduleBlobExpiryOriginType from a string. */ - explicit ScheduleBlobExpiryOriginType(std::string value) : m_value(std::move(value)) {} - /** Compares with another ScheduleBlobExpiryOriginType. */ - bool operator==(const ScheduleBlobExpiryOriginType& other) const + explicit ScheduleBlobExpiryOriginType(std::string value) + : ExtendableEnumeration(std::move(value)) { - return m_value == other.m_value; } - /** Compares with another ScheduleBlobExpiryOriginType. */ - bool operator!=(const ScheduleBlobExpiryOriginType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + /** Constant value of type ScheduleBlobExpiryOriginType: NeverExpire */ AZ_STORAGE_BLOBS_DLLEXPORT const static ScheduleBlobExpiryOriginType NeverExpire; /** Constant value of type ScheduleBlobExpiryOriginType: RelativeToCreation */ @@ -2006,9 +1872,6 @@ namespace Azure { namespace Storage { namespace Blobs { AZ_STORAGE_BLOBS_DLLEXPORT const static ScheduleBlobExpiryOriginType RelativeToNow; /** Constant value of type ScheduleBlobExpiryOriginType: Absolute */ AZ_STORAGE_BLOBS_DLLEXPORT const static ScheduleBlobExpiryOriginType Absolute; - - private: - std::string m_value; }; /** * @brief Response type for Azure::Storage::Blobs::BlobClient::SetExpiry. @@ -2047,7 +1910,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The current sequence number for a page blob. This header is not returned for block blobs or * append blobs. */ - Nullable SequenceNumber; + Nullable SequenceNumber; }; /** * @brief Response type for #Azure::Storage::Blobs::BlobClient::SetImmutabilityPolicy. @@ -2084,7 +1947,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The field is deprecated and is always null. Use GetProperties() instead to check sequence * number for a page blob. */ - Nullable SequenceNumber; + Nullable SequenceNumber; /** * The ETag contains a value that you can use to perform operations conditionally. If the * request version is 2011-08-18 or newer, the ETag value will be in quotes. @@ -2111,7 +1974,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only * returned when the metadata was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -2219,7 +2082,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * Approximate time remaining in the lease period, in seconds. */ - int32_t LeaseTime = int32_t(); + std::int32_t LeaseTime = std::int32_t(); }; } // namespace _detail /** @@ -2231,7 +2094,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The field is deprecated and is always null. Use GetProperties() instead to get SHA256 of * the encryption key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * The field is deprecated and is always null. Use GetProperties() instead to check the * encryption scope. @@ -2304,28 +2167,20 @@ namespace Azure { namespace Storage { namespace Blobs { * @brief Optional, default 'replace'. Indicates if source tags should be copied or replaced * with the tags specified by x-ms-tags. */ - class BlobCopySourceTagsMode final { + class BlobCopySourceTagsMode final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new BlobCopySourceTagsMode instance */ BlobCopySourceTagsMode() = default; /** Constructs a new BlobCopySourceTagsMode from a string. */ - explicit BlobCopySourceTagsMode(std::string value) : m_value(std::move(value)) {} - /** Compares with another BlobCopySourceTagsMode. */ - bool operator==(const BlobCopySourceTagsMode& other) const + explicit BlobCopySourceTagsMode(std::string value) : ExtendableEnumeration(std::move(value)) { - return m_value == other.m_value; } - /** Compares with another BlobCopySourceTagsMode. */ - bool operator!=(const BlobCopySourceTagsMode& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + /** Constant value of type BlobCopySourceTagsMode: Replace */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlobCopySourceTagsMode Replace; /** Constant value of type BlobCopySourceTagsMode: Copy */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlobCopySourceTagsMode Copy; - - private: - std::string m_value; }; /** * @brief Response type for #Azure::Storage::Blobs::BlobClient::CopyFromUri. @@ -2404,42 +2259,29 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief Required. The type of the provided query expression. */ - class QueryRequestQueryType final { + class QueryRequestQueryType final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new QueryRequestQueryType instance */ QueryRequestQueryType() = default; /** Constructs a new QueryRequestQueryType from a string. */ - explicit QueryRequestQueryType(std::string value) : m_value(std::move(value)) {} - /** Compares with another QueryRequestQueryType. */ - bool operator==(const QueryRequestQueryType& other) const + explicit QueryRequestQueryType(std::string value) : ExtendableEnumeration(std::move(value)) { - return m_value == other.m_value; } - /** Compares with another QueryRequestQueryType. */ - bool operator!=(const QueryRequestQueryType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + /** Constant value of type QueryRequestQueryType: SQL */ AZ_STORAGE_BLOBS_DLLEXPORT const static QueryRequestQueryType SQL; - - private: - std::string m_value; }; /** * @brief The quick query format type. */ - class QueryFormatType final { + class QueryFormatType final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new QueryFormatType instance */ QueryFormatType() = default; /** Constructs a new QueryFormatType from a string. */ - explicit QueryFormatType(std::string value) : m_value(std::move(value)) {} - /** Compares with another QueryFormatType. */ - bool operator==(const QueryFormatType& other) const { return m_value == other.m_value; } - /** Compares with another QueryFormatType. */ - bool operator!=(const QueryFormatType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit QueryFormatType(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type QueryFormatType: Delimited */ AZ_STORAGE_BLOBS_DLLEXPORT const static QueryFormatType Delimited; /** Constant value of type QueryFormatType: Json */ @@ -2448,9 +2290,6 @@ namespace Azure { namespace Storage { namespace Blobs { AZ_STORAGE_BLOBS_DLLEXPORT const static QueryFormatType Arrow; /** Constant value of type QueryFormatType: Parquet */ AZ_STORAGE_BLOBS_DLLEXPORT const static QueryFormatType Parquet; - - private: - std::string m_value; }; /** * @brief Groups the settings used for interpreting the blob data if the blob is delimited @@ -2493,21 +2332,16 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief Type of blob query arrow field. */ - class BlobQueryArrowFieldType final { + class BlobQueryArrowFieldType final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new BlobQueryArrowFieldType instance */ BlobQueryArrowFieldType() = default; /** Constructs a new BlobQueryArrowFieldType from a string. */ - explicit BlobQueryArrowFieldType(std::string value) : m_value(std::move(value)) {} - /** Compares with another BlobQueryArrowFieldType. */ - bool operator==(const BlobQueryArrowFieldType& other) const + explicit BlobQueryArrowFieldType(std::string value) : ExtendableEnumeration(std::move(value)) { - return m_value == other.m_value; } - /** Compares with another BlobQueryArrowFieldType. */ - bool operator!=(const BlobQueryArrowFieldType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + /** Constant value of type BlobQueryArrowFieldType: Int64 */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlobQueryArrowFieldType Int64; /** Constant value of type BlobQueryArrowFieldType: Bool */ @@ -2520,9 +2354,6 @@ namespace Azure { namespace Storage { namespace Blobs { AZ_STORAGE_BLOBS_DLLEXPORT const static BlobQueryArrowFieldType Double; /** Constant value of type BlobQueryArrowFieldType: Decimal */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlobQueryArrowFieldType Decimal; - - private: - std::string m_value; }; /** * @brief Groups settings regarding specific field of an arrow schema. @@ -2540,11 +2371,11 @@ namespace Azure { namespace Storage { namespace Blobs { /** * Precision of the field. */ - Nullable Precision; + Nullable Precision; /** * Scale of the field. */ - Nullable Scale; + Nullable Scale; }; namespace _detail { /** @@ -2669,7 +2500,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The field is deprecated and is always null. Use GetProperties() instead to check sequence * number for a page blob. */ - Nullable SequenceNumber; + Nullable SequenceNumber; /** * The ETag contains a value that you can use to perform operations conditionally. If the * request version is 2011-08-18 or newer, the ETag value will be in quotes. @@ -2696,7 +2527,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only * returned when the blob was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -2728,7 +2559,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * The current sequence number for the page blob. */ - int64_t SequenceNumber = int64_t(); + std::int64_t SequenceNumber = int64_t(); /** * The value of this header is set to true if the contents of the request are successfully * encrypted using the specified algorithm, and false otherwise. @@ -2738,7 +2569,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the pages. This header is only * returned when the pages were encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -2765,7 +2596,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * The current sequence number for the page blob. */ - int64_t SequenceNumber = int64_t(); + std::int64_t SequenceNumber = int64_t(); }; /** * @brief Response type for #Azure::Storage::Blobs::PageBlobClient::UploadPagesFromUri. @@ -2791,7 +2622,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * The current sequence number for the page blob. */ - int64_t SequenceNumber = int64_t(); + std::int64_t SequenceNumber = int64_t(); /** * The value of this header is set to true if the contents of the request are successfully * encrypted using the specified algorithm, and false otherwise. @@ -2801,7 +2632,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only * returned when the blob was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -2820,7 +2651,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * Size of the blob in bytes. */ - int64_t BlobSize = int64_t(); + std::int64_t BlobSize = std::int64_t(); /** * Array of PageRange. */ @@ -2841,7 +2672,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * Size of the blob in bytes. */ - int64_t BlobSize = int64_t(); + std::int64_t BlobSize = std::int64_t(); /** * Array of PageRange. */ @@ -2873,34 +2704,27 @@ namespace Azure { namespace Storage { namespace Blobs { * The current sequence number for a page blob. This header is not returned for block blobs or * append blobs. */ - int64_t SequenceNumber = int64_t(); + std::int64_t SequenceNumber = std::int64_t(); }; /** * @brief Required if the x-ms-blob-sequence-number header is set for the request. This property * applies to page blobs only. This property indicates how the service should modify the blob's * sequence number. */ - class SequenceNumberAction final { + class SequenceNumberAction final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new SequenceNumberAction instance */ SequenceNumberAction() = default; /** Constructs a new SequenceNumberAction from a string. */ - explicit SequenceNumberAction(std::string value) : m_value(std::move(value)) {} - /** Compares with another SequenceNumberAction. */ - bool operator==(const SequenceNumberAction& other) const { return m_value == other.m_value; } - /** Compares with another SequenceNumberAction. */ - bool operator!=(const SequenceNumberAction& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit SequenceNumberAction(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type SequenceNumberAction: Max */ AZ_STORAGE_BLOBS_DLLEXPORT const static SequenceNumberAction Max; /** Constant value of type SequenceNumberAction: Update */ AZ_STORAGE_BLOBS_DLLEXPORT const static SequenceNumberAction Update; /** Constant value of type SequenceNumberAction: Increment */ AZ_STORAGE_BLOBS_DLLEXPORT const static SequenceNumberAction Increment; - - private: - std::string m_value; }; /** * @brief Response type for #Azure::Storage::Blobs::PageBlobClient::UpdateSequenceNumber. @@ -2922,7 +2746,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The current sequence number for a page blob. This header is not returned for block blobs or * append blobs. */ - int64_t SequenceNumber = int64_t(); + std::int64_t SequenceNumber = std::int64_t(); }; namespace _detail { /** @@ -2993,7 +2817,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only * returned when the blob was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -3026,12 +2850,12 @@ namespace Azure { namespace Storage { namespace Blobs { * This response header is returned only for append operations. It returns the offset at which * the block was committed, in bytes. */ - int64_t AppendOffset = int64_t(); + std::int64_t AppendOffset = std::int64_t(); /** * The number of committed blocks present in the blob. This header is returned only for append * blobs. */ - int32_t CommittedBlockCount = int32_t(); + std::int32_t CommittedBlockCount = std::int32_t(); /** * The value of this header is set to true if the contents of the request are successfully * encrypted using the specified algorithm, and false otherwise. @@ -3041,7 +2865,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the block. This header is only * returned when the block was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -3074,17 +2898,17 @@ namespace Azure { namespace Storage { namespace Blobs { * This response header is returned only for append operations. It returns the offset at which * the block was committed, in bytes. */ - int64_t AppendOffset = int64_t(); + std::int64_t AppendOffset = std::int64_t(); /** * The number of committed blocks present in the blob. This header is returned only for append * blobs. */ - int32_t CommittedBlockCount = int32_t(); + std::int32_t CommittedBlockCount = std::int32_t(); /** * The SHA-256 hash of the encryption key used to encrypt the block. This header is only * returned when the block was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -3154,7 +2978,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only * returned when the blob was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -3198,7 +3022,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only * returned when the blob was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -3226,7 +3050,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the block. This header is only * returned when the block was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -3254,7 +3078,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the block. This header is only * returned when the block was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -3316,7 +3140,7 @@ namespace Azure { namespace Storage { namespace Blobs { * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only * returned when the blob was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * Returns the name of the encryption scope used to encrypt the blob contents and application * metadata. Note that the absence of this header implies use of the default account @@ -3336,33 +3160,25 @@ namespace Azure { namespace Storage { namespace Blobs { /** * The block size in bytes. */ - int64_t Size = int64_t(); + std::int64_t Size = std::int64_t(); }; /** * @brief Specifies whether to return the list of committed blocks, the list of uncommitted * blocks, or both lists together. */ - class BlockListType final { + class BlockListType final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new BlockListType instance */ BlockListType() = default; /** Constructs a new BlockListType from a string. */ - explicit BlockListType(std::string value) : m_value(std::move(value)) {} - /** Compares with another BlockListType. */ - bool operator==(const BlockListType& other) const { return m_value == other.m_value; } - /** Compares with another BlockListType. */ - bool operator!=(const BlockListType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit BlockListType(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type BlockListType: Committed */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlockListType Committed; /** Constant value of type BlockListType: Uncommitted */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlockListType Uncommitted; /** Constant value of type BlockListType: All */ AZ_STORAGE_BLOBS_DLLEXPORT const static BlockListType All; - - private: - std::string m_value; }; /** * @brief Response type for #Azure::Storage::Blobs::BlockBlobClient::GetBlockList. @@ -3383,7 +3199,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * Size of the blob in bytes. */ - int64_t BlobSize = 0; + std::int64_t BlobSize = 0; /** * List of committed blocks. */ @@ -3426,7 +3242,7 @@ namespace Azure { namespace Storage { namespace Blobs { { Nullable Prefix; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; Nullable Include; }; static Response ListBlobContainers( @@ -3465,7 +3281,7 @@ namespace Azure { namespace Storage { namespace Blobs { { Nullable Where; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; }; static Response FindBlobsByTags( Core::Http::_internal::HttpPipeline& pipeline, @@ -3574,7 +3390,7 @@ namespace Azure { namespace Storage { namespace Blobs { { Nullable Where; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; }; static Response FindBlobsByTags( Core::Http::_internal::HttpPipeline& pipeline, @@ -3583,7 +3399,7 @@ namespace Azure { namespace Storage { namespace Blobs { const Core::Context& context); struct AcquireBlobContainerLeaseOptions final { - Nullable Duration; + Nullable Duration; Nullable ProposedLeaseId; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; @@ -3617,7 +3433,7 @@ namespace Azure { namespace Storage { namespace Blobs { const Core::Context& context); struct BreakBlobContainerLeaseOptions final { - Nullable BreakPeriod; + Nullable BreakPeriod; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; }; @@ -3642,7 +3458,7 @@ namespace Azure { namespace Storage { namespace Blobs { { Nullable Prefix; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; Nullable Include; }; static Response ListBlobs( @@ -3655,7 +3471,7 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable Prefix; std::string Delimiter; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; Nullable Include; Nullable ShowOnly; }; @@ -3684,7 +3500,7 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable RangeGetContentMD5; Nullable RangeGetContentCRC64; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; @@ -3704,7 +3520,7 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable VersionId; Nullable LeaseId; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; @@ -3757,7 +3573,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string BlobCacheControl; std::string BlobContentType; - std::vector BlobContentMD5; + std::vector BlobContentMD5; std::string BlobContentEncoding; std::string BlobContentLanguage; Nullable LeaseId; @@ -3806,7 +3622,7 @@ namespace Azure { namespace Storage { namespace Blobs { std::map Metadata; Nullable LeaseId; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable IfModifiedSince; @@ -3822,7 +3638,7 @@ namespace Azure { namespace Storage { namespace Blobs { const Core::Context& context); struct AcquireBlobLeaseOptions final { - Nullable Duration; + Nullable Duration; Nullable ProposedLeaseId; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; @@ -3880,7 +3696,7 @@ namespace Azure { namespace Storage { namespace Blobs { const Core::Context& context); struct BreakBlobLeaseOptions final { - Nullable BreakPeriod; + Nullable BreakPeriod; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; ETag IfMatch; @@ -3896,7 +3712,7 @@ namespace Azure { namespace Storage { namespace Blobs { { std::map Metadata; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable IfModifiedSince; @@ -3955,7 +3771,7 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable IfTags; std::string CopySource; Nullable LeaseId; - Nullable> SourceContentMD5; + Nullable> SourceContentMD5; Nullable BlobTagsString; Nullable ImmutabilityPolicyExpiry; Nullable ImmutabilityPolicyMode; @@ -3963,7 +3779,7 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable CopySourceAuthorization; Nullable EncryptionScope; Nullable CopySourceTags; - Nullable> SourceContentcrc64; + Nullable> SourceContentcrc64; }; static Response CopyFromUri( Core::Http::_internal::HttpPipeline& pipeline, @@ -4008,7 +3824,7 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable Snapshot; Nullable LeaseId; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; @@ -4038,8 +3854,8 @@ namespace Azure { namespace Storage { namespace Blobs { { std::map Tags; Nullable VersionId; - Nullable> TransactionalContentMD5; - Nullable> TransactionalContentCrc64; + Nullable> TransactionalContentMD5; + Nullable> TransactionalContentCrc64; Nullable IfTags; Nullable LeaseId; }; @@ -4057,13 +3873,13 @@ namespace Azure { namespace Storage { namespace Blobs { std::string BlobContentType; std::string BlobContentEncoding; std::string BlobContentLanguage; - std::vector BlobContentMD5; + std::vector BlobContentMD5; std::string BlobCacheControl; std::map Metadata; Nullable LeaseId; std::string BlobContentDisposition; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable IfModifiedSince; @@ -4071,8 +3887,8 @@ namespace Azure { namespace Storage { namespace Blobs { ETag IfMatch; ETag IfNoneMatch; Nullable IfTags; - int64_t BlobContentLength = int64_t(); - Nullable BlobSequenceNumber; + std::int64_t BlobContentLength = std::int64_t(); + Nullable BlobSequenceNumber; Nullable BlobTagsString; Nullable ImmutabilityPolicyExpiry; Nullable ImmutabilityPolicyMode; @@ -4085,17 +3901,17 @@ namespace Azure { namespace Storage { namespace Blobs { const Core::Context& context); struct UploadPageBlobPagesOptions final { - Nullable> TransactionalContentMD5; - Nullable> TransactionalContentCrc64; + Nullable> TransactionalContentMD5; + Nullable> TransactionalContentCrc64; Nullable Range; Nullable LeaseId; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; - Nullable IfSequenceNumberLessThanOrEqualTo; - Nullable IfSequenceNumberLessThan; - Nullable IfSequenceNumberEqualTo; + Nullable IfSequenceNumberLessThanOrEqualTo; + Nullable IfSequenceNumberLessThan; + Nullable IfSequenceNumberEqualTo; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; ETag IfMatch; @@ -4113,12 +3929,12 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable Range; Nullable LeaseId; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; - Nullable IfSequenceNumberLessThanOrEqualTo; - Nullable IfSequenceNumberLessThan; - Nullable IfSequenceNumberEqualTo; + Nullable IfSequenceNumberLessThanOrEqualTo; + Nullable IfSequenceNumberLessThan; + Nullable IfSequenceNumberEqualTo; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; ETag IfMatch; @@ -4134,17 +3950,17 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string SourceUrl; std::string SourceRange; - Nullable> SourceContentMD5; - Nullable> SourceContentcrc64; + Nullable> SourceContentMD5; + Nullable> SourceContentcrc64; std::string Range; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable LeaseId; - Nullable IfSequenceNumberLessThanOrEqualTo; - Nullable IfSequenceNumberLessThan; - Nullable IfSequenceNumberEqualTo; + Nullable IfSequenceNumberLessThanOrEqualTo; + Nullable IfSequenceNumberLessThan; + Nullable IfSequenceNumberEqualTo; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; ETag IfMatch; @@ -4172,7 +3988,7 @@ namespace Azure { namespace Storage { namespace Blobs { ETag IfNoneMatch; Nullable IfTags; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; }; static Response GetPageRanges( Core::Http::_internal::HttpPipeline& pipeline, @@ -4192,7 +4008,7 @@ namespace Azure { namespace Storage { namespace Blobs { ETag IfNoneMatch; Nullable IfTags; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; }; static Response GetPageRangesDiff( Core::Http::_internal::HttpPipeline& pipeline, @@ -4203,7 +4019,7 @@ namespace Azure { namespace Storage { namespace Blobs { { Nullable LeaseId; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable IfModifiedSince; @@ -4211,7 +4027,7 @@ namespace Azure { namespace Storage { namespace Blobs { ETag IfMatch; ETag IfNoneMatch; Nullable IfTags; - int64_t BlobContentLength = int64_t(); + std::int64_t BlobContentLength = std::int64_t(); }; static Response Resize( Core::Http::_internal::HttpPipeline& pipeline, @@ -4227,7 +4043,7 @@ namespace Azure { namespace Storage { namespace Blobs { ETag IfNoneMatch; Nullable IfTags; Models::SequenceNumberAction SequenceNumberAction; - Nullable BlobSequenceNumber; + Nullable BlobSequenceNumber; }; static Response UpdateSequenceNumber( Core::Http::_internal::HttpPipeline& pipeline, @@ -4256,13 +4072,13 @@ namespace Azure { namespace Storage { namespace Blobs { std::string BlobContentType; std::string BlobContentEncoding; std::string BlobContentLanguage; - std::vector BlobContentMD5; + std::vector BlobContentMD5; std::string BlobCacheControl; std::map Metadata; Nullable LeaseId; std::string BlobContentDisposition; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable IfModifiedSince; @@ -4282,13 +4098,13 @@ namespace Azure { namespace Storage { namespace Blobs { const Core::Context& context); struct AppendAppendBlobBlockOptions final { - Nullable> TransactionalContentMD5; - Nullable> TransactionalContentCrc64; + Nullable> TransactionalContentMD5; + Nullable> TransactionalContentCrc64; Nullable LeaseId; - Nullable MaxSize; - Nullable AppendPosition; + Nullable MaxSize; + Nullable AppendPosition; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable IfModifiedSince; @@ -4307,16 +4123,16 @@ namespace Azure { namespace Storage { namespace Blobs { { std::string SourceUrl; Nullable SourceRange; - Nullable> SourceContentMD5; - Nullable> SourceContentcrc64; - Nullable> TransactionalContentMD5; + Nullable> SourceContentMD5; + Nullable> SourceContentcrc64; + Nullable> TransactionalContentMD5; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable LeaseId; - Nullable MaxSize; - Nullable AppendPosition; + Nullable MaxSize; + Nullable AppendPosition; Nullable IfModifiedSince; Nullable IfUnmodifiedSince; ETag IfMatch; @@ -4340,7 +4156,7 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable IfUnmodifiedSince; ETag IfMatch; ETag IfNoneMatch; - Nullable AppendPosition; + Nullable AppendPosition; }; static Response Seal( Core::Http::_internal::HttpPipeline& pipeline, @@ -4352,17 +4168,17 @@ namespace Azure { namespace Storage { namespace Blobs { public: struct UploadBlockBlobOptions final { - Nullable> TransactionalContentMD5; + Nullable> TransactionalContentMD5; std::string BlobContentType; std::string BlobContentEncoding; std::string BlobContentLanguage; - std::vector BlobContentMD5; + std::vector BlobContentMD5; std::string BlobCacheControl; std::map Metadata; Nullable LeaseId; std::string BlobContentDisposition; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable Tier; @@ -4375,7 +4191,7 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable ImmutabilityPolicyExpiry; Nullable ImmutabilityPolicyMode; Nullable LegalHold; - Nullable> TransactionalContentCrc64; + Nullable> TransactionalContentCrc64; }; static Response Upload( Core::Http::_internal::HttpPipeline& pipeline, @@ -4388,13 +4204,13 @@ namespace Azure { namespace Storage { namespace Blobs { std::string BlobContentType; std::string BlobContentEncoding; std::string BlobContentLanguage; - std::vector BlobContentMD5; + std::vector BlobContentMD5; std::string BlobCacheControl; std::map Metadata; Nullable LeaseId; std::string BlobContentDisposition; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable Tier; @@ -4408,13 +4224,13 @@ namespace Azure { namespace Storage { namespace Blobs { ETag SourceIfMatch; ETag SourceIfNoneMatch; Nullable SourceIfTags; - Nullable> SourceContentMD5; + Nullable> SourceContentMD5; Nullable BlobTagsString; std::string CopySource; Nullable CopySourceBlobProperties; Nullable CopySourceAuthorization; Nullable CopySourceTags; - Nullable> SourceContentcrc64; + Nullable> SourceContentcrc64; }; static Response UploadFromUri( Core::Http::_internal::HttpPipeline& pipeline, @@ -4424,11 +4240,11 @@ namespace Azure { namespace Storage { namespace Blobs { struct StageBlockBlobBlockOptions final { std::string BlockId; - Nullable> TransactionalContentMD5; - Nullable> TransactionalContentCrc64; + Nullable> TransactionalContentMD5; + Nullable> TransactionalContentCrc64; Nullable LeaseId; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; }; @@ -4443,10 +4259,10 @@ namespace Azure { namespace Storage { namespace Blobs { std::string BlockId; std::string SourceUrl; Nullable SourceRange; - Nullable> SourceContentMD5; - Nullable> SourceContentcrc64; + Nullable> SourceContentMD5; + Nullable> SourceContentcrc64; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable LeaseId; @@ -4468,14 +4284,14 @@ namespace Azure { namespace Storage { namespace Blobs { std::string BlobContentType; std::string BlobContentEncoding; std::string BlobContentLanguage; - std::vector BlobContentMD5; - Nullable> TransactionalContentMD5; - Nullable> TransactionalContentCrc64; + std::vector BlobContentMD5; + Nullable> TransactionalContentMD5; + Nullable> TransactionalContentCrc64; std::map Metadata; Nullable LeaseId; std::string BlobContentDisposition; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable EncryptionScope; Nullable Tier; diff --git a/sdk/storage/azure-storage-blobs/swagger/README.md b/sdk/storage/azure-storage-blobs/swagger/README.md index 662835fa89..e7483ffc5c 100644 --- a/sdk/storage/azure-storage-blobs/swagger/README.md +++ b/sdk/storage/azure-storage-blobs/swagger/README.md @@ -9,7 +9,7 @@ package-name: azure-storage-blobs namespace: Azure::Storage::Blobs output-folder: generated clear-output-folder: true -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Microsoft.BlobStorage/stable/2021-12-02/blob.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Microsoft.BlobStorage/stable/2024-08-04/blob.json ``` ## ModelFour Options diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/rest_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/rest_client.hpp index 27b56be0d3..9dfdbfcf21 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/rest_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/rest_client.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -30,47 +31,29 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { } // namespace _detail namespace Models { namespace _detail { - class PathRenameMode final { + class PathRenameMode final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new PathRenameMode instance */ PathRenameMode() = default; /** Constructs a new PathRenameMode from a string. */ - explicit PathRenameMode(std::string value) : m_value(std::move(value)) {} - /** Compares with another PathRenameMode. */ - bool operator==(const PathRenameMode& other) const { return m_value == other.m_value; } - /** Compares with another PathRenameMode. */ - bool operator!=(const PathRenameMode& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit PathRenameMode(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type PathRenameMode: Legacy */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathRenameMode Legacy; /** Constant value of type PathRenameMode: Posix */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathRenameMode Posix; - - private: - std::string m_value; }; - class PathSetAccessControlListRecursiveMode final { + class PathSetAccessControlListRecursiveMode final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new PathSetAccessControlListRecursiveMode instance */ PathSetAccessControlListRecursiveMode() = default; /** Constructs a new PathSetAccessControlListRecursiveMode from a string. */ explicit PathSetAccessControlListRecursiveMode(std::string value) - : m_value(std::move(value)) - { - } - /** Compares with another PathSetAccessControlListRecursiveMode. */ - bool operator==(const PathSetAccessControlListRecursiveMode& other) const + : ExtendableEnumeration(std::move(value)) { - return m_value == other.m_value; } - /** Compares with another PathSetAccessControlListRecursiveMode. */ - bool operator!=(const PathSetAccessControlListRecursiveMode& other) const - { - return !(*this == other); - } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + /** Constant value of type PathSetAccessControlListRecursiveMode: Set */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlListRecursiveMode Set; /** Constant value of type PathSetAccessControlListRecursiveMode: Modify */ @@ -79,36 +62,25 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { /** Constant value of type PathSetAccessControlListRecursiveMode: Remove */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlListRecursiveMode Remove; - - private: - std::string m_value; }; } // namespace _detail /** * @brief Specifies whether data in the file system may be accessed publicly and the level of * access. */ - class PublicAccessType final { + class PublicAccessType final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new PublicAccessType instance */ PublicAccessType() = default; /** Constructs a new PublicAccessType from a string. */ - explicit PublicAccessType(std::string value) : m_value(std::move(value)) {} - /** Compares with another PublicAccessType. */ - bool operator==(const PublicAccessType& other) const { return m_value == other.m_value; } - /** Compares with another PublicAccessType. */ - bool operator!=(const PublicAccessType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit PublicAccessType(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type PublicAccessType: None */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PublicAccessType None; /** Constant value of type PublicAccessType: FileSystem */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PublicAccessType FileSystem; /** Constant value of type PublicAccessType: Path */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PublicAccessType Path; - - private: - std::string m_value; }; namespace _detail { struct PathItem final @@ -116,7 +88,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { std::string Name; bool IsDirectory = false; DateTime LastModified; - int64_t FileSize = int64_t(); + std::int64_t FileSize = std::int64_t(); std::string Owner; std::string Group; std::string Permissions; @@ -151,25 +123,17 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * @brief Required only for Create File and Create Directory. The value must be "file" or * "directory". */ - class PathResourceType final { + class PathResourceType final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new PathResourceType instance */ PathResourceType() = default; /** Constructs a new PathResourceType from a string. */ - explicit PathResourceType(std::string value) : m_value(std::move(value)) {} - /** Compares with another PathResourceType. */ - bool operator==(const PathResourceType& other) const { return m_value == other.m_value; } - /** Compares with another PathResourceType. */ - bool operator!=(const PathResourceType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit PathResourceType(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type PathResourceType: Directory */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathResourceType Directory; /** Constant value of type PathResourceType: File */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathResourceType File; - - private: - std::string m_value; }; /** * @brief Response type for #Azure::Storage::Files::DataLake::DataLakePathClient::Create. @@ -192,7 +156,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { /** * The size of the resource in bytes. */ - Nullable FileSize; + Nullable FileSize; /** * The value of this header is set to true if the contents of the request are successfully * encrypted using the specified algorithm, and false otherwise. @@ -202,7 +166,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only * returned when the blob was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; }; /** * @brief Response type for #Azure::Storage::Files::DataLake::DataLakePathClient::Delete. @@ -255,9 +219,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ struct SetAccessControlListRecursiveResult final { - int32_t NumberOfSuccessfulDirectories = int32_t(); - int32_t NumberOfSuccessfulFiles = int32_t(); - int32_t NumberOfFailures = int32_t(); + std::int32_t NumberOfSuccessfulDirectories = std::int32_t(); + std::int32_t NumberOfSuccessfulFiles = std::int32_t(); + std::int32_t NumberOfFailures = std::int32_t(); /** * Array of AclFailedEntry. */ @@ -317,18 +281,13 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * lease. If "release" it will release the lease only on flush. If "acquire-release" it will * acquire & complete the operation & release the lease once operation is done. */ - class LeaseAction final { + class LeaseAction final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new LeaseAction instance */ LeaseAction() = default; /** Constructs a new LeaseAction from a string. */ - explicit LeaseAction(std::string value) : m_value(std::move(value)) {} - /** Compares with another LeaseAction. */ - bool operator==(const LeaseAction& other) const { return m_value == other.m_value; } - /** Compares with another LeaseAction. */ - bool operator!=(const LeaseAction& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit LeaseAction(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type LeaseAction: Acquire */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseAction Acquire; /** Constant value of type LeaseAction: AutoRenew */ @@ -337,9 +296,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseAction Release; /** Constant value of type LeaseAction: AcquireRelease */ AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseAction AcquireRelease; - - private: - std::string m_value; }; /** * @brief Response type for #Azure::Storage::Files::DataLake::DataLakeFileClient::Flush. @@ -358,7 +314,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { /** * The size of the resource in bytes. */ - int64_t FileSize = int64_t(); + std::int64_t FileSize = std::int64_t(); /** * The value of this header is set to true if the contents of the request are successfully * encrypted using the specified algorithm, and false otherwise. @@ -368,7 +324,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only * returned when the blob was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * If the lease was auto-renewed with this request. */ @@ -393,7 +349,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only * returned when the blob was encrypted with a customer-provided key. */ - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; /** * If the lease was auto-renewed with this request. */ @@ -406,11 +362,11 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { struct ListFileSystemPathsOptions final { Nullable RequestId; - Nullable Timeout; + Nullable Timeout; Nullable ContinuationToken; Nullable Path; bool Recursive = bool(); - Nullable MaxResults; + Nullable MaxResults; Nullable Upn; }; static Response ListPaths( @@ -424,7 +380,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { struct CreatePathOptions final { Nullable RequestId; - Nullable Timeout; + Nullable Timeout; Nullable Resource; Nullable ContinuationToken; Nullable Mode; @@ -448,13 +404,13 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Nullable SourceIfModifiedSince; Nullable SourceIfUnmodifiedSince; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable Owner; Nullable Group; Nullable Acl; Nullable ProposedLeaseId; - Nullable LeaseDuration; + Nullable LeaseDuration; Nullable ExpiryOptions; Nullable ExpiresOn; Nullable EncryptionContext; @@ -467,7 +423,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { struct DeletePathOptions final { Nullable RequestId; - Nullable Timeout; + Nullable Timeout; Nullable Recursive; Nullable ContinuationToken; Nullable LeaseId; @@ -504,7 +460,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Nullable ContinuationToken; std::string Mode; Nullable ForceFlag; - Nullable MaxRecords; + Nullable MaxRecords; Nullable Acl; }; static Response @@ -541,13 +497,13 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { public: struct FlushFileOptions final { - Nullable Position; + Nullable Position; Nullable RetainUncommittedData; Nullable Close; - Nullable> ContentMD5; + Nullable> ContentMD5; Nullable LeaseId; Nullable LeaseAction; - Nullable LeaseDuration; + Nullable LeaseDuration; Nullable ProposedLeaseId; Nullable CacheControl; Nullable ContentType; @@ -559,7 +515,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Nullable IfModifiedSince; Nullable IfUnmodifiedSince; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; }; static Response Flush( @@ -569,15 +525,15 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { const Core::Context& context); struct AppendFileOptions final { - Nullable Position; - Nullable> TransactionalContentHash; - Nullable> TransactionalContentCrc64; + Nullable Position; + Nullable> TransactionalContentHash; + Nullable> TransactionalContentCrc64; Nullable LeaseId; Nullable LeaseAction; - Nullable LeaseDuration; + Nullable LeaseDuration; Nullable ProposedLeaseId; Nullable EncryptionKey; - Nullable> EncryptionKeySha256; + Nullable> EncryptionKeySha256; Nullable EncryptionAlgorithm; Nullable Flush; }; diff --git a/sdk/storage/azure-storage-files-datalake/src/rest_client.cpp b/sdk/storage/azure-storage-files-datalake/src/rest_client.cpp index 24ebdde414..8b24eb0397 100644 --- a/sdk/storage/azure-storage-files-datalake/src/rest_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/rest_client.cpp @@ -108,7 +108,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { vectorElement2.LastModified = DateTime::Parse( var0["lastModified"].get(), Azure::DateTime::DateFormat::Rfc1123); vectorElement2.FileSize = var0["contentLength"].is_number_integer() - ? var0["contentLength"].get() + ? var0["contentLength"].get() : std::stoll(var0["contentLength"].get()); vectorElement2.Owner = var0["owner"].get(); vectorElement2.Group = var0["group"].get(); @@ -504,13 +504,13 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { = Core::Json::_internal::json::parse(responseBody.begin(), responseBody.end()); response.NumberOfSuccessfulDirectories = jsonRoot["directoriesSuccessful"].is_number_integer() - ? jsonRoot["directoriesSuccessful"].get() + ? jsonRoot["directoriesSuccessful"].get() : std::stoi(jsonRoot["directoriesSuccessful"].get()); response.NumberOfSuccessfulFiles = jsonRoot["filesSuccessful"].is_number_integer() - ? jsonRoot["filesSuccessful"].get() + ? jsonRoot["filesSuccessful"].get() : std::stoi(jsonRoot["filesSuccessful"].get()); response.NumberOfFailures = jsonRoot["failureCount"].is_number_integer() - ? jsonRoot["failureCount"].get() + ? jsonRoot["failureCount"].get() : std::stoi(jsonRoot["failureCount"].get()); for (const auto& var0 : jsonRoot.count("failedEntries") != 0 && jsonRoot["failedEntries"].is_array() diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp index 645724feef..2f72d995de 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/rest_client.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -49,7 +50,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { * value will be deleted. Metrics data is deleted on a best-effort basis after the retention * period expires. */ - Nullable Days; + Nullable Days; }; /** * @brief Storage Analytics metrics for file service. @@ -106,7 +107,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * The maximum amount time that a browser should cache the preflight OPTIONS request. */ - int32_t MaxAgeInSeconds = int32_t(); + std::int32_t MaxAgeInSeconds = std::int32_t(); }; /** * @brief Settings for SMB multichannel. @@ -141,23 +142,15 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * @brief Valid value is backup. */ - class ShareTokenIntent final { + class ShareTokenIntent final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new ShareTokenIntent instance */ ShareTokenIntent() = default; /** Constructs a new ShareTokenIntent from a string. */ - explicit ShareTokenIntent(std::string value) : m_value(std::move(value)) {} - /** Compares with another ShareTokenIntent. */ - bool operator==(const ShareTokenIntent& other) const { return m_value == other.m_value; } - /** Compares with another ShareTokenIntent. */ - bool operator!=(const ShareTokenIntent& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit ShareTokenIntent(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type ShareTokenIntent: Backup */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareTokenIntent Backup; - - private: - std::string m_value; }; /** * @brief Response type for #Azure::Storage::Files::Shares::ShareServiceClient::SetProperties. @@ -190,18 +183,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * @brief Specifies the access tier of the share. */ - class AccessTier final { + class AccessTier final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new AccessTier instance */ AccessTier() = default; /** Constructs a new AccessTier from a string. */ - explicit AccessTier(std::string value) : m_value(std::move(value)) {} - /** Compares with another AccessTier. */ - bool operator==(const AccessTier& other) const { return m_value == other.m_value; } - /** Compares with another AccessTier. */ - bool operator!=(const AccessTier& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit AccessTier(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type AccessTier: TransactionOptimized */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static AccessTier TransactionOptimized; /** Constant value of type AccessTier: Hot */ @@ -210,48 +198,32 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { AZ_STORAGE_FILES_SHARES_DLLEXPORT const static AccessTier Cool; /** Constant value of type AccessTier: Premium */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static AccessTier Premium; - - private: - std::string m_value; }; /** * @brief The current lease status of the share. */ - class LeaseStatus final { + class LeaseStatus final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new LeaseStatus instance */ LeaseStatus() = default; /** Constructs a new LeaseStatus from a string. */ - explicit LeaseStatus(std::string value) : m_value(std::move(value)) {} - /** Compares with another LeaseStatus. */ - bool operator==(const LeaseStatus& other) const { return m_value == other.m_value; } - /** Compares with another LeaseStatus. */ - bool operator!=(const LeaseStatus& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit LeaseStatus(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type LeaseStatus: Locked */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStatus Locked; /** Constant value of type LeaseStatus: Unlocked */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStatus Unlocked; - - private: - std::string m_value; }; /** * @brief Lease state of the share. */ - class LeaseState final { + class LeaseState final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new LeaseState instance */ LeaseState() = default; /** Constructs a new LeaseState from a string. */ - explicit LeaseState(std::string value) : m_value(std::move(value)) {} - /** Compares with another LeaseState. */ - bool operator==(const LeaseState& other) const { return m_value == other.m_value; } - /** Compares with another LeaseState. */ - bool operator!=(const LeaseState& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit LeaseState(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type LeaseState: Available */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseState Available; /** Constant value of type LeaseState: Leased */ @@ -262,80 +234,54 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseState Breaking; /** Constant value of type LeaseState: Broken */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseState Broken; - - private: - std::string m_value; }; /** * @brief When a share is leased, specifies whether the lease is of infinite or fixed duration. */ - class LeaseDurationType final { + class LeaseDurationType final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new LeaseDurationType instance */ LeaseDurationType() = default; /** Constructs a new LeaseDurationType from a string. */ - explicit LeaseDurationType(std::string value) : m_value(std::move(value)) {} - /** Compares with another LeaseDurationType. */ - bool operator==(const LeaseDurationType& other) const { return m_value == other.m_value; } - /** Compares with another LeaseDurationType. */ - bool operator!=(const LeaseDurationType& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit LeaseDurationType(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type LeaseDurationType: Infinite */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseDurationType Infinite; /** Constant value of type LeaseDurationType: Fixed */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseDurationType Fixed; - - private: - std::string m_value; }; /** * @brief The protocols that have been enabled on the share. */ - class ShareProtocols final { + class ShareProtocols final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new ShareProtocols instance */ ShareProtocols() = default; /** Constructs a new ShareProtocols from a string. */ - explicit ShareProtocols(std::string value) : m_value(std::move(value)) {} - /** Compares with another ShareProtocols. */ - bool operator==(const ShareProtocols& other) const { return m_value == other.m_value; } - /** Compares with another ShareProtocols. */ - bool operator!=(const ShareProtocols& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit ShareProtocols(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type ShareProtocols: Smb */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareProtocols Smb; /** Constant value of type ShareProtocols: Nfs */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareProtocols Nfs; - - private: - std::string m_value; }; /** * @brief Root squash to set on the share. Only valid for NFS shares. */ - class ShareRootSquash final { + class ShareRootSquash final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new ShareRootSquash instance */ ShareRootSquash() = default; /** Constructs a new ShareRootSquash from a string. */ - explicit ShareRootSquash(std::string value) : m_value(std::move(value)) {} - /** Compares with another ShareRootSquash. */ - bool operator==(const ShareRootSquash& other) const { return m_value == other.m_value; } - /** Compares with another ShareRootSquash. */ - bool operator!=(const ShareRootSquash& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit ShareRootSquash(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type ShareRootSquash: NoRootSquash */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareRootSquash NoRootSquash; /** Constant value of type ShareRootSquash: RootSquash */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareRootSquash RootSquash; /** Constant value of type ShareRootSquash: AllSquash */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static ShareRootSquash AllSquash; - - private: - std::string m_value; }; /** * @brief Properties of a share. @@ -353,23 +299,23 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * The Quota for the item. */ - int64_t Quota = int64_t(); + std::int64_t Quota = std::int64_t(); /** * Provisioned Iops. */ - Nullable ProvisionedIops; + Nullable ProvisionedIops; /** * Provisioned Ingress MBps. */ - Nullable ProvisionedIngressMBps; + Nullable ProvisionedIngressMBps; /** * Provisioned Egress MBps. */ - Nullable ProvisionedEgressMBps; + Nullable ProvisionedEgressMBps; /** * Provisioned Bandwidth MBps. */ - Nullable ProvisionedBandwidthMBps; + Nullable ProvisionedBandwidthMBps; /** * Next allowed Quota Downgrade Time. */ @@ -381,7 +327,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * Remaining retention days. */ - int32_t RemainingRetentionDays = int32_t(); + std::int32_t RemainingRetentionDays = std::int32_t(); /** * Specifies the access tier of the share. */ @@ -428,12 +374,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { * Optional. Integer. Default if not specified is the maximum IOPS the file share can support. * Current maximum for a file share is 102,400 IOPS. */ - Nullable PaidBurstingMaxIops; + Nullable PaidBurstingMaxIops; /** * Optional. Integer. Default if not specified is the maximum throughput the file share can * support. Current maximum for a file share is 10,340 MiB/sec. */ - Nullable PaidBurstingMaxBandwidthMibps; + Nullable PaidBurstingMaxBandwidthMibps; }; /** * @brief A listed Azure Storage share item. @@ -508,7 +454,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { std::string ServiceEndpoint; Nullable Prefix; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; /** * Array of ShareItem. */ @@ -562,19 +508,19 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * Returns the current share quota in GB. */ - int64_t Quota = int64_t(); + std::int64_t Quota = std::int64_t(); /** * Returns the current share provisioned IOPS. */ - Nullable ProvisionedIops; + Nullable ProvisionedIops; /** * Returns the current share provisioned ingress in megabytes per second. */ - Nullable ProvisionedIngressMBps; + Nullable ProvisionedIngressMBps; /** * Returns the current share provisioned egress in megabytes per second. */ - Nullable ProvisionedEgressMBps; + Nullable ProvisionedEgressMBps; /** * Returns the current share next allowed quota downgrade time. */ @@ -582,7 +528,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * Returns the current share provisioned bandwidth in megabits per second. */ - Nullable ProvisionedBandwidthMBps; + Nullable ProvisionedBandwidthMBps; /** * When a share is leased, specifies whether the lease is of infinite or fixed duration. */ @@ -625,33 +571,26 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { * Optional. Integer. Default if not specified is the maximum IOPS the file share can support. * Current maximum for a file share is 102,400 IOPS. */ - Nullable PaidBurstingMaxIops; + Nullable PaidBurstingMaxIops; /** * Optional. Integer. Default if not specified is the maximum throughput the file share can * support. Current maximum for a file share is 10,340 MiB/sec. */ - Nullable PaidBurstingMaxBandwidthMibps; + Nullable PaidBurstingMaxBandwidthMibps; }; /** * @brief Specifies the option include to delete the base share and all of its snapshots. */ - class DeleteSnapshotsOption final { + class DeleteSnapshotsOption final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new DeleteSnapshotsOption instance */ DeleteSnapshotsOption() = default; /** Constructs a new DeleteSnapshotsOption from a string. */ - explicit DeleteSnapshotsOption(std::string value) : m_value(std::move(value)) {} - /** Compares with another DeleteSnapshotsOption. */ - bool operator==(const DeleteSnapshotsOption& other) const { return m_value == other.m_value; } - /** Compares with another DeleteSnapshotsOption. */ - bool operator!=(const DeleteSnapshotsOption& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit DeleteSnapshotsOption(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type DeleteSnapshotsOption: Include */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static DeleteSnapshotsOption Include; - - private: - std::string m_value; }; /** * @brief Response type for #Azure::Storage::Files::Shares::ShareClient::Delete. @@ -763,7 +702,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * Approximate time remaining in the lease period, in seconds. */ - int32_t LeaseTime = int32_t(); + std::int32_t LeaseTime = std::int32_t(); }; } // namespace _detail /** @@ -803,25 +742,18 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { * returned in SDDL format. If x-ms-file-permission-format is explicitly set to binary, the * permission is returned as a base64 string representing the binary encoding of the permission. */ - class FilePermissionFormat final { + class FilePermissionFormat final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new FilePermissionFormat instance */ FilePermissionFormat() = default; /** Constructs a new FilePermissionFormat from a string. */ - explicit FilePermissionFormat(std::string value) : m_value(std::move(value)) {} - /** Compares with another FilePermissionFormat. */ - bool operator==(const FilePermissionFormat& other) const { return m_value == other.m_value; } - /** Compares with another FilePermissionFormat. */ - bool operator!=(const FilePermissionFormat& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit FilePermissionFormat(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type FilePermissionFormat: Sddl */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static FilePermissionFormat Sddl; /** Constant value of type FilePermissionFormat: Binary */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static FilePermissionFormat Binary; - - private: - std::string m_value; }; /** * @brief Response type for #Azure::Storage::Files::Shares::ShareClient::CreatePermission. @@ -945,7 +877,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { * The approximate size of the data stored in bytes. Note that this value may not include all * recently created or recently resized files. */ - int64_t ShareUsageInBytes = int64_t(); + std::int64_t ShareUsageInBytes = std::int64_t(); /** * The ETag contains a value that you can use to perform operations conditionally, in quotes. */ @@ -1217,7 +1149,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { * handle is closed or the op-lock is broken. To retrieve current property values, call Get * File Properties. */ - int64_t FileSize = int64_t(); + std::int64_t FileSize = std::int64_t(); /** * The time the file was last accessed. */ @@ -1306,7 +1238,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { std::string DirectoryPath; StringEncoded Prefix; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; /** * Abstract for entries that can be listed from Directory. */ @@ -1317,27 +1249,19 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * @brief Access rights of the access policy. */ - class AccessRight final { + class AccessRight final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new AccessRight instance */ AccessRight() = default; /** Constructs a new AccessRight from a string. */ - explicit AccessRight(std::string value) : m_value(std::move(value)) {} - /** Compares with another AccessRight. */ - bool operator==(const AccessRight& other) const { return m_value == other.m_value; } - /** Compares with another AccessRight. */ - bool operator!=(const AccessRight& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit AccessRight(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type AccessRight: Read */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static AccessRight Read; /** Constant value of type AccessRight: Write */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static AccessRight Write; /** Constant value of type AccessRight: Delete */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static AccessRight Delete; - - private: - std::string m_value; }; /** * @brief A listed Azure Storage handle item. @@ -1399,11 +1323,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * Contains count of number of handles closed. */ - int32_t NumberOfHandlesClosed = int32_t(); + std::int32_t NumberOfHandlesClosed = std::int32_t(); /** * Contains count of number of handles that failed to close. */ - int32_t NumberOfHandlesFailedToClose = int32_t(); + std::int32_t NumberOfHandlesFailedToClose = std::int32_t(); }; /** * @brief Response type for #Azure::Storage::Files::Shares::DirectoryClient::Rename. @@ -1518,18 +1442,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * @brief Status of a copy operation. */ - class CopyStatus final { + class CopyStatus final : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new CopyStatus instance */ CopyStatus() = default; /** Constructs a new CopyStatus from a string. */ - explicit CopyStatus(std::string value) : m_value(std::move(value)) {} - /** Compares with another CopyStatus. */ - bool operator==(const CopyStatus& other) const { return m_value == other.m_value; } - /** Compares with another CopyStatus. */ - bool operator!=(const CopyStatus& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit CopyStatus(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type CopyStatus: Pending */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static CopyStatus Pending; /** Constant value of type CopyStatus: Success */ @@ -1538,9 +1457,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { AZ_STORAGE_FILES_SHARES_DLLEXPORT const static CopyStatus Aborted; /** Constant value of type CopyStatus: Failed */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static CopyStatus Failed; - - private: - std::string m_value; }; /** * @brief Detailed information of the downloaded file. @@ -1642,7 +1558,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * Size of the file in bytes. */ - int64_t FileSize = int64_t(); + std::int64_t FileSize = std::int64_t(); /** * MD5 hash for the downloaded range of data. */ @@ -1682,7 +1598,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { * The size of the file in bytes. This header returns the value of the 'x-ms-content-length' * header that is stored with the file. */ - int64_t FileSize = int64_t(); + std::int64_t FileSize = std::int64_t(); /** * The ETag contains a value that you can use to perform operations conditionally, in quotes. */ @@ -1869,25 +1785,18 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * @brief If the file last write time should be preserved or overwritten. */ - class FileLastWrittenMode final { + class FileLastWrittenMode final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new FileLastWrittenMode instance */ FileLastWrittenMode() = default; /** Constructs a new FileLastWrittenMode from a string. */ - explicit FileLastWrittenMode(std::string value) : m_value(std::move(value)) {} - /** Compares with another FileLastWrittenMode. */ - bool operator==(const FileLastWrittenMode& other) const { return m_value == other.m_value; } - /** Compares with another FileLastWrittenMode. */ - bool operator!=(const FileLastWrittenMode& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit FileLastWrittenMode(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type FileLastWrittenMode: Now */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static FileLastWrittenMode Now; /** Constant value of type FileLastWrittenMode: Preserve */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static FileLastWrittenMode Preserve; - - private: - std::string m_value; }; /** * @brief Response type for #Azure::Storage::Files::Shares::ShareFileClient::UploadRange. @@ -1969,32 +1878,25 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * The size of the file in bytes. */ - int64_t FileSize = int64_t(); + std::int64_t FileSize = std::int64_t(); }; /** * @brief Specifies the option to copy file security descriptor from source file or to set it * using the value which is defined by the header value of x-ms-file-permission or * x-ms-file-permission-key. */ - class PermissionCopyMode final { + class PermissionCopyMode final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new PermissionCopyMode instance */ PermissionCopyMode() = default; /** Constructs a new PermissionCopyMode from a string. */ - explicit PermissionCopyMode(std::string value) : m_value(std::move(value)) {} - /** Compares with another PermissionCopyMode. */ - bool operator==(const PermissionCopyMode& other) const { return m_value == other.m_value; } - /** Compares with another PermissionCopyMode. */ - bool operator!=(const PermissionCopyMode& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit PermissionCopyMode(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type PermissionCopyMode: Source */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static PermissionCopyMode Source; /** Constant value of type PermissionCopyMode: Override */ AZ_STORAGE_FILES_SHARES_DLLEXPORT const static PermissionCopyMode Override; - - private: - std::string m_value; }; namespace _detail { /** @@ -2054,11 +1956,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { /** * Contains count of number of handles closed. */ - int32_t NumberOfHandlesClosed = int32_t(); + std::int32_t NumberOfHandlesClosed = std::int32_t(); /** * Contains count of number of handles that failed to close. */ - int32_t NumberOfHandlesFailedToClose = int32_t(); + std::int32_t NumberOfHandlesFailedToClose = std::int32_t(); }; /** * @brief Response type for #Azure::Storage::Files::Shares::FileClient::Rename. @@ -2137,7 +2039,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { Nullable Prefix; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; Nullable Include; Nullable FileRequestIntent; }; @@ -2152,14 +2054,14 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct CreateShareOptions final { std::map Metadata; - Nullable Quota; + Nullable Quota; Nullable AccessTier; Nullable EnabledProtocols; Nullable RootSquash; Nullable EnableSnapshotVirtualDirectoryAccess; Nullable PaidBurstingEnabled; - Nullable PaidBurstingMaxBandwidthMibps; - Nullable PaidBurstingMaxIops; + Nullable PaidBurstingMaxBandwidthMibps; + Nullable PaidBurstingMaxIops; Nullable FileRequestIntent; }; static Response Create( @@ -2192,7 +2094,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context); struct AcquireShareLeaseOptions final { - Nullable Duration; + Nullable Duration; Nullable ProposedLeaseId; Nullable Sharesnapshot; Nullable FileRequestIntent; @@ -2238,7 +2140,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context); struct BreakShareLeaseOptions final { - Nullable BreakPeriod; + Nullable BreakPeriod; Nullable LeaseId; Nullable Sharesnapshot; Nullable FileRequestIntent; @@ -2281,14 +2183,14 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context); struct SetSharePropertiesOptions final { - Nullable Quota; + Nullable Quota; Nullable AccessTier; Nullable LeaseId; Nullable RootSquash; Nullable EnableSnapshotVirtualDirectoryAccess; Nullable PaidBurstingEnabled; - Nullable PaidBurstingMaxBandwidthMibps; - Nullable PaidBurstingMaxIops; + Nullable PaidBurstingMaxBandwidthMibps; + Nullable PaidBurstingMaxIops; Nullable FileRequestIntent; }; static Response SetProperties( @@ -2412,7 +2314,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Nullable Prefix; Nullable Sharesnapshot; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; Nullable Include; Nullable IncludeExtendedInfo; Nullable AllowTrailingDot; @@ -2427,7 +2329,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct ListDirectoryHandlesOptions final { Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; Nullable Sharesnapshot; Nullable Recursive; Nullable AllowTrailingDot; @@ -2482,12 +2384,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct CreateFileOptions final { Nullable AllowTrailingDot; - int64_t FileContentLength = int64_t(); + std::int64_t FileContentLength = std::int64_t(); Nullable FileContentType; Nullable FileContentEncoding; Nullable FileContentLanguage; Nullable FileCacheControl; - Nullable> FileContentMD5; + Nullable> FileContentMD5; Nullable FileContentDisposition; std::map Metadata; Nullable FilePermission; @@ -2543,12 +2445,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context); struct SetFileHttpHeadersOptions final { - Nullable FileContentLength; + Nullable FileContentLength; Nullable FileContentType; Nullable FileContentEncoding; Nullable FileContentLanguage; Nullable FileCacheControl; - Nullable> FileContentMD5; + Nullable> FileContentMD5; Nullable FileContentDisposition; Nullable FilePermission; Nullable FilePermissionFormat; @@ -2580,7 +2482,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { const Core::Context& context); struct AcquireFileLeaseOptions final { - Nullable Duration; + Nullable Duration; Nullable ProposedLeaseId; Nullable AllowTrailingDot; Nullable FileRequestIntent; @@ -2628,7 +2530,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { std::string Range; std::string FileRangeWrite; - Nullable> ContentMD5; + Nullable> ContentMD5; Nullable LeaseId; Nullable FileLastWrittenMode; Nullable AllowTrailingDot; @@ -2645,9 +2547,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { std::string Range; std::string CopySource; Nullable SourceRange; - Nullable> SourceContentCrc64; - Nullable> SourceIfMatchCrc64; - Nullable> SourceIfNoneMatchCrc64; + Nullable> SourceContentCrc64; + Nullable> SourceIfMatchCrc64; + Nullable> SourceIfNoneMatchCrc64; Nullable LeaseId; Nullable CopySourceAuthorization; Nullable FileLastWrittenMode; @@ -2713,7 +2615,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { struct ListFileHandlesOptions final { Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; Nullable Sharesnapshot; Nullable AllowTrailingDot; Nullable FileRequestIntent; diff --git a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_options.hpp b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_options.hpp index 5b259477e0..20eb526da1 100644 --- a/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_options.hpp +++ b/sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_options.hpp @@ -192,13 +192,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { * Optional. Integer. Version 2023-11-03 and newer. Default if not specified is the maximum IOPS * the file share can support. Current maximum for a file share is 102,400 IOPS. */ - Nullable PaidBurstingMaxIops; + Nullable PaidBurstingMaxIops; /** * Optional. Integer. Version 2023-11-03 and newer. Default if not specified is the maximum * throughput the file share can support. Current maximum for a file share is 10,340 MiB/sec. */ - Nullable PaidBurstingMaxBandwidthMibps; + Nullable PaidBurstingMaxBandwidthMibps; }; /** @@ -269,13 +269,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { * Optional. Integer. Version 2023-11-03 and newer. Default if not specified is the maximum IOPS * the file share can support. Current maximum for a file share is 102,400 IOPS. */ - Nullable PaidBurstingMaxIops; + Nullable PaidBurstingMaxIops; /** * Optional. Integer. Version 2023-11-03 and newer. Default if not specified is the maximum * throughput the file share can support. Current maximum for a file share is 10,340 MiB/sec. */ - Nullable PaidBurstingMaxBandwidthMibps; + Nullable PaidBurstingMaxBandwidthMibps; }; /** diff --git a/sdk/storage/azure-storage-queues/inc/azure/storage/queues/rest_client.hpp b/sdk/storage/azure-storage-queues/inc/azure/storage/queues/rest_client.hpp index e93b1e9380..9cd2db0c34 100644 --- a/sdk/storage/azure-storage-queues/inc/azure/storage/queues/rest_client.hpp +++ b/sdk/storage/azure-storage-queues/inc/azure/storage/queues/rest_client.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -42,7 +43,7 @@ namespace Azure { namespace Storage { namespace Queues { * Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. */ - Nullable Days; + Nullable Days; }; /** * @brief Azure Analytics Logging settings. @@ -126,7 +127,7 @@ namespace Azure { namespace Storage { namespace Queues { /** * The maximum amount time that a browser should cache the preflight OPTIONS request. */ - int32_t MaxAgeInSeconds = int32_t(); + std::int32_t MaxAgeInSeconds = std::int32_t(); }; /** * @brief Response type for #Azure::Storage::Queues::QueueServiceClient::SetProperties. @@ -159,27 +160,20 @@ namespace Azure { namespace Storage { namespace Queues { /** * @brief The status of the secondary location. */ - class GeoReplicationStatus final { + class GeoReplicationStatus final + : public Core::_internal::ExtendableEnumeration { public: /** Constructs a new GeoReplicationStatus instance */ GeoReplicationStatus() = default; /** Constructs a new GeoReplicationStatus from a string. */ - explicit GeoReplicationStatus(std::string value) : m_value(std::move(value)) {} - /** Compares with another GeoReplicationStatus. */ - bool operator==(const GeoReplicationStatus& other) const { return m_value == other.m_value; } - /** Compares with another GeoReplicationStatus. */ - bool operator!=(const GeoReplicationStatus& other) const { return !(*this == other); } - /** Converts the value to a string. */ - const std::string& ToString() const { return m_value; } + explicit GeoReplicationStatus(std::string value) : ExtendableEnumeration(std::move(value)) {} + /** Constant value of type GeoReplicationStatus: Live */ AZ_STORAGE_QUEUES_DLLEXPORT const static GeoReplicationStatus Live; /** Constant value of type GeoReplicationStatus: Bootstrap */ AZ_STORAGE_QUEUES_DLLEXPORT const static GeoReplicationStatus Bootstrap; /** Constant value of type GeoReplicationStatus: Unavailable */ AZ_STORAGE_QUEUES_DLLEXPORT const static GeoReplicationStatus Unavailable; - - private: - std::string m_value; }; /** * @brief Geo-Replication information for the Secondary Storage Service. @@ -302,7 +296,7 @@ namespace Azure { namespace Storage { namespace Queues { * The approximate number of messages in the queue. This number is not lower than the actual * number of messages in the queue, but could be higher. */ - int32_t ApproximateMessageCount = int32_t(); + std::int32_t ApproximateMessageCount = std::int32_t(); }; /** * @brief Response type for #Azure::Storage::Queues::QueueClient::SetMetadata. @@ -378,7 +372,7 @@ namespace Azure { namespace Storage { namespace Queues { /** * The number of times the message has been dequeued. */ - int64_t DequeueCount = int64_t(); + std::int64_t DequeueCount = std::int64_t(); /** * The content of the Message. */ @@ -460,7 +454,7 @@ namespace Azure { namespace Storage { namespace Queues { /** * The number of times the message has been dequeued. */ - int64_t DequeueCount = int64_t(); + std::int64_t DequeueCount = std::int64_t(); /** * The content of the Message. */ @@ -529,7 +523,7 @@ namespace Azure { namespace Storage { namespace Queues { { Nullable Prefix; Nullable Marker; - Nullable MaxResults; + Nullable MaxResults; Nullable Include; }; static Response ListQueuesSegment( @@ -593,8 +587,8 @@ namespace Azure { namespace Storage { namespace Queues { const Core::Context& context); struct ReceiveQueueMessagesOptions final { - Nullable NumberOfMessages; - Nullable Visibilitytimeout; + Nullable NumberOfMessages; + Nullable Visibilitytimeout; }; static Response ReceiveMessages( Core::Http::_internal::HttpPipeline& pipeline, @@ -612,8 +606,8 @@ namespace Azure { namespace Storage { namespace Queues { struct EnqueueQueueMessageOptions final { Models::_detail::QueueMessageInternal QueueMessage; - Nullable Visibilitytimeout; - Nullable MessageTimeToLive; + Nullable Visibilitytimeout; + Nullable MessageTimeToLive; }; static Response EnqueueMessage( Core::Http::_internal::HttpPipeline& pipeline, @@ -622,7 +616,7 @@ namespace Azure { namespace Storage { namespace Queues { const Core::Context& context); struct PeekQueueMessagesOptions final { - Nullable NumberOfMessages; + Nullable NumberOfMessages; }; static Response PeekMessages( Core::Http::_internal::HttpPipeline& pipeline, @@ -633,7 +627,7 @@ namespace Azure { namespace Storage { namespace Queues { { Models::_detail::QueueMessageInternal QueueMessage; std::string PopReceipt; - int32_t Visibilitytimeout = int32_t(); + std::int32_t Visibilitytimeout = std::int32_t(); }; static Response UpdateMessage( Core::Http::_internal::HttpPipeline& pipeline, @@ -652,7 +646,7 @@ namespace Azure { namespace Storage { namespace Queues { struct UpdateQueueMessageVisibilityOptions final { std::string PopReceipt; - int32_t Visibilitytimeout = int32_t(); + std::int32_t Visibilitytimeout = std::int32_t(); }; static Response UpdateMessageVisibility( Core::Http::_internal::HttpPipeline& pipeline,