From 396c715e8da2ef8d212f37cb673e806b0d33eada Mon Sep 17 00:00:00 2001 From: Jorge Beauregard Date: Wed, 7 Oct 2020 10:05:44 -0600 Subject: [PATCH] Addressed Ankit's comments --- .../administration/PhoneNumberAsyncClient.java | 9 +++++---- .../communication/administration/PhoneNumberClient.java | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberAsyncClient.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberAsyncClient.java index 92ed3f8138cf0..5d7524186a1ab 100644 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberAsyncClient.java +++ b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberAsyncClient.java @@ -775,6 +775,7 @@ Mono> purchaseSearchWithResponse(String searchId, Context context * until it gets a result from the server * @return A {@link PollerFlux} object with the search result */ + @ServiceMethod(returns = ReturnType.COLLECTION) public PollerFlux beginCreateSearch( CreateSearchOptions options, Duration pollInterval) { Objects.requireNonNull(options, "'options' cannot be null."); @@ -786,8 +787,8 @@ public PollerFlux beginCreateSearch( createSearchFetchResultOperation()); } - private Function, - Mono> createSearchActivationOperation(CreateSearchOptions options) { + private Function, Mono> + createSearchActivationOperation(CreateSearchOptions options) { return (pollingContext) -> { Mono response = createSearch(options).flatMap(createSearchResponse -> { String searchId = createSearchResponse.getSearchId(); @@ -829,8 +830,8 @@ Mono>> createSearchPollOperation() { } private BiFunction, - PollResponse, - Mono> cancelSearchOperation() { + PollResponse,Mono> + cancelSearchOperation() { return (pollingContext, firstResponse) -> { cancelSearch(pollingContext.getActivationResponse().getValue().getSearchId()); return Mono.just(new PhoneNumberSearch()); diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberClient.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberClient.java index d15facfe211f5..be3a27b8d70d7 100644 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberClient.java +++ b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberClient.java @@ -530,13 +530,13 @@ public Response purchaseSearchWithResponse(String searchId, Context contex * This function returns a Long Running Operation poller. * * @param options A {@link CreateSearchOptions} with the search options - * @param lroDuration The time our long running operation will keep on polling + * @param pollInterval The time our long running operation will keep on polling * until it gets a result from the server * @return A {@link SyncPoller} object with the search result */ @ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller beginCreateSearch( - CreateSearchOptions options, Duration lroDuration) { - return phoneNumberAsyncClient.beginCreateSearch(options, lroDuration).getSyncPoller(); + CreateSearchOptions options, Duration pollInterval) { + return phoneNumberAsyncClient.beginCreateSearch(options, pollInterval).getSyncPoller(); } }