diff --git a/sdk/communication/azure-communication-administration/README.md b/sdk/communication/azure-communication-administration/README.md index 2ab5821262f28..fd60ffff5594f 100644 --- a/sdk/communication/azure-communication-administration/README.md +++ b/sdk/communication/azure-communication-administration/README.md @@ -294,6 +294,22 @@ SyncPoller res = res.waitForCompletion(); ``` +### Release Phone Numbers + +```java +Duration duration = Duration.ofSeconds(1); +PhoneNumber phoneNumber = new PhoneNumber("PHONE_NUMBER_TO_RELEASE"); +List phoneNumbers = new ArrayList<>(); +phoneNumbers.add(phoneNumber); +PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); + +SyncPoller res = + phoneNumberClient.beginReleasePhoneNumbers(phoneNumbers, duration); +res.waitForCompletion(); +PhoneNumberRelease result = res.getFinalResult(); +System.out.println("Phone number release status: " + result.getStatus()); +``` + ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution. 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 b85af46a83f68..347523d578a24 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 @@ -22,6 +22,7 @@ import com.azure.communication.administration.models.PstnConfiguration; import com.azure.communication.administration.models.ReleaseRequest; import com.azure.communication.administration.models.ReleaseResponse; +import com.azure.communication.administration.models.ReleaseStatus; import com.azure.communication.administration.models.UpdateNumberCapabilitiesResponse; import com.azure.communication.administration.models.NumberConfiguration; import com.azure.communication.administration.models.PhoneNumberSearch; @@ -541,8 +542,7 @@ Mono> getReleaseByIdWithResponse(String releaseId, * @param phoneNumbers {@link List} of {@link PhoneNumber} objects with the phone numbers. * @return A {@link Mono} containing a {@link ReleaseResponse} representing the release. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono releasePhoneNumbers(List phoneNumbers) { + private Mono releasePhoneNumbers(List phoneNumbers) { return releasePhoneNumbersWithResponse(phoneNumbers).flatMap(FluxUtil::toMono); } @@ -553,12 +553,12 @@ public Mono releasePhoneNumbers(List phoneNumbers) * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue()} value returns * a {@link ReleaseResponse} representing the release. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releasePhoneNumbersWithResponse(List phoneNumbers) { + private Mono> releasePhoneNumbersWithResponse(List phoneNumbers) { return releasePhoneNumbersWithResponse(phoneNumbers, null); } - Mono> releasePhoneNumbersWithResponse(List phoneNumbers, Context context) { + private Mono> releasePhoneNumbersWithResponse( + List phoneNumbers, Context context) { Objects.requireNonNull(phoneNumbers, "'phoneNumbers' cannot be null."); List phoneNumberStrings = phoneNumbers.stream().map(PhoneNumber::getValue).collect(Collectors.toList()); @@ -896,4 +896,70 @@ Mono> purchaseSearchFetchResultOperation() { }; } + + /** + * Releases the given phone numbers. + * This function returns a Long Running Operation poller that allows you to + * wait indefinitely until the operation is complete. + * + * @param phoneNumbers A list of {@link PhoneNumber} with the desired numbers to release + * @param pollInterval The time our long running operation will keep on polling + * until it gets a result from the server + * @return A {@link PollerFlux} object with the release entity + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PollerFlux + beginReleasePhoneNumbers(List phoneNumbers, Duration pollInterval) { + Objects.requireNonNull(phoneNumbers, "'phoneNumbers' cannot be null."); + + if (pollInterval == null) { + pollInterval = defaultPollInterval; + } + + return new PollerFlux(pollInterval, + releaseNumbersActivationOperation(phoneNumbers), + releaseNumbersPollOperation(), + (activationResponse, pollingContext) -> + monoError(logger, new RuntimeException("Cancellation is not supported")), + releaseNumbersFetchResultOperation()); + } + + private Function, Mono> + releaseNumbersActivationOperation(List phoneNumbers) { + return (pollingContext) -> { + Mono response = releasePhoneNumbers(phoneNumbers) + .flatMap(releaseNumberResponse -> { + String releaseId = releaseNumberResponse.getReleaseId(); + Mono phoneNumberRelease = getReleaseById(releaseId); + return phoneNumberRelease; + }); + return response; + }; + } + + private Function, Mono>> + releaseNumbersPollOperation() { + return pollingContext -> + getReleaseById(pollingContext.getLatestResponse().getValue().getReleaseId()) + .flatMap(getReleaseResponse -> { + ReleaseStatus status = getReleaseResponse.getStatus(); + if (status.equals(ReleaseStatus.COMPLETE) + || status.equals(ReleaseStatus.EXPIRED)) { + return Mono.just(new PollResponse<>( + LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, getReleaseResponse)); + } + if (status.equals(ReleaseStatus.FAILED)) { + return Mono.just(new PollResponse<>( + LongRunningOperationStatus.FAILED, getReleaseResponse)); + } + return Mono.just(new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, getReleaseResponse)); + }); + } + + private Function, + Mono> releaseNumbersFetchResultOperation() { + return pollingContext -> { + return Mono.just(pollingContext.getLatestResponse().getValue()); + }; + } } 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 2ddb1cc50d931..9f628180517d1 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 @@ -16,7 +16,6 @@ import com.azure.communication.administration.models.PhonePlan; import com.azure.communication.administration.models.PhonePlanGroup; import com.azure.communication.administration.models.PstnConfiguration; -import com.azure.communication.administration.models.ReleaseResponse; import com.azure.communication.administration.models.UpdateNumberCapabilitiesResponse; import com.azure.communication.administration.models.PhoneNumberSearch; import com.azure.communication.administration.models.UpdatePhoneNumberCapabilitiesResponse; @@ -367,30 +366,6 @@ public Response getReleaseByIdWithResponse(String releaseId, return phoneNumberAsyncClient.getReleaseByIdWithResponse(releaseId, context).block(); } - /** - * Creates a release for the given phone numbers. - * - * @param phoneNumbers {@link List} of {@link PhoneNumber} objects with the phone numbers. - * @return A {@link ReleaseResponse} representing the release. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReleaseResponse releasePhoneNumbers(List phoneNumbers) { - return phoneNumberAsyncClient.releasePhoneNumbers(phoneNumbers).block(); - } - - /** - * Creates a release for the given phone numbers. - * - * @param phoneNumbers {@link List} of {@link PhoneNumber} objects with the phone numbers. - * @param context A {@link Context} representing the request context. - * @return A {@link Response} whose {@link Response#getValue()} value returns - * a {@link ReleaseResponse} representing the release. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response releasePhoneNumbersWithResponse(List phoneNumbers, Context context) { - return phoneNumberAsyncClient.releasePhoneNumbersWithResponse(phoneNumbers, context).block(); - } - /** * Gets the list of all releases * @@ -532,4 +507,19 @@ public SyncPoller beginPurchaseSearch( String searchId, Duration pollInterval) { return phoneNumberAsyncClient.beginPurchaseSearch(searchId, pollInterval).getSyncPoller(); } + + /** + * Releases the given phone numbers. + * This function returns a Long Running Operation poller + * + * @param phoneNumbers A list of {@link PhoneNumber} with the desired numbers to release + * @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.COLLECTION) + public SyncPoller beginReleasePhoneNumbers( + List phoneNumbers, Duration pollInterval) { + return phoneNumberAsyncClient.beginReleasePhoneNumbers(phoneNumbers, pollInterval).getSyncPoller(); + } } diff --git a/sdk/communication/azure-communication-administration/src/samples/java/com/azure/communication/administration/ReadmeSamples.java b/sdk/communication/azure-communication-administration/src/samples/java/com/azure/communication/administration/ReadmeSamples.java index 1769ea5486683..7a570b0ef840e 100644 --- a/sdk/communication/azure-communication-administration/src/samples/java/com/azure/communication/administration/ReadmeSamples.java +++ b/sdk/communication/azure-communication-administration/src/samples/java/com/azure/communication/administration/ReadmeSamples.java @@ -15,6 +15,7 @@ import com.azure.communication.administration.models.LocationOptionsDetails; import com.azure.communication.administration.models.LocationOptionsQuery; import com.azure.communication.administration.models.PhoneNumberCountry; +import com.azure.communication.administration.models.PhoneNumberRelease; import com.azure.communication.administration.models.PhoneNumberSearch; import com.azure.communication.administration.models.PhonePlan; import com.azure.communication.administration.models.PhonePlanGroup; @@ -27,7 +28,6 @@ import com.azure.core.util.polling.SyncPoller; public class ReadmeSamples { - /** * Sample code for creating a sync Communication Identity Client. * @@ -381,4 +381,21 @@ public void beginPurchaseSearch() { phoneNumberClient.beginPurchaseSearch(phoneNumberSearchId, duration); res.waitForCompletion(); } + + /** + * Sample code to release a phone number as a long running operation + */ + public void beginReleasePhoneNumbers() { + Duration duration = Duration.ofSeconds(1); + PhoneNumber phoneNumber = new PhoneNumber("PHONE_NUMBER_TO_RELEASE"); + List phoneNumbers = new ArrayList<>(); + phoneNumbers.add(phoneNumber); + PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); + + SyncPoller res = + phoneNumberClient.beginReleasePhoneNumbers(phoneNumbers, duration); + res.waitForCompletion(); + PhoneNumberRelease result = res.getFinalResult(); + System.out.println("Phone number release status: " + result.getStatus()); + } } diff --git a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberAsyncClientIntegrationTest.java b/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberAsyncClientIntegrationTest.java index 72ff8cf370127..daa3df16d6408 100644 --- a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberAsyncClientIntegrationTest.java +++ b/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberAsyncClientIntegrationTest.java @@ -13,11 +13,12 @@ import com.azure.communication.administration.models.NumberUpdateCapabilities; import com.azure.communication.administration.models.PhoneNumberCountry; import com.azure.communication.administration.models.PhoneNumberEntity; +import com.azure.communication.administration.models.PhoneNumberRelease; import com.azure.communication.administration.models.PhoneNumberSearch; import com.azure.communication.administration.models.PhonePlan; import com.azure.communication.administration.models.PhonePlanGroup; import com.azure.communication.administration.models.PstnConfiguration; -import com.azure.communication.administration.models.ReleaseResponse; +import com.azure.communication.administration.models.ReleaseStatus; import com.azure.communication.administration.models.SearchStatus; import com.azure.communication.administration.models.UpdateNumberCapabilitiesResponse; import com.azure.communication.administration.models.UpdatePhoneNumberCapabilitiesResponse; @@ -450,38 +451,6 @@ public void unconfigureNumberWithResponse(HttpClient httpClient) { .verifyComplete(); } - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void releasePhoneNumbers(HttpClient httpClient) { - List phoneNumbers = new ArrayList<>(); - phoneNumbers.add(new PhoneNumber(PHONENUMBER_TO_RELEASE)); - - Mono mono = this.getClient(httpClient).releasePhoneNumbers(phoneNumbers); - - StepVerifier.create(mono) - .assertNext(item -> { - assertNotNull(item.getReleaseId()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void releasePhoneNumbersWithResponse(HttpClient httpClient) { - List phoneNumbers = new ArrayList<>(); - phoneNumbers.add(new PhoneNumber(PHONENUMBER_TO_RELEASE)); - - Mono> mono = - this.getClient(httpClient).releasePhoneNumbersWithResponse(phoneNumbers, Context.NONE); - - StepVerifier.create(mono) - .assertNext(item -> { - assertEquals(200, item.getStatusCode()); - assertNotNull(item.getValue().getReleaseId()); - }) - .verifyComplete(); - } - @ParameterizedTest @MethodSource("com.azure.core.test.TestBase#getHttpClients") public void beginCreateSearch(HttpClient httpClient) { @@ -500,12 +469,13 @@ public void beginCreateSearch(HttpClient httpClient) { PhoneNumberAsyncClient client = this.getClient(httpClient); PollerFlux poller = client.beginCreateSearch(createSearchOptions, duration); - AsyncPollResponse asyncRes = - poller.takeUntil(apr -> apr.getStatus() == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) - .blockLast(); - PhoneNumberSearch testResult = asyncRes.getValue(); - assertEquals(testResult.getPhoneNumbers().size(), 2); - assertNotNull(testResult.getSearchId()); + Mono> asyncRes = poller.last(); + StepVerifier.create(asyncRes) + .assertNext(item -> { + assertEquals(item.getValue().getPhoneNumbers().size(), 2); + assertNotNull(item.getValue().getSearchId()); + }) + .verifyComplete(); } @ParameterizedTest @@ -525,6 +495,23 @@ public void beginPurchaseSearch(HttpClient httpClient) { .verifyComplete(); } + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void beginReleasePhoneNumbers(HttpClient httpClient) { + PhoneNumber phoneNumber = new PhoneNumber(PHONENUMBER_TO_RELEASE); + List phoneNumbers = new ArrayList<>(); + phoneNumbers.add(phoneNumber); + Duration pollInterval = Duration.ofSeconds(1); + PollerFlux poller = + this.getClient(httpClient).beginReleasePhoneNumbers(phoneNumbers, pollInterval); + Mono> asyncRes = poller.last(); + StepVerifier.create(asyncRes) + .assertNext(item -> { + assertEquals(ReleaseStatus.COMPLETE, item.getValue().getStatus()); + }) + .verifyComplete(); + } + private PhoneNumberAsyncClient getClient(HttpClient httpClient) { return super.getClientBuilder(httpClient).buildAsyncClient(); } diff --git a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberClientIntegrationTest.java b/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberClientIntegrationTest.java index cf240700853ce..df3da0d5c609f 100644 --- a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberClientIntegrationTest.java +++ b/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberClientIntegrationTest.java @@ -17,7 +17,6 @@ import com.azure.communication.administration.models.PhonePlan; import com.azure.communication.administration.models.PhonePlanGroup; import com.azure.communication.administration.models.PstnConfiguration; -import com.azure.communication.administration.models.ReleaseResponse; import com.azure.communication.administration.models.UpdateNumberCapabilitiesResponse; import com.azure.communication.administration.models.UpdatePhoneNumberCapabilitiesResponse; import com.azure.communication.common.PhoneNumber; @@ -331,30 +330,6 @@ public void unconfigureNumberWithResponse(HttpClient httpClient) { assertEquals(200, response.getStatusCode()); } - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void releasePhoneNumbers(HttpClient httpClient) { - List phoneNumbers = new ArrayList<>(); - phoneNumbers.add(new PhoneNumber(PHONENUMBER_TO_RELEASE)); - - ReleaseResponse releaseResponse = this.getClient(httpClient).releasePhoneNumbers(phoneNumbers); - - assertNotNull(releaseResponse.getReleaseId()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void releasePhoneNumbersWithResponse(HttpClient httpClient) { - List phoneNumbers = new ArrayList<>(); - phoneNumbers.add(new PhoneNumber(PHONENUMBER_TO_RELEASE)); - - Response response = - this.getClient(httpClient).releasePhoneNumbersWithResponse(phoneNumbers, Context.NONE); - - assertEquals(200, response.getStatusCode()); - assertNotNull(response.getValue().getReleaseId()); - } - private PhoneNumberClient getClient(HttpClient httpClient) { return super.getClientBuilder(httpClient).buildClient(); } diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginReleasePhoneNumbers.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginReleasePhoneNumbers.json new file mode 100644 index 0000000000000..c5c2a62d2f5a8 --- /dev/null +++ b/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginReleasePhoneNumbers.json @@ -0,0 +1,383 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "1021ms", + "MS-CV" : "OkktCzuvUUeGdwjjKSxWpw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0GiyXXwAAAACsY2Y2pmWDQ4uF9jhQlzhHREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\"}", + "Date" : "Mon, 26 Oct 2020 20:05:46 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "447ms", + "MS-CV" : "LA1nngj23EKnZVRmN3kZHQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0GyyXXwAAAAANStwPu4xJRJ55d7IxiXsAREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"Pending\"}}}", + "Date" : "Mon, 26 Oct 2020 20:05:48 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "218ms", + "MS-CV" : "IRGMqOvgnUiDfeXfAEq8vg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0ISyXXwAAAADHjTcg/4s6QalFu9fKUfNUREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"Pending\"}}}", + "Date" : "Mon, 26 Oct 2020 20:05:52 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "281ms", + "MS-CV" : "09VjyN0Cp0argLV2ztIZjA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0JiyXXwAAAABJgGwcxuPdS65En2jWCWeyREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"Pending\"}}}", + "Date" : "Mon, 26 Oct 2020 20:05:58 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "199ms", + "MS-CV" : "tn3VvTszSU6hQedEaPpWyQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0LCyXXwAAAADfVU1F/Jb1Tqmk4Yl/skNrREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"Pending\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:03 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "199ms", + "MS-CV" : "2Z8V/ovtTkSSCX92PoPlHQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0MSyXXwAAAAATqVIPBtLHR7cPCK/LJUNwREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"Pending\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:09 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "196ms", + "MS-CV" : "bLXHxJJ1OUqw9lYcDwRLAw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0NiyXXwAAAADtmPYpu8BiT5JZcRQUBhwhREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"Pending\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:13 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "204ms", + "MS-CV" : "jGpqtF1M80ay+9PaRhqkTQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0OyyXXwAAAACFtjBQuLMGSpdnmh1MQYyvREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"Pending\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:19 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "200ms", + "MS-CV" : "X5av9HGRvEKPpPVP0Ftiqw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0QSyXXwAAAAAiI0ejZHdgQqCh3L9AlVQkREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"Pending\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:24 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "196ms", + "MS-CV" : "Lk5CPIl9rUmwaNS9LWd2/w.0", + "retry-after" : "0", + "X-Azure-Ref" : "0RiyXXwAAAAB8rQ0abyLQRr/qkTbMbOenREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:30 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "195ms", + "MS-CV" : "KtWmXnEb/06TzCj5U9PzuQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0SyyXXwAAAACMWo4raCoCRqQY7viXAhiaREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:34 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "202ms", + "MS-CV" : "wunF1VTjyU6ZBbdx3r0iJw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0UCyXXwAAAADcRX97IXr+QLxD7qykHYwcREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:40 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "195ms", + "MS-CV" : "2H3GVB7xoEir8W8xcgjudw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0ViyXXwAAAAA94b7XOhJwRLmCXJRwBJvsREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:45 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "250ms", + "MS-CV" : "j1LcvY17ikW0COkorLc4aw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0WyyXXwAAAAD/Ma3wVnIZQrTcx7dyfVcrREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:51 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "2212ms", + "MS-CV" : "vSVVtN6bDU2gMb2BTo1JRQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0YCyXXwAAAABQSluFk2kRQoNRl8+fkW0nREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:06:57 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "261ms", + "MS-CV" : "uAnk9qCfGk6z2fmS17uJ0Q.0", + "retry-after" : "0", + "X-Azure-Ref" : "0aCyXXwAAAACj4RqkTuwUS4WmkAChTzL7REVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:07:04 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "355ms", + "MS-CV" : "zWkQB2CIAUilQTHSZ/2oWQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0bSyXXwAAAAA6GpqN9SXpRrgz2+I1pwPZREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:07:09 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "197ms", + "MS-CV" : "m9uzYzLyYkmQgn/hx7l6xg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0ciyXXwAAAAA6WniR8TUEQ4SDIofSNPLDREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:07:14 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "309ms", + "MS-CV" : "RAqlfHjzuEqciZlb7qxbDw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0eCyXXwAAAAAul0Mo31JLTqmJE6lNiriQREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:07:20 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "282ms", + "MS-CV" : "d1/zdj71qEKDB1F/BLpREQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0fSyXXwAAAABgGll90BArR5Ra7yZYNFEUREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"InProgress\"}}}", + "Date" : "Mon, 26 Oct 2020 20:07:25 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/1e671fd9-31e3-4c93-a688-e3c13e865e25?api-version=2020-07-20-preview1", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "238ms", + "MS-CV" : "LEbXKBbttk6cClcEvddQBg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0giyXXwAAAABpw1FAFjbDSbcgW8pYXZdqREVOMDJFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"releaseId\":\"1e671fd9-31e3-4c93-a688-e3c13e865e25\",\"createdAt\":\"2020-10-26T20:05:46.9508456+00:00\",\"status\":\"Complete\",\"phoneNumberReleaseStatusDetails\":{\"+12134592987\":{\"status\":\"Success\"}}}", + "Date" : "Mon, 26 Oct 2020 20:07:31 GMT", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] + } \ No newline at end of file