Skip to content

Commit 4e2cbb4

Browse files
committed
applying swagger and public facing changes, not tested
1 parent 6daf347 commit 4e2cbb4

File tree

7 files changed

+739
-153
lines changed

7 files changed

+739
-153
lines changed

sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java

Lines changed: 416 additions & 77 deletions
Large diffs are not rendered by default.

sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java

Lines changed: 116 additions & 72 deletions
Large diffs are not rendered by default.
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
5+
package com.azure.storage.blob.implementation.models;
6+
7+
import com.azure.core.annotation.Fluent;
8+
import com.azure.core.annotation.Generated;
9+
import com.azure.core.util.DateTimeRfc1123;
10+
import java.time.OffsetDateTime;
11+
12+
/**
13+
* Parameter group.
14+
*/
15+
@Fluent
16+
public final class BlobModifiedAccessConditions {
17+
/*
18+
* Specify this header value to operate only on a blob if it has been modified since the specified date/time.
19+
*/
20+
@Generated
21+
private DateTimeRfc1123 ifModifiedSince;
22+
23+
/*
24+
* Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
25+
*/
26+
@Generated
27+
private DateTimeRfc1123 ifUnmodifiedSince;
28+
29+
/*
30+
* Specify an ETag value to operate only on blobs with a matching value.
31+
*/
32+
@Generated
33+
private String ifMatch;
34+
35+
/*
36+
* Specify an ETag value to operate only on blobs without a matching value.
37+
*/
38+
@Generated
39+
private String ifNoneMatch;
40+
41+
/**
42+
* Creates an instance of BlobModifiedAccessConditions class.
43+
*/
44+
@Generated
45+
public BlobModifiedAccessConditions() {
46+
}
47+
48+
/**
49+
* Get the ifModifiedSince property: Specify this header value to operate only on a blob if it has been modified
50+
* since the specified date/time.
51+
*
52+
* @return the ifModifiedSince value.
53+
*/
54+
@Generated
55+
public OffsetDateTime getIfModifiedSince() {
56+
if (this.ifModifiedSince == null) {
57+
return null;
58+
}
59+
return this.ifModifiedSince.getDateTime();
60+
}
61+
62+
/**
63+
* Set the ifModifiedSince property: Specify this header value to operate only on a blob if it has been modified
64+
* since the specified date/time.
65+
*
66+
* @param ifModifiedSince the ifModifiedSince value to set.
67+
* @return the BlobModifiedAccessConditions object itself.
68+
*/
69+
@Generated
70+
public BlobModifiedAccessConditions setIfModifiedSince(OffsetDateTime ifModifiedSince) {
71+
if (ifModifiedSince == null) {
72+
this.ifModifiedSince = null;
73+
} else {
74+
this.ifModifiedSince = new DateTimeRfc1123(ifModifiedSince);
75+
}
76+
return this;
77+
}
78+
79+
/**
80+
* Get the ifUnmodifiedSince property: Specify this header value to operate only on a blob if it has not been
81+
* modified since the specified date/time.
82+
*
83+
* @return the ifUnmodifiedSince value.
84+
*/
85+
@Generated
86+
public OffsetDateTime getIfUnmodifiedSince() {
87+
if (this.ifUnmodifiedSince == null) {
88+
return null;
89+
}
90+
return this.ifUnmodifiedSince.getDateTime();
91+
}
92+
93+
/**
94+
* Set the ifUnmodifiedSince property: Specify this header value to operate only on a blob if it has not been
95+
* modified since the specified date/time.
96+
*
97+
* @param ifUnmodifiedSince the ifUnmodifiedSince value to set.
98+
* @return the BlobModifiedAccessConditions object itself.
99+
*/
100+
@Generated
101+
public BlobModifiedAccessConditions setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSince) {
102+
if (ifUnmodifiedSince == null) {
103+
this.ifUnmodifiedSince = null;
104+
} else {
105+
this.ifUnmodifiedSince = new DateTimeRfc1123(ifUnmodifiedSince);
106+
}
107+
return this;
108+
}
109+
110+
/**
111+
* Get the ifMatch property: Specify an ETag value to operate only on blobs with a matching value.
112+
*
113+
* @return the ifMatch value.
114+
*/
115+
@Generated
116+
public String getIfMatch() {
117+
return this.ifMatch;
118+
}
119+
120+
/**
121+
* Set the ifMatch property: Specify an ETag value to operate only on blobs with a matching value.
122+
*
123+
* @param ifMatch the ifMatch value to set.
124+
* @return the BlobModifiedAccessConditions object itself.
125+
*/
126+
@Generated
127+
public BlobModifiedAccessConditions setIfMatch(String ifMatch) {
128+
this.ifMatch = ifMatch;
129+
return this;
130+
}
131+
132+
/**
133+
* Get the ifNoneMatch property: Specify an ETag value to operate only on blobs without a matching value.
134+
*
135+
* @return the ifNoneMatch value.
136+
*/
137+
@Generated
138+
public String getIfNoneMatch() {
139+
return this.ifNoneMatch;
140+
}
141+
142+
/**
143+
* Set the ifNoneMatch property: Specify an ETag value to operate only on blobs without a matching value.
144+
*
145+
* @param ifNoneMatch the ifNoneMatch value to set.
146+
* @return the BlobModifiedAccessConditions object itself.
147+
*/
148+
@Generated
149+
public BlobModifiedAccessConditions setIfNoneMatch(String ifNoneMatch) {
150+
this.ifNoneMatch = ifNoneMatch;
151+
return this;
152+
}
153+
}

sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRequestConditions.java

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
@Fluent
1717
public class BlobRequestConditions extends BlobLeaseRequestConditions {
1818
private String leaseId;
19+
private OffsetDateTime accessTierIfModifiedSince;
20+
private OffsetDateTime accessTierIfUnmodifiedSince;
1921

2022
/**
2123
* Creates a new instance of {@link BlobRequestConditions}.
@@ -104,4 +106,48 @@ public BlobRequestConditions setLeaseId(String leaseId) {
104106
this.leaseId = leaseId;
105107
return this;
106108
}
109+
110+
/**
111+
* Gets the access-tier {@link OffsetDateTime} that the resource must have been modified since.
112+
*
113+
* @return The access-tier {@link OffsetDateTime} that the resource must have been modified since.
114+
*/
115+
public OffsetDateTime getAccessTierIfModifiedSince() {
116+
return accessTierIfModifiedSince;
117+
}
118+
119+
/**
120+
* Optionally limits requests to resources that have had their access-tier modified since the specified
121+
* {@link OffsetDateTime}.
122+
*
123+
* @param accessTierIfModifiedSince The access-tier {@link OffsetDateTime} that the resource must have been modified
124+
* since.
125+
* @return The updated BlobRequestConditions object.
126+
*/
127+
public BlobRequestConditions setAccessTierIfModifiedSince(OffsetDateTime accessTierIfModifiedSince) {
128+
this.accessTierIfModifiedSince = accessTierIfModifiedSince;
129+
return this;
130+
}
131+
132+
/**
133+
* Gets the access-tier {@link OffsetDateTime} that the resource must have remained unmodified since.
134+
*
135+
* @return The access-tier {@link OffsetDateTime} that the resource must have remained unmodified since.
136+
*/
137+
public OffsetDateTime getAccessTierIfUnmodifiedSince() {
138+
return accessTierIfUnmodifiedSince;
139+
}
140+
141+
/**
142+
* Optionally limits requests to resources that have not had their access-tier modified since the specified
143+
* {@link OffsetDateTime}.
144+
*
145+
* @param accessTierIfUnmodifiedSince The access-tier {@link OffsetDateTime} that the resource must have remained
146+
* unmodified since.
147+
* @return The updated BlobRequestConditions object.
148+
*/
149+
public BlobRequestConditions setAccessTierIfUnmodifiedSince(OffsetDateTime accessTierIfUnmodifiedSince) {
150+
this.accessTierIfUnmodifiedSince = accessTierIfUnmodifiedSince;
151+
return this;
152+
}
107153
}

sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,9 @@ Mono<Response<Void>> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnap
16421642
.deleteNoCustomHeadersWithResponseAsync(containerName, blobName, snapshot, versionId, null,
16431643
requestConditions.getLeaseId(), deleteBlobSnapshotOptions, requestConditions.getIfModifiedSince(),
16441644
requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(),
1645-
requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, null, context);
1645+
requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, null,
1646+
requestConditions.getAccessTierIfModifiedSince(), requestConditions.getAccessTierIfUnmodifiedSince(),
1647+
context);
16461648
}
16471649

16481650
/**

sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,9 @@ public Response<Void> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSna
16241624
finalRequestConditions.getLeaseId(), deleteBlobSnapshotOptions,
16251625
finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(),
16261626
finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(),
1627-
finalRequestConditions.getTagsConditions(), null, null, finalContext);
1627+
finalRequestConditions.getTagsConditions(), null, null,
1628+
finalRequestConditions.getAccessTierIfModifiedSince(),
1629+
finalRequestConditions.getAccessTierIfUnmodifiedSince(), finalContext);
16281630

16291631
return sendRequest(operation, timeout, BlobStorageException.class);
16301632
}
@@ -2027,7 +2029,7 @@ public Response<Void> setTagsWithResponse(BlobSetTagsOptions options, Duration t
20272029
BlobTags t = new BlobTags().setBlobTagSet(tagList);
20282030
Callable<Response<Void>> operation = () -> this.azureBlobStorage.getBlobs()
20292031
.setTagsNoCustomHeadersWithResponse(containerName, blobName, null, versionId, null, null, null,
2030-
requestConditions.getTagsConditions(), requestConditions.getLeaseId(), t, finalContext);
2032+
requestConditions.getTagsConditions(), requestConditions.getLeaseId(), t, null, finalContext);
20312033
return sendRequest(operation, timeout, BlobStorageException.class);
20322034
}
20332035

sdk/storage/azure-storage-blob/swagger/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ autorest
1616
### Code generation settings
1717
``` yaml
1818
use: '@autorest/[email protected]'
19-
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/596d8d2a8c1c50bd6ebe60036143f4c4787fc816/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-11-05/blob.json
19+
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/933db48a0939e55518e7f3f442dd78ea66e3fef0/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-04-06/blob.json
2020
java: true
2121
output-folder: ../
2222
namespace: com.azure.storage.blob

0 commit comments

Comments
 (0)