Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ public AzureBlobStorageBuilder pipeline(HttpPipeline pipeline) {
* @return an instance of AzureBlobStorageImpl.
*/
public AzureBlobStorageImpl build() {
if (version == null) {
this.version = "2018-11-09";
}
if (pipeline == null) {
this.pipeline = RestProxy.createDefaultPipeline();
}
Expand All @@ -79,6 +76,8 @@ public AzureBlobStorageImpl build() {
}
if (this.version != null) {
client.setVersion(this.version);
} else {
client.setVersion("2018-11-09");
}
return client;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private interface ContainersService {
@Put("{containerName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(StorageErrorException.class)
Mono<ContainersSetAccessPolicyResponse> setAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifierWrapper containerAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-blob-public-access") PublicAccessType access, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context);
Mono<ContainersSetAccessPolicyResponse> setAccessPolicy(@PathParam("containerName") String containerName, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifiersWrapper containerAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-blob-public-access") PublicAccessType access, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, Context context);

@Put("{containerName}")
@ExpectedResponses({201})
Expand Down Expand Up @@ -381,7 +381,7 @@ public Mono<ContainersSetAccessPolicyResponse> setAccessPolicyWithRestResponseAs
final String restype = "container";
final String comp = "acl";
final String leaseId = null;
SignedIdentifierWrapper containerAclConverted = new SignedIdentifierWrapper(null);
SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(null);
DateTimeRfc1123 ifModifiedSinceConverted = null;
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
return service.setAccessPolicy(containerName, this.client.getUrl(), containerAclConverted, timeout, access, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context);
Expand Down Expand Up @@ -417,7 +417,7 @@ public Mono<ContainersSetAccessPolicyResponse> setAccessPolicyWithRestResponseAs
if (modifiedAccessConditions != null) {
ifUnmodifiedSince = modifiedAccessConditions.ifUnmodifiedSince();
}
SignedIdentifierWrapper containerAclConverted = new SignedIdentifierWrapper(containerAcl);
SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(containerAcl);
DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
return service.setAccessPolicy(containerName, this.client.getUrl(), containerAclConverted, timeout, access, this.client.getVersion(), requestId, restype, comp, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
* A wrapper around List&lt;SignedIdentifier&gt; which provides top-level metadata for serialization.
*/
@JacksonXmlRootElement(localName = "SignedIdentifiers")
public final class SignedIdentifierWrapper {
public final class SignedIdentifiersWrapper {
@JacksonXmlProperty(localName = "SignedIdentifier")
private final List<SignedIdentifier> signedIdentifier;
private final List<SignedIdentifier> signedIdentifiers;

/**
* Creates an instance of SignedIdentifierWrapper.
* Creates an instance of SignedIdentifiersWrapper.
*
* @param signedIdentifier the list.
* @param signedIdentifiers the list.
*/
@JsonCreator
public SignedIdentifierWrapper(@JsonProperty("SignedIdentifier") List<SignedIdentifier> signedIdentifier) {
this.signedIdentifier = signedIdentifier;
public SignedIdentifiersWrapper(@JsonProperty("SignedIdentifier") List<SignedIdentifier> signedIdentifiers) {
this.signedIdentifiers = signedIdentifiers;
}

/**
Expand All @@ -35,6 +35,6 @@ public SignedIdentifierWrapper(@JsonProperty("SignedIdentifier") List<SignedIden
* @return the List&lt;SignedIdentifier&gt;.
*/
public List<SignedIdentifier> items() {
return signedIdentifier;
return signedIdentifiers;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import com.azure.core.implementation.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import java.util.ArrayList;
import java.util.List;
Expand All @@ -14,6 +15,7 @@
* The BlobHierarchyListSegment model.
*/
@JacksonXmlRootElement(localName = "Blobs")
@JsonDeserialize(using = CustomHierarchicalListingDeserializer.class)
@Fluent
public final class BlobHierarchyListSegment {
/*
Expand Down
9 changes: 6 additions & 3 deletions sdk/storage/azure-storage-blob/swagger/blob.json
Original file line number Diff line number Diff line change
Expand Up @@ -7706,11 +7706,14 @@
"description": "a collection of signed identifiers",
"type": "array",
"items": {
"$ref": "#/definitions/SignedIdentifier"
"$ref": "#/definitions/SignedIdentifier",
"xml": {
"name": "SignedIdentifier"
}
},
"xml": {
"wrapped": true,
"name": "SignedIdentifier"
"name": "SignedIdentifiers"
}
},
"StaticWebsite": {
Expand Down Expand Up @@ -8641,4 +8644,4 @@
"description": "Content disposition for given resource"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ private Response<ShareProperties> mapGetPropertiesResponse(SharesGetPropertiesRe
}

private Response<ShareStatistics> mapGetStatisticsResponse(SharesGetStatisticsResponse response) {
ShareStatistics shareStatistics = new ShareStatistics(response.value().shareUsageBytes() / 1024);
ShareStatistics shareStatistics = new ShareStatistics((int) (response.value().shareUsageBytes() / 1024));

return new SimpleResponse<>(response.request(), response.statusCode(), response.headers(), shareStatistics);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,15 @@ public AzureFileStorageBuilder pipeline(HttpPipeline pipeline) {
* @return an instance of AzureFileStorageImpl.
*/
public AzureFileStorageImpl build() {
if (version == null) {
this.version = "2018-11-09";
}
if (pipeline == null) {
this.pipeline = RestProxy.createDefaultPipeline();
}
AzureFileStorageImpl client = new AzureFileStorageImpl(pipeline);
client.setVersion(this.version);
if (this.version != null) {
client.setVersion(this.version);
} else {
client.setVersion("2018-11-09");
}
if (this.url != null) {
client.setUrl(this.url);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.azure.storage.file.models.DirectorysListFilesAndDirectoriesSegmentResponse;
import com.azure.storage.file.models.DirectorysListHandlesResponse;
import com.azure.storage.file.models.DirectorysSetMetadataResponse;
import com.azure.storage.file.models.FilesDeleteResponse;
import com.azure.storage.file.models.StorageErrorException;
import java.util.Map;
import reactor.core.publisher.Mono;
Expand Down Expand Up @@ -183,7 +182,6 @@ public Mono<DirectorysDeleteResponse> deleteWithRestResponseAsync(String shareNa
return service.delete(shareName, directoryPath, this.client.getUrl(), timeout, this.client.getVersion(), restype, context);
}


/**
* Removes the specified empty directory. Note that the directory must be empty before it can be deleted.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import com.azure.storage.file.models.SignedIdentifier;
import com.azure.storage.file.models.StorageErrorException;
import java.util.List;
import reactor.core.publisher.Mono;
import java.util.Map;
import reactor.core.publisher.Mono;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public final class ListFilesAndDirectoriesSegmentResponse {
private String shareName;

/*
* The snapshot property.
* The shareSnapshot property.
*/
@JacksonXmlProperty(localName = "ShareSnapshot", isAttribute = true)
private String shareSnapshot;
Expand Down Expand Up @@ -110,18 +110,18 @@ public ListFilesAndDirectoriesSegmentResponse shareName(String shareName) {
}

/**
* Get the snapshot property: The snapshot property.
* Get the shareSnapshot property: The shareSnapshot property.
*
* @return the snapshot value.
* @return the shareSnapshot value.
*/
public String shareSnapshot() {
return this.shareSnapshot;
}

/**
* Set the snapshot property: The snapshot property.
* Set the shareSnapshot property: The shareSnapshot property.
*
* @param shareSnapshot the snapshot value to set.
* @param shareSnapshot the shareSnapshot value to set.
* @return the ListFilesAndDirectoriesSegmentResponse object itself.
*/
public ListFilesAndDirectoriesSegmentResponse shareSnapshot(String shareSnapshot) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.azure.core.implementation.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;

import java.time.OffsetDateTime;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class ShareStats {
* created or recently resized files.
*/
@JsonProperty(value = "ShareUsageBytes", required = true)
private int shareUsageBytes;
private long shareUsageBytes;

/**
* Get the shareUsageBytes property: The approximate size of the data
Expand All @@ -29,7 +29,7 @@ public final class ShareStats {
*
* @return the shareUsageBytes value.
*/
public int shareUsageBytes() {
public long shareUsageBytes() {
return this.shareUsageBytes;
}

Expand All @@ -41,7 +41,7 @@ public int shareUsageBytes() {
* @param shareUsageBytes the shareUsageBytes value to set.
* @return the ShareStats object itself.
*/
public ShareStats shareUsageBytes(int shareUsageBytes) {
public ShareStats shareUsageBytes(long shareUsageBytes) {
this.shareUsageBytes = shareUsageBytes;
return this;
}
Expand Down
7 changes: 4 additions & 3 deletions sdk/storage/azure-storage-file/swagger/file.json
Original file line number Diff line number Diff line change
Expand Up @@ -3398,7 +3398,8 @@
"properties": {
"ShareUsageBytes": {
"description": "The approximate size of the data stored in bytes, rounded up to the nearest gigabyte. Note that this value may not include all recently created or recently resized files.",
"type": "integer"
"type": "integer",
"format": "int64"
}
}
},
Expand Down Expand Up @@ -3545,7 +3546,7 @@
"required": true,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-skip-url-encoding": true
"x-ms-skip-url-encoding": false
},
"FileCacheControl": {
"name": "x-ms-cache-control",
Expand Down Expand Up @@ -3627,7 +3628,7 @@
"required": true,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-skip-url-encoding": true
"x-ms-skip-url-encoding": false
},
"FileType": {
"name": "x-ms-type",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,18 @@ public AzureQueueStorageBuilder pipeline(HttpPipeline pipeline) {
* @return an instance of AzureQueueStorageImpl.
*/
public AzureQueueStorageImpl build() {
if (version == null) {
this.version = "2018-03-28";
}
if (pipeline == null) {
this.pipeline = RestProxy.createDefaultPipeline();
}
AzureQueueStorageImpl client = new AzureQueueStorageImpl(pipeline);
if (this.url != null) {
client.setUrl(this.url);
}
client.setVersion(this.version);
if (this.version != null) {
client.setVersion(this.version);
} else {
client.setVersion("2018-03-28");
}
return client;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.storage.queue.models;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.storage.queue.models;

Expand Down