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

Rename fileService to fileStorage, queueService to queueStorage. #4571

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 15 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 @@ -441,6 +441,8 @@
<Class name="com.azure.storage.blob.BlobInputStream"/>
<Class name="com.azure.storage.blob.BlobOutputStream"/>
<Class name="com.azure.storage.queue.QueueServiceClient"/>
<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed a merged conflict

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with the fix. Thanks!

=======
</Or>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
Expand All @@ -451,6 +453,7 @@
<Or>
<Class name="com.azure.security.keyvault.keys.KeyClient"/>
<Class name="com.azure.security.keyvault.keys.SecretClient"/>
>>>>>>> 9bbc188570dec6bc2baa66847a6a5041e5638294
</Or>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
Expand Down
28 changes: 14 additions & 14 deletions storage/client/file/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ The File Service REST API provides operations on accounts and manage file servic
Once you have the SASToken, you can construct the file service client with `${accountName}`, `${sasToken}`

```
String fileServiceURL = String.format("https://%s.file.core.windows.net", accountName);
FileServiceClient fileServiceClient = new FileServiceClientBuilder().endpoint(fileServiceURL)
String fileStorageURL = String.format("https://%s.file.core.windows.net", accountName);
FileStorageClient fileStorageClient = new FileStorageClientBuilder().endpoint(fileStorageURL)
.credential(sasToken).buildClient();
```

Expand Down Expand Up @@ -209,19 +209,19 @@ The following sections provide several code snippets covering some of the most c

