Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed getting parent client #5261

Closed
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 @@ -150,21 +150,6 @@ public BlobAsyncClient getSnapshotClient(String snapshot) {
.build(), snapshot);
}

/**
* Initializes a {@link ContainerAsyncClient} object pointing to the container this blob is in. This method does not
* create a container. It simply constructs the client to the container and offers access to methods relevant to
* containers.
*
* @return A {@link ContainerAsyncClient} object pointing to the container containing the blob
*/
public ContainerAsyncClient getContainerAsyncClient() {
BlobURLParts parts = URLParser.parse(getBlobUrl());
return new ContainerAsyncClient(new AzureBlobStorageBuilder()
.url(String.format("%s://%s/%s", parts.scheme(), parts.host(), parts.containerName()))
.pipeline(azureBlobStorage.getHttpPipeline())
.build());
}

/**
* Gets the URL of the blob represented by this client.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,6 @@ public BlobClient getSnapshotClient(String snapshot) {
return new BlobClient(blobAsyncClient.getSnapshotClient(snapshot));
}

/**
* Initializes a {@link ContainerClient} object pointing to the container this blob is in. This method does not
* create a container. It simply constructs the URL to the container and offers access to methods relevant to
* containers.
*
* @return A {@link ContainerClient} object pointing to the container containing the blob
*/
public ContainerClient getContainerClient() {
return new ContainerClient(blobAsyncClient.getContainerAsyncClient());
}

/**
* Gets the URL of the blob represented by this client.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,6 @@ public BlobAsyncClient getBlobAsyncClient(String blobName, String snapshot) {
.build(), snapshot);
}

/**
* Initializes a {@link BlobServiceAsyncClient} object pointing to the storage account this container is in.
*
* @return A {@link BlobServiceAsyncClient} object pointing to the specified storage account
*/
public BlobServiceAsyncClient getBlobServiceAsyncClient() {
return new BlobServiceAsyncClient(new AzureBlobStorageBuilder()
.url(Utility.stripLastPathSegment(getContainerUrl()).toString())
.pipeline(azureBlobStorage.getHttpPipeline())
.build());
}

/**
* Gets the URL of the container represented by this client.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,6 @@ public BlobClient getBlobClient(String blobName, String snapshot) {
return new BlobClient(containerAsyncClient.getBlobAsyncClient(blobName, snapshot));
}

/**
* Initializes a {@link BlobServiceClient} object pointing to the storage account this container is in.
* @return A {@link BlobServiceClient} object pointing to the specified storage account
*/
public BlobServiceClient getBlobServiceClient() {
return new BlobServiceClient(containerAsyncClient.getBlobServiceAsyncClient());
}

/**
* Gets the URL of the container represented by this client.
* @return the URL.
Expand Down