Skip to content

Commit

Permalink
Merge pull request #2 from alzimmermsft/storage-file-swagger
Browse files Browse the repository at this point in the history
Update to Use New Service Interface
  • Loading branch information
alzimmermsft authored Aug 19, 2019
2 parents 3cc9454 + 5628280 commit b58a864
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 0 additions & 2 deletions sdk/storage/azure-storage-blob/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ cd <swagger-folder>
autorest --use=C:/work/autorest.java --use=C:/work/autorest.modeler --version=2.0.4280
```

Due to limitations, after generation has completed add the `@JsonDeserialize(using = CustomHierarchicalListingDeserializer.class)` annotation to `BlobHierarchyListSegment`.

### Code generation settings
``` yaml
input-file: ./blob-2019-02-02.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@
import com.azure.storage.file.models.FileRef;
import com.azure.storage.file.models.HandleItem;
import com.azure.storage.file.models.StorageErrorException;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.net.MalformedURLException;
import java.net.URL;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
* This class provides a client that contains all the operations for interacting with directory in Azure Storage File Service.
Expand Down Expand Up @@ -168,7 +169,7 @@ public Mono<Response<DirectoryInfo>> create() {
* @throws StorageErrorException If the directory has already existed, the parent directory does not exist or directory name is an invalid resource name.
*/
public Mono<Response<DirectoryInfo>> create(Map<String, String> metadata) {
return azureFileStorageClient.directorys().createWithRestResponseAsync(shareName, directoryPath, null, metadata, Context.NONE)
return azureFileStorageClient.directorys().createWithRestResponseAsync(shareName, directoryPath, null, null, null, null, metadata, null, null, Context.NONE)
.map(this::createWithRestResponse);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
import com.azure.storage.file.models.HandleItem;
import com.azure.storage.file.models.StorageErrorException;
import io.netty.buffer.ByteBuf;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;

import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
Expand All @@ -54,9 +58,6 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeoutException;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;

/**
* This class provides a client that contains all the operations for interacting with file in Azure Storage File Service.
Expand Down Expand Up @@ -171,7 +172,7 @@ public Mono<Response<FileInfo>> create(long maxSize) {
* @throws StorageErrorException If the directory has already existed, the parent directory does not exist or directory is an invalid resource name.
*/
public Mono<Response<FileInfo>> create(long maxSize, FileHTTPHeaders httpHeaders, Map<String, String> metadata) {
return azureFileStorageClient.files().createWithRestResponseAsync(shareName, filePath, maxSize, null, metadata, httpHeaders, Context.NONE)
return azureFileStorageClient.files().createWithRestResponseAsync(shareName, filePath, maxSize, null, null, null, null, metadata, null, null, httpHeaders, Context.NONE)
.map(this::createFileInfoResponse);
}

Expand Down Expand Up @@ -410,7 +411,7 @@ public Mono<Response<FileProperties>> getProperties() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
*/
public Mono<Response<FileInfo>> setHttpHeaders(long newFileSize, FileHTTPHeaders httpHeaders) {
return azureFileStorageClient.files().setHTTPHeadersWithRestResponseAsync(shareName, filePath, null, newFileSize, httpHeaders, Context.NONE)
return azureFileStorageClient.files().setHTTPHeadersWithRestResponseAsync(shareName, filePath, null, null, null, null, newFileSize, null, null, httpHeaders, Context.NONE)
.map(this::setHttpHeadersResponse);
}

Expand Down

0 comments on commit b58a864

Please sign in to comment.