Remove Type suffix from some enums. (#1951)
* Remove Type suffix from some enums. * Remove more fields. * Resolve build issue on Linux.
This commit is contained in:
parent
9f4b389f4d
commit
0d422b95a0
@ -22,8 +22,9 @@
|
||||
- Removed `DataLake` from the names of return types and option types.
|
||||
- Removed `RequestId` from the return types.
|
||||
- Changed `BodyStream` parameter of `Append` function from pointer to reference.
|
||||
- Removed `PathRenameMode`, `PathGetPropertiesAction`, `PathSetAccessControlRecursiveMode`, `FileSystemResourceType` and `FileSystemResourceType`.
|
||||
- Removed `PathRenameMode`, `PathGetPropertiesAction`, `PathSetAccessControlRecursiveMode`, `FileSystemResourceType`, `PathExpiryOptions` and `FileSystemResourceType`.
|
||||
- Removed `IsAccessTierInferred` and `AccessTierChangedOn` from `PathProperties`.
|
||||
- Renamed `LeaseDurationType` to `LeaseDuration`, `LeaseStateType` to `LeaseState` and `LeaseStatusType` to `LeaseStatus`.
|
||||
|
||||
## 12.0.0-beta.8 (2021-02-12)
|
||||
|
||||
|
||||
@ -25,9 +25,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam
|
||||
PublicAccessType AccessType = PublicAccessType::None;
|
||||
bool HasImmutabilityPolicy = false;
|
||||
bool HasLegalHold = false;
|
||||
Azure::Nullable<LeaseDurationType> LeaseDuration;
|
||||
LeaseStateType LeaseState = LeaseStateType::Available;
|
||||
LeaseStatusType LeaseStatus = LeaseStatusType::Unlocked;
|
||||
Azure::Nullable<Models::LeaseDuration> LeaseDuration;
|
||||
Models::LeaseState LeaseState = Models::LeaseState::Available;
|
||||
Models::LeaseStatus LeaseStatus = Models::LeaseStatus::Unlocked;
|
||||
}; // struct FileSystemItemDetails
|
||||
|
||||
struct FileSystemItem
|
||||
@ -141,9 +141,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam
|
||||
DateTime CreatedOn;
|
||||
int64_t FileSize = 0;
|
||||
Storage::Metadata Metadata;
|
||||
Azure::Nullable<LeaseDurationType> LeaseDuration;
|
||||
Azure::Nullable<LeaseStateType> LeaseState;
|
||||
Azure::Nullable<LeaseStatusType> LeaseStatus;
|
||||
Azure::Nullable<Models::LeaseDuration> LeaseDuration;
|
||||
Azure::Nullable<Models::LeaseState> LeaseState;
|
||||
Azure::Nullable<Models::LeaseStatus> LeaseStatus;
|
||||
PathHttpHeaders HttpHeaders;
|
||||
Azure::Nullable<bool> IsServerEncrypted;
|
||||
Azure::Nullable<std::vector<uint8_t>> EncryptionKeySha256;
|
||||
@ -207,9 +207,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam
|
||||
{
|
||||
Azure::ETag ETag;
|
||||
DateTime LastModified;
|
||||
Azure::Nullable<LeaseDurationType> LeaseDuration;
|
||||
LeaseStateType LeaseState;
|
||||
LeaseStatusType LeaseStatus;
|
||||
Azure::Nullable<Models::LeaseDuration> LeaseDuration;
|
||||
Models::LeaseState LeaseState;
|
||||
Models::LeaseStatus LeaseStatus;
|
||||
PathHttpHeaders HttpHeaders;
|
||||
Storage::Metadata Metadata;
|
||||
DateTime CreatedOn;
|
||||
|
||||
@ -38,24 +38,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
Storage::ContentHash ContentHash;
|
||||
};
|
||||
|
||||
// Required. Indicates mode of the expiry time
|
||||
class PathExpiryOptions {
|
||||
public:
|
||||
PathExpiryOptions() = default;
|
||||
explicit PathExpiryOptions(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const PathExpiryOptions& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const PathExpiryOptions& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathExpiryOptions NeverExpire;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathExpiryOptions RelativeToCreation;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathExpiryOptions RelativeToNow;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathExpiryOptions Absolute;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum PathExpiryOptions
|
||||
|
||||
struct AclFailedEntry
|
||||
{
|
||||
std::string Name;
|
||||
@ -108,55 +90,55 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
}; // extensible enum PathResourceType
|
||||
|
||||
// When a resource is leased, specifies whether the lease is of infinite or fixed duration.
|
||||
class LeaseDurationType {
|
||||
class LeaseDuration {
|
||||
public:
|
||||
LeaseDurationType() = default;
|
||||
explicit LeaseDurationType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseDurationType& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseDurationType& other) const { return !(*this == other); }
|
||||
LeaseDuration() = default;
|
||||
explicit LeaseDuration(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseDuration& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseDuration& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseDurationType Infinite;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseDurationType Fixed;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseDuration Infinite;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseDuration Fixed;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum LeaseDurationType
|
||||
}; // extensible enum LeaseDuration
|
||||
|
||||
// Lease state of the resource.
|
||||
class LeaseStateType {
|
||||
class LeaseState {
|
||||
public:
|
||||
LeaseStateType() = default;
|
||||
explicit LeaseStateType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseStateType& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseStateType& other) const { return !(*this == other); }
|
||||
LeaseState() = default;
|
||||
explicit LeaseState(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseState& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseState& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseStateType Available;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseStateType Leased;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseStateType Expired;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseStateType Breaking;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseStateType Broken;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseState Available;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseState Leased;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseState Expired;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseState Breaking;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseState Broken;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum LeaseStateType
|
||||
}; // extensible enum LeaseState
|
||||
|
||||
// The lease status of the resource.
|
||||
class LeaseStatusType {
|
||||
class LeaseStatus {
|
||||
public:
|
||||
LeaseStatusType() = default;
|
||||
explicit LeaseStatusType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseStatusType& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseStatusType& other) const { return !(*this == other); }
|
||||
LeaseStatus() = default;
|
||||
explicit LeaseStatus(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseStatus& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseStatus& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseStatusType Locked;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseStatusType Unlocked;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseStatus Locked;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseStatus Unlocked;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum LeaseStatusType
|
||||
}; // extensible enum LeaseStatus
|
||||
|
||||
} // namespace Models
|
||||
namespace _detail {
|
||||
@ -209,7 +191,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
constexpr static const char* HeaderGroup = "x-ms-group";
|
||||
constexpr static const char* HeaderAcl = "x-ms-acl";
|
||||
constexpr static const char* HeaderContentLength = "content-length";
|
||||
constexpr static const char* HeaderExpiryOptions = "x-ms-expiry-option";
|
||||
constexpr static const char* HeaderExpiresOn = "x-ms-expiry-time";
|
||||
constexpr static const char* HeaderDate = "date";
|
||||
constexpr static const char* HeaderRequestId = "x-ms-request-id";
|
||||
@ -347,9 +328,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
Azure::Nullable<std::string> Group;
|
||||
Azure::Nullable<std::string> Permissions;
|
||||
Azure::Nullable<std::string> Acl;
|
||||
Azure::Nullable<LeaseDurationType> LeaseDuration;
|
||||
Azure::Nullable<LeaseStateType> LeaseState;
|
||||
Azure::Nullable<LeaseStatusType> LeaseStatus;
|
||||
Azure::Nullable<Models::LeaseDuration> LeaseDuration;
|
||||
Azure::Nullable<Models::LeaseState> LeaseState;
|
||||
Azure::Nullable<Models::LeaseStatus> LeaseStatus;
|
||||
};
|
||||
|
||||
struct PathDeleteResult
|
||||
@ -1260,19 +1241,18 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseDuration
|
||||
= LeaseDurationType(response.GetHeaders().at(_detail::HeaderLeaseDuration));
|
||||
= LeaseDuration(response.GetHeaders().at(_detail::HeaderLeaseDuration));
|
||||
}
|
||||
if (response.GetHeaders().find(_detail::HeaderLeaseState)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseState
|
||||
= LeaseStateType(response.GetHeaders().at(_detail::HeaderLeaseState));
|
||||
result.LeaseState = LeaseState(response.GetHeaders().at(_detail::HeaderLeaseState));
|
||||
}
|
||||
if (response.GetHeaders().find(_detail::HeaderLeaseStatus)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseStatus
|
||||
= LeaseStatusType(response.GetHeaders().at(_detail::HeaderLeaseStatus));
|
||||
= LeaseStatus(response.GetHeaders().at(_detail::HeaderLeaseStatus));
|
||||
}
|
||||
return Azure::Response<PathGetPropertiesResult>(
|
||||
std::move(result), std::move(responsePtr));
|
||||
|
||||
@ -39,42 +39,42 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
return ret;
|
||||
}
|
||||
|
||||
Models::LeaseStateType FromBlobLeaseState(Blobs::Models::LeaseState state)
|
||||
Models::LeaseState FromBlobLeaseState(Blobs::Models::LeaseState state)
|
||||
{
|
||||
if (state == Blobs::Models::LeaseState::Available)
|
||||
{
|
||||
return Models::LeaseStateType::Available;
|
||||
return Models::LeaseState::Available;
|
||||
}
|
||||
if (state == Blobs::Models::LeaseState::Breaking)
|
||||
{
|
||||
return Models::LeaseStateType::Breaking;
|
||||
return Models::LeaseState::Breaking;
|
||||
}
|
||||
if (state == Blobs::Models::LeaseState::Broken)
|
||||
{
|
||||
return Models::LeaseStateType::Broken;
|
||||
return Models::LeaseState::Broken;
|
||||
}
|
||||
if (state == Blobs::Models::LeaseState::Expired)
|
||||
{
|
||||
return Models::LeaseStateType::Expired;
|
||||
return Models::LeaseState::Expired;
|
||||
}
|
||||
if (state == Blobs::Models::LeaseState::Leased)
|
||||
{
|
||||
return Models::LeaseStateType::Leased;
|
||||
return Models::LeaseState::Leased;
|
||||
}
|
||||
return Models::LeaseStateType();
|
||||
return Models::LeaseState();
|
||||
}
|
||||
|
||||
Models::LeaseStatusType FromBlobLeaseStatus(Blobs::Models::LeaseStatus status)
|
||||
Models::LeaseStatus FromBlobLeaseStatus(Blobs::Models::LeaseStatus status)
|
||||
{
|
||||
if (status == Blobs::Models::LeaseStatus::Locked)
|
||||
{
|
||||
return Models::LeaseStatusType::Locked;
|
||||
return Models::LeaseStatus::Locked;
|
||||
}
|
||||
if (status == Blobs::Models::LeaseStatus::Unlocked)
|
||||
{
|
||||
return Models::LeaseStatusType::Unlocked;
|
||||
return Models::LeaseStatus::Unlocked;
|
||||
}
|
||||
return Models::LeaseStatusType();
|
||||
return Models::LeaseStatus();
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@ -227,7 +227,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
if (result->Details.LeaseDuration.HasValue())
|
||||
{
|
||||
ret.Details.LeaseDuration
|
||||
= Models::LeaseDurationType(result->Details.LeaseDuration.GetValue().ToString());
|
||||
= Models::LeaseDuration(result->Details.LeaseDuration.GetValue().ToString());
|
||||
}
|
||||
ret.Details.LeaseState = result->Details.LeaseState.HasValue()
|
||||
? FromBlobLeaseState(result->Details.LeaseState.GetValue())
|
||||
@ -300,7 +300,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
if (result->Details.LeaseDuration.HasValue())
|
||||
{
|
||||
ret.Details.LeaseDuration
|
||||
= Models::LeaseDurationType(result->Details.LeaseDuration.GetValue().ToString());
|
||||
= Models::LeaseDuration(result->Details.LeaseDuration.GetValue().ToString());
|
||||
}
|
||||
ret.Details.LeaseState = result->Details.LeaseState.HasValue()
|
||||
? FromBlobLeaseState(result->Details.LeaseState.GetValue())
|
||||
@ -342,7 +342,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
if (result->Details.LeaseDuration.HasValue())
|
||||
{
|
||||
ret.Details.LeaseDuration
|
||||
= Models::LeaseDurationType(result->Details.LeaseDuration.GetValue().ToString());
|
||||
= Models::LeaseDuration(result->Details.LeaseDuration.GetValue().ToString());
|
||||
}
|
||||
ret.Details.LeaseState = result->Details.LeaseState.HasValue()
|
||||
? FromBlobLeaseState(result->Details.LeaseState.GetValue())
|
||||
|
||||
@ -19,42 +19,42 @@
|
||||
namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
|
||||
namespace {
|
||||
Models::LeaseStateType FromBlobLeaseState(Blobs::Models::LeaseState state)
|
||||
Models::LeaseState FromBlobLeaseState(Blobs::Models::LeaseState state)
|
||||
{
|
||||
if (state == Blobs::Models::LeaseState::Available)
|
||||
{
|
||||
return Models::LeaseStateType::Available;
|
||||
return Models::LeaseState::Available;
|
||||
}
|
||||
if (state == Blobs::Models::LeaseState::Breaking)
|
||||
{
|
||||
return Models::LeaseStateType::Breaking;
|
||||
return Models::LeaseState::Breaking;
|
||||
}
|
||||
if (state == Blobs::Models::LeaseState::Broken)
|
||||
{
|
||||
return Models::LeaseStateType::Broken;
|
||||
return Models::LeaseState::Broken;
|
||||
}
|
||||
if (state == Blobs::Models::LeaseState::Expired)
|
||||
{
|
||||
return Models::LeaseStateType::Expired;
|
||||
return Models::LeaseState::Expired;
|
||||
}
|
||||
if (state == Blobs::Models::LeaseState::Leased)
|
||||
{
|
||||
return Models::LeaseStateType::Leased;
|
||||
return Models::LeaseState::Leased;
|
||||
}
|
||||
return Models::LeaseStateType();
|
||||
return Models::LeaseState();
|
||||
}
|
||||
|
||||
Models::LeaseStatusType FromBlobLeaseStatus(Blobs::Models::LeaseStatus status)
|
||||
Models::LeaseStatus FromBlobLeaseStatus(Blobs::Models::LeaseStatus status)
|
||||
{
|
||||
if (status == Blobs::Models::LeaseStatus::Locked)
|
||||
{
|
||||
return Models::LeaseStatusType::Locked;
|
||||
return Models::LeaseStatus::Locked;
|
||||
}
|
||||
if (status == Blobs::Models::LeaseStatus::Unlocked)
|
||||
{
|
||||
return Models::LeaseStatusType::Unlocked;
|
||||
return Models::LeaseStatus::Unlocked;
|
||||
}
|
||||
return Models::LeaseStatusType();
|
||||
return Models::LeaseStatus();
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@ -330,7 +330,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
ret.Metadata = std::move(result->Metadata);
|
||||
if (result->LeaseDuration.HasValue())
|
||||
{
|
||||
ret.LeaseDuration = Models::LeaseDurationType(result->LeaseDuration.GetValue().ToString());
|
||||
ret.LeaseDuration = Models::LeaseDuration(result->LeaseDuration.GetValue().ToString());
|
||||
}
|
||||
ret.LeaseState = result->LeaseState.HasValue()
|
||||
? FromBlobLeaseState(result->LeaseState.GetValue())
|
||||
|
||||
@ -6,12 +6,6 @@
|
||||
|
||||
namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
namespace Models {
|
||||
|
||||
const PathExpiryOptions PathExpiryOptions::NeverExpire("NeverExpire");
|
||||
const PathExpiryOptions PathExpiryOptions::RelativeToCreation("RelativeToCreation");
|
||||
const PathExpiryOptions PathExpiryOptions::RelativeToNow("RelativeToNow");
|
||||
const PathExpiryOptions PathExpiryOptions::Absolute("Absolute");
|
||||
|
||||
const PublicAccessType PublicAccessType::FileSystem("FileSystem");
|
||||
const PublicAccessType PublicAccessType::Path("Path");
|
||||
const PublicAccessType PublicAccessType::None("None");
|
||||
@ -19,17 +13,17 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
const PathResourceType PathResourceType::Directory("directory");
|
||||
const PathResourceType PathResourceType::File("file");
|
||||
|
||||
const LeaseDurationType LeaseDurationType::Infinite("infinite");
|
||||
const LeaseDurationType LeaseDurationType::Fixed("fixed");
|
||||
const LeaseDuration LeaseDuration::Infinite("infinite");
|
||||
const LeaseDuration LeaseDuration::Fixed("fixed");
|
||||
|
||||
const LeaseStateType LeaseStateType::Available("available");
|
||||
const LeaseStateType LeaseStateType::Leased("leased");
|
||||
const LeaseStateType LeaseStateType::Expired("expired");
|
||||
const LeaseStateType LeaseStateType::Breaking("breaking");
|
||||
const LeaseStateType LeaseStateType::Broken("broken");
|
||||
const LeaseState LeaseState::Available("available");
|
||||
const LeaseState LeaseState::Leased("leased");
|
||||
const LeaseState LeaseState::Expired("expired");
|
||||
const LeaseState LeaseState::Breaking("breaking");
|
||||
const LeaseState LeaseState::Broken("broken");
|
||||
|
||||
const LeaseStatusType LeaseStatusType::Locked("locked");
|
||||
const LeaseStatusType LeaseStatusType::Unlocked("unlocked");
|
||||
const LeaseStatus LeaseStatus::Locked("locked");
|
||||
const LeaseStatus LeaseStatus::Unlocked("unlocked");
|
||||
|
||||
} // namespace Models
|
||||
namespace _detail {
|
||||
|
||||
@ -53,11 +53,10 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
if (item.Details.LeaseDuration.HasValue())
|
||||
{
|
||||
fileSystem.Details.LeaseDuration
|
||||
= Models::LeaseDurationType((item.Details.LeaseDuration.GetValue().ToString()));
|
||||
= Models::LeaseDuration((item.Details.LeaseDuration.GetValue().ToString()));
|
||||
}
|
||||
fileSystem.Details.LeaseState = Models::LeaseStateType(item.Details.LeaseState.ToString());
|
||||
fileSystem.Details.LeaseStatus
|
||||
= Models::LeaseStatusType(item.Details.LeaseStatus.ToString());
|
||||
fileSystem.Details.LeaseState = Models::LeaseState(item.Details.LeaseState.ToString());
|
||||
fileSystem.Details.LeaseStatus = Models::LeaseStatus(item.Details.LeaseStatus.ToString());
|
||||
|
||||
fileSystems.emplace_back(std::move(fileSystem));
|
||||
}
|
||||
|
||||
@ -29,7 +29,11 @@
|
||||
- Renamed `ShareRetentionPolicy` to `RetentionPolicy`.
|
||||
- Renamed `ShareProtocolSettings` to `ProtocolSettings`.
|
||||
- Renamed `CopyStatusType` to `CopyStatus`
|
||||
- Removed `FileRangeWriteType`, `ShareFileRangeList` and `ShareStats`.
|
||||
- Removed `FileRangeWriteType`, `ShareFileRangeList`, `FileRangeWriteFromUrlType`, `FileRange`, `ClearRange`, `SharePermission`, `LeaseAction` and `ShareStats`.
|
||||
- Renamed `LeaseDurationType` to `LeaseDuration`, `LeaseStateType` to `LeaseState` and `LeaseStatusType` to `LeaseStatus`.
|
||||
- Renamed `ListSharesIncludeType` to `ListSharesIncludeFlags`.
|
||||
- Renamed `DeleteSnapshotsOptionType` to `DeleteSnapshotsOption`.
|
||||
- Renamed `PermissionCopyModeType` to `PermissionCopyMode`.
|
||||
|
||||
## 12.0.0-beta.8 (2021-02-12)
|
||||
|
||||
|
||||
@ -100,60 +100,35 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
// 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 PermissionCopyModeType {
|
||||
class PermissionCopyMode {
|
||||
public:
|
||||
PermissionCopyModeType() = default;
|
||||
explicit PermissionCopyModeType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const PermissionCopyModeType& other) const
|
||||
{
|
||||
return m_value == other.m_value;
|
||||
}
|
||||
bool operator!=(const PermissionCopyModeType& other) const { return !(*this == other); }
|
||||
PermissionCopyMode() = default;
|
||||
explicit PermissionCopyMode(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const PermissionCopyMode& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const PermissionCopyMode& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static PermissionCopyModeType Source;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static PermissionCopyModeType Override;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static PermissionCopyMode Source;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static PermissionCopyMode Override;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum PermissionCopyModeType
|
||||
}; // extensible enum PermissionCopyMode
|
||||
|
||||
// Specifies the option include to delete the base share and all of its snapshots.
|
||||
class DeleteSnapshotsOptionType {
|
||||
class DeleteSnapshotsOption {
|
||||
public:
|
||||
DeleteSnapshotsOptionType() = default;
|
||||
explicit DeleteSnapshotsOptionType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const DeleteSnapshotsOptionType& other) const
|
||||
{
|
||||
return m_value == other.m_value;
|
||||
}
|
||||
bool operator!=(const DeleteSnapshotsOptionType& other) const { return !(*this == other); }
|
||||
DeleteSnapshotsOption() = default;
|
||||
explicit DeleteSnapshotsOption(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const DeleteSnapshotsOption& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const DeleteSnapshotsOption& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static DeleteSnapshotsOptionType Include;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static DeleteSnapshotsOption Include;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum DeleteSnapshotsOptionType
|
||||
|
||||
// Only update is supported: - Update: Writes the bytes downloaded from the source url into the
|
||||
// specified range.
|
||||
class FileRangeWriteFromUrlType {
|
||||
public:
|
||||
FileRangeWriteFromUrlType() = default;
|
||||
explicit FileRangeWriteFromUrlType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const FileRangeWriteFromUrlType& other) const
|
||||
{
|
||||
return m_value == other.m_value;
|
||||
}
|
||||
bool operator!=(const FileRangeWriteFromUrlType& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static FileRangeWriteFromUrlType Update;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum FileRangeWriteFromUrlType
|
||||
}; // extensible enum DeleteSnapshotsOption
|
||||
|
||||
// An Access policy.
|
||||
struct AccessPolicy
|
||||
@ -223,55 +198,55 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
};
|
||||
|
||||
// When a file or share is leased, specifies whether the lease is of infinite or fixed duration.
|
||||
class LeaseDurationType {
|
||||
class LeaseDuration {
|
||||
public:
|
||||
LeaseDurationType() = default;
|
||||
explicit LeaseDurationType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseDurationType& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseDurationType& other) const { return !(*this == other); }
|
||||
LeaseDuration() = default;
|
||||
explicit LeaseDuration(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseDuration& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseDuration& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseDurationType Infinite;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseDurationType Fixed;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseDuration Infinite;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseDuration Fixed;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum LeaseDurationType
|
||||
}; // extensible enum LeaseDuration
|
||||
|
||||
// Lease state of the file or share.
|
||||
class LeaseStateType {
|
||||
class LeaseState {
|
||||
public:
|
||||
LeaseStateType() = default;
|
||||
explicit LeaseStateType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseStateType& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseStateType& other) const { return !(*this == other); }
|
||||
LeaseState() = default;
|
||||
explicit LeaseState(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseState& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseState& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStateType Available;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStateType Leased;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStateType Expired;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStateType Breaking;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStateType Broken;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseState Available;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseState Leased;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseState Expired;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseState Breaking;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseState Broken;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum LeaseStateType
|
||||
}; // extensible enum LeaseState
|
||||
|
||||
// The current lease status of the file or share.
|
||||
class LeaseStatusType {
|
||||
class LeaseStatus {
|
||||
public:
|
||||
LeaseStatusType() = default;
|
||||
explicit LeaseStatusType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseStatusType& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseStatusType& other) const { return !(*this == other); }
|
||||
LeaseStatus() = default;
|
||||
explicit LeaseStatus(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseStatus& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseStatus& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStatusType Locked;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStatusType Unlocked;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStatus Locked;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseStatus Unlocked;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum LeaseStatusType
|
||||
}; // extensible enum LeaseStatus
|
||||
|
||||
// Properties of a share.
|
||||
struct ShareItemDetails
|
||||
@ -288,9 +263,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
Azure::Nullable<Models::AccessTier> AccessTier; // The access tier of the share.
|
||||
Azure::Nullable<DateTime> AccessTierChangedOn;
|
||||
Azure::Nullable<std::string> AccessTierTransitionState;
|
||||
LeaseStatusType LeaseStatus;
|
||||
LeaseStateType LeaseState;
|
||||
LeaseDurationType LeaseDuration;
|
||||
Models::LeaseStatus LeaseStatus;
|
||||
Models::LeaseState LeaseState;
|
||||
Models::LeaseDuration LeaseDuration;
|
||||
};
|
||||
|
||||
// A listed Azure Storage share item.
|
||||
@ -332,20 +307,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
bool Enabled = bool(); // If SMB multichannel is enabled.
|
||||
};
|
||||
|
||||
// An Azure Storage file range.
|
||||
struct FileRange
|
||||
{
|
||||
int64_t Start = int64_t(); // Start of the range.
|
||||
int64_t End = int64_t(); // End of the range.
|
||||
};
|
||||
|
||||
// An Azure Storage file clear range.
|
||||
struct ClearRange
|
||||
{
|
||||
int64_t Start = int64_t(); // Start of the range.
|
||||
int64_t End = int64_t(); // End of the range.
|
||||
};
|
||||
|
||||
// Settings for SMB protocol.
|
||||
struct SmbSettings
|
||||
{
|
||||
@ -376,32 +337,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
Azure::Nullable<ProtocolSettings> Protocol; // Protocol settings
|
||||
};
|
||||
|
||||
// A permission (a security descriptor) at the share level.
|
||||
struct SharePermission
|
||||
{
|
||||
std::string
|
||||
FilePermission; // The permission in the Security Descriptor Definition Language (SDDL).
|
||||
};
|
||||
|
||||
// Describes what lease action to take.
|
||||
class LeaseAction {
|
||||
public:
|
||||
LeaseAction() = default;
|
||||
explicit LeaseAction(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseAction& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseAction& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseAction Acquire;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseAction Release;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseAction Change;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseAction Renew;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseAction Break;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum LeaseAction
|
||||
|
||||
// State of the copy operation identified by 'x-ms-copy-id'.
|
||||
class CopyStatus {
|
||||
public:
|
||||
@ -420,7 +355,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
std::string m_value;
|
||||
}; // extensible enum CopyStatus
|
||||
|
||||
enum class ListSharesIncludeType
|
||||
enum class ListSharesIncludeFlags
|
||||
{
|
||||
None = 0,
|
||||
Snapshots = 1,
|
||||
@ -428,35 +363,39 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
Deleted = 4,
|
||||
};
|
||||
|
||||
inline ListSharesIncludeType operator|(ListSharesIncludeType lhs, ListSharesIncludeType rhs)
|
||||
inline ListSharesIncludeFlags operator|(ListSharesIncludeFlags lhs, ListSharesIncludeFlags rhs)
|
||||
{
|
||||
using type = std::underlying_type_t<ListSharesIncludeType>;
|
||||
return static_cast<ListSharesIncludeType>(static_cast<type>(lhs) | static_cast<type>(rhs));
|
||||
using type = std::underlying_type_t<ListSharesIncludeFlags>;
|
||||
return static_cast<ListSharesIncludeFlags>(static_cast<type>(lhs) | static_cast<type>(rhs));
|
||||
}
|
||||
|
||||
inline ListSharesIncludeType& operator|=(ListSharesIncludeType& lhs, ListSharesIncludeType rhs)
|
||||
inline ListSharesIncludeFlags& operator|=(
|
||||
ListSharesIncludeFlags& lhs,
|
||||
ListSharesIncludeFlags rhs)
|
||||
{
|
||||
lhs = lhs | rhs;
|
||||
return lhs;
|
||||
}
|
||||
|
||||
inline ListSharesIncludeType operator&(ListSharesIncludeType lhs, ListSharesIncludeType rhs)
|
||||
inline ListSharesIncludeFlags operator&(ListSharesIncludeFlags lhs, ListSharesIncludeFlags rhs)
|
||||
{
|
||||
using type = std::underlying_type_t<ListSharesIncludeType>;
|
||||
return static_cast<ListSharesIncludeType>(static_cast<type>(lhs) & static_cast<type>(rhs));
|
||||
using type = std::underlying_type_t<ListSharesIncludeFlags>;
|
||||
return static_cast<ListSharesIncludeFlags>(static_cast<type>(lhs) & static_cast<type>(rhs));
|
||||
}
|
||||
|
||||
inline ListSharesIncludeType& operator&=(ListSharesIncludeType& lhs, ListSharesIncludeType rhs)
|
||||
inline ListSharesIncludeFlags& operator&=(
|
||||
ListSharesIncludeFlags& lhs,
|
||||
ListSharesIncludeFlags rhs)
|
||||
{
|
||||
lhs = lhs & rhs;
|
||||
return lhs;
|
||||
}
|
||||
inline std::string ListSharesIncludeTypeToString(const ListSharesIncludeType& val)
|
||||
inline std::string ListSharesIncludeFlagsToString(const ListSharesIncludeFlags& val)
|
||||
{
|
||||
ListSharesIncludeType value_list[] = {
|
||||
ListSharesIncludeType::Snapshots,
|
||||
ListSharesIncludeType::Metadata,
|
||||
ListSharesIncludeType::Deleted,
|
||||
ListSharesIncludeFlags value_list[] = {
|
||||
ListSharesIncludeFlags::Snapshots,
|
||||
ListSharesIncludeFlags::Metadata,
|
||||
ListSharesIncludeFlags::Deleted,
|
||||
};
|
||||
const char* string_list[] = {
|
||||
"snapshots",
|
||||
@ -464,7 +403,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
"deleted",
|
||||
};
|
||||
std::string result;
|
||||
for (std::size_t i = 0; i < sizeof(value_list) / sizeof(ListSharesIncludeType); ++i)
|
||||
for (std::size_t i = 0; i < sizeof(value_list) / sizeof(ListSharesIncludeFlags); ++i)
|
||||
{
|
||||
if ((val & value_list[i]) == value_list[i])
|
||||
{
|
||||
@ -483,7 +422,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
using namespace Models;
|
||||
constexpr static const char* DefaultServiceApiVersion = "2020-02-10";
|
||||
constexpr static const char* QueryCopyId = "copyid";
|
||||
constexpr static const char* QueryListSharesInclude = "include";
|
||||
constexpr static const char* QueryIncludeFlags = "include";
|
||||
constexpr static const char* QueryContinuationToken = "marker";
|
||||
constexpr static const char* QueryPageSizeHint = "maxresults";
|
||||
constexpr static const char* QueryPrefix = "prefix";
|
||||
@ -515,7 +454,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
constexpr static const char* HeaderFilePermission = "x-ms-file-permission";
|
||||
constexpr static const char* HeaderFilePermissionKey = "x-ms-file-permission-key";
|
||||
constexpr static const char* HeaderFileRangeWriteFromUrl = "x-ms-write";
|
||||
constexpr static const char* HeaderFileRangeWriteFromUrlDefault = "update";
|
||||
constexpr static const char* HeaderFileRangeWriteFromUrlTypeDefault = "update";
|
||||
constexpr static const char* HeaderFileTypeConstant = "x-ms-type";
|
||||
constexpr static const char* HeaderRangeGetContentMd5 = "x-ms-range-get-content-md5";
|
||||
constexpr static const char* HeaderHandleId = "x-ms-handle-id";
|
||||
@ -579,10 +518,29 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
constexpr static const char* HeaderCopyProgress = "x-ms-copy-progress";
|
||||
constexpr static const char* HeaderCopyStatus = "x-ms-copy-status";
|
||||
constexpr static const char* HeaderXMsRange = "x-ms-range";
|
||||
constexpr static const char* HeaderFileRangeWrite = "x-ms-write";
|
||||
constexpr static const char* HeaderFileRangeWriteType = "x-ms-write";
|
||||
constexpr static const char* HeaderFileRangeWriteTypeDefault = "update";
|
||||
constexpr static const char* HeaderTransactionalContentHashCrc64 = "x-ms-content-crc64";
|
||||
|
||||
// Only update is supported: - Update: Writes the bytes downloaded from the source url into the
|
||||
// specified range.
|
||||
class FileRangeWriteFromUrlType {
|
||||
public:
|
||||
FileRangeWriteFromUrlType() = default;
|
||||
explicit FileRangeWriteFromUrlType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const FileRangeWriteFromUrlType& other) const
|
||||
{
|
||||
return m_value == other.m_value;
|
||||
}
|
||||
bool operator!=(const FileRangeWriteFromUrlType& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static FileRangeWriteFromUrlType Update;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum FileRangeWriteFromUrlType
|
||||
|
||||
// Abstract for entries that can be listed from Directory.
|
||||
struct FilesAndDirectoriesListSinglePage
|
||||
{
|
||||
@ -620,6 +578,20 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
Azure::Nullable<std::string> ContinuationToken;
|
||||
};
|
||||
|
||||
// An Azure Storage file range.
|
||||
struct FileRange
|
||||
{
|
||||
int64_t Start = int64_t(); // Start of the range.
|
||||
int64_t End = int64_t(); // End of the range.
|
||||
};
|
||||
|
||||
// An Azure Storage file clear range.
|
||||
struct ClearRange
|
||||
{
|
||||
int64_t Start = int64_t(); // Start of the range.
|
||||
int64_t End = int64_t(); // End of the range.
|
||||
};
|
||||
|
||||
// The list of file ranges
|
||||
struct RangeList
|
||||
{
|
||||
@ -635,6 +607,32 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
// not include all recently created or recently resized files.
|
||||
};
|
||||
|
||||
// A permission (a security descriptor) at the share level.
|
||||
struct SharePermission
|
||||
{
|
||||
std::string
|
||||
FilePermission; // The permission in the Security Descriptor Definition Language (SDDL).
|
||||
};
|
||||
|
||||
// Describes what lease action to take.
|
||||
class LeaseAction {
|
||||
public:
|
||||
LeaseAction() = default;
|
||||
explicit LeaseAction(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const LeaseAction& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const LeaseAction& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseAction Acquire;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseAction Release;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseAction Change;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseAction Renew;
|
||||
AZ_STORAGE_FILES_SHARES_DLLEXPORT const static LeaseAction Break;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum LeaseAction
|
||||
|
||||
// Specify one of the following options: - Update: Writes the bytes specified by the request
|
||||
// body into the specified range. The Range and Content-Length headers must match to perform the
|
||||
// update. - Clear: Clears the specified range and releases the space used in storage for that
|
||||
@ -692,9 +690,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
Azure::Nullable<int32_t> ProvisionedIngressMBps;
|
||||
Azure::Nullable<int32_t> ProvisionedEgressMBps;
|
||||
Azure::Nullable<DateTime> NextAllowedQuotaDowngradeTime;
|
||||
Azure::Nullable<LeaseDurationType> LeaseDuration;
|
||||
Azure::Nullable<LeaseStateType> LeaseState;
|
||||
Azure::Nullable<LeaseStatusType> LeaseStatus;
|
||||
Azure::Nullable<Models::LeaseDuration> LeaseDuration;
|
||||
Azure::Nullable<Models::LeaseState> LeaseState;
|
||||
Azure::Nullable<Models::LeaseStatus> LeaseStatus;
|
||||
Azure::Nullable<Models::AccessTier> AccessTier;
|
||||
Azure::Nullable<DateTime> AccessTierChangedOn;
|
||||
Azure::Nullable<std::string> AccessTierTransitionState;
|
||||
@ -879,9 +877,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
Azure::Nullable<Models::CopyStatus> CopyStatus;
|
||||
bool IsServerEncrypted = bool();
|
||||
FileSmbProperties SmbProperties;
|
||||
Azure::Nullable<LeaseDurationType> LeaseDuration;
|
||||
Azure::Nullable<LeaseStateType> LeaseState;
|
||||
Azure::Nullable<LeaseStatusType> LeaseStatus;
|
||||
Azure::Nullable<Models::LeaseDuration> LeaseDuration;
|
||||
Azure::Nullable<Models::LeaseState> LeaseState;
|
||||
Azure::Nullable<Models::LeaseStatus> LeaseStatus;
|
||||
};
|
||||
|
||||
struct FileGetPropertiesResult
|
||||
@ -899,9 +897,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
Azure::Nullable<Models::CopyStatus> CopyStatus;
|
||||
bool IsServerEncrypted = bool();
|
||||
FileSmbProperties SmbProperties;
|
||||
Azure::Nullable<LeaseDurationType> LeaseDuration;
|
||||
Azure::Nullable<LeaseStateType> LeaseState;
|
||||
Azure::Nullable<LeaseStatusType> LeaseStatus;
|
||||
Azure::Nullable<Models::LeaseDuration> LeaseDuration;
|
||||
Azure::Nullable<Models::LeaseState> LeaseState;
|
||||
Azure::Nullable<Models::LeaseStatus> LeaseStatus;
|
||||
};
|
||||
|
||||
struct FileDeleteResult
|
||||
@ -1125,7 +1123,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
Azure::Nullable<std::string> Prefix;
|
||||
Azure::Nullable<std::string> ContinuationToken;
|
||||
Azure::Nullable<int32_t> MaxResults;
|
||||
Azure::Nullable<ListSharesIncludeType> ListSharesInclude;
|
||||
Azure::Nullable<ListSharesIncludeFlags> IncludeFlags;
|
||||
Azure::Nullable<int32_t> Timeout;
|
||||
std::string ApiVersionParameter = _detail::DefaultServiceApiVersion;
|
||||
};
|
||||
@ -1158,12 +1156,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
_internal::UrlEncodeQueryParameter(
|
||||
std::to_string(listSharesSinglePageOptions.MaxResults.GetValue())));
|
||||
}
|
||||
if (listSharesSinglePageOptions.ListSharesInclude.HasValue())
|
||||
if (listSharesSinglePageOptions.IncludeFlags.HasValue())
|
||||
{
|
||||
request.GetUrl().AppendQueryParameter(
|
||||
_detail::QueryListSharesInclude,
|
||||
_internal::UrlEncodeQueryParameter(ListSharesIncludeTypeToString(
|
||||
listSharesSinglePageOptions.ListSharesInclude.GetValue())));
|
||||
_detail::QueryIncludeFlags,
|
||||
_internal::UrlEncodeQueryParameter(ListSharesIncludeFlagsToString(
|
||||
listSharesSinglePageOptions.IncludeFlags.GetValue())));
|
||||
}
|
||||
if (listSharesSinglePageOptions.Timeout.HasValue())
|
||||
{
|
||||
@ -1868,9 +1866,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
}
|
||||
}
|
||||
|
||||
static LeaseStatusType LeaseStatusTypeFromXml(_internal::XmlReader& reader)
|
||||
static LeaseStatus LeaseStatusFromXml(_internal::XmlReader& reader)
|
||||
{
|
||||
LeaseStatusType result;
|
||||
LeaseStatus result;
|
||||
enum class XmlTagName
|
||||
{
|
||||
LeaseStatus,
|
||||
@ -1912,16 +1910,16 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
{
|
||||
if (path.size() == 1 && path[0] == XmlTagName::LeaseStatus)
|
||||
{
|
||||
result = LeaseStatusType(node.Value);
|
||||
result = LeaseStatus(node.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static LeaseStateType LeaseStateTypeFromXml(_internal::XmlReader& reader)
|
||||
static LeaseState LeaseStateFromXml(_internal::XmlReader& reader)
|
||||
{
|
||||
LeaseStateType result;
|
||||
LeaseState result;
|
||||
enum class XmlTagName
|
||||
{
|
||||
LeaseState,
|
||||
@ -1963,16 +1961,16 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
{
|
||||
if (path.size() == 1 && path[0] == XmlTagName::LeaseState)
|
||||
{
|
||||
result = LeaseStateType(node.Value);
|
||||
result = LeaseState(node.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static LeaseDurationType LeaseDurationTypeFromXml(_internal::XmlReader& reader)
|
||||
static LeaseDuration LeaseDurationFromXml(_internal::XmlReader& reader)
|
||||
{
|
||||
LeaseDurationType result;
|
||||
LeaseDuration result;
|
||||
enum class XmlTagName
|
||||
{
|
||||
LeaseDuration,
|
||||
@ -2014,7 +2012,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
{
|
||||
if (path.size() == 1 && path[0] == XmlTagName::LeaseDuration)
|
||||
{
|
||||
result = LeaseDurationType(node.Value);
|
||||
result = LeaseDuration(node.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2133,17 +2131,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
|
||||
if (path.size() == 1 && path[0] == XmlTagName::LeaseStatus)
|
||||
{
|
||||
result.LeaseStatus = LeaseStatusTypeFromXml(reader);
|
||||
result.LeaseStatus = LeaseStatusFromXml(reader);
|
||||
path.pop_back();
|
||||
}
|
||||
else if (path.size() == 1 && path[0] == XmlTagName::LeaseState)
|
||||
{
|
||||
result.LeaseState = LeaseStateTypeFromXml(reader);
|
||||
result.LeaseState = LeaseStateFromXml(reader);
|
||||
path.pop_back();
|
||||
}
|
||||
else if (path.size() == 1 && path[0] == XmlTagName::LeaseDuration)
|
||||
{
|
||||
result.LeaseDuration = LeaseDurationTypeFromXml(reader);
|
||||
result.LeaseDuration = LeaseDurationFromXml(reader);
|
||||
path.pop_back();
|
||||
}
|
||||
}
|
||||
@ -2542,7 +2540,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
Azure::Nullable<std::string> ShareSnapshot;
|
||||
Azure::Nullable<int32_t> Timeout;
|
||||
std::string ApiVersionParameter = _detail::DefaultServiceApiVersion;
|
||||
Azure::Nullable<DeleteSnapshotsOptionType> XMsDeleteSnapshots;
|
||||
Azure::Nullable<DeleteSnapshotsOption> XMsDeleteSnapshots;
|
||||
Azure::Nullable<std::string> LeaseIdOptional;
|
||||
};
|
||||
|
||||
@ -3194,19 +3192,18 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseDuration
|
||||
= LeaseDurationType(response.GetHeaders().at(_detail::HeaderLeaseDuration));
|
||||
= LeaseDuration(response.GetHeaders().at(_detail::HeaderLeaseDuration));
|
||||
}
|
||||
if (response.GetHeaders().find(_detail::HeaderLeaseState)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseState
|
||||
= LeaseStateType(response.GetHeaders().at(_detail::HeaderLeaseState));
|
||||
result.LeaseState = LeaseState(response.GetHeaders().at(_detail::HeaderLeaseState));
|
||||
}
|
||||
if (response.GetHeaders().find(_detail::HeaderLeaseStatus)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseStatus
|
||||
= LeaseStatusType(response.GetHeaders().at(_detail::HeaderLeaseStatus));
|
||||
= LeaseStatus(response.GetHeaders().at(_detail::HeaderLeaseStatus));
|
||||
}
|
||||
if (response.GetHeaders().find("x-ms-access-tier") != response.GetHeaders().end())
|
||||
{
|
||||
@ -5582,7 +5579,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
std::to_string(uploadRangeOptions.Timeout.GetValue())));
|
||||
}
|
||||
request.SetHeader(_detail::HeaderXMsRange, uploadRangeOptions.XMsRange);
|
||||
request.SetHeader(_detail::HeaderFileRangeWrite, uploadRangeOptions.XMsWrite.ToString());
|
||||
request.SetHeader(
|
||||
_detail::HeaderFileRangeWriteType, uploadRangeOptions.XMsWrite.ToString());
|
||||
request.SetHeader(
|
||||
_detail::HeaderContentLength, std::to_string(uploadRangeOptions.ContentLength));
|
||||
if (uploadRangeOptions.ContentMd5.HasValue())
|
||||
@ -5730,7 +5728,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
std::string CopySource;
|
||||
Azure::Nullable<std::string> FilePermission;
|
||||
Azure::Nullable<std::string> FilePermissionKey;
|
||||
Azure::Nullable<PermissionCopyModeType> XMsFilePermissionCopyMode;
|
||||
Azure::Nullable<PermissionCopyMode> XMsFilePermissionCopyMode;
|
||||
Azure::Nullable<bool> FileCopyIgnoreReadOnly;
|
||||
Azure::Nullable<std::string> FileCopyFileAttributes;
|
||||
Azure::Nullable<std::string> FileCopyFileCreationTime;
|
||||
@ -6124,19 +6122,18 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseDuration
|
||||
= LeaseDurationType(response.GetHeaders().at(_detail::HeaderLeaseDuration));
|
||||
= LeaseDuration(response.GetHeaders().at(_detail::HeaderLeaseDuration));
|
||||
}
|
||||
if (response.GetHeaders().find(_detail::HeaderLeaseState)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseState
|
||||
= LeaseStateType(response.GetHeaders().at(_detail::HeaderLeaseState));
|
||||
result.LeaseState = LeaseState(response.GetHeaders().at(_detail::HeaderLeaseState));
|
||||
}
|
||||
if (response.GetHeaders().find(_detail::HeaderLeaseStatus)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseStatus
|
||||
= LeaseStatusType(response.GetHeaders().at(_detail::HeaderLeaseStatus));
|
||||
= LeaseStatus(response.GetHeaders().at(_detail::HeaderLeaseStatus));
|
||||
}
|
||||
return Azure::Response<FileDownloadResult>(std::move(result), std::move(responsePtr));
|
||||
}
|
||||
@ -6282,19 +6279,18 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseDuration
|
||||
= LeaseDurationType(response.GetHeaders().at(_detail::HeaderLeaseDuration));
|
||||
= LeaseDuration(response.GetHeaders().at(_detail::HeaderLeaseDuration));
|
||||
}
|
||||
if (response.GetHeaders().find(_detail::HeaderLeaseState)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseState
|
||||
= LeaseStateType(response.GetHeaders().at(_detail::HeaderLeaseState));
|
||||
result.LeaseState = LeaseState(response.GetHeaders().at(_detail::HeaderLeaseState));
|
||||
}
|
||||
if (response.GetHeaders().find(_detail::HeaderLeaseStatus)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseStatus
|
||||
= LeaseStatusType(response.GetHeaders().at(_detail::HeaderLeaseStatus));
|
||||
= LeaseStatus(response.GetHeaders().at(_detail::HeaderLeaseStatus));
|
||||
}
|
||||
return Azure::Response<FileDownloadResult>(std::move(result), std::move(responsePtr));
|
||||
}
|
||||
@ -6419,19 +6415,18 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseDuration
|
||||
= LeaseDurationType(response.GetHeaders().at(_detail::HeaderLeaseDuration));
|
||||
= LeaseDuration(response.GetHeaders().at(_detail::HeaderLeaseDuration));
|
||||
}
|
||||
if (response.GetHeaders().find(_detail::HeaderLeaseState)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseState
|
||||
= LeaseStateType(response.GetHeaders().at(_detail::HeaderLeaseState));
|
||||
result.LeaseState = LeaseState(response.GetHeaders().at(_detail::HeaderLeaseState));
|
||||
}
|
||||
if (response.GetHeaders().find(_detail::HeaderLeaseStatus)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LeaseStatus
|
||||
= LeaseStatusType(response.GetHeaders().at(_detail::HeaderLeaseStatus));
|
||||
= LeaseStatus(response.GetHeaders().at(_detail::HeaderLeaseStatus));
|
||||
}
|
||||
return Azure::Response<FileGetPropertiesResult>(
|
||||
std::move(result), std::move(responsePtr));
|
||||
|
||||
@ -54,7 +54,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
/**
|
||||
* @brief Include this parameter to specify one or more datasets to include in the response.
|
||||
*/
|
||||
Azure::Nullable<Models::ListSharesIncludeType> ListSharesIncludeFlags;
|
||||
Azure::Nullable<Models::ListSharesIncludeFlags> ListSharesIncludeFlags;
|
||||
};
|
||||
|
||||
struct SetServicePropertiesOptions
|
||||
@ -374,7 +374,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
* @brief Specifies the option to copy file security descriptor from source file or to set it
|
||||
* using the value which is defined by the smb properties.
|
||||
*/
|
||||
Azure::Nullable<Models::PermissionCopyModeType> PermissionCopyMode;
|
||||
Azure::Nullable<Models::PermissionCopyMode> PermissionCopyMode;
|
||||
|
||||
/**
|
||||
* @brief Specifies the option to overwrite the target file if it already exists and has
|
||||
|
||||
@ -118,9 +118,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
Nullable<Models::CopyStatus> CopyStatus;
|
||||
bool IsServerEncrypted = bool();
|
||||
FileSmbProperties SmbProperties;
|
||||
Nullable<LeaseDurationType> LeaseDuration;
|
||||
Nullable<LeaseStateType> LeaseState;
|
||||
Nullable<LeaseStatusType> LeaseStatus;
|
||||
Nullable<Models::LeaseDuration> LeaseDuration;
|
||||
Nullable<Models::LeaseState> LeaseState;
|
||||
Nullable<Models::LeaseStatus> LeaseStatus;
|
||||
};
|
||||
|
||||
struct DownloadFileResult
|
||||
|
||||
@ -140,7 +140,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
auto protocolLayerOptions = _detail::ShareRestClient::Share::DeleteOptions();
|
||||
if (options.DeleteSnapshots.HasValue() && options.DeleteSnapshots.GetValue())
|
||||
{
|
||||
protocolLayerOptions.XMsDeleteSnapshots = Models::DeleteSnapshotsOptionType::Include;
|
||||
protocolLayerOptions.XMsDeleteSnapshots = Models::DeleteSnapshotsOption::Include;
|
||||
}
|
||||
auto result = _detail::ShareRestClient::Share::Delete(
|
||||
m_shareUrl, *m_pipeline, context, protocolLayerOptions);
|
||||
|
||||
@ -343,7 +343,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
if (options.PermissionCopyMode.HasValue())
|
||||
{
|
||||
protocolLayerOptions.XMsFilePermissionCopyMode = options.PermissionCopyMode.GetValue();
|
||||
if (options.PermissionCopyMode.GetValue() == Models::PermissionCopyModeType::Override)
|
||||
if (options.PermissionCopyMode.GetValue() == Models::PermissionCopyMode::Override)
|
||||
{
|
||||
if (options.Permission.HasValue())
|
||||
{
|
||||
@ -363,7 +363,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
}
|
||||
else
|
||||
{
|
||||
protocolLayerOptions.XMsFilePermissionCopyMode = Models::PermissionCopyModeType::Source;
|
||||
protocolLayerOptions.XMsFilePermissionCopyMode = Models::PermissionCopyMode::Source;
|
||||
}
|
||||
protocolLayerOptions.FileCopyIgnoreReadOnly = options.IgnoreReadOnly;
|
||||
protocolLayerOptions.FileCopySetArchiveAttribute = options.SetArchiveAttribute;
|
||||
@ -1099,7 +1099,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
= options.SourceAccessCondition.IfNoneMatchContentHash;
|
||||
protocolLayerOptions.SourceRange = std::string("bytes=") + std::to_string(sourceRange.Offset)
|
||||
+ std::string("-") + std::to_string(sourceRange.Offset + sourceRange.Length.GetValue() - 1);
|
||||
protocolLayerOptions.XMsWrite = Models::FileRangeWriteFromUrlType::Update;
|
||||
protocolLayerOptions.XMsWrite = _detail::FileRangeWriteFromUrlType::Update;
|
||||
|
||||
return _detail::ShareRestClient::File::UploadRangeFromUrl(
|
||||
m_shareFileUrl, *m_pipeline, context, protocolLayerOptions);
|
||||
|
||||
@ -11,30 +11,22 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
const AccessTier AccessTier::Cool("Cool");
|
||||
const AccessTier AccessTier::Premium("Premium");
|
||||
|
||||
const PermissionCopyModeType PermissionCopyModeType::Source("source");
|
||||
const PermissionCopyModeType PermissionCopyModeType::Override("override");
|
||||
const PermissionCopyMode PermissionCopyMode::Source("source");
|
||||
const PermissionCopyMode PermissionCopyMode::Override("override");
|
||||
|
||||
const DeleteSnapshotsOptionType DeleteSnapshotsOptionType::Include("include");
|
||||
const DeleteSnapshotsOption DeleteSnapshotsOption::Include("include");
|
||||
|
||||
const FileRangeWriteFromUrlType FileRangeWriteFromUrlType::Update("update");
|
||||
const LeaseDuration LeaseDuration::Infinite("infinite");
|
||||
const LeaseDuration LeaseDuration::Fixed("fixed");
|
||||
|
||||
const LeaseDurationType LeaseDurationType::Infinite("infinite");
|
||||
const LeaseDurationType LeaseDurationType::Fixed("fixed");
|
||||
const LeaseState LeaseState::Available("available");
|
||||
const LeaseState LeaseState::Leased("leased");
|
||||
const LeaseState LeaseState::Expired("expired");
|
||||
const LeaseState LeaseState::Breaking("breaking");
|
||||
const LeaseState LeaseState::Broken("broken");
|
||||
|
||||
const LeaseStateType LeaseStateType::Available("available");
|
||||
const LeaseStateType LeaseStateType::Leased("leased");
|
||||
const LeaseStateType LeaseStateType::Expired("expired");
|
||||
const LeaseStateType LeaseStateType::Breaking("breaking");
|
||||
const LeaseStateType LeaseStateType::Broken("broken");
|
||||
|
||||
const LeaseStatusType LeaseStatusType::Locked("locked");
|
||||
const LeaseStatusType LeaseStatusType::Unlocked("unlocked");
|
||||
|
||||
const LeaseAction LeaseAction::Acquire("acquire");
|
||||
const LeaseAction LeaseAction::Release("release");
|
||||
const LeaseAction LeaseAction::Change("change");
|
||||
const LeaseAction LeaseAction::Renew("renew");
|
||||
const LeaseAction LeaseAction::Break("break");
|
||||
const LeaseStatus LeaseStatus::Locked("locked");
|
||||
const LeaseStatus LeaseStatus::Unlocked("unlocked");
|
||||
|
||||
const CopyStatus CopyStatus::Pending("pending");
|
||||
const CopyStatus CopyStatus::Success("success");
|
||||
@ -45,5 +37,14 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
namespace _detail {
|
||||
const FileRangeWriteType FileRangeWriteType::Update("update");
|
||||
const FileRangeWriteType FileRangeWriteType::Clear("clear");
|
||||
|
||||
const FileRangeWriteFromUrlType FileRangeWriteFromUrlType::Update("update");
|
||||
|
||||
const LeaseAction LeaseAction::Acquire("acquire");
|
||||
const LeaseAction LeaseAction::Release("release");
|
||||
const LeaseAction LeaseAction::Change("change");
|
||||
const LeaseAction LeaseAction::Renew("renew");
|
||||
const LeaseAction LeaseAction::Break("break");
|
||||
|
||||
} // namespace _detail
|
||||
}}}} // namespace Azure::Storage::Files::Shares
|
||||
|
||||
@ -87,7 +87,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
auto protocolLayerOptions = _detail::ShareRestClient::Service::ListSharesSinglePageOptions();
|
||||
protocolLayerOptions.ListSharesInclude = options.ListSharesIncludeFlags;
|
||||
protocolLayerOptions.IncludeFlags = options.ListSharesIncludeFlags;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.PageSizeHint;
|
||||
protocolLayerOptions.Prefix = options.Prefix;
|
||||
|
||||
@ -282,8 +282,8 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
EXPECT_EQ(aLease.LeaseId, leaseId1);
|
||||
|
||||
auto properties = *m_fileClient->GetProperties();
|
||||
EXPECT_EQ(properties.LeaseState.GetValue(), Files::Shares::Models::LeaseStateType::Leased);
|
||||
EXPECT_EQ(properties.LeaseStatus.GetValue(), Files::Shares::Models::LeaseStatusType::Locked);
|
||||
EXPECT_EQ(properties.LeaseState.GetValue(), Files::Shares::Models::LeaseState::Leased);
|
||||
EXPECT_EQ(properties.LeaseStatus.GetValue(), Files::Shares::Models::LeaseStatus::Locked);
|
||||
|
||||
std::string leaseId2 = Files::Shares::ShareLeaseClient::CreateUniqueLeaseId();
|
||||
EXPECT_NE(leaseId1, leaseId2);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user