### Create a share
Create a share in the Storage Account. Throws StorageErrorException If the share fails to be created.
Taking a FileServiceClient in KeyConcept, [`${fileServiceClient}`](#File-services) .
Taking a FileStorageClient in KeyConcept, [`${fileStorageClient}`](#File-services) .

```Java
String shareName = "testshare";
fileServiceClient.createShare(shareName);
fileStorageClient.createShare(shareName);
```

### Create a snapshot on Share
Taking a FileServiceClient in KeyConcept, [`${fileServiceClient}`](#File-services) .
Taking a FileStorageClient in KeyConcept, [`${fileStorageClient}`](#File-services) .

```Java
String shareName = "testshare";
ShareClient shareClient = fileServiceClient.getShareClient(shareName);
ShareClient shareClient = fileStorageClient.getShareClient(shareName);
shareClient.createSnapshot();
```

Expand Down Expand Up @@ -250,10 +250,10 @@ directoryClient.createFile(fileName);
```

### List all Shares
Taking the fileServiceClient in KeyConcept, [`${fileServiceClient}`](#File-services)
Taking the fileStorageClient in KeyConcept, [`${fileStorageClient}`](#File-services)

```Java
fileServiceClient.listShares();
fileStorageClient.listShares();
```

### Create all subdirectories and files
Expand Down Expand Up @@ -347,22 +347,22 @@ fileClient.downloadToFile(filePath);
```

### Get a file service properties
Taking a FileServiceClient in KeyConcept, [`${fileServiceClient}`](#File-services) .
Taking a FileStorageClient in KeyConcept, [`${fileStorageClient}`](#File-services) .

```Java
fileServiceClient.getProperties();
fileStorageClient.getProperties();
```

### Set a file service properties
Taking a FileServiceClient in KeyConcept, [`${fileServiceClient}`](#File-services) .
Taking a FileStorageClient in KeyConcept, [`${fileStorageClient}`](#File-services) .

```Java
FileServiceProperties properties = fileServiceClient.getProperties().value();
FileServiceProperties properties = fileStorageClient.getProperties().value();

properties.minuteMetrics().enabled(true);
properties.hourMetrics().enabled(true);

VoidResponse response = fileServiceClient.setProperties(properties);
VoidResponse response = fileStorageClient.setProperties(properties);
```

### Set a share metadata
Expand Down Expand Up @@ -432,7 +432,7 @@ When you interact with file using this Java client library, errors returned by t
## Next steps

### More Samples
- [FileServiceSample](src/samples/java/file/FileServiceSample.java)
- [FileStorageSample](src/samples/java/file/FileStorageSample.java)
- [ShareSample](src/samples/java/file/ShareSample.java)
- [DirectorySample](src/samples/java/file/DirectorySample.java)
- [FileSample](src/samples/java/file/FileSample.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,26 @@
*
* <p><strong>Instantiating an Asynchronous File Service Client</strong></p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.instantiation}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.instantiation}
*
* <p>View {@link FileServiceClientBuilder this} for additional ways to construct the azureFileStorageClient.</p>
* <p>View {@link FileStorageClientBuilder this} for additional ways to construct the azureFileStorageClient.</p>
*
* @see FileServiceClientBuilder
* @see FileServiceClient
* @see FileStorageClientBuilder
* @see FileStorageClient
* @see SharedKeyCredential
* @see SASTokenCredential
*/
public final class FileServiceAsyncClient {
public final class FileStorageAsyncClient {
private final AzureFileStorageImpl azureFileStorageClient;

/**
* Creates a FileServiceClient that sends requests to the storage account at {@code endpoint}.
* Creates a FileStorageClient that sends requests to the storage account at {@code endpoint}.
* Each service call goes through the {@code httpPipeline}.
*
* @param endpoint URL for the Storage File service
* @param httpPipeline HttpPipeline that the HTTP requests and responses flow through
*/
FileServiceAsyncClient(URL endpoint, HttpPipeline httpPipeline) {
FileStorageAsyncClient(URL endpoint, HttpPipeline httpPipeline) {
this.azureFileStorageClient = new AzureFileStorageBuilder().pipeline(httpPipeline)
.url(endpoint.toString())
.build();
Expand All @@ -68,7 +68,7 @@ public final class FileServiceAsyncClient {
* @return the url of the Storage File service.
* @throws RuntimeException If the file service is using a malformed URL.
*/
public URL getFileServiceUrl() {
public URL getFileStorageUrl() {
try {
return new URL(azureFileStorageClient.url());
} catch (MalformedURLException e) {
Expand Down Expand Up @@ -97,7 +97,7 @@ public ShareAsyncClient getShareAsyncClient(String shareName) {
*
* <p>List all shares in the account</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.listShares}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.listShares}
*
* @return {@link ShareItem Shares} in the storage account without their metadata or snapshots
*/
Expand All @@ -121,11 +121,11 @@ public Flux<ShareItem> listShares() {
*
* <p>List all shares that begin with "azure"</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.listShares#ListSharesOptions.prefix}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.listShares#ListSharesOptions.prefix}
*
* <p>List all shares including their snapshots and metadata</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.listShares#ListSharesOptions.metadata.snapshot}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.listShares#ListSharesOptions.metadata.snapshot}
*
* @param options Options for listing shares
* @return {@link ShareItem Shares} in the storage account that satisfy the filter requirements
Expand Down Expand Up @@ -194,7 +194,7 @@ private Publisher<ShareItem> extractAndFetchShares(ServicesListSharesSegmentResp
*
* <p>Retrieve File service properties</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.getProperties}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.getProperties}
*
* @return Storage account File service properties
*/
Expand All @@ -214,11 +214,11 @@ public Mono<Response<FileServiceProperties>> getProperties() {
*
* <p>Clear CORS in the File service</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.setProperties#fileServiceProperties.clearCORS}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.setProperties#fileServiceProperties.clearCORS}
*
* <p>Enable Minute and Hour Metrics</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.setProperties#fileServiceProperties}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.setProperties#fileServiceProperties}
*
* @param properties Storage account File service properties
* @return A response that only contains headers and response status code
Expand Down Expand Up @@ -246,7 +246,7 @@ public Mono<VoidResponse> setProperties(FileServiceProperties properties) {
*
* <p>Create the share "test"</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.createShare#string}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.createShare#string}
*
* @param shareName Name of the share
* @return A response containing the ShareAsyncClient and the status of creating the share.
Expand All @@ -264,11 +264,11 @@ public Mono<Response<ShareAsyncClient>> createShare(String shareName) {
*
* <p>Create the share "test" with metadata "share:metadata"</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.createShare#string-map-integer.metadata}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.createShare#string-map-integer.metadata}
*
* <p>Create the share "test" with a quota of 10 GB</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.createShare#string-map-integer.quota}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.createShare#string-map-integer.quota}
*
* @param shareName Name of the share
* @param metadata Optional metadata to associate with the share
Expand All @@ -292,7 +292,7 @@ public Mono<Response<ShareAsyncClient>> createShare(String shareName, Map<String
*
* <p>Delete the share "test"</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.deleteShare#string}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.deleteShare#string}
*
* @param shareName Name of the share
* @return A response that only contains headers and response status code
Expand All @@ -310,7 +310,7 @@ public Mono<VoidResponse> deleteShare(String shareName) {
*
* <p>Delete the snapshot of share "test" that was created at current time.</p>
*
* {@codesnippet com.azure.storage.file.fileServiceAsyncClient.deleteShare#string-string}
* {@codesnippet com.azure.storage.file.fileStorageAsyncClient.deleteShare#string-string}
*
* @param shareName Name of the share
* @param snapshot Identifier of the snapshot
Expand Down
Loading