Skip to content

Commit 14e3eed

Browse files
authored
Update Storage V2 with latest codegen version (Azure#45895)
1 parent 4bd9e2f commit 14e3eed

File tree

14 files changed

+188
-2594
lines changed

14 files changed

+188
-2594
lines changed

sdk/storage-v2/azure-storage-blob/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ public void create(String containerName, String blob, long contentLength, Intege
134134
String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString,
135135
OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
136136
BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
137-
this.serviceClient.create(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince,
137+
createWithResponse(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince,
138138
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry,
139-
immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam);
139+
immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestContext.none());
140140
}
141141

142142
/**
@@ -246,9 +246,10 @@ public void appendBlock(String containerName, String blob, long contentLength, B
246246
Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
247247
String ifNoneMatch, String ifTags, String requestId, String structuredBodyType, Long structuredContentLength,
248248
CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
249-
this.serviceClient.appendBlock(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
249+
appendBlockWithResponse(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
250250
transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch,
251-
ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam);
251+
ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam,
252+
RequestContext.none());
252253
}
253254

254255
/**
@@ -376,11 +377,11 @@ public void appendBlockFromUrl(String containerName, String blob, String sourceU
376377
String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
377378
String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
378379
CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
379-
this.serviceClient.appendBlockFromUrl(containerName, blob, sourceUrl, contentLength, sourceRange,
380-
sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition,
381-
ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince,
382-
sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo,
383-
encryptionScopeParam);
380+
appendBlockFromUrlWithResponse(containerName, blob, sourceUrl, contentLength, sourceRange, sourceContentMD5,
381+
sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, ifModifiedSince,
382+
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince,
383+
sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam,
384+
RequestContext.none());
384385
}
385386

386387
/**
@@ -451,7 +452,7 @@ public Response<Void> sealWithResponse(String containerName, String blob, Intege
451452
public void seal(String containerName, String blob, Integer timeout, String requestId, String leaseId,
452453
OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
453454
Long appendPosition) {
454-
this.serviceClient.seal(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, ifUnmodifiedSince,
455-
ifMatch, ifNoneMatch, appendPosition);
455+
sealWithResponse(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch,
456+
ifNoneMatch, appendPosition, RequestContext.none());
456457
}
457458
}

sdk/storage-v2/azure-storage-blob/src/main/java/com/azure/v2/storage/blob/BlobClient.java

Lines changed: 45 additions & 42 deletions
Large diffs are not rendered by default.

sdk/storage-v2/azure-storage-blob/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ public void upload(String containerName, String blob, long contentLength, Binary
165165
BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64,
166166
String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo,
167167
EncryptionScope encryptionScopeParam) {
168-
this.serviceClient.upload(containerName, blob, contentLength, body, timeout, transactionalContentMD5, metadata,
168+
uploadWithResponse(containerName, blob, contentLength, body, timeout, transactionalContentMD5, metadata,
169169
leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString,
170170
immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64, structuredBodyType,
171-
structuredContentLength, blobHttpHeaders, cpkInfo, encryptionScopeParam);
171+
structuredContentLength, blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestContext.none());
172172
}
173173

174174
/**
@@ -312,11 +312,11 @@ public void putBlobFromUrl(String containerName, String blob, long contentLength
312312
String blobTagsString, Boolean copySourceBlobProperties, String copySourceAuthorization,
313313
BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo,
314314
EncryptionScope encryptionScopeParam) {
315-
this.serviceClient.putBlobFromUrl(containerName, blob, contentLength, copySource, timeout,
316-
transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch,
317-
ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags,
318-
requestId, sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization,
319-
copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam);
315+
putBlobFromUrlWithResponse(containerName, blob, contentLength, copySource, timeout, transactionalContentMD5,
316+
metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags,
317+
sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, requestId,
318+
sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization, copySourceTags,
319+
blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestContext.none());
320320
}
321321

322322
/**
@@ -394,9 +394,9 @@ public void stageBlock(String containerName, String blob, String blockId, long c
394394
byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String leaseId,
395395
String requestId, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo,
396396
EncryptionScope encryptionScopeParam) {
397-
this.serviceClient.stageBlock(containerName, blob, blockId, contentLength, body, transactionalContentMD5,
397+
stageBlockWithResponse(containerName, blob, blockId, contentLength, body, transactionalContentMD5,
398398
transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, structuredContentLength,
399-
cpkInfo, encryptionScopeParam);
399+
cpkInfo, encryptionScopeParam, RequestContext.none());
400400
}
401401

402402
/**
@@ -491,9 +491,10 @@ public void stageBlockFromURL(String containerName, String blob, String blockId,
491491
String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
492492
String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
493493
CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
494-
this.serviceClient.stageBlockFromURL(containerName, blob, blockId, contentLength, sourceUrl, sourceRange,
494+
stageBlockFromURLWithResponse(containerName, blob, blockId, contentLength, sourceUrl, sourceRange,
495495
sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince,
496-
sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam);
496+
sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam,
497+
RequestContext.none());
497498
}
498499

499500
/**
@@ -609,10 +610,10 @@ public void commitBlockList(String containerName, String blob, BlockLookupList b
609610
String ifNoneMatch, String ifTags, String requestId, String blobTagsString,
610611
OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
611612
BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
612-
this.serviceClient.commitBlockList(containerName, blob, blocks, timeout, transactionalContentMD5,
613+
commitBlockListWithResponse(containerName, blob, blocks, timeout, transactionalContentMD5,
613614
transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch,
614615
ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold,
615-
blobHttpHeaders, cpkInfo, encryptionScopeParam);
616+
blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestContext.none());
616617
}
617618

618619
/**
@@ -675,7 +676,7 @@ public Response<BlockList> getBlockListWithResponse(String containerName, String
675676
@ServiceMethod(returns = ReturnType.SINGLE)
676677
public BlockList getBlockList(String containerName, String blob, BlockListType listType, String snapshot,
677678
Integer timeout, String leaseId, String ifTags, String requestId) {
678-
return this.serviceClient.getBlockList(containerName, blob, listType, snapshot, timeout, leaseId, ifTags,
679-
requestId);
679+
return getBlockListWithResponse(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, requestId,
680+
RequestContext.none()).getValue();
680681
}
681682
}

0 commit comments

Comments
 (0)