parent
8fa71e0f31
commit
ea2186bee3
@ -22,6 +22,8 @@
|
||||
- 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 `IsAccessTierInferred` and `AccessTierChangedOn` from `PathProperties`.
|
||||
|
||||
## 12.0.0-beta.8 (2021-02-12)
|
||||
|
||||
|
||||
@ -240,7 +240,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const
|
||||
{
|
||||
return SetAccessControlListRecursiveSinglePageInternal(
|
||||
Models::PathSetAccessControlRecursiveMode::Set, acls, options, context);
|
||||
_detail::PathSetAccessControlRecursiveMode::Set, acls, options, context);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -263,7 +263,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const
|
||||
{
|
||||
return SetAccessControlListRecursiveSinglePageInternal(
|
||||
Models::PathSetAccessControlRecursiveMode::Modify, acls, options, context);
|
||||
_detail::PathSetAccessControlRecursiveMode::Modify, acls, options, context);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -286,7 +286,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const
|
||||
{
|
||||
return SetAccessControlListRecursiveSinglePageInternal(
|
||||
Models::PathSetAccessControlRecursiveMode::Remove, acls, options, context);
|
||||
_detail::PathSetAccessControlRecursiveMode::Remove, acls, options, context);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -305,7 +305,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
|
||||
Azure::Response<Models::SetPathAccessControlListRecursiveSinglePageResult>
|
||||
SetAccessControlListRecursiveSinglePageInternal(
|
||||
Models::PathSetAccessControlRecursiveMode mode,
|
||||
_detail::PathSetAccessControlRecursiveMode mode,
|
||||
const std::vector<Models::Acl>& acls,
|
||||
const SetPathAccessControlListRecursiveSinglePageOptions& options
|
||||
= SetPathAccessControlListRecursiveSinglePageOptions(),
|
||||
|
||||
@ -147,8 +147,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam
|
||||
PathHttpHeaders HttpHeaders;
|
||||
Azure::Nullable<bool> IsServerEncrypted;
|
||||
Azure::Nullable<std::vector<uint8_t>> EncryptionKeySha256;
|
||||
Azure::Nullable<bool> IsAccessTierInferred;
|
||||
Azure::Nullable<DateTime> AccessTierChangedOn;
|
||||
Azure::Nullable<std::string> CopyId;
|
||||
Azure::Nullable<std::string> CopySource;
|
||||
Azure::Nullable<Blobs::Models::CopyStatus> CopyStatus;
|
||||
|
||||
@ -38,50 +38,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
Storage::ContentHash ContentHash;
|
||||
};
|
||||
|
||||
// The value must be "filesystem" for all filesystem operations.
|
||||
class FileSystemResourceType {
|
||||
public:
|
||||
FileSystemResourceType() = default;
|
||||
explicit FileSystemResourceType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const FileSystemResourceType& other) const
|
||||
{
|
||||
return m_value == other.m_value;
|
||||
}
|
||||
bool operator!=(const FileSystemResourceType& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static FileSystemResourceType Filesystem;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum FileSystemResourceType
|
||||
|
||||
// Mode "set" sets POSIX access control rights on files and directories, "modify" modifies one
|
||||
// or more POSIX access control rights that pre-exist on files and directories, "remove"
|
||||
// removes one or more POSIX access control rights that were present earlier on files and
|
||||
// directories
|
||||
class PathSetAccessControlRecursiveMode {
|
||||
public:
|
||||
PathSetAccessControlRecursiveMode() = default;
|
||||
explicit PathSetAccessControlRecursiveMode(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const PathSetAccessControlRecursiveMode& other) const
|
||||
{
|
||||
return m_value == other.m_value;
|
||||
}
|
||||
bool operator!=(const PathSetAccessControlRecursiveMode& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlRecursiveMode Set;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlRecursiveMode Modify;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlRecursiveMode Remove;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum PathSetAccessControlRecursiveMode
|
||||
|
||||
// Required. Indicates mode of the expiry time
|
||||
class PathExpiryOptions {
|
||||
public:
|
||||
@ -151,46 +107,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
std::string m_value;
|
||||
}; // extensible enum PathResourceType
|
||||
|
||||
// Optional. Valid only when namespace is enabled. This parameter determines the behavior of the
|
||||
// rename operation. The value must be "legacy" or "posix", and the default value will be
|
||||
// "posix".
|
||||
class PathRenameMode {
|
||||
public:
|
||||
PathRenameMode() = default;
|
||||
explicit PathRenameMode(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const PathRenameMode& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const PathRenameMode& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathRenameMode Legacy;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathRenameMode Posix;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum PathRenameMode
|
||||
|
||||
// Optional. If the value is "getStatus" only the system defined properties for the path are
|
||||
// returned. If the value is "getAccessControl" the access control list is returned in the
|
||||
// response headers (Hierarchical Namespace must be enabled for the account), otherwise the
|
||||
// properties are returned.
|
||||
class PathGetPropertiesAction {
|
||||
public:
|
||||
PathGetPropertiesAction() = default;
|
||||
explicit PathGetPropertiesAction(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const PathGetPropertiesAction& other) const
|
||||
{
|
||||
return m_value == other.m_value;
|
||||
}
|
||||
bool operator!=(const PathGetPropertiesAction& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathGetPropertiesAction GetAccessControl;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathGetPropertiesAction GetStatus;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum PathGetPropertiesAction
|
||||
|
||||
// When a resource is leased, specifies whether the lease is of infinite or fixed duration.
|
||||
class LeaseDurationType {
|
||||
public:
|
||||
@ -309,6 +225,50 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
constexpr static const char* HeaderLeaseStatus = "x-ms-lease-status";
|
||||
constexpr static const char* HeaderRequestIsServerEncrypted = "x-ms-request-server-encrypted";
|
||||
|
||||
// The value must be "filesystem" for all filesystem operations.
|
||||
class FileSystemResourceType {
|
||||
public:
|
||||
FileSystemResourceType() = default;
|
||||
explicit FileSystemResourceType(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const FileSystemResourceType& other) const
|
||||
{
|
||||
return m_value == other.m_value;
|
||||
}
|
||||
bool operator!=(const FileSystemResourceType& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static FileSystemResourceType Filesystem;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum FileSystemResourceType
|
||||
|
||||
// Mode "set" sets POSIX access control rights on files and directories, "modify" modifies one
|
||||
// or more POSIX access control rights that pre-exist on files and directories, "remove"
|
||||
// removes one or more POSIX access control rights that were present earlier on files and
|
||||
// directories
|
||||
class PathSetAccessControlRecursiveMode {
|
||||
public:
|
||||
PathSetAccessControlRecursiveMode() = default;
|
||||
explicit PathSetAccessControlRecursiveMode(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const PathSetAccessControlRecursiveMode& other) const
|
||||
{
|
||||
return m_value == other.m_value;
|
||||
}
|
||||
bool operator!=(const PathSetAccessControlRecursiveMode& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlRecursiveMode Set;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlRecursiveMode Modify;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlRecursiveMode Remove;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum PathSetAccessControlRecursiveMode
|
||||
|
||||
struct SetAccessControlRecursiveResponse
|
||||
{
|
||||
int32_t NumberOfSuccessfulDirectories = int32_t();
|
||||
@ -322,6 +282,46 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
std::vector<PathItem> Items;
|
||||
};
|
||||
|
||||
// Optional. Valid only when namespace is enabled. This parameter determines the behavior of the
|
||||
// rename operation. The value must be "legacy" or "posix", and the default value will be
|
||||
// "posix".
|
||||
class PathRenameMode {
|
||||
public:
|
||||
PathRenameMode() = default;
|
||||
explicit PathRenameMode(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const PathRenameMode& other) const { return m_value == other.m_value; }
|
||||
bool operator!=(const PathRenameMode& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathRenameMode Legacy;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathRenameMode Posix;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum PathRenameMode
|
||||
|
||||
// Optional. If the value is "getStatus" only the system defined properties for the path are
|
||||
// returned. If the value is "getAccessControl" the access control list is returned in the
|
||||
// response headers (Hierarchical Namespace must be enabled for the account), otherwise the
|
||||
// properties are returned.
|
||||
class PathGetPropertiesAction {
|
||||
public:
|
||||
PathGetPropertiesAction() = default;
|
||||
explicit PathGetPropertiesAction(std::string value) : m_value(std::move(value)) {}
|
||||
bool operator==(const PathGetPropertiesAction& other) const
|
||||
{
|
||||
return m_value == other.m_value;
|
||||
}
|
||||
bool operator!=(const PathGetPropertiesAction& other) const { return !(*this == other); }
|
||||
const std::string& ToString() const { return m_value; }
|
||||
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathGetPropertiesAction GetAccessControl;
|
||||
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathGetPropertiesAction GetStatus;
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
}; // extensible enum PathGetPropertiesAction
|
||||
|
||||
struct FileSystemListPathsResult
|
||||
{
|
||||
std::vector<PathItem> Items;
|
||||
|
||||
@ -98,7 +98,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
destinationFileSystem.GetValue() + '/' + _internal::UrlEncodePath(destinationFilePath));
|
||||
|
||||
_detail::DataLakeRestClient::Path::CreateOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Mode = Models::PathRenameMode::Legacy;
|
||||
protocolLayerOptions.Mode = _detail::PathRenameMode::Legacy;
|
||||
protocolLayerOptions.SourceLeaseId = options.SourceAccessConditions.LeaseId;
|
||||
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
|
||||
@ -142,7 +142,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
+ _internal::UrlEncodePath(destinationDirectoryPath));
|
||||
|
||||
_detail::DataLakeRestClient::Path::CreateOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Mode = Models::PathRenameMode::Legacy;
|
||||
protocolLayerOptions.Mode = _detail::PathRenameMode::Legacy;
|
||||
protocolLayerOptions.SourceLeaseId = options.SourceAccessConditions.LeaseId;
|
||||
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
|
||||
@ -195,7 +195,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::DataLakeRestClient::FileSystem::ListPathsOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Resource = Models::FileSystemResourceType::Filesystem;
|
||||
protocolLayerOptions.Resource = _detail::FileSystemResourceType::Filesystem;
|
||||
protocolLayerOptions.Upn = options.UserPrincipalName;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.PageSizeHint;
|
||||
|
||||
@ -268,7 +268,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::DataLakeRestClient::FileSystem::ListPathsOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Resource = Models::FileSystemResourceType::Filesystem;
|
||||
protocolLayerOptions.Resource = _detail::FileSystemResourceType::Filesystem;
|
||||
protocolLayerOptions.Upn = options.UserPrincipalName;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.PageSizeHint;
|
||||
|
||||
@ -345,8 +345,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
ret.HttpHeaders.ContentType = std::move(result->HttpHeaders.ContentType);
|
||||
ret.IsServerEncrypted = result->IsServerEncrypted;
|
||||
ret.EncryptionKeySha256 = std::move(result->EncryptionKeySha256);
|
||||
ret.IsAccessTierInferred = std::move(result->IsAccessTierInferred);
|
||||
ret.AccessTierChangedOn = std::move(result->AccessTierChangedOn);
|
||||
ret.CopyId = std::move(result->CopyId);
|
||||
ret.CopySource = std::move(result->CopySource);
|
||||
ret.CopyStatus = std::move(result->CopyStatus);
|
||||
@ -371,7 +369,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::DataLakeRestClient::Path::GetPropertiesOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Action = Models::PathGetPropertiesAction::GetAccessControl;
|
||||
protocolLayerOptions.Action = _detail::PathGetPropertiesAction::GetAccessControl;
|
||||
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
|
||||
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
|
||||
protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch;
|
||||
@ -428,7 +426,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
|
||||
Azure::Response<Models::SetPathAccessControlListRecursiveSinglePageResult>
|
||||
DataLakePathClient::SetAccessControlListRecursiveSinglePageInternal(
|
||||
Models::PathSetAccessControlRecursiveMode mode,
|
||||
_detail::PathSetAccessControlRecursiveMode mode,
|
||||
const std::vector<Models::Acl>& acls,
|
||||
const SetPathAccessControlListRecursiveSinglePageOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
|
||||
@ -4,41 +4,45 @@
|
||||
|
||||
#include "azure/storage/files/datalake/protocol/datalake_rest_client.hpp"
|
||||
|
||||
namespace Azure { namespace Storage { namespace Files { namespace DataLake { namespace Models {
|
||||
const FileSystemResourceType FileSystemResourceType::Filesystem("filesystem");
|
||||
namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
namespace Models {
|
||||
|
||||
const PathSetAccessControlRecursiveMode PathSetAccessControlRecursiveMode::Set("set");
|
||||
const PathSetAccessControlRecursiveMode PathSetAccessControlRecursiveMode::Modify("modify");
|
||||
const PathSetAccessControlRecursiveMode PathSetAccessControlRecursiveMode::Remove("remove");
|
||||
const PathExpiryOptions PathExpiryOptions::NeverExpire("NeverExpire");
|
||||
const PathExpiryOptions PathExpiryOptions::RelativeToCreation("RelativeToCreation");
|
||||
const PathExpiryOptions PathExpiryOptions::RelativeToNow("RelativeToNow");
|
||||
const PathExpiryOptions PathExpiryOptions::Absolute("Absolute");
|
||||
|
||||
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");
|
||||
|
||||
const PublicAccessType PublicAccessType::FileSystem("FileSystem");
|
||||
const PublicAccessType PublicAccessType::Path("Path");
|
||||
const PublicAccessType PublicAccessType::None("None");
|
||||
const PathResourceType PathResourceType::Directory("directory");
|
||||
const PathResourceType PathResourceType::File("file");
|
||||
|
||||
const PathResourceType PathResourceType::Directory("directory");
|
||||
const PathResourceType PathResourceType::File("file");
|
||||
const LeaseDurationType LeaseDurationType::Infinite("infinite");
|
||||
const LeaseDurationType LeaseDurationType::Fixed("fixed");
|
||||
|
||||
const PathRenameMode PathRenameMode::Legacy("legacy");
|
||||
const PathRenameMode PathRenameMode::Posix("posix");
|
||||
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 PathGetPropertiesAction PathGetPropertiesAction::GetAccessControl("getAccessControl");
|
||||
const PathGetPropertiesAction PathGetPropertiesAction::GetStatus("getStatus");
|
||||
const LeaseStatusType LeaseStatusType::Locked("locked");
|
||||
const LeaseStatusType LeaseStatusType::Unlocked("unlocked");
|
||||
|
||||
const LeaseDurationType LeaseDurationType::Infinite("infinite");
|
||||
const LeaseDurationType LeaseDurationType::Fixed("fixed");
|
||||
} // namespace Models
|
||||
namespace _detail {
|
||||
const PathRenameMode PathRenameMode::Legacy("legacy");
|
||||
const PathRenameMode PathRenameMode::Posix("posix");
|
||||
|
||||
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 PathGetPropertiesAction PathGetPropertiesAction::GetAccessControl("getAccessControl");
|
||||
const PathGetPropertiesAction PathGetPropertiesAction::GetStatus("getStatus");
|
||||
|
||||
const LeaseStatusType LeaseStatusType::Locked("locked");
|
||||
const LeaseStatusType LeaseStatusType::Unlocked("unlocked");
|
||||
const FileSystemResourceType FileSystemResourceType::Filesystem("filesystem");
|
||||
|
||||
}}}}} // namespace Azure::Storage::Files::DataLake::Models
|
||||
const PathSetAccessControlRecursiveMode PathSetAccessControlRecursiveMode::Set("set");
|
||||
const PathSetAccessControlRecursiveMode PathSetAccessControlRecursiveMode::Modify("modify");
|
||||
const PathSetAccessControlRecursiveMode PathSetAccessControlRecursiveMode::Remove("remove");
|
||||
} // namespace _detail
|
||||
}}}} // namespace Azure::Storage::Files::DataLake
|
||||
|
||||
Loading…
Reference in New Issue
Block a user