Skip to content

Commit

Permalink
Swagger update for blobs, file share (#22644)
Browse files Browse the repository at this point in the history
  • Loading branch information
gapra-msft authored Jul 7, 2021
1 parent 9051a95 commit c29a9dc
Show file tree
Hide file tree
Showing 20 changed files with 734 additions and 2,908 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.azure.storage.blob.models.BlobImmutabilityPolicyMode;
import com.azure.storage.blob.models.CpkInfo;
import com.azure.storage.blob.models.EncryptionAlgorithmType;
import java.net.URL;
import java.nio.ByteBuffer;
import java.time.OffsetDateTime;
import java.util.Map;
Expand Down Expand Up @@ -68,9 +67,9 @@ public interface AppendBlobsService {
@UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class)
Mono<AppendBlobsCreateResponse> create(
@HostParam("url") String url,
@HeaderParam("x-ms-blob-type") String blobType,
@PathParam("containerName") String containerName,
@PathParam("blob") String blob,
@HeaderParam("x-ms-blob-type") String blobType,
@QueryParam("timeout") Integer timeout,
@HeaderParam("Content-Length") long contentLength,
@HeaderParam("x-ms-blob-content-type") String contentType,
Expand Down Expand Up @@ -104,9 +103,9 @@ Mono<AppendBlobsCreateResponse> create(
@UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class)
Mono<AppendBlobsAppendBlockResponse> appendBlock(
@HostParam("url") String url,
@QueryParam("comp") String comp,
@PathParam("containerName") String containerName,
@PathParam("blob") String blob,
@QueryParam("comp") String comp,
@QueryParam("timeout") Integer timeout,
@HeaderParam("Content-Length") long contentLength,
@HeaderParam("Content-MD5") String transactionalContentMD5,
Expand Down Expand Up @@ -134,10 +133,10 @@ Mono<AppendBlobsAppendBlockResponse> appendBlock(
@UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class)
Mono<AppendBlobsAppendBlockFromUrlResponse> appendBlockFromUrl(
@HostParam("url") String url,
@QueryParam("comp") String comp,
@PathParam("containerName") String containerName,
@PathParam("blob") String blob,
@HeaderParam("x-ms-copy-source") URL sourceUrl,
@QueryParam("comp") String comp,
@HeaderParam("x-ms-copy-source") String sourceUrl,
@HeaderParam("x-ms-source-range") String sourceRange,
@HeaderParam("x-ms-source-content-md5") String sourceContentMD5,
@HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64,
Expand Down Expand Up @@ -171,9 +170,9 @@ Mono<AppendBlobsAppendBlockFromUrlResponse> appendBlockFromUrl(
@UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class)
Mono<AppendBlobsSealResponse> seal(
@HostParam("url") String url,
@QueryParam("comp") String comp,
@PathParam("containerName") String containerName,
@PathParam("blob") String blob,
@QueryParam("comp") String comp,
@QueryParam("timeout") Integer timeout,
@HeaderParam("x-ms-version") String version,
@HeaderParam("x-ms-client-request-id") String requestId,
Expand Down Expand Up @@ -308,9 +307,9 @@ public Mono<AppendBlobsCreateResponse> createWithResponseAsync(
immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
return service.create(
this.client.getUrl(),
blobType,
containerName,
blob,
blobType,
timeout,
contentLength,
contentType,
Expand Down Expand Up @@ -431,9 +430,9 @@ public Mono<AppendBlobsAppendBlockResponse> appendBlockWithResponseAsync(
ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
return service.appendBlock(
this.client.getUrl(),
comp,
containerName,
blob,
comp,
timeout,
contentLength,
transactionalContentMD5Converted,
Expand Down Expand Up @@ -512,7 +511,7 @@ public Mono<AppendBlobsAppendBlockResponse> appendBlockWithResponseAsync(
public Mono<AppendBlobsAppendBlockFromUrlResponse> appendBlockFromUrlWithResponseAsync(
String containerName,
String blob,
URL sourceUrl,
String sourceUrl,
long contentLength,
String sourceRange,
byte[] sourceContentMD5,
Expand Down Expand Up @@ -571,9 +570,9 @@ public Mono<AppendBlobsAppendBlockFromUrlResponse> appendBlockFromUrlWithRespons
sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince);
return service.appendBlockFromUrl(
this.client.getUrl(),
comp,
containerName,
blob,
comp,
sourceUrl,
sourceRange,
sourceContentMD5Converted,
Expand Down Expand Up @@ -653,9 +652,9 @@ public Mono<AppendBlobsSealResponse> sealWithResponseAsync(
ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
return service.seal(
this.client.getUrl(),
comp,
containerName,
blob,
comp,
timeout,
this.client.getVersion(),
requestId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.util.serializer.JacksonAdapter;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.storage.blob.models.PathRenameMode;

/** Initializes a new instance of the AzureBlobStorage type. */
public final class AzureBlobStorageImpl {
Expand Down Expand Up @@ -39,18 +38,6 @@ public String getVersion() {
return this.version;
}

/** Determines the behavior of the rename operation. */
private final PathRenameMode pathRenameMode;

/**
* Gets Determines the behavior of the rename operation.
*
* @return the pathRenameMode value.
*/
public PathRenameMode getPathRenameMode() {
return this.pathRenameMode;
}

/** The HTTP pipeline to send requests through. */
private final HttpPipeline httpPipeline;

Expand Down Expand Up @@ -99,18 +86,6 @@ public ContainersImpl getContainers() {
return this.containers;
}

/** The DirectoriesImpl object to access its operations. */
private final DirectoriesImpl directories;

/**
* Gets the DirectoriesImpl object to access its operations.
*
* @return the DirectoriesImpl object.
*/
public DirectoriesImpl getDirectories() {
return this.directories;
}

/** The BlobsImpl object to access its operations. */
private final BlobsImpl blobs;

Expand Down Expand Up @@ -164,17 +139,15 @@ public BlockBlobsImpl getBlockBlobs() {
*
* @param url The URL of the service account, container, or blob that is the target of the desired operation.
* @param version Specifies the version of the operation to use for this request.
* @param pathRenameMode Determines the behavior of the rename operation.
*/
AzureBlobStorageImpl(String url, String version, PathRenameMode pathRenameMode) {
AzureBlobStorageImpl(String url, String version) {
this(
new HttpPipelineBuilder()
.policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
.build(),
JacksonAdapter.createDefaultSerializerAdapter(),
url,
version,
pathRenameMode);
version);
}

/**
Expand All @@ -183,10 +156,9 @@ public BlockBlobsImpl getBlockBlobs() {
* @param httpPipeline The HTTP pipeline to send requests through.
* @param url The URL of the service account, container, or blob that is the target of the desired operation.
* @param version Specifies the version of the operation to use for this request.
* @param pathRenameMode Determines the behavior of the rename operation.
*/
AzureBlobStorageImpl(HttpPipeline httpPipeline, String url, String version, PathRenameMode pathRenameMode) {
this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), url, version, pathRenameMode);
AzureBlobStorageImpl(HttpPipeline httpPipeline, String url, String version) {
this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), url, version);
}

/**
Expand All @@ -196,22 +168,14 @@ public BlockBlobsImpl getBlockBlobs() {
* @param serializerAdapter The serializer to serialize an object into a string.
* @param url The URL of the service account, container, or blob that is the target of the desired operation.
* @param version Specifies the version of the operation to use for this request.
* @param pathRenameMode Determines the behavior of the rename operation.
*/
AzureBlobStorageImpl(
HttpPipeline httpPipeline,
SerializerAdapter serializerAdapter,
String url,
String version,
PathRenameMode pathRenameMode) {
AzureBlobStorageImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String url, String version) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.url = url;
this.version = version;
this.pathRenameMode = pathRenameMode;
this.services = new ServicesImpl(this);
this.containers = new ContainersImpl(this);
this.directories = new DirectoriesImpl(this);
this.blobs = new BlobsImpl(this);
this.pageBlobs = new PageBlobsImpl(this);
this.appendBlobs = new AppendBlobsImpl(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.serializer.JacksonAdapter;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.storage.blob.models.PathRenameMode;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -71,22 +70,6 @@ public AzureBlobStorageImplBuilder version(String version) {
return this;
}

/*
* Determines the behavior of the rename operation
*/
private PathRenameMode pathRenameMode;

/**
* Sets Determines the behavior of the rename operation.
*
* @param pathRenameMode the pathRenameMode value.
* @return the AzureBlobStorageImplBuilder.
*/
public AzureBlobStorageImplBuilder pathRenameMode(PathRenameMode pathRenameMode) {
this.pathRenameMode = pathRenameMode;
return this;
}

/*
* The HTTP pipeline to send requests through
*/
Expand Down Expand Up @@ -216,8 +199,7 @@ public AzureBlobStorageImpl buildClient() {
if (serializerAdapter == null) {
this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter();
}
AzureBlobStorageImpl client =
new AzureBlobStorageImpl(pipeline, serializerAdapter, url, version, pathRenameMode);
AzureBlobStorageImpl client = new AzureBlobStorageImpl(pipeline, serializerAdapter, url, version);
return client;
}

Expand Down
Loading

0 comments on commit c29a9dc

Please sign in to comment.