azure-storage-files-datalake
Loading...
Searching...
No Matches
rest_client.hpp
1
2// Copyright (c) Microsoft Corporation.
3// Licensed under the MIT License.
4//
5// Code generated by Microsoft (R) AutoRest C++ Code Generator.
6// Changes may cause incorrect behavior and will be lost if the code is regenerated.
7#pragma once
8
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>
20
21#include <cstdint>
22#include <string>
23#include <vector>
24
25namespace Azure { namespace Storage { namespace Files { namespace DataLake {
26 namespace _detail {
30 constexpr static const char* ApiVersion = "2024-08-04";
31 } // namespace _detail
32 namespace Models {
33 namespace _detail {
34 class PathRenameMode final : public Core::_internal::ExtendableEnumeration<PathRenameMode> {
35 public:
37 PathRenameMode() = default;
39 explicit PathRenameMode(std::string value) : ExtendableEnumeration(std::move(value)) {}
40
42 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathRenameMode Legacy;
44 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathRenameMode Posix;
45 };
46 class PathSetAccessControlListRecursiveMode final
47 : public Core::_internal::ExtendableEnumeration<PathSetAccessControlListRecursiveMode> {
48 public:
50 PathSetAccessControlListRecursiveMode() = default;
52 explicit PathSetAccessControlListRecursiveMode(std::string value)
53 : ExtendableEnumeration(std::move(value))
54 {
55 }
56
58 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlListRecursiveMode Set;
60 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlListRecursiveMode
61 Modify;
63 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathSetAccessControlListRecursiveMode
64 Remove;
65 };
66 } // namespace _detail
71 class PublicAccessType final : public Core::_internal::ExtendableEnumeration<PublicAccessType> {
72 public:
74 PublicAccessType() = default;
76 explicit PublicAccessType(std::string value) : ExtendableEnumeration(std::move(value)) {}
77
79 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PublicAccessType None;
81 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PublicAccessType FileSystem;
83 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PublicAccessType Path;
84 };
85 namespace _detail {
86 struct PathItem final
87 {
88 std::string Name;
89 bool IsDirectory = false;
90 DateTime LastModified;
91 std::int64_t FileSize = std::int64_t();
92 std::string Owner;
93 std::string Group;
94 std::string Permissions;
98 Nullable<std::string> EncryptionScope;
99 Nullable<std::string> CreatedOn;
100 Nullable<std::string> ExpiresOn;
101 Nullable<std::string> EncryptionContext;
102 std::string ETag;
103 };
107 struct PathList final
108 {
112 std::vector<PathItem> Paths;
119 Nullable<std::string> ContinuationToken;
120 };
121 } // namespace _detail
126 class PathResourceType final : public Core::_internal::ExtendableEnumeration<PathResourceType> {
127 public:
129 PathResourceType() = default;
131 explicit PathResourceType(std::string value) : ExtendableEnumeration(std::move(value)) {}
132
134 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathResourceType Directory;
136 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static PathResourceType File;
137 };
141 struct CreatePathResult final
142 {
146 bool Created = true;
150 Azure::ETag ETag;
155 DateTime LastModified;
159 Nullable<std::int64_t> FileSize;
164 bool IsServerEncrypted = bool();
169 Nullable<std::vector<std::uint8_t>> EncryptionKeySha256;
170 };
174 struct DeletePathResult final
175 {
179 bool Deleted = true;
180 };
186 {
190 Azure::ETag ETag;
195 DateTime LastModified;
196 };
200 struct AclFailedEntry final
201 {
205 std::string Name;
209 std::string Type;
213 std::string ErrorMessage;
214 };
215 namespace _detail {
220 struct SetAccessControlListRecursiveResult final
221 {
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;
238 };
242 struct UndeletePathResult final
243 {
248 Nullable<std::string> ResourceType;
249 };
254 struct GetPathAccessControlListResult final
255 {
260 std::string Owner;
265 std::string Group;
270 std::string Permissions;
276 std::string Acl;
277 };
278 } // namespace _detail
284 class LeaseAction final : public Core::_internal::ExtendableEnumeration<LeaseAction> {
285 public:
287 LeaseAction() = default;
289 explicit LeaseAction(std::string value) : ExtendableEnumeration(std::move(value)) {}
290
292 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseAction Acquire;
294 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseAction AutoRenew;
296 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseAction Release;
298 AZ_STORAGE_FILES_DATALAKE_DLLEXPORT const static LeaseAction AcquireRelease;
299 };
303 struct FlushFileResult final
304 {
308 Azure::ETag ETag;
313 DateTime LastModified;
317 std::int64_t FileSize = std::int64_t();
322 bool IsServerEncrypted = bool();
327 Nullable<std::vector<std::uint8_t>> EncryptionKeySha256;
331 Nullable<bool> IsLeaseRenewed;
332 };
336 struct AppendFileResult final
337 {
342 Nullable<ContentHash> TransactionalContentHash;
347 bool IsServerEncrypted = bool();
352 Nullable<std::vector<std::uint8_t>> EncryptionKeySha256;
356 Nullable<bool> IsLeaseRenewed;
357 };
358 } // namespace Models
359 namespace _detail {
360 class FileSystemClient final {
361 public:
362 struct ListFileSystemPathsOptions final
363 {
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;
370 Nullable<bool> Upn;
371 };
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);
377 };
378 class PathClient final {
379 public:
380 struct CreatePathOptions final
381 {
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;
398 ETag IfMatch;
399 ETag IfNoneMatch;
400 Nullable<DateTime> IfModifiedSince;
401 Nullable<DateTime> IfUnmodifiedSince;
402 ETag SourceIfMatch;
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;
417 };
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
424 {
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;
430 ETag IfMatch;
431 ETag IfNoneMatch;
432 Nullable<DateTime> IfModifiedSince;
433 Nullable<DateTime> IfUnmodifiedSince;
434 Nullable<bool> Paginated;
435 };
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
442 {
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;
448 ETag IfMatch;
449 ETag IfNoneMatch;
450 Nullable<DateTime> IfModifiedSince;
451 Nullable<DateTime> IfUnmodifiedSince;
452 };
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
459 {
460 Nullable<std::string> ContinuationToken;
461 std::string Mode;
462 Nullable<bool> ForceFlag;
463 Nullable<std::int32_t> MaxRecords;
464 Nullable<std::string> Acl;
465 };
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
473 {
474 Nullable<std::string> UndeleteSource;
475 };
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
482 {
483 Nullable<bool> Upn;
484 Nullable<std::string> LeaseId;
485 ETag IfMatch;
486 ETag IfNoneMatch;
487 Nullable<DateTime> IfModifiedSince;
488 Nullable<DateTime> IfUnmodifiedSince;
489 };
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);
495 };
496 class FileClient final {
497 public:
498 struct FlushFileOptions final
499 {
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;
513 ETag IfMatch;
514 ETag IfNoneMatch;
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;
520 };
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
527 {
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;
539 };
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);
546 };
547 } // namespace _detail
548}}}} // namespace Azure::Storage::Files::DataLake
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(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
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
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
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