9#include <azure/core/context.hpp>
10#include <azure/core/datetime.hpp>
11#include <azure/core/etag.hpp>
12#include <azure/core/internal/extendable_enumeration.hpp>
13#include <azure/core/internal/http/pipeline.hpp>
14#include <azure/core/io/body_stream.hpp>
15#include <azure/core/nullable.hpp>
16#include <azure/core/response.hpp>
17#include <azure/core/url.hpp>
18#include <azure/storage/common/storage_common.hpp>
19#include <azure/storage/files/datalake/dll_import_export.hpp>
25namespace Azure {
namespace Storage {
namespace Files {
namespace DataLake {
30 constexpr static const char* ApiVersion =
"2024-08-04";
34 class PathRenameMode final :
public Core::_internal::ExtendableEnumeration<PathRenameMode> {
37 PathRenameMode() =
default;
39 explicit PathRenameMode(std::string value) : ExtendableEnumeration(std::move(value)) {}
42 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT
const static PathRenameMode Legacy;
44 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT
const static PathRenameMode Posix;
46 class PathSetAccessControlListRecursiveMode final
47 :
public Core::_internal::ExtendableEnumeration<PathSetAccessControlListRecursiveMode> {
50 PathSetAccessControlListRecursiveMode() =
default;
52 explicit PathSetAccessControlListRecursiveMode(std::string value)
53 : ExtendableEnumeration(std::move(value))
58 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT
const static PathSetAccessControlListRecursiveMode Set;
60 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT
const static PathSetAccessControlListRecursiveMode
63 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT
const static PathSetAccessControlListRecursiveMode
71 class PublicAccessType final :
public Core::_internal::ExtendableEnumeration<PublicAccessType> {
76 explicit PublicAccessType(std::string value) : ExtendableEnumeration(std::move(value)) {}
89 bool IsDirectory =
false;
90 DateTime LastModified;
91 std::int64_t FileSize = std::int64_t();
94 std::string Permissions;
98 Nullable<std::string> EncryptionScope;
99 Nullable<std::string> CreatedOn;
100 Nullable<std::string> ExpiresOn;
101 Nullable<std::string> EncryptionContext;
107 struct PathList final
112 std::vector<PathItem> Paths;
119 Nullable<std::string> ContinuationToken;
126 class PathResourceType final :
public Core::_internal::ExtendableEnumeration<PathResourceType> {
220 struct SetAccessControlListRecursiveResult final
222 std::int32_t NumberOfSuccessfulDirectories = std::int32_t();
223 std::int32_t NumberOfSuccessfulFiles = std::int32_t();
224 std::int32_t NumberOfFailures = std::int32_t();
228 std::vector<AclFailedEntry> FailedEntries;
237 Nullable<std::string> ContinuationToken;
242 struct UndeletePathResult final
248 Nullable<std::string> ResourceType;
254 struct GetPathAccessControlListResult final
270 std::string Permissions;
284 class LeaseAction final :
public Core::_internal::ExtendableEnumeration<LeaseAction> {
289 explicit LeaseAction(std::string value) : ExtendableEnumeration(std::move(value)) {}
360 class FileSystemClient final {
362 struct ListFileSystemPathsOptions final
364 Nullable<std::string> RequestId;
365 Nullable<std::int32_t> Timeout;
366 Nullable<std::string> ContinuationToken;
367 Nullable<std::string> Path;
368 bool Recursive = bool();
369 Nullable<std::int32_t> MaxResults;
372 static Response<Models::_detail::PathList> ListPaths(
373 Core::Http::_internal::HttpPipeline& pipeline,
374 const Core::Url& url,
375 const ListFileSystemPathsOptions& options,
376 const Core::Context& context);
378 class PathClient final {
380 struct CreatePathOptions final
382 Nullable<std::string> RequestId;
383 Nullable<std::int32_t> Timeout;
384 Nullable<Models::PathResourceType> Resource;
385 Nullable<std::string> ContinuationToken;
386 Nullable<std::string> Mode;
387 Nullable<std::string> CacheControl;
388 Nullable<std::string> ContentEncoding;
389 Nullable<std::string> ContentLanguage;
390 Nullable<std::string> ContentDisposition;
391 Nullable<std::string> ContentType;
392 Nullable<std::string> RenameSource;
393 Nullable<std::string> LeaseId;
394 Nullable<std::string> SourceLeaseId;
395 Nullable<std::string> Properties;
396 Nullable<std::string> Permissions;
397 Nullable<std::string> Umask;
400 Nullable<DateTime> IfModifiedSince;
401 Nullable<DateTime> IfUnmodifiedSince;
403 ETag SourceIfNoneMatch;
404 Nullable<DateTime> SourceIfModifiedSince;
405 Nullable<DateTime> SourceIfUnmodifiedSince;
406 Nullable<std::string> EncryptionKey;
407 Nullable<std::vector<std::uint8_t>> EncryptionKeySha256;
408 Nullable<std::string> EncryptionAlgorithm;
409 Nullable<std::string> Owner;
410 Nullable<std::string> Group;
411 Nullable<std::string> Acl;
412 Nullable<std::string> ProposedLeaseId;
413 Nullable<std::int64_t> LeaseDuration;
414 Nullable<std::string> ExpiryOptions;
415 Nullable<std::string> ExpiresOn;
416 Nullable<std::string> EncryptionContext;
418 static Response<Models::CreatePathResult> Create(
419 Core::Http::_internal::HttpPipeline& pipeline,
420 const Core::Url& url,
421 const CreatePathOptions& options,
422 const Core::Context& context);
423 struct DeletePathOptions final
425 Nullable<std::string> RequestId;
426 Nullable<std::int32_t> Timeout;
427 Nullable<bool> Recursive;
428 Nullable<std::string> ContinuationToken;
429 Nullable<std::string> LeaseId;
432 Nullable<DateTime> IfModifiedSince;
433 Nullable<DateTime> IfUnmodifiedSince;
434 Nullable<bool> Paginated;
436 static Response<Models::DeletePathResult> Delete(
437 Core::Http::_internal::HttpPipeline& pipeline,
438 const Core::Url& url,
439 const DeletePathOptions& options,
440 const Core::Context& context);
441 struct SetPathAccessControlListOptions final
443 Nullable<std::string> LeaseId;
444 Nullable<std::string> Owner;
445 Nullable<std::string> Group;
446 Nullable<std::string> Permissions;
447 Nullable<std::string> Acl;
450 Nullable<DateTime> IfModifiedSince;
451 Nullable<DateTime> IfUnmodifiedSince;
453 static Response<Models::SetPathAccessControlListResult> SetAccessControlList(
454 Core::Http::_internal::HttpPipeline& pipeline,
455 const Core::Url& url,
456 const SetPathAccessControlListOptions& options,
457 const Core::Context& context);
458 struct SetPathAccessControlListRecursiveOptions final
460 Nullable<std::string> ContinuationToken;
462 Nullable<bool> ForceFlag;
463 Nullable<std::int32_t> MaxRecords;
464 Nullable<std::string> Acl;
466 static Response<Models::_detail::SetAccessControlListRecursiveResult>
467 SetAccessControlListRecursive(
468 Core::Http::_internal::HttpPipeline& pipeline,
469 const Core::Url& url,
470 const SetPathAccessControlListRecursiveOptions& options,
471 const Core::Context& context);
472 struct UndeletePathOptions final
474 Nullable<std::string> UndeleteSource;
476 static Response<Models::_detail::UndeletePathResult> Undelete(
477 Core::Http::_internal::HttpPipeline& pipeline,
478 const Core::Url& url,
479 const UndeletePathOptions& options,
480 const Core::Context& context);
481 struct GetPathAccessControlListOptions final
484 Nullable<std::string> LeaseId;
487 Nullable<DateTime> IfModifiedSince;
488 Nullable<DateTime> IfUnmodifiedSince;
490 static Response<Models::_detail::GetPathAccessControlListResult> GetAccessControlList(
491 Core::Http::_internal::HttpPipeline& pipeline,
492 const Core::Url& url,
493 const GetPathAccessControlListOptions& options,
494 const Core::Context& context);
496 class FileClient final {
498 struct FlushFileOptions final
500 Nullable<std::int64_t> Position;
501 Nullable<bool> RetainUncommittedData;
502 Nullable<bool> Close;
503 Nullable<std::vector<std::uint8_t>> ContentMD5;
504 Nullable<std::string> LeaseId;
505 Nullable<Models::LeaseAction> LeaseAction;
506 Nullable<std::int64_t> LeaseDuration;
507 Nullable<std::string> ProposedLeaseId;
508 Nullable<std::string> CacheControl;
509 Nullable<std::string> ContentType;
510 Nullable<std::string> ContentDisposition;
511 Nullable<std::string> ContentEncoding;
512 Nullable<std::string> ContentLanguage;
515 Nullable<DateTime> IfModifiedSince;
516 Nullable<DateTime> IfUnmodifiedSince;
517 Nullable<std::string> EncryptionKey;
518 Nullable<std::vector<std::uint8_t>> EncryptionKeySha256;
519 Nullable<std::string> EncryptionAlgorithm;
521 static Response<Models::FlushFileResult> Flush(
522 Core::Http::_internal::HttpPipeline& pipeline,
523 const Core::Url& url,
524 const FlushFileOptions& options,
525 const Core::Context& context);
526 struct AppendFileOptions final
528 Nullable<std::int64_t> Position;
529 Nullable<std::vector<std::uint8_t>> TransactionalContentHash;
530 Nullable<std::vector<std::uint8_t>> TransactionalContentCrc64;
531 Nullable<std::string> LeaseId;
532 Nullable<Models::LeaseAction> LeaseAction;
533 Nullable<std::int64_t> LeaseDuration;
534 Nullable<std::string> ProposedLeaseId;
535 Nullable<std::string> EncryptionKey;
536 Nullable<std::vector<std::uint8_t>> EncryptionKeySha256;
537 Nullable<std::string> EncryptionAlgorithm;
538 Nullable<bool> Flush;
540 static Response<Models::AppendFileResult> Append(
541 Core::Http::_internal::HttpPipeline& pipeline,
542 const Core::Url& url,
543 Core::IO::BodyStream& requestBody,
544 const AppendFileOptions& options,
545 const Core::Context& context);
Optional. If "acquire" it will acquire the lease. If "auto-renew" it will renew the lease....
Definition rest_client.hpp:284
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT static const LeaseAction Acquire
Definition rest_client.hpp:292
LeaseAction(std::string value)
Definition rest_client.hpp:289
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT static const LeaseAction AutoRenew
Definition rest_client.hpp:294
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT static const LeaseAction Release
Definition rest_client.hpp:296
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT static const LeaseAction AcquireRelease
Definition rest_client.hpp:298
Required only for Create File and Create Directory. The value must be "file" or "directory".
Definition rest_client.hpp:126
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT static const PathResourceType Directory
Definition rest_client.hpp:134
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT static const PathResourceType File
Definition rest_client.hpp:136
PathResourceType()=default
PathResourceType(std::string value)
Definition rest_client.hpp:131
Specifies whether data in the file system may be accessed publicly and the level of access.
Definition rest_client.hpp:71
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT static const PublicAccessType FileSystem
Definition rest_client.hpp:81
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT static const PublicAccessType Path
Definition rest_client.hpp:83
PublicAccessType(std::string value)
Definition rest_client.hpp:76
PublicAccessType()=default
AZ_STORAGE_FILES_DATALAKE_DLLEXPORT static const PublicAccessType None
Definition rest_client.hpp:79
The failed entry when setting the Acl.
Definition rest_client.hpp:201
std::string ErrorMessage
Definition rest_client.hpp:213
std::string Name
Definition rest_client.hpp:205
std::string Type
Definition rest_client.hpp:209
Response type for Azure::Storage::Files::DataLake::DataLakeFileClient::Append.
Definition rest_client.hpp:337
Nullable< ContentHash > TransactionalContentHash
Definition rest_client.hpp:342
Nullable< bool > IsLeaseRenewed
Definition rest_client.hpp:356
Nullable< std::vector< std::uint8_t > > EncryptionKeySha256
Definition rest_client.hpp:352
bool IsServerEncrypted
Definition rest_client.hpp:347
Response type for Azure::Storage::Files::DataLake::DataLakePathClient::Create.
Definition rest_client.hpp:142
Azure::ETag ETag
Definition rest_client.hpp:150
DateTime LastModified
Definition rest_client.hpp:155
Nullable< std::vector< std::uint8_t > > EncryptionKeySha256
Definition rest_client.hpp:169
bool Created
Definition rest_client.hpp:146
Nullable< std::int64_t > FileSize
Definition rest_client.hpp:159
bool IsServerEncrypted
Definition rest_client.hpp:164
Response type for Azure::Storage::Files::DataLake::DataLakePathClient::Delete.
Definition rest_client.hpp:175
bool Deleted
Definition rest_client.hpp:179
Response type for Azure::Storage::Files::DataLake::DataLakeFileClient::Flush.
Definition rest_client.hpp:304
Nullable< std::vector< std::uint8_t > > EncryptionKeySha256
Definition rest_client.hpp:327
Azure::ETag ETag
Definition rest_client.hpp:308
std::int64_t FileSize
Definition rest_client.hpp:317
bool IsServerEncrypted
Definition rest_client.hpp:322
Nullable< bool > IsLeaseRenewed
Definition rest_client.hpp:331
DateTime LastModified
Definition rest_client.hpp:313
The path item returned when listing the paths.
Definition datalake_responses.hpp:229
Response type for Azure::Storage::Files::DataLake::DataLakePathClient::SetAccessControlList.
Definition rest_client.hpp:186
Azure::ETag ETag
Definition rest_client.hpp:190
DateTime LastModified
Definition rest_client.hpp:195