Loading [MathJax]/extensions/tex2jax.js
azure-storage-blobs
All Classes Functions Variables Pages
blob_responses.hpp
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include "azure/storage/blobs/blob_options.hpp"
7
8#include <azure/core/azure_assert.hpp>
9#include <azure/core/operation.hpp>
10#include <azure/core/paged_response.hpp>
11
12#include <cstdint>
13#include <string>
14#include <thread>
15#include <vector>
16
17namespace Azure { namespace Storage {
18
19 namespace Files { namespace DataLake {
20 class ListFileSystemsPagedResponse;
21 }} // namespace Files::DataLake
22
23 namespace Blobs {
24
25 class BlobServiceClient;
26 class BlobContainerClient;
27 class BlobClient;
28 class PageBlobClient;
29
30 namespace Models {
31
36 {
41
45 Azure::Core::Http::HttpRange ContentRange;
46
50 int64_t BlobSize = 0;
51
55 Azure::Nullable<ContentHash> TransactionalContentHash;
56
61 };
62
64
68 struct AcquireLeaseResult final
69 {
73 Azure::ETag ETag;
74
78 Azure::DateTime LastModified;
79
85 std::string LeaseId;
86 };
87
91 struct BreakLeaseResult final
92 {
96 Azure::ETag ETag;
97
101 Azure::DateTime LastModified;
102 };
103
107 struct ChangeLeaseResult final
108 {
112 Azure::ETag ETag;
113
117 Azure::DateTime LastModified;
118
124 std::string LeaseId;
125 };
126
131 {
135 Azure::ETag ETag;
136
140 Azure::DateTime LastModified;
141 };
142
146 struct RenewLeaseResult final
147 {
151 Azure::ETag ETag;
152
156 Azure::DateTime LastModified;
157
163 std::string LeaseId;
164 };
165
169 struct BlobItem final
170 {
174 std::string Name;
178 bool IsDeleted = bool();
182 std::string Snapshot;
186 Nullable<std::string> VersionId;
190 Nullable<bool> IsCurrentVersion;
198 Nullable<bool> HasVersionsOnly;
202 int64_t BlobSize = int64_t();
207 };
208
213 {
214 };
215
216 } // namespace Models
217
221 class StartBlobCopyOperation final : public Azure::Core::Operation<Models::BlobProperties> {
222 public:
229 Models::BlobProperties Value() const override { return m_pollResult; }
230
231 StartBlobCopyOperation() = default;
232
238
241
242 ~StartBlobCopyOperation() override {}
243
244 private:
245 std::string GetResumeToken() const override { AZURE_NOT_IMPLEMENTED(); }
246
247 std::unique_ptr<Azure::Core::Http::RawResponse> PollInternal(
248 const Azure::Core::Context& context) override;
249
250 Azure::Response<Models::BlobProperties> PollUntilDoneInternal(
251 std::chrono::milliseconds period,
252 Azure::Core::Context& context) override;
253
254 std::shared_ptr<BlobClient> m_blobClient;
255 Models::BlobProperties m_pollResult;
256
257 friend class Blobs::BlobClient;
258 friend class Blobs::PageBlobClient;
259 };
260
265 : public Azure::Core::PagedResponse<ListBlobContainersPagedResponse> {
266 public:
270 std::string ServiceEndpoint;
271
275 std::string Prefix;
276
280 std::vector<Models::BlobContainerItem> BlobContainers;
281
282 private:
283 void OnNextPage(const Azure::Core::Context& context);
284
285 std::shared_ptr<BlobServiceClient> m_blobServiceClient;
286 ListBlobContainersOptions m_operationOptions;
287
288 friend class BlobServiceClient;
289 friend class Azure::Core::PagedResponse<ListBlobContainersPagedResponse>;
290 friend class Files::DataLake::ListFileSystemsPagedResponse;
291 };
292
297 : public Azure::Core::PagedResponse<FindBlobsByTagsPagedResponse> {
298 public:
302 std::string ServiceEndpoint;
303
307 std::vector<Models::TaggedBlobItem> TaggedBlobs;
308
309 private:
310 void OnNextPage(const Azure::Core::Context& context);
311
312 std::shared_ptr<BlobServiceClient> m_blobServiceClient;
313 std::shared_ptr<BlobContainerClient> m_blobContainerClient;
314 FindBlobsByTagsOptions m_operationOptions;
315 std::string m_tagFilterSqlExpression;
316
317 friend class BlobServiceClient;
318 friend class BlobContainerClient;
319 friend class Azure::Core::PagedResponse<FindBlobsByTagsPagedResponse>;
320 };
321
325 class ListBlobsPagedResponse final : public Azure::Core::PagedResponse<ListBlobsPagedResponse> {
326 public:
330 std::string ServiceEndpoint;
331
335 std::string BlobContainerName;
336
340 std::string Prefix;
341
345 std::vector<Models::BlobItem> Blobs;
346
347 private:
348 void OnNextPage(const Azure::Core::Context& context);
349
350 std::shared_ptr<BlobContainerClient> m_blobContainerClient;
351 ListBlobsOptions m_operationOptions;
352
353 friend class BlobContainerClient;
354 friend class Azure::Core::PagedResponse<ListBlobsPagedResponse>;
355 };
356
361 : public Azure::Core::PagedResponse<ListBlobsByHierarchyPagedResponse> {
362 public:
366 std::string ServiceEndpoint;
367
371 std::string BlobContainerName;
372
376 std::string Prefix;
377
382 std::string Delimiter;
383
387 std::vector<Models::BlobItem> Blobs;
388
392 std::vector<std::string> BlobPrefixes;
393
394 private:
395 void OnNextPage(const Azure::Core::Context& context);
396
397 std::shared_ptr<BlobContainerClient> m_blobContainerClient;
398 ListBlobsOptions m_operationOptions;
399 std::string m_delimiter;
400
401 friend class BlobContainerClient;
402 friend class Azure::Core::PagedResponse<ListBlobsByHierarchyPagedResponse>;
403 };
404
409 : public Azure::Core::PagedResponse<GetPageRangesPagedResponse> {
410 public:
414 Azure::ETag ETag;
415
419 Azure::DateTime LastModified;
420
424 int64_t BlobSize = 0;
425
429 std::vector<Azure::Core::Http::HttpRange> PageRanges;
430
431 private:
432 void OnNextPage(const Azure::Core::Context& context);
433
434 std::shared_ptr<PageBlobClient> m_pageBlobClient;
435 GetPageRangesOptions m_operationOptions;
436
437 friend class PageBlobClient;
438 friend class Azure::Core::PagedResponse<GetPageRangesPagedResponse>;
439 };
440
446 : public Azure::Core::PagedResponse<GetPageRangesDiffPagedResponse> {
447 public:
451 Azure::ETag ETag;
452
456 Azure::DateTime LastModified;
457
461 int64_t BlobSize = 0;
462
466 std::vector<Azure::Core::Http::HttpRange> PageRanges;
467
471 std::vector<Azure::Core::Http::HttpRange> ClearRanges;
472
473 private:
474 void OnNextPage(const Azure::Core::Context& context);
475
476 std::shared_ptr<PageBlobClient> m_pageBlobClient;
477 GetPageRangesOptions m_operationOptions;
478 Azure::Nullable<std::string> m_previousSnapshot;
479 Azure::Nullable<std::string> m_previousSnapshotUrl;
480
481 friend class PageBlobClient;
482 friend class Azure::Core::PagedResponse<GetPageRangesDiffPagedResponse>;
483 };
484
485 } // namespace Blobs
486}} // namespace Azure::Storage
The BlobClient allows you to manipulate Azure Storage blobs.
Definition blob_client.hpp:39
Definition blob_container_client.hpp:21
Definition blob_service_client.hpp:22
Response type for Azure::Storage::Blobs::BlobServiceClient::FindBlobsByTags.
Definition blob_responses.hpp:297
std::vector< Models::TaggedBlobItem > TaggedBlobs
Definition blob_responses.hpp:307
std::string ServiceEndpoint
Definition blob_responses.hpp:302
Response type for Azure::Storage::Blobs::PageBlobClient::GetPageRangesDiff and Azure::Storage::Blobs:...
Definition blob_responses.hpp:446
std::vector< Azure::Core::Http::HttpRange > PageRanges
Definition blob_responses.hpp:466
int64_t BlobSize
Definition blob_responses.hpp:461
Azure::ETag ETag
Definition blob_responses.hpp:451
Azure::DateTime LastModified
Definition blob_responses.hpp:456
std::vector< Azure::Core::Http::HttpRange > ClearRanges
Definition blob_responses.hpp:471
Response type for Azure::Storage::Blobs::PageBlobClient::GetPageRanges.
Definition blob_responses.hpp:409
Azure::ETag ETag
Definition blob_responses.hpp:414
int64_t BlobSize
Definition blob_responses.hpp:424
Azure::DateTime LastModified
Definition blob_responses.hpp:419
std::vector< Azure::Core::Http::HttpRange > PageRanges
Definition blob_responses.hpp:429
Response type for Azure::Storage::Blobs::BlobServiceClient::ListBlobContainers.
Definition blob_responses.hpp:265
std::string ServiceEndpoint
Definition blob_responses.hpp:270
std::vector< Models::BlobContainerItem > BlobContainers
Definition blob_responses.hpp:280
std::string Prefix
Definition blob_responses.hpp:275
Response type for Azure::Storage::Blobs::BlobContainerClient::ListBlobsByHierarchy.
Definition blob_responses.hpp:361
std::string BlobContainerName
Definition blob_responses.hpp:371
std::string Delimiter
Definition blob_responses.hpp:382
std::string ServiceEndpoint
Definition blob_responses.hpp:366
std::vector< Models::BlobItem > Blobs
Definition blob_responses.hpp:387
std::string Prefix
Definition blob_responses.hpp:376
std::vector< std::string > BlobPrefixes
Definition blob_responses.hpp:392
Response type for Azure::Storage::Blobs::BlobContainerClient::ListBlobs.
Definition blob_responses.hpp:325
std::vector< Models::BlobItem > Blobs
Definition blob_responses.hpp:345
std::string BlobContainerName
Definition blob_responses.hpp:335
std::string Prefix
Definition blob_responses.hpp:340
std::string ServiceEndpoint
Definition blob_responses.hpp:330
Type of the blob.
Definition rest_client.hpp:1307
Definition page_blob_client.hpp:23
A long-running operation to copy a blob.
Definition blob_responses.hpp:221
StartBlobCopyOperation(StartBlobCopyOperation &&)=default
Construct a StartBlobCopyOperation from a StartBlobCopyOperation.
Models::BlobProperties Value() const override
Get the Azure::Storage::Blobs::Models::BlobProperties object, which includes the latest copy informat...
Definition blob_responses.hpp:229
StartBlobCopyOperation & operator=(StartBlobCopyOperation &&)=default
Optional parameters for Azure::Storage::Blobs::BlobServiceClient::FindBlobsByTags.
Definition blob_options.hpp:291
Optional parameters for Azure::Storage::Blobs::PageBlobClient::GetPageRanges.
Definition blob_options.hpp:1524
Optional parameters for Azure::Storage::Blobs::BlobServiceClient::ListBlobContainers.
Definition blob_options.hpp:219
Optional parameters for Azure::Storage::Blobs::BlobContainerClient::ListBlobs and Azure::Storage::Blo...
Definition blob_options.hpp:398
Response type for Azure::Storage::Blobs::BlobLeaseClient::Acquire.
Definition blob_responses.hpp:69
std::string LeaseId
Definition blob_responses.hpp:85
Azure::ETag ETag
Definition blob_responses.hpp:73
Azure::DateTime LastModified
Definition blob_responses.hpp:78
Properties of a blob.
Definition rest_client.hpp:1135
An Azure Storage blob.
Definition blob_responses.hpp:170
Nullable< bool > HasVersionsOnly
Definition blob_responses.hpp:198
std::string Snapshot
Definition blob_responses.hpp:182
BlobItemDetails Details
Definition blob_responses.hpp:194
int64_t BlobSize
Definition blob_responses.hpp:202
Nullable< std::string > VersionId
Definition blob_responses.hpp:186
bool IsDeleted
Definition blob_responses.hpp:178
Models::BlobType BlobType
Definition blob_responses.hpp:206
std::string Name
Definition blob_responses.hpp:174
Nullable< bool > IsCurrentVersion
Definition blob_responses.hpp:190
Response type for Azure::Storage::Blobs::BlobClient::GetProperties.
Definition rest_client.hpp:1620
Response type for Azure::Storage::Blobs::BlobLeaseClient::Break.
Definition blob_responses.hpp:92
Azure::DateTime LastModified
Definition blob_responses.hpp:101
Azure::ETag ETag
Definition blob_responses.hpp:96
Response type for Azure::Storage::Blobs::BlobLeaseClient::Change.
Definition blob_responses.hpp:108
Azure::ETag ETag
Definition blob_responses.hpp:112
Azure::DateTime LastModified
Definition blob_responses.hpp:117
std::string LeaseId
Definition blob_responses.hpp:124
Detailed information of the downloaded blob.
Definition rest_client.hpp:1445
Response type for Azure::Storage::Blobs::BlobClient::DownloadTo.
Definition blob_responses.hpp:36
Azure::Nullable< ContentHash > TransactionalContentHash
Definition blob_responses.hpp:55
int64_t BlobSize
Definition blob_responses.hpp:50
Models::BlobType BlobType
Definition blob_responses.hpp:40
Azure::Core::Http::HttpRange ContentRange
Definition blob_responses.hpp:45
DownloadBlobDetails Details
Definition blob_responses.hpp:60
Response type for Azure::Storage::Blobs::BlobLeaseClient::Release.
Definition blob_responses.hpp:131
Azure::ETag ETag
Definition blob_responses.hpp:135
Azure::DateTime LastModified
Definition blob_responses.hpp:140
Response type for Azure::Storage::Blobs::BlobLeaseClient::Renew.
Definition blob_responses.hpp:147
std::string LeaseId
Definition blob_responses.hpp:163
Azure::ETag ETag
Definition blob_responses.hpp:151
Azure::DateTime LastModified
Definition blob_responses.hpp:156
Response type for BlobClient::SubmitBatch.
Definition blob_responses.hpp:213
Response type for Azure::Storage::Blobs::BlockBlobClient::Upload.
Definition rest_client.hpp:2949