diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index 6797e4c308ad..6b0f10598579 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -128,6 +128,7 @@ known_content_issues: - ['sdk/communication/azure-communication-sms/swagger/README.md', '#3113'] - ['sdk/communication/azure-communication-administration/swagger/README.md', '#3113'] - ['sdk/communication/azure-communication-identity/swagger/README.md', '#3113'] + - ['sdk/communication/azure-communication-phonenumbers/swagger/README.md', '#3113'] - ['sdk/cosmos/changelog/README.md', '#3113'] - ['sdk/cosmos/faq/README.md', '#3113'] - ['sdk/cosmos/azure-cosmos-benchmark/README.md', '#3113'] diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index d8ba12ada0e3..968fde356156 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -75,6 +75,11 @@ com.azure azure-communication-sms 1.0.0-beta.5 + + + com.azure + azure-communication-phonenumbers + 1.0.0-beta.5 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index f85405a4b147..71f854ede7dc 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -50,6 +50,7 @@ com.azure:azure-communication-common;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-communication-administration;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-communication-sms;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-communication-identity;1.0.0-beta.4;1.0.0-beta.5 +com.azure:azure-communication-phonenumbers;1.0.0-beta.5;1.0.0-beta.5 com.azure:azure-core;1.13.0;1.14.0-beta.1 com.azure:azure-core-amqp;2.0.2;2.1.0-beta.1 com.azure:azure-core-amqp-experimental;1.0.0-beta.1;1.0.0-beta.1 diff --git a/sdk/communication/azure-communication-administration/CHANGELOG.md b/sdk/communication/azure-communication-administration/CHANGELOG.md index 8c16bb288553..333f7c15457a 100644 --- a/sdk/communication/azure-communication-administration/CHANGELOG.md +++ b/sdk/communication/azure-communication-administration/CHANGELOG.md @@ -1,13 +1,15 @@ # Release History ## 1.0.0-beta.5 (Unreleased) +### Breaking Changes +- PhoneNumbersClient and PhoneNumbersAsyncClient is moved to a new package, `azure.communication.phonenumbers`. ## 1.0.0-beta.4 (Skipped) ### Added - Added support for Azure Active Directory Authentication. ### Breaking Changes -- CommunicationIdentityClient and CommunicationIdentityAsyncClient is moved to a new package, `azure-communication-identity`. +- CommunicationIdentityClient and CommunicationIdentityAsyncClient is moved to a new package, `azure.communication.identity`. ## 1.0.0-beta.3 (2020-11-16) ### Added diff --git a/sdk/communication/azure-communication-administration/README.md b/sdk/communication/azure-communication-administration/README.md index 34c58f996b58..2ffd5c8a20f7 100644 --- a/sdk/communication/azure-communication-administration/README.md +++ b/sdk/communication/azure-communication-administration/README.md @@ -1,11 +1,10 @@ # Azure Communication Administration client library for Java -The administration package provides capabilities for Phone Number Administration. +The administration package previously provided capabilities for User and Token Management and for Phone Number Administration. -Acquired phone numbers can come with many capabilities, depending on the country, number type and phone plan. Examples of capabilities are SMS inbound and outbound usage, PSTN inbound and outbound usage. Phone numbers can also be assigned to a bot via a webhook URL. +Now, User and Token Management capabilities have been moved to `azure.communication.identity`. +Phone Number Administration has been moved to `azure.communication.phonenumbers`. -[Source code][source] | [Package (Maven)][package] | [API reference documentation][api_documentation] -| [Product documentation][product_docs] ## Getting started ### Prerequisites @@ -28,217 +27,8 @@ Acquired phone numbers can come with many capabilities, depending on the country ## Key concepts - -### Initializing Phone Number Client -The PhoneNumberClientBuilder is enabled to use Azure Active Directory Authentication - -```java -String endpoint = "https://.communication.azure.com"; - -// Create an HttpClient builder of your choice and customize it -HttpClient httpClient = new NettyAsyncHttpClientBuilder().build(); - -PhoneNumberClient phoneNumberClient = new PhoneNumberClientBuilder() - .endpoint(endpoint) - .credential(new DefaultAzureCredentialBuilder().build()) - .httpClient(httpClient) - .buildClient(); -``` - -Using the endpoint and access key from the communication resource to authenticate is also posible. - -```java -// You can find your endpoint and access token from your resource in the Azure Portal -String endpoint = "https://.communication.azure.com"; -String accessKey = "SECRET"; - -// Create an HttpClient builder of your choice and customize it -HttpClient httpClient = new NettyAsyncHttpClientBuilder().build(); - -PhoneNumberClient phoneNumberClient = new PhoneNumberClientBuilder() - .endpoint(endpoint) - .accessKey(accessKey) - .httpClient(httpClient) - .buildClient(); -``` -Alternatively, you can provide the entire connection string using the connectionString() function of the PhoneNumberClientBuilder instead of providing the endpoint and access key. - -### Phone plans overview - -Phone plans come in two types; Geographic and Toll-Free. Geographic phone plans are phone plans associated with a location, whose phone numbers' area codes are associated with the area code of a geographic location. Toll-Free phone plans are phone plans not associated location. For example, in the US, toll-free numbers can come with area codes such as 800 or 888. - -All geographic phone plans within the same country are grouped into a phone plan group with a Geographic phone number type. All Toll-Free phone plans within the same country are grouped into a phone plan group. - -### Searching and Acquiring numbers - -Phone numbers search can be search through the search creation API by providing a phone plan id, an area code and quantity of phone numbers. The provided quantity of phone numbers will be reserved for ten minutes. This search of phone numbers can either be cancelled or purchased. If the search is cancelled, then the phone numbers will become available to others. If the search is purchased, then the phone numbers are acquired for the Azure resources. - -### Configuring / Assigning numbers - -Phone numbers can be assigned to a callback URL via the configure number API. As part of the configuration, you will need an acquired phone number, callback URL and application id. - ## Examples -### Get Countries - - -```java -PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - -PagedIterable phoneNumberCountries = phoneNumberClient - .listAllSupportedCountries(locale); - -for (PhoneNumberCountry phoneNumberCountry - : phoneNumberCountries) { - System.out.println("Phone Number Country Code: " + phoneNumberCountry.getCountryCode()); - System.out.println("Phone Number Country Name: " + phoneNumberCountry.getLocalizedName()); -} -``` - -### Get Phone Plan Groups - -Phone plan groups come in two types, Geographic and Toll-Free. - - -```java -PagedIterable phonePlanGroups = phoneNumberClient - .listPhonePlanGroups(countryCode, locale, true); - -for (PhonePlanGroup phonePlanGroup - : phonePlanGroups) { - System.out.println("Phone Plan GroupId: " + phonePlanGroup.getPhonePlanGroupId()); - System.out.println("Phone Plan NumberType: " + phonePlanGroup.getPhoneNumberType()); -} -``` - -### Get Phone Plans - -Unlike Toll-Free phone plans, area codes for Geographic Phone Plans are empty. Area codes are found in the Area Codes API. - - -```java -PagedIterable phonePlans = phoneNumberClient - .listPhonePlans(countryCode, phonePlanGroupId, locale); - -for (PhonePlan phonePlan - : phonePlans) { - System.out.println("Phone Plan Id: " + phonePlan.getPhonePlanId()); - System.out.println("Phone Plan Name: " + phonePlan.getLocalizedName()); - System.out.println("Phone Plan Capabilities: " + phonePlan.getCapabilities()); - System.out.println("Phone Plan Area Codes: " + phonePlan.getAreaCodes()); -} -``` - -### Get Location Options - -For Geographic phone plans, you can query the available geographic locations. The locations options are structured like the geographic hierarchy of a country. For example, the US has states and within each state are cities. - - -```java -LocationOptions locationOptions = phoneNumberClient - .getPhonePlanLocationOptions(countryCode, phonePlanGroupId, phonePlanId, locale) - .getLocationOptions(); - -System.out.println("Getting LocationOptions for: " + locationOptions.getLabelId()); -for (LocationOptionsDetails locationOptionsDetails - : locationOptions.getOptions()) { - System.out.println(locationOptionsDetails.getValue()); - for (LocationOptions locationOptions1 - : locationOptionsDetails.getLocationOptions()) { - System.out.println("Getting LocationOptions for: " + locationOptions1.getLabelId()); - for (LocationOptionsDetails locationOptionsDetails1 - : locationOptions1.getOptions()) { - System.out.println(locationOptionsDetails1.getValue()); - } - } -} -``` - -### Get Area Codes - -Fetching area codes for geographic phone plans will require the the location options queries set. You must include the chain of geographic locations traversing down the location options object returned by the GetLocationOptions API. - - -```java -AreaCodes areaCodes = phoneNumberClient - .getAllAreaCodes("selection", countryCode, phonePlanId, locationOptions); - -for (String areaCode - : areaCodes.getPrimaryAreaCodes()) { - System.out.println(areaCode); -} -``` - -### Configure Phone Number - - -```java -phoneNumberClient.configureNumber(phoneNumber, pstnConfiguration); -``` - -## Long Running Operations - -The Phone Number Client supports a variety of long running operations that allow indefinite polling time to the functions listed down below. - -### Create Search - - -```java -String phonePlanId = "PHONE_PLAN_ID"; - -List phonePlanIds = new ArrayList<>(); -phonePlanIds.add(phonePlanId); - -CreateReservationOptions createReservationOptions = new CreateReservationOptions(); -createReservationOptions - .setAreaCode("AREA_CODE_FOR_RESERVATION") - .setDescription("DESCRIPTION_FOR_RESERVATION") - .setDisplayName("NAME_FOR_RESERVATION") - .setPhonePlanIds(phonePlanIds) - .setQuantity(2); - -Duration duration = Duration.ofSeconds(1); -PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - -SyncPoller res = - phoneNumberClient.beginCreateReservation(createReservationOptions, duration); -res.waitForCompletion(); -PhoneNumberReservation result = res.getFinalResult(); - -System.out.println("Reservation Id: " + result.getReservationId()); -for (String phoneNumber: result.getPhoneNumbers()) { - System.out.println("Phone Number: " + phoneNumber); -} -``` - -### Purchase Search - -```java -Duration duration = Duration.ofSeconds(1); -String phoneNumberReservationId = "RESERVATION_ID_TO_PURCHASE"; -PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - -SyncPoller res = - phoneNumberClient.beginPurchaseReservation(phoneNumberReservationId, duration); -res.waitForCompletion(); -``` - -### Release Phone Numbers - -```java -Duration duration = Duration.ofSeconds(1); -PhoneNumberIdentifier phoneNumber = new PhoneNumberIdentifier("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. @@ -264,8 +54,5 @@ Check out other client libraries for Azure communication service [product_docs]: https://docs.microsoft.com/azure/communication-services/ [package]: https://search.maven.org/artifact/com.azure/azure-communication-administration [api_documentation]: https://aka.ms/java-docs -[source]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/communication/azure-communication-administration/src - - ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcommunication%2Fazure-communication-administration%2FREADME.png) 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 deleted file mode 100644 index 5a66cc1b1221..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberAsyncClient.java +++ /dev/null @@ -1,965 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.communication.administration; - -import com.azure.communication.administration.implementation.PhoneNumberAdminClientImpl; -import com.azure.communication.administration.implementation.PhoneNumberAdministrationsImpl; -import com.azure.communication.administration.models.AcquiredPhoneNumber; -import com.azure.communication.administration.models.AreaCodes; -import com.azure.communication.administration.models.CreateReservationOptions; -import com.azure.communication.administration.models.CreateReservationResponse; -import com.azure.communication.administration.models.LocationOptionsQuery; -import com.azure.communication.administration.models.LocationOptionsQueries; -import com.azure.communication.administration.models.LocationOptionsResponse; -import com.azure.communication.administration.models.NumberConfiguration; -import com.azure.communication.administration.models.NumberConfigurationPhoneNumber; -import com.azure.communication.administration.models.NumberConfigurationResponse; -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.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.ReleaseRequest; -import com.azure.communication.administration.models.ReleaseStatus; -import com.azure.communication.administration.models.UpdateNumberCapabilitiesRequest; -import com.azure.communication.administration.models.UpdateNumberCapabilitiesResponse; -import com.azure.communication.administration.models.PhoneNumberReservation; -import com.azure.communication.administration.models.UpdatePhoneNumberCapabilitiesResponse; -import com.azure.communication.common.PhoneNumberIdentifier; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollResponse; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.PollingContext; -import reactor.core.publisher.Mono; - -import java.time.Duration; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.BiFunction; -import java.util.function.Function; -import java.util.stream.Collectors; - -import static com.azure.core.util.FluxUtil.monoError; -import static com.azure.core.util.FluxUtil.pagedFluxError; - -/** - * Asynchronous client for Communication service phone number operations - */ -@ServiceClient(builder = PhoneNumberClientBuilder.class, isAsync = true) -public final class PhoneNumberAsyncClient { - private final ClientLogger logger = new ClientLogger(PhoneNumberAsyncClient.class); - private final PhoneNumberAdministrationsImpl phoneNumberAdministrations; - private final Duration defaultPollInterval = Duration.ofSeconds(1); - - PhoneNumberAsyncClient(PhoneNumberAdminClientImpl phoneNumberAdminClient) { - this.phoneNumberAdministrations = phoneNumberAdminClient.getPhoneNumberAdministrations(); - } - - /** - * Gets the list of the acquired phone numbers. - * - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @return A {@link PagedFlux} of {@link AcquiredPhoneNumber} instances representing acquired telephone numbers. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAllPhoneNumbers(String locale) { - return listAllPhoneNumbers(locale, null); - } - - PagedFlux listAllPhoneNumbers(String locale, Context context) { - try { - if (context == null) { - return phoneNumberAdministrations.getAllPhoneNumbersAsync(locale, null, null); - } else { - return phoneNumberAdministrations.getAllPhoneNumbersAsync(locale, null, null, context); - } - } catch (RuntimeException ex) { - return pagedFluxError(logger, ex); - } - } - - /** - * Gets a list of the supported area codes. - * - * @param locationType The type of location information required by the plan. - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanId The plan id from which to search area codes. - * @param locationOptions A {@link List} of {@link LocationOptionsQuery} for querying the area codes. - * @return A {@link Mono} containing a {@link AreaCodes} representing area codes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAllAreaCodes( - String locationType, String countryCode, String phonePlanId, List locationOptions) { - return getAllAreaCodesWithResponse(locationType, countryCode, phonePlanId, locationOptions) - .flatMap(FluxUtil::toMono); - } - - /** - * Gets a list of the supported area codes. - * - * @param locationType The type of location information required by the plan. - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanId The plan id from which to search area codes. - * @param locationOptions A {@link List} of {@link LocationOptionsQuery} for querying the area codes. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue()} value returns - * a {@link AreaCodes} representing area codes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllAreaCodesWithResponse( - String locationType, String countryCode, String phonePlanId, List locationOptions) { - return getAllAreaCodesWithResponse(locationType, countryCode, phonePlanId, locationOptions, null); - } - - Mono> getAllAreaCodesWithResponse( - String locationType, String countryCode, String phonePlanId, List locationOptions, - Context context) { - - LocationOptionsQueries locationOptionsQueries = new LocationOptionsQueries(); - locationOptionsQueries.setLocationOptions(locationOptions); - - try { - - Objects.requireNonNull(locationType, "'locationType' cannot be null."); - Objects.requireNonNull(countryCode, "'countryCode' cannot be null."); - Objects.requireNonNull(phonePlanId, "'phonePlanId' cannot be null."); - - if (context == null) { - return phoneNumberAdministrations.getAllAreaCodesWithResponseAsync( - locationType, countryCode, phonePlanId, locationOptionsQueries); - } else { - return phoneNumberAdministrations.getAllAreaCodesWithResponseAsync( - locationType, countryCode, phonePlanId, locationOptionsQueries, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Gets the information for a phone number capabilities update - * - * @param capabilitiesId ID of the capabilities update. - * @return A {@link Mono} containing - * a {@link UpdatePhoneNumberCapabilitiesResponse} representing the capabilities update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getCapabilitiesUpdate(String capabilitiesId) { - return getCapabilitiesUpdateWithResponse(capabilitiesId).flatMap(FluxUtil::toMono); - } - - /** - * Gets the information for a phone number capabilities update - * - * @param capabilitiesId ID of the capabilities update. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue()} value returns - * a {@link UpdatePhoneNumberCapabilitiesResponse} representing the capabilities update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getCapabilitiesUpdateWithResponse( - String capabilitiesId) { - return getCapabilitiesUpdateWithResponse(capabilitiesId, null); - } - - Mono> getCapabilitiesUpdateWithResponse( - String capabilitiesId, Context context) { - try { - Objects.requireNonNull(capabilitiesId, "'capabilitiesId' cannot be null."); - if (context == null) { - return phoneNumberAdministrations.getCapabilitiesUpdateWithResponseAsync(capabilitiesId); - } else { - return phoneNumberAdministrations.getCapabilitiesUpdateWithResponseAsync(capabilitiesId, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Adds or removes phone number capabilities. - * - * @param phoneNumberCapabilitiesUpdate {@link Map} with the updates to perform - * @return A {@link Mono} containing - * a {@link UpdatePhoneNumberCapabilitiesResponse} representing the capabilities update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateCapabilities( - Map phoneNumberCapabilitiesUpdate) { - return updateCapabilitiesWithResponse(phoneNumberCapabilitiesUpdate).flatMap(FluxUtil::toMono); - } - - /** - * Adds or removes phone number capabilities. - * - * @param phoneNumberCapabilitiesUpdate {@link Map} with the updates to perform - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue()} value returns - * a {@link UpdatePhoneNumberCapabilitiesResponse} representing the capabilities update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateCapabilitiesWithResponse( - Map phoneNumberCapabilitiesUpdate) { - return updateCapabilitiesWithResponse(phoneNumberCapabilitiesUpdate, null); - } - - Mono> updateCapabilitiesWithResponse( - Map phoneNumberCapabilitiesUpdate, Context context) { - try { - Objects.requireNonNull(phoneNumberCapabilitiesUpdate, "'phoneNumberCapabilitiesUpdate' cannot be null."); - Map capabilitiesMap = new HashMap<>(); - for (Map.Entry entry - : phoneNumberCapabilitiesUpdate.entrySet()) { - capabilitiesMap.put(entry.getKey().getPhoneNumber(), entry.getValue()); - } - UpdateNumberCapabilitiesRequest updateNumberCapabilitiesRequest = new UpdateNumberCapabilitiesRequest(); - updateNumberCapabilitiesRequest.setPhoneNumberCapabilitiesUpdate(capabilitiesMap); - - if (context == null) { - return phoneNumberAdministrations.updateCapabilitiesWithResponseAsync( - updateNumberCapabilitiesRequest); - } else { - return phoneNumberAdministrations.updateCapabilitiesWithResponseAsync( - updateNumberCapabilitiesRequest, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Gets a list of supported countries. - * - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @return A {@link PagedFlux} of {@link PhoneNumberCountry} instances representing supported countries. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAllSupportedCountries(String locale) { - return listAllSupportedCountries(locale, null); - } - - PagedFlux listAllSupportedCountries(String locale, Context context) { - try { - if (context == null) { - return phoneNumberAdministrations.getAllSupportedCountriesAsync(locale, null, null); - } else { - return phoneNumberAdministrations.getAllSupportedCountriesAsync(locale, null, null, context); - } - } catch (RuntimeException ex) { - return pagedFluxError(logger, ex); - } - } - - /** - * Gets the configuration of a given phone number. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @return A {@link Mono} containing a {@link NumberConfigurationResponse} representing the configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getNumberConfiguration(PhoneNumberIdentifier phoneNumber) { - return getNumberConfigurationWithResponse(phoneNumber).flatMap(FluxUtil::toMono); - } - - /** - * Gets the configuration of a given phone number. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue()} value returns - * a {@link NumberConfigurationResponse} representing the configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getNumberConfigurationWithResponse( - PhoneNumberIdentifier phoneNumber) { - return getNumberConfigurationWithResponse(phoneNumber, null); - } - - Mono> getNumberConfigurationWithResponse( - PhoneNumberIdentifier phoneNumber, Context context) { - try { - Objects.requireNonNull(phoneNumber, "'phoneNumber' cannot be null."); - NumberConfigurationPhoneNumber configurationPhoneNumber = new NumberConfigurationPhoneNumber(); - configurationPhoneNumber.setPhoneNumber(phoneNumber.getPhoneNumber()); - - if (context == null) { - return phoneNumberAdministrations.getNumberConfigurationWithResponseAsync( - configurationPhoneNumber); - } else { - return phoneNumberAdministrations.getNumberConfigurationWithResponseAsync( - configurationPhoneNumber, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Associates a phone number with a PSTN Configuration. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @param pstnConfiguration A {@link PstnConfiguration} containing the pstn number configuration options. - * @return A {@link Mono} for the asynchronous return - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono configureNumber(PhoneNumberIdentifier phoneNumber, PstnConfiguration pstnConfiguration) { - return configureNumberWithResponse(phoneNumber, pstnConfiguration).flatMap(FluxUtil::toMono); - } - - /** - * Associates a phone number with a PSTN Configuration. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @param pstnConfiguration A {@link PstnConfiguration} containing the pstn number configuration options. - * @return A {@link Mono} containing a {@link Response} for the operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> configureNumberWithResponse( - PhoneNumberIdentifier phoneNumber, PstnConfiguration pstnConfiguration) { - return configureNumberWithResponse(phoneNumber, pstnConfiguration, null); - } - - Mono> configureNumberWithResponse( - PhoneNumberIdentifier phoneNumber, PstnConfiguration pstnConfiguration, Context context) { - try { - Objects.requireNonNull(phoneNumber, "'phoneNumber' cannot be null."); - Objects.requireNonNull(pstnConfiguration, "'pstnConfiguration' cannot be null."); - - NumberConfiguration numberConfiguration = new NumberConfiguration(); - numberConfiguration.setPhoneNumber(phoneNumber.getPhoneNumber()).setPstnConfiguration(pstnConfiguration); - - if (context == null) { - return phoneNumberAdministrations.configureNumberWithResponseAsync(numberConfiguration); - } else { - return phoneNumberAdministrations.configureNumberWithResponseAsync(numberConfiguration, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Removes the PSTN Configuration from a phone number. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @return A {@link Mono} for the asynchronous return - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono unconfigureNumber(PhoneNumberIdentifier phoneNumber) { - return unconfigureNumberWithResponse(phoneNumber).flatMap(FluxUtil::toMono); - } - - /** - * Removes the PSTN Configuration from a phone number. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @return A {@link Mono} containing a {@link Response} for the operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> unconfigureNumberWithResponse(PhoneNumberIdentifier phoneNumber) { - return unconfigureNumberWithResponse(phoneNumber, null); - } - - Mono> unconfigureNumberWithResponse(PhoneNumberIdentifier phoneNumber, Context context) { - try { - Objects.requireNonNull(phoneNumber, "'phoneNumber' cannot be null."); - NumberConfigurationPhoneNumber configurationPhoneNumber = new NumberConfigurationPhoneNumber(); - configurationPhoneNumber.setPhoneNumber(phoneNumber.getPhoneNumber()); - - if (context == null) { - return phoneNumberAdministrations.unconfigureNumberWithResponseAsync(configurationPhoneNumber); - } else { - return phoneNumberAdministrations.unconfigureNumberWithResponseAsync(configurationPhoneNumber, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Gets a list of phone plan groups for the given country. - * - * @param countryCode The ISO 3166-2 country code. - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @param includeRateInformation Flag to indicate if rate information should be returned. - * @return A {@link PagedFlux} of {@link PhonePlanGroup} instances representing phone plan groups - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listPhonePlanGroups( - String countryCode, String locale, Boolean includeRateInformation) { - return listPhonePlanGroups(countryCode, locale, includeRateInformation, null); - } - - PagedFlux listPhonePlanGroups( - String countryCode, String locale, Boolean includeRateInformation, Context context) { - try { - Objects.requireNonNull(countryCode, "'countryCode' cannot be null."); - if (context == null) { - return phoneNumberAdministrations.getPhonePlanGroupsAsync( - countryCode, locale, includeRateInformation, null, null); - } else { - return phoneNumberAdministrations.getPhonePlanGroupsAsync( - countryCode, locale, includeRateInformation, null, null, context); - } - } catch (RuntimeException ex) { - return pagedFluxError(logger, ex); - } - } - - /** - * Gets a list of phone plans for a phone plan group - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId ID of the Phone Plan Group - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @return A {@link PagedFlux} of {@link PhonePlan} instances representing phone plans - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listPhonePlans(String countryCode, String phonePlanGroupId, String locale) { - return listPhonePlans(countryCode, phonePlanGroupId, locale, null); - } - - PagedFlux listPhonePlans(String countryCode, String phonePlanGroupId, String locale, Context context) { - try { - Objects.requireNonNull(countryCode, "'countryCode' cannot be null."); - Objects.requireNonNull(phonePlanGroupId, "'phonePlanGroupId' cannot be null."); - if (context == null) { - return phoneNumberAdministrations.getPhonePlansAsync( - countryCode, phonePlanGroupId, locale, null, null); - } else { - return phoneNumberAdministrations.getPhonePlansAsync( - countryCode, phonePlanGroupId, locale, null, null, context); - } - } catch (RuntimeException ex) { - return pagedFluxError(logger, ex); - } - } - - /** - * Gets the location options for a phone plan. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId ID of the Phone Plan Group - * @param phonePlanId ID of the Phone Plan - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @return A {@link Mono} containing a {@link LocationOptionsResponse} representing the location options - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPhonePlanLocationOptions( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale) { - return getPhonePlanLocationOptionsWithResponse(countryCode, phonePlanGroupId, phonePlanId, locale) - .flatMap(FluxUtil::toMono); - } - - /** - * Gets the location options for a phone plan. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId ID of the Phone Plan Group - * @param phonePlanId ID of the Phone Plan - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue()} value returns - * a {@link LocationOptionsResponse} representing the location options - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlanLocationOptionsWithResponse( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale) { - return getPhonePlanLocationOptionsWithResponse( - countryCode, phonePlanGroupId, phonePlanId, locale, null); - } - - Mono> getPhonePlanLocationOptionsWithResponse( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale, Context context) { - try { - Objects.requireNonNull(countryCode, "'countryCode' cannot be null."); - Objects.requireNonNull(phonePlanGroupId, "'phonePlanGroupId' cannot be null."); - Objects.requireNonNull(phonePlanId, "'phonePlanId' cannot be null."); - - if (context == null) { - return phoneNumberAdministrations.getPhonePlanLocationOptionsWithResponseAsync( - countryCode, phonePlanGroupId, phonePlanId, locale); - } else { - return phoneNumberAdministrations.getPhonePlanLocationOptionsWithResponseAsync( - countryCode, phonePlanGroupId, phonePlanId, locale, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Gets a release by ID. - * - * @param releaseId ID of the Release - * @return A {@link Mono} containing a {@link PhoneNumberRelease} representing the release. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getReleaseById(String releaseId) { - return getReleaseByIdWithResponse(releaseId).flatMap(FluxUtil::toMono); - } - - /** - * Gets a release by ID. - * - * @param releaseId ID of the Release - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue()} value returns - * a {@link PhoneNumberRelease} representing the release. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getReleaseByIdWithResponse(String releaseId) { - return getReleaseByIdWithResponse(releaseId, null); - } - - Mono> getReleaseByIdWithResponse(String releaseId, Context context) { - try { - Objects.requireNonNull(releaseId, "'releaseId' cannot be null."); - if (context == null) { - return phoneNumberAdministrations.getReleaseByIdWithResponseAsync(releaseId); - } else { - return phoneNumberAdministrations.getReleaseByIdWithResponseAsync(releaseId, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Creates a release for the given phone numbers. - * - * @param phoneNumbers {@link List} of {@link PhoneNumberIdentifier} objects with the phone numbers. - * @return A {@link Mono} containing a {@link ReleaseResponse} representing the release. - */ - private Mono releasePhoneNumbers(List phoneNumbers) { - return releasePhoneNumbersWithResponse(phoneNumbers).flatMap(FluxUtil::toMono); - } - - /** - * Creates a release for the given phone numbers. - * - * @param phoneNumbers {@link List} of {@link PhoneNumberIdentifier} objects with the phone numbers. - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue()} value returns - * a {@link ReleaseResponse} representing the release. - */ - private Mono> releasePhoneNumbersWithResponse(List phoneNumbers) { - return releasePhoneNumbersWithResponse(phoneNumbers, null); - } - - private Mono> releasePhoneNumbersWithResponse( - List phoneNumbers, Context context) { - Objects.requireNonNull(phoneNumbers, "'phoneNumbers' cannot be null."); - - List phoneNumberStrings = phoneNumbers - .stream() - .map(PhoneNumberIdentifier::getPhoneNumber) - .collect(Collectors.toList()); - ReleaseRequest releaseRequest = new ReleaseRequest(); - releaseRequest.setPhoneNumbers(phoneNumberStrings); - - try { - if (context == null) { - return phoneNumberAdministrations.releasePhoneNumbersWithResponseAsync(releaseRequest); - } else { - return phoneNumberAdministrations.releasePhoneNumbersWithResponseAsync(releaseRequest, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Gets the list of all releases - * - * @return A {@link PagedFlux} of {@link PhoneNumberEntity} instances representing releases. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAllReleases() { - return listAllReleases(null); - } - - PagedFlux listAllReleases(Context context) { - try { - if (context == null) { - return phoneNumberAdministrations.getAllReleasesAsync(null, null); - } else { - return phoneNumberAdministrations.getAllReleasesAsync(null, null, context); - } - } catch (RuntimeException ex) { - return pagedFluxError(logger, ex); - } - } - - /** - * Gets a reservation by ID. - * - * @param reservationId ID of the reservation - * @return A {@link Mono} containing a {@link PhoneNumberReservation} representing the reservation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getReservationById(String reservationId) { - return getReservationByIdWithResponse(reservationId).flatMap(FluxUtil::toMono); - } - - /** - * Gets a reservation by ID. - * - * @param reservationId ID of the reservation - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue()} value returns - * a {@link PhoneNumberReservation} representing the reservation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getReservationByIdWithResponse(String reservationId) { - return getReservationByIdWithResponse(reservationId, null); - } - - Mono> getReservationByIdWithResponse(String reservationId, Context context) { - try { - Objects.requireNonNull(reservationId, "'reservationId' cannot be null."); - if (context == null) { - return phoneNumberAdministrations.getSearchByIdWithResponseAsync(reservationId); - } else { - return phoneNumberAdministrations.getSearchByIdWithResponseAsync(reservationId, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Create a phone number reservation. - * - * @param reservationOptions A {@link CreateReservationOptions} with the reservation options - * @return A {@link Mono} containing a {@link CreateReservationResponse} representing the reservation. - */ - private Mono createReservation(CreateReservationOptions reservationOptions) { - return createReservationWithResponse(reservationOptions).flatMap(FluxUtil::toMono); - } - - /** - * Create a phone number reservation. - * - * @param reservationOptions A {@link CreateReservationOptions} with the reservation options - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue()} value returns - * a {@link CreateReservationResponse} representing the reservation. - */ - private Mono> createReservationWithResponse( - CreateReservationOptions reservationOptions) { - return createReservationWithResponse(reservationOptions, null); - } - - private Mono> createReservationWithResponse( - CreateReservationOptions reservationOptions, Context context) { - try { - Objects.requireNonNull(reservationOptions, "'reservationOptions' cannot be null."); - - if (context == null) { - return phoneNumberAdministrations.createSearchWithResponseAsync(reservationOptions); - } else { - return phoneNumberAdministrations.createSearchWithResponseAsync(reservationOptions, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Gets the list of all reservations - * - * @return A {@link PagedFlux} of {@link PhoneNumberEntity} instances representing reservations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAllReservations() { - return listAllReservations(null); - } - - PagedFlux listAllReservations(Context context) { - try { - if (context == null) { - return phoneNumberAdministrations.getAllSearchesAsync(null, null); - } else { - return phoneNumberAdministrations.getAllSearchesAsync(null, null, context); - } - } catch (RuntimeException ex) { - return pagedFluxError(logger, ex); - } - } - - /** - * Cancels the reservation. This means existing numbers in the reservation will be made available. - * - * @param reservationId ID of the reservation - * @return A {@link Mono} for the asynchronous return - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono cancelReservation(String reservationId) { - return cancelReservationWithResponse(reservationId).flatMap(FluxUtil::toMono); - } - - /** - * Cancels the reservation. This means existing numbers in the reservation will be made available. - * - * @param reservationId ID of the reservation - * @return A {@link Mono} containing a {@link Response} for the operation - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> cancelReservationWithResponse(String reservationId) { - return cancelReservationWithResponse(reservationId, null); - } - - Mono> cancelReservationWithResponse(String reservationId, Context context) { - try { - Objects.requireNonNull(reservationId, "'ReservationId' cannot be null."); - - if (context == null) { - return phoneNumberAdministrations.cancelSearchWithResponseAsync(reservationId); - } else { - return phoneNumberAdministrations.cancelSearchWithResponseAsync(reservationId, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Purchases the phone number reservation. - * - * @param reservationId ID of the reservation - * @return A {@link Mono} for the asynchronous return - */ - private Mono purchaseReservation(String reservationId) { - return purchaseReservationWithResponse(reservationId).flatMap(FluxUtil::toMono); - } - - /** - * Purchases the phone number reservation. - * - * @param reservationId ID of the reservation - * @return A {@link Mono} containing a {@link Response} for the operation - */ - private Mono> purchaseReservationWithResponse(String reservationId) { - return purchaseReservationWithResponse(reservationId, null); - } - - private Mono> purchaseReservationWithResponse(String reservationId, Context context) { - try { - Objects.requireNonNull(reservationId, "'reservationId' cannot be null."); - if (context == null) { - return phoneNumberAdministrations.purchaseSearchWithResponseAsync(reservationId); - } else { - return phoneNumberAdministrations.purchaseSearchWithResponseAsync(reservationId, context); - } - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - /** - * Initiates a reservation and returns a {@link PhoneNumberReservation} usable by other functions - * This function returns a Long Running Operation poller that allows you to - * wait indefinitely until the operation is complete. - * - * @param options A {@link CreateReservationOptions} with the reservation options - * @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 reservation result - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginCreateReservation( - CreateReservationOptions options, Duration pollInterval) { - Objects.requireNonNull(options, "'options' cannot be null."); - - if (pollInterval == null) { - pollInterval = defaultPollInterval; - } - - return new PollerFlux(pollInterval, - createReservationActivationOperation(options), - createReservationPollOperation(), - cancelReservationOperation(), - createReservationFetchResultOperation()); - } - - private Function, Mono> - createReservationActivationOperation(CreateReservationOptions options) { - return (pollingContext) -> { - Mono response = createReservation(options).flatMap(createReservationResponse -> { - String reservationId = createReservationResponse.getReservationId(); - Mono phoneNumberReservation = getReservationById(reservationId); - return phoneNumberReservation; - }); - return response; - }; - } - - private Function, Mono>> - createReservationPollOperation() { - return pollingContext -> - getReservationById(pollingContext.getLatestResponse().getValue().getReservationId()) - .flatMap(getReservationResponse -> { - ReservationStatus status = - ReservationStatus.fromString(getReservationResponse.getStatus().toString()); - if (status.equals(ReservationStatus.EXPIRED) - || status.equals(ReservationStatus.CANCELLED) - || status.equals(ReservationStatus.RESERVED)) { - return Mono.just(new PollResponse<>( - LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, getReservationResponse)); - } - if (status.equals(ReservationStatus.ERROR)) { - return Mono.just(new PollResponse<>( - LongRunningOperationStatus.FAILED, getReservationResponse)); - } - return Mono.just(new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, - getReservationResponse)); - }); - } - - private BiFunction, - PollResponse, Mono> - cancelReservationOperation() { - return (pollingContext, firstResponse) -> { - cancelReservation(pollingContext.getLatestResponse().getValue().getReservationId()); - return Mono.just(pollingContext.getLatestResponse().getValue()); - }; - } - - private Function, - Mono> createReservationFetchResultOperation() { - return pollingContext -> { - return Mono.just(pollingContext.getLatestResponse().getValue()); - }; - } - - /** - * Initiates a purchase process and polls until a terminal state is reached - * This function returns a Long Running Operation poller that allows you to - * wait indefinitely until the operation is complete. - * - * @param reservationId ID of the reservation - * @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. - */ - - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginPurchaseReservation(String reservationId, Duration pollInterval) { - Objects.requireNonNull(reservationId, "'ReservationId' can not be null."); - - if (pollInterval == null) { - pollInterval = defaultPollInterval; - } - - return new PollerFlux(pollInterval, - purchaseReservationActivationOperation(reservationId), - purchaseReservationPollOperation(reservationId), - (activationResponse, pollingContext) -> Mono.error(new RuntimeException("Cancellation is not supported")), - purchaseReservationFetchResultOperation()); - } - - private Function, - Mono> purchaseReservationActivationOperation(String reservationId) { - return (pollingContext) -> { - return purchaseReservation(reservationId); - }; - } - - private Function, Mono>> - purchaseReservationPollOperation(String reservationId) { - return (pollingContext) -> getReservationById(reservationId) - .flatMap(getReservationResponse -> { - ReservationStatus statusResponse = - ReservationStatus.fromString(getReservationResponse.getStatus().toString()); - if (statusResponse.equals(ReservationStatus.SUCCESS)) { - return Mono.just(new PollResponse<>( - LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, null)); - } - if (statusResponse.equals(ReservationStatus.ERROR) - || statusResponse.equals(ReservationStatus.EXPIRED)) { - return Mono.just(new PollResponse<>( - LongRunningOperationStatus.FAILED, null)); - } - return Mono.just(new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, null)); - }); - } - - private Function, - Mono> purchaseReservationFetchResultOperation() { - return pollingContext -> { - return Mono.empty(); - }; - - } - - /** - * 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 PhoneNumberIdentifier} 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.LONG_RUNNING_OPERATION) - 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 deleted file mode 100644 index 492235c52a7f..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberClient.java +++ /dev/null @@ -1,500 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.communication.administration; - -import com.azure.communication.administration.models.AcquiredPhoneNumber; -import com.azure.communication.administration.models.AreaCodes; -import com.azure.communication.administration.models.CreateReservationOptions; -import com.azure.communication.administration.models.LocationOptionsQuery; -import com.azure.communication.administration.models.LocationOptionsResponse; -import com.azure.communication.administration.models.NumberConfigurationResponse; -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.PhonePlan; -import com.azure.communication.administration.models.PhonePlanGroup; -import com.azure.communication.administration.models.PstnConfiguration; -import com.azure.communication.administration.models.UpdateNumberCapabilitiesResponse; -import com.azure.communication.administration.models.PhoneNumberReservation; -import com.azure.communication.administration.models.UpdatePhoneNumberCapabilitiesResponse; -import com.azure.communication.common.PhoneNumberIdentifier; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceClient; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; - -import java.time.Duration; - -import java.util.List; -import java.util.Map; - -/** - * Synchronous client for Communication service phone number operations - */ -@ServiceClient(builder = PhoneNumberClientBuilder.class, isAsync = false) -public final class PhoneNumberClient { - - private final PhoneNumberAsyncClient phoneNumberAsyncClient; - - PhoneNumberClient(PhoneNumberAsyncClient phoneNumberAsyncClient) { - this.phoneNumberAsyncClient = phoneNumberAsyncClient; - } - - /** - * Gets the list of the acquired phone numbers. - * - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @return A {@link PagedIterable} of {@link AcquiredPhoneNumber} instances representing acquired telephone numbers. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllPhoneNumbers(String locale) { - return new PagedIterable<>(phoneNumberAsyncClient.listAllPhoneNumbers(locale)); - } - - /** - * Gets the list of the acquired phone numbers. - * - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @param context A {@link Context} representing the request context. - * @return A {@link PagedIterable} of {@link AcquiredPhoneNumber} instances representing acquired telephone numbers. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllPhoneNumbers(String locale, Context context) { - return new PagedIterable<>(phoneNumberAsyncClient.listAllPhoneNumbers(locale, context)); - } - - /** - * Gets a list of the supported area codes. - * - * @param locationType The type of location information required by the plan. - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanId The plan id from which to search area codes. - * @param locationOptions A {@link List} of {@link LocationOptionsQuery} for querying the area codes. - * @return A {@link AreaCodes} representing area codes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AreaCodes getAllAreaCodes( - String locationType, String countryCode, String phonePlanId, List locationOptions) { - return phoneNumberAsyncClient.getAllAreaCodes(locationType, countryCode, phonePlanId, locationOptions).block(); - } - - /** - * Gets a list of the supported area codes. - * - * @param locationType The type of location information required by the plan. - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanId The plan id from which to search area codes. - * @param locationOptions A {@link List} of {@link LocationOptionsQuery} for querying the area codes. - * @param context A {@link Context} representing the request context. - * @return A {@link Response} whose {@link Response#getValue()} value returns - * a {@link AreaCodes} representing area codes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAllAreaCodesWithResponse( - String locationType, String countryCode, String phonePlanId, List locationOptions, - Context context) { - return phoneNumberAsyncClient.getAllAreaCodesWithResponse( - locationType, countryCode, phonePlanId, locationOptions, context).block(); - } - - /** - * Gets the information for a phone number capabilities update - * - * @param capabilitiesId ID of the capabilities update. - * @return A {@link UpdatePhoneNumberCapabilitiesResponse} representing the capabilities update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdatePhoneNumberCapabilitiesResponse getCapabilitiesUpdate(String capabilitiesId) { - return phoneNumberAsyncClient.getCapabilitiesUpdate(capabilitiesId).block(); - } - - /** - * Gets the information for a phone number capabilities update - * - * @param capabilitiesId ID of the capabilities update. - * @param context A {@link Context} representing the request context. - * @return A {@link Response} whose {@link Response#getValue()} value returns - * a {@link UpdatePhoneNumberCapabilitiesResponse} representing the capabilities update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getCapabilitiesUpdateWithResponse( - String capabilitiesId, Context context) { - return phoneNumberAsyncClient.getCapabilitiesUpdateWithResponse(capabilitiesId, context).block(); - } - - /** - * Adds or removes phone number capabilities. - * - * @param phoneNumberCapabilitiesUpdate {@link Map} with the updates to perform - * @return A {@link UpdatePhoneNumberCapabilitiesResponse} representing the capabilities update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateNumberCapabilitiesResponse updateCapabilities( - Map phoneNumberCapabilitiesUpdate) { - return phoneNumberAsyncClient.updateCapabilities(phoneNumberCapabilitiesUpdate).block(); - } - - /** - * Adds or removes phone number capabilities. - * - * @param phoneNumberCapabilitiesUpdate {@link Map} with the updates to perform - * @param context A {@link Context} representing the request context. - * @return A {@link Response} whose {@link Response#getValue()} value returns - * a {@link UpdatePhoneNumberCapabilitiesResponse} representing the capabilities update. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateCapabilitiesWithResponse( - Map phoneNumberCapabilitiesUpdate, Context context) { - return phoneNumberAsyncClient.updateCapabilitiesWithResponse(phoneNumberCapabilitiesUpdate, context).block(); - } - - /** - * Gets a list of supported countries. - * - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @return A {@link PagedIterable} of {@link PhoneNumberCountry} instances representing supported countries. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllSupportedCountries(String locale) { - return new PagedIterable<>(phoneNumberAsyncClient.listAllSupportedCountries(locale)); - } - - /** - * Gets a list of supported countries. - * - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @param context A {@link Context} representing the request context. - * @return A {@link PagedIterable} of {@link PhoneNumberCountry} instances representing supported countries. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllSupportedCountries(String locale, Context context) { - return new PagedIterable<>(phoneNumberAsyncClient.listAllSupportedCountries(locale, context)); - } - - /** - * Gets the configuration of a given phone number. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @return A {@link NumberConfigurationResponse} representing the configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NumberConfigurationResponse getNumberConfiguration(PhoneNumberIdentifier phoneNumber) { - return phoneNumberAsyncClient.getNumberConfiguration(phoneNumber).block(); - } - - /** - * Gets the configuration of a given phone number. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @param context A {@link Context} representing the request context. - * @return A {@link Response} whose {@link Response#getValue()} value returns - * a {@link NumberConfigurationResponse} representing the configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getNumberConfigurationWithResponse( - PhoneNumberIdentifier phoneNumber, Context context) { - return phoneNumberAsyncClient.getNumberConfigurationWithResponse(phoneNumber, context).block(); - } - - /** - * Associates a phone number with a PSTN Configuration. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @param pstnConfiguration A {@link PstnConfiguration} containing the pstn number configuration options. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void configureNumber(PhoneNumberIdentifier phoneNumber, PstnConfiguration pstnConfiguration) { - phoneNumberAsyncClient.configureNumber(phoneNumber, pstnConfiguration).block(); - } - - /** - * Associates a phone number with a PSTN Configuration. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @param pstnConfiguration A {@link PstnConfiguration} containing the pstn number configuration options. - * @param context A {@link Context} representing the request context. - * @return A {@link Response} for the operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response configureNumberWithResponse( - PhoneNumberIdentifier phoneNumber, PstnConfiguration pstnConfiguration, Context context) { - return phoneNumberAsyncClient.configureNumberWithResponse(phoneNumber, pstnConfiguration, context).block(); - } - - /** - * Removes the PSTN Configuration from a phone number. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void unconfigureNumber(PhoneNumberIdentifier phoneNumber) { - phoneNumberAsyncClient.unconfigureNumber(phoneNumber).block(); - } - - /** - * Removes the PSTN Configuration from a phone number. - * - * @param phoneNumber A {@link PhoneNumberIdentifier} representing the phone number. - * @param context A {@link Context} representing the request context. - * @return A {@link Response} for the operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response unconfigureNumberWithResponse(PhoneNumberIdentifier phoneNumber, Context context) { - return phoneNumberAsyncClient.unconfigureNumberWithResponse(phoneNumber, context).block(); - } - - /** - * Gets a list of phone plan groups for the given country. - * - * @param countryCode The ISO 3166-2 country code. - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @param includeRateInformation Flag to indicate if rate information should be returned. - * @return A {@link PagedIterable} of {@link PhonePlanGroup} instances representing phone plan groups - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPhonePlanGroups( - String countryCode, String locale, Boolean includeRateInformation) { - return new PagedIterable<>( - phoneNumberAsyncClient.listPhonePlanGroups(countryCode, locale, includeRateInformation)); - } - - /** - * Gets a list of phone plan groups for the given country. - * - * @param countryCode The ISO 3166-2 country code. - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @param includeRateInformation Flag to indicate if rate information should be returned. - * @param context A {@link Context} representing the request context. - * @return A {@link PagedIterable} of {@link PhonePlanGroup} instances representing phone plan groups - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPhonePlanGroups( - String countryCode, String locale, Boolean includeRateInformation, Context context) { - return new PagedIterable<>( - phoneNumberAsyncClient.listPhonePlanGroups(countryCode, locale, includeRateInformation, context)); - } - - /** - * Gets a list of phone plans for a phone plan group - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId ID of the Phone Plan Group - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @return A {@link PagedIterable} of {@link PhonePlan} instances representing phone plans - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPhonePlans(String countryCode, String phonePlanGroupId, String locale) { - return new PagedIterable<>(phoneNumberAsyncClient.listPhonePlans(countryCode, phonePlanGroupId, locale)); - } - - /** - * Gets a list of phone plans for a phone plan group - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId ID of the Phone Plan Group - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @param context A {@link Context} representing the request context. - * @return A {@link PagedIterable} of {@link PhonePlan} instances representing phone plans - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPhonePlans( - String countryCode, String phonePlanGroupId, String locale, Context context) { - return new PagedIterable<>(phoneNumberAsyncClient.listPhonePlans( - countryCode, phonePlanGroupId, locale, context)); - } - - /** - * Gets the location options for a phone plan. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId ID of the Phone Plan Group - * @param phonePlanId ID of the Phone Plan - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @return A {@link LocationOptionsResponse} representing the location options - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LocationOptionsResponse getPhonePlanLocationOptions( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale) { - return phoneNumberAsyncClient.getPhonePlanLocationOptions(countryCode, phonePlanGroupId, phonePlanId, locale) - .block(); - } - - /** - * Gets the location options for a phone plan. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId ID of the Phone Plan Group - * @param phonePlanId ID of the Phone Plan - * @param locale A language-locale pairing which will be used to localise the names of countries. - * @param context A {@link Context} representing the request context. - * @return A {@link Response} whose {@link Response#getValue()} value returns - * a {@link LocationOptionsResponse} representing the location options - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPhonePlanLocationOptionsWithResponse( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale, Context context) { - return phoneNumberAsyncClient.getPhonePlanLocationOptionsWithResponse( - countryCode, phonePlanGroupId, phonePlanId, locale, context).block(); - } - - /** - * Gets a release by ID. - * - * @param releaseId ID of the Release - * @return A {@link PhoneNumberRelease} representing the release. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PhoneNumberRelease getReleaseById(String releaseId) { - return phoneNumberAsyncClient.getReleaseById(releaseId).block(); - } - - /** - * Gets a release by ID. - * - * @param releaseId ID of the Release - * @param context A {@link Context} representing the request context. - * @return A {@link Response} whose {@link Response#getValue()} value returns - * a {@link PhoneNumberRelease} representing the release. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getReleaseByIdWithResponse(String releaseId, Context context) { - return phoneNumberAsyncClient.getReleaseByIdWithResponse(releaseId, context).block(); - } - - /** - * Gets the list of all releases - * - * @return A {@link PagedIterable} of {@link PhoneNumberEntity} instances representing releases. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllReleases() { - return new PagedIterable<>(phoneNumberAsyncClient.listAllReleases()); - } - - /** - * Gets the list of all releases - * - * @param context A {@link Context} representing the request context. - * @return A {@link PagedIterable} of {@link PhoneNumberEntity} instances representing releases. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllReleases(Context context) { - return new PagedIterable<>(phoneNumberAsyncClient.listAllReleases(context)); - } - - /** - * Gets a reservation by ID. - * - * @param reservationId ID of the reservation - * @return A {@link PhoneNumberReservation} representing the reservation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PhoneNumberReservation getReservationById(String reservationId) { - return phoneNumberAsyncClient.getReservationById(reservationId).block(); - } - - /** - * Gets a reservation by ID. - * - * @param reservationId ID of the reservation - * @param context A {@link Context} representing the request context. - * @return A {@link Response} whose {@link Response#getValue()} value returns - * a {@link PhoneNumberReservation} representing the reservation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getReservationByIdWithResponse(String reservationId, Context context) { - return phoneNumberAsyncClient.getReservationByIdWithResponse(reservationId, context).block(); - } - - /** - * Gets the list of all reservations - * - * @return A {@link PagedIterable} of {@link PhoneNumberEntity} instances representing reservations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllReservations() { - return new PagedIterable<>(phoneNumberAsyncClient.listAllReservations()); - } - - /** - * Gets the list of all reservationes - * - * @param context A {@link Context} representing the request context. - * @return A {@link PagedIterable} of {@link PhoneNumberEntity} instances representing reservations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllReservations(Context context) { - return new PagedIterable<>(phoneNumberAsyncClient.listAllReservations(context)); - } - - /** - * Cancels the reservation. This means existing numbers in the reservation will be made available. - * - * @param reservationId ID of the reservation - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void cancelReservation(String reservationId) { - phoneNumberAsyncClient.cancelReservation(reservationId).block(); - } - - /** - * Cancels the reservation. This means existing numbers in the reservation will be made available. - * - * @param reservationId ID of the reservation - * @param context A {@link Context} representing the request context. - * @return A {@link Response} for the operation - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelReservationWithResponse(String reservationId, Context context) { - return phoneNumberAsyncClient.cancelReservationWithResponse(reservationId, context).block(); - } - - /** - * Initiates a reservation and returns a {@link PhoneNumberReservation} usable by other functions - * This function returns a Long Running Operation poller. - * - * @param options A {@link CreateReservationOptions} with the reservation options - * @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 reservation result - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginCreateReservation( - CreateReservationOptions options, Duration pollInterval) { - return phoneNumberAsyncClient.beginCreateReservation(options, pollInterval).getSyncPoller(); - } - - /** - * Initiates a purchase process and polls until a terminal state is reached - * This function returns a Long Running Operation poller - * - * @param reservationId ID of the reservation - * @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 reservation result - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginPurchaseReservation( - String reservationId, Duration pollInterval) { - return phoneNumberAsyncClient.beginPurchaseReservation(reservationId, pollInterval).getSyncPoller(); - } - - /** - * Releases the given phone numbers. - * This function returns a Long Running Operation poller - * - * @param phoneNumbers A list of {@link PhoneNumberIdentifier} 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 reservation result - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginReleasePhoneNumbers( - List phoneNumbers, Duration pollInterval) { - return phoneNumberAsyncClient.beginReleasePhoneNumbers(phoneNumbers, pollInterval).getSyncPoller(); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/PhoneNumberAdministrationsImpl.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/PhoneNumberAdministrationsImpl.java deleted file mode 100644 index 501ebdc46164..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/PhoneNumberAdministrationsImpl.java +++ /dev/null @@ -1,2824 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.implementation; - -import com.azure.communication.administration.models.AcquiredPhoneNumber; -import com.azure.communication.administration.models.AcquiredPhoneNumbers; -import com.azure.communication.administration.models.AreaCodes; -import com.azure.communication.administration.models.CreateReservationOptions; -import com.azure.communication.administration.models.CreateReservationResponse; -import com.azure.communication.administration.models.ErrorResponseException; -import com.azure.communication.administration.models.LocationOptionsQueries; -import com.azure.communication.administration.models.LocationOptionsResponse; -import com.azure.communication.administration.models.NumberConfiguration; -import com.azure.communication.administration.models.NumberConfigurationPhoneNumber; -import com.azure.communication.administration.models.NumberConfigurationResponse; -import com.azure.communication.administration.models.PhoneNumberCountries; -import com.azure.communication.administration.models.PhoneNumberCountry; -import com.azure.communication.administration.models.PhoneNumberEntities; -import com.azure.communication.administration.models.PhoneNumberEntity; -import com.azure.communication.administration.models.PhoneNumberRelease; -import com.azure.communication.administration.models.PhoneNumberReservation; -import com.azure.communication.administration.models.PhonePlan; -import com.azure.communication.administration.models.PhonePlanGroup; -import com.azure.communication.administration.models.PhonePlanGroups; -import com.azure.communication.administration.models.PhonePlansResponse; -import com.azure.communication.administration.models.ReleaseRequest; -import com.azure.communication.administration.models.ReleaseResponse; -import com.azure.communication.administration.models.UpdateNumberCapabilitiesRequest; -import com.azure.communication.administration.models.UpdateNumberCapabilitiesResponse; -import com.azure.communication.administration.models.UpdatePhoneNumberCapabilitiesResponse; -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in PhoneNumberAdministrations. */ -public final class PhoneNumberAdministrationsImpl { - /** The proxy service used to perform REST calls. */ - private final PhoneNumberAdministrationsService service; - - /** The service client containing this operation class. */ - private final PhoneNumberAdminClientImpl client; - - /** - * Initializes an instance of PhoneNumberAdministrationsImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PhoneNumberAdministrationsImpl(PhoneNumberAdminClientImpl client) { - this.service = RestProxy.create(PhoneNumberAdministrationsService.class, client.getHttpPipeline()); - this.client = client; - } - - /** - * The interface defining all the services for PhoneNumberAdminClientPhoneNumberAdministrations to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "PhoneNumberAdminClie") - private interface PhoneNumberAdministrationsService { - @Get("/administration/phonenumbers/phonenumbers") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getAllPhoneNumbers( - @HostParam("endpoint") String endpoint, - @QueryParam("locale") String locale, - @QueryParam("skip") Integer skip, - @QueryParam("take") Integer take, - @QueryParam("api-version") String apiVersion, - Context context); - - @Post("/administration/phonenumbers/countries/{countryCode}/areacodes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getAllAreaCodes( - @HostParam("endpoint") String endpoint, - @QueryParam("locationType") String locationType, - @PathParam("countryCode") String countryCode, - @QueryParam("phonePlanId") String phonePlanId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LocationOptionsQueries body, - Context context); - - @Get("/administration/phonenumbers/capabilities/{capabilitiesUpdateId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getCapabilitiesUpdate( - @HostParam("endpoint") String endpoint, - @PathParam("capabilitiesUpdateId") String capabilitiesUpdateId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Post("/administration/phonenumbers/capabilities") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> updateCapabilities( - @HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") UpdateNumberCapabilitiesRequest body, - Context context); - - @Get("/administration/phonenumbers/countries") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getAllSupportedCountries( - @HostParam("endpoint") String endpoint, - @QueryParam("locale") String locale, - @QueryParam("skip") Integer skip, - @QueryParam("take") Integer take, - @QueryParam("api-version") String apiVersion, - Context context); - - @Post("/administration/phonenumbers/numberconfiguration") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getNumberConfiguration( - @HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NumberConfigurationPhoneNumber body, - Context context); - - @Patch("/administration/phonenumbers/numberconfiguration/configure") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> configureNumber( - @HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NumberConfiguration body, - Context context); - - @Patch("/administration/phonenumbers/numberconfiguration/unconfigure") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> unconfigureNumber( - @HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NumberConfigurationPhoneNumber body, - Context context); - - @Get("/administration/phonenumbers/countries/{countryCode}/phoneplangroups") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getPhonePlanGroups( - @HostParam("endpoint") String endpoint, - @PathParam("countryCode") String countryCode, - @QueryParam("locale") String locale, - @QueryParam("includeRateInformation") Boolean includeRateInformation, - @QueryParam("skip") Integer skip, - @QueryParam("take") Integer take, - @QueryParam("api-version") String apiVersion, - Context context); - - @Get("/administration/phonenumbers/countries/{countryCode}/phoneplangroups/{phonePlanGroupId}/phoneplans") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getPhonePlans( - @HostParam("endpoint") String endpoint, - @PathParam("countryCode") String countryCode, - @PathParam("phonePlanGroupId") String phonePlanGroupId, - @QueryParam("locale") String locale, - @QueryParam("skip") Integer skip, - @QueryParam("take") Integer take, - @QueryParam("api-version") String apiVersion, - Context context); - - @Get( - "/administration/phonenumbers/countries/{countryCode}/phoneplangroups/{phonePlanGroupId}/phoneplans/{phonePlanId}/locationoptions") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getPhonePlanLocationOptions( - @HostParam("endpoint") String endpoint, - @PathParam("countryCode") String countryCode, - @PathParam("phonePlanGroupId") String phonePlanGroupId, - @PathParam("phonePlanId") String phonePlanId, - @QueryParam("locale") String locale, - @QueryParam("api-version") String apiVersion, - Context context); - - @Get("/administration/phonenumbers/releases/{releaseId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getReleaseById( - @HostParam("endpoint") String endpoint, - @PathParam("releaseId") String releaseId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Post("/administration/phonenumbers/releases") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> releasePhoneNumbers( - @HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ReleaseRequest body, - Context context); - - @Get("/administration/phonenumbers/releases") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getAllReleases( - @HostParam("endpoint") String endpoint, - @QueryParam("skip") Integer skip, - @QueryParam("take") Integer take, - @QueryParam("api-version") String apiVersion, - Context context); - - @Get("/administration/phonenumbers/searches/{searchId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getSearchById( - @HostParam("endpoint") String endpoint, - @PathParam("searchId") String searchId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Post("/administration/phonenumbers/searches") - @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> createSearch( - @HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CreateReservationOptions body, - Context context); - - @Get("/administration/phonenumbers/searches") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getAllSearches( - @HostParam("endpoint") String endpoint, - @QueryParam("skip") Integer skip, - @QueryParam("take") Integer take, - @QueryParam("api-version") String apiVersion, - Context context); - - @Post("/administration/phonenumbers/searches/{searchId}/cancel") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> cancelSearch( - @HostParam("endpoint") String endpoint, - @PathParam("searchId") String searchId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Post("/administration/phonenumbers/searches/{searchId}/purchase") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> purchaseSearch( - @HostParam("endpoint") String endpoint, - @PathParam("searchId") String searchId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getAllPhoneNumbersNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getAllSupportedCountriesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getPhonePlanGroupsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getPhonePlansNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getAllReleasesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorResponseException.class) - Mono> getAllSearchesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); - } - - /** - * Gets the list of the acquired phone numbers. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of the acquired phone numbers. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllPhoneNumbersSinglePageAsync( - String locale, Integer skip, Integer take) { - return FluxUtil.withContext( - context -> - service.getAllPhoneNumbers( - this.client.getEndpoint(), - locale, - skip, - take, - this.client.getApiVersion(), - context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhoneNumbers(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets the list of the acquired phone numbers. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of the acquired phone numbers. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllPhoneNumbersSinglePageAsync( - String locale, Integer skip, Integer take, Context context) { - return service.getAllPhoneNumbers( - this.client.getEndpoint(), locale, skip, take, this.client.getApiVersion(), context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhoneNumbers(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets the list of the acquired phone numbers. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of the acquired phone numbers. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getAllPhoneNumbersAsync(String locale, Integer skip, Integer take) { - return new PagedFlux<>( - () -> getAllPhoneNumbersSinglePageAsync(locale, skip, take), - nextLink -> getAllPhoneNumbersNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of the acquired phone numbers. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of the acquired phone numbers. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getAllPhoneNumbersAsync( - String locale, Integer skip, Integer take, Context context) { - return new PagedFlux<>( - () -> getAllPhoneNumbersSinglePageAsync(locale, skip, take, context), - nextLink -> getAllPhoneNumbersNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of the acquired phone numbers. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of the acquired phone numbers. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getAllPhoneNumbers(String locale, Integer skip, Integer take) { - return new PagedIterable<>(getAllPhoneNumbersAsync(locale, skip, take)); - } - - /** - * Gets the list of the acquired phone numbers. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of the acquired phone numbers. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getAllPhoneNumbers( - String locale, Integer skip, Integer take, Context context) { - return new PagedIterable<>(getAllPhoneNumbersAsync(locale, skip, take, context)); - } - - /** - * Gets a list of the supported area codes. - * - * @param locationType The type of location information required by the plan. - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanId The plan id from which to search area codes. - * @param body Represents a list of location option queries, used for fetching area codes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the supported area codes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllAreaCodesWithResponseAsync( - String locationType, String countryCode, String phonePlanId, LocationOptionsQueries body) { - return FluxUtil.withContext( - context -> - service.getAllAreaCodes( - this.client.getEndpoint(), - locationType, - countryCode, - phonePlanId, - this.client.getApiVersion(), - body, - context)); - } - - /** - * Gets a list of the supported area codes. - * - * @param locationType The type of location information required by the plan. - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanId The plan id from which to search area codes. - * @param body Represents a list of location option queries, used for fetching area codes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the supported area codes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllAreaCodesWithResponseAsync( - String locationType, String countryCode, String phonePlanId, LocationOptionsQueries body, Context context) { - return service.getAllAreaCodes( - this.client.getEndpoint(), - locationType, - countryCode, - phonePlanId, - this.client.getApiVersion(), - body, - context); - } - - /** - * Gets a list of the supported area codes. - * - * @param locationType The type of location information required by the plan. - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanId The plan id from which to search area codes. - * @param body Represents a list of location option queries, used for fetching area codes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the supported area codes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAllAreaCodesAsync( - String locationType, String countryCode, String phonePlanId, LocationOptionsQueries body) { - return getAllAreaCodesWithResponseAsync(locationType, countryCode, phonePlanId, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a list of the supported area codes. - * - * @param locationType The type of location information required by the plan. - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanId The plan id from which to search area codes. - * @param body Represents a list of location option queries, used for fetching area codes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the supported area codes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAllAreaCodesAsync( - String locationType, String countryCode, String phonePlanId, LocationOptionsQueries body, Context context) { - return getAllAreaCodesWithResponseAsync(locationType, countryCode, phonePlanId, body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a list of the supported area codes. - * - * @param locationType The type of location information required by the plan. - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanId The plan id from which to search area codes. - * @param body Represents a list of location option queries, used for fetching area codes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the supported area codes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AreaCodes getAllAreaCodes( - String locationType, String countryCode, String phonePlanId, LocationOptionsQueries body) { - return getAllAreaCodesAsync(locationType, countryCode, phonePlanId, body).block(); - } - - /** - * Gets a list of the supported area codes. - * - * @param locationType The type of location information required by the plan. - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanId The plan id from which to search area codes. - * @param body Represents a list of location option queries, used for fetching area codes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the supported area codes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AreaCodes getAllAreaCodes( - String locationType, String countryCode, String phonePlanId, LocationOptionsQueries body, Context context) { - return getAllAreaCodesAsync(locationType, countryCode, phonePlanId, body, context).block(); - } - - /** - * Get capabilities by capabilities update id. - * - * @param capabilitiesUpdateId The capabilitiesUpdateId parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities by capabilities update id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getCapabilitiesUpdateWithResponseAsync( - String capabilitiesUpdateId) { - return FluxUtil.withContext( - context -> - service.getCapabilitiesUpdate( - this.client.getEndpoint(), capabilitiesUpdateId, this.client.getApiVersion(), context)); - } - - /** - * Get capabilities by capabilities update id. - * - * @param capabilitiesUpdateId The capabilitiesUpdateId parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities by capabilities update id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getCapabilitiesUpdateWithResponseAsync( - String capabilitiesUpdateId, Context context) { - return service.getCapabilitiesUpdate( - this.client.getEndpoint(), capabilitiesUpdateId, this.client.getApiVersion(), context); - } - - /** - * Get capabilities by capabilities update id. - * - * @param capabilitiesUpdateId The capabilitiesUpdateId parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities by capabilities update id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getCapabilitiesUpdateAsync(String capabilitiesUpdateId) { - return getCapabilitiesUpdateWithResponseAsync(capabilitiesUpdateId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get capabilities by capabilities update id. - * - * @param capabilitiesUpdateId The capabilitiesUpdateId parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities by capabilities update id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getCapabilitiesUpdateAsync( - String capabilitiesUpdateId, Context context) { - return getCapabilitiesUpdateWithResponseAsync(capabilitiesUpdateId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get capabilities by capabilities update id. - * - * @param capabilitiesUpdateId The capabilitiesUpdateId parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities by capabilities update id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdatePhoneNumberCapabilitiesResponse getCapabilitiesUpdate(String capabilitiesUpdateId) { - return getCapabilitiesUpdateAsync(capabilitiesUpdateId).block(); - } - - /** - * Get capabilities by capabilities update id. - * - * @param capabilitiesUpdateId The capabilitiesUpdateId parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities by capabilities update id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdatePhoneNumberCapabilitiesResponse getCapabilitiesUpdate(String capabilitiesUpdateId, Context context) { - return getCapabilitiesUpdateAsync(capabilitiesUpdateId, context).block(); - } - - /** - * Adds or removes phone number capabilities. - * - * @param body Represents a numbers capabilities update request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a number capability update response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateCapabilitiesWithResponseAsync( - UpdateNumberCapabilitiesRequest body) { - return FluxUtil.withContext( - context -> - service.updateCapabilities( - this.client.getEndpoint(), this.client.getApiVersion(), body, context)); - } - - /** - * Adds or removes phone number capabilities. - * - * @param body Represents a numbers capabilities update request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a number capability update response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateCapabilitiesWithResponseAsync( - UpdateNumberCapabilitiesRequest body, Context context) { - return service.updateCapabilities(this.client.getEndpoint(), this.client.getApiVersion(), body, context); - } - - /** - * Adds or removes phone number capabilities. - * - * @param body Represents a numbers capabilities update request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a number capability update response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateCapabilitiesAsync(UpdateNumberCapabilitiesRequest body) { - return updateCapabilitiesWithResponseAsync(body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Adds or removes phone number capabilities. - * - * @param body Represents a numbers capabilities update request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a number capability update response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateCapabilitiesAsync( - UpdateNumberCapabilitiesRequest body, Context context) { - return updateCapabilitiesWithResponseAsync(body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Adds or removes phone number capabilities. - * - * @param body Represents a numbers capabilities update request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a number capability update response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateNumberCapabilitiesResponse updateCapabilities(UpdateNumberCapabilitiesRequest body) { - return updateCapabilitiesAsync(body).block(); - } - - /** - * Adds or removes phone number capabilities. - * - * @param body Represents a numbers capabilities update request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a number capability update response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateNumberCapabilitiesResponse updateCapabilities(UpdateNumberCapabilitiesRequest body, Context context) { - return updateCapabilitiesAsync(body, context).block(); - } - - /** - * Gets a list of supported countries. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported countries. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllSupportedCountriesSinglePageAsync( - String locale, Integer skip, Integer take) { - return FluxUtil.withContext( - context -> - service.getAllSupportedCountries( - this.client.getEndpoint(), - locale, - skip, - take, - this.client.getApiVersion(), - context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getCountries(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets a list of supported countries. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported countries. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllSupportedCountriesSinglePageAsync( - String locale, Integer skip, Integer take, Context context) { - return service.getAllSupportedCountries( - this.client.getEndpoint(), locale, skip, take, this.client.getApiVersion(), context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getCountries(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets a list of supported countries. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported countries. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getAllSupportedCountriesAsync(String locale, Integer skip, Integer take) { - return new PagedFlux<>( - () -> getAllSupportedCountriesSinglePageAsync(locale, skip, take), - nextLink -> getAllSupportedCountriesNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of supported countries. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported countries. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getAllSupportedCountriesAsync( - String locale, Integer skip, Integer take, Context context) { - return new PagedFlux<>( - () -> getAllSupportedCountriesSinglePageAsync(locale, skip, take, context), - nextLink -> getAllSupportedCountriesNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of supported countries. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported countries. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getAllSupportedCountries(String locale, Integer skip, Integer take) { - return new PagedIterable<>(getAllSupportedCountriesAsync(locale, skip, take)); - } - - /** - * Gets a list of supported countries. - * - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported countries. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getAllSupportedCountries( - String locale, Integer skip, Integer take, Context context) { - return new PagedIterable<>(getAllSupportedCountriesAsync(locale, skip, take, context)); - } - - /** - * Endpoint for getting number configurations. - * - * @param body The phone number wrapper representing a number configuration request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return definition for number configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getNumberConfigurationWithResponseAsync( - NumberConfigurationPhoneNumber body) { - return FluxUtil.withContext( - context -> - service.getNumberConfiguration( - this.client.getEndpoint(), this.client.getApiVersion(), body, context)); - } - - /** - * Endpoint for getting number configurations. - * - * @param body The phone number wrapper representing a number configuration request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return definition for number configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getNumberConfigurationWithResponseAsync( - NumberConfigurationPhoneNumber body, Context context) { - return service.getNumberConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), body, context); - } - - /** - * Endpoint for getting number configurations. - * - * @param body The phone number wrapper representing a number configuration request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return definition for number configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getNumberConfigurationAsync(NumberConfigurationPhoneNumber body) { - return getNumberConfigurationWithResponseAsync(body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Endpoint for getting number configurations. - * - * @param body The phone number wrapper representing a number configuration request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return definition for number configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getNumberConfigurationAsync( - NumberConfigurationPhoneNumber body, Context context) { - return getNumberConfigurationWithResponseAsync(body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Endpoint for getting number configurations. - * - * @param body The phone number wrapper representing a number configuration request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return definition for number configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NumberConfigurationResponse getNumberConfiguration(NumberConfigurationPhoneNumber body) { - return getNumberConfigurationAsync(body).block(); - } - - /** - * Endpoint for getting number configurations. - * - * @param body The phone number wrapper representing a number configuration request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return definition for number configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NumberConfigurationResponse getNumberConfiguration(NumberConfigurationPhoneNumber body, Context context) { - return getNumberConfigurationAsync(body, context).block(); - } - - /** - * Endpoint for configuring a pstn number. - * - * @param body Definition for number configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> configureNumberWithResponseAsync(NumberConfiguration body) { - return FluxUtil.withContext( - context -> - service.configureNumber(this.client.getEndpoint(), this.client.getApiVersion(), body, context)); - } - - /** - * Endpoint for configuring a pstn number. - * - * @param body Definition for number configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> configureNumberWithResponseAsync(NumberConfiguration body, Context context) { - return service.configureNumber(this.client.getEndpoint(), this.client.getApiVersion(), body, context); - } - - /** - * Endpoint for configuring a pstn number. - * - * @param body Definition for number configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono configureNumberAsync(NumberConfiguration body) { - return configureNumberWithResponseAsync(body).flatMap((Response res) -> Mono.empty()); - } - - /** - * Endpoint for configuring a pstn number. - * - * @param body Definition for number configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono configureNumberAsync(NumberConfiguration body, Context context) { - return configureNumberWithResponseAsync(body, context).flatMap((Response res) -> Mono.empty()); - } - - /** - * Endpoint for configuring a pstn number. - * - * @param body Definition for number configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void configureNumber(NumberConfiguration body) { - configureNumberAsync(body).block(); - } - - /** - * Endpoint for configuring a pstn number. - * - * @param body Definition for number configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void configureNumber(NumberConfiguration body, Context context) { - configureNumberAsync(body, context).block(); - } - - /** - * Endpoint for unconfiguring a pstn number by removing the configuration. - * - * @param body The phone number wrapper representing a number configuration request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> unconfigureNumberWithResponseAsync(NumberConfigurationPhoneNumber body) { - return FluxUtil.withContext( - context -> - service.unconfigureNumber( - this.client.getEndpoint(), this.client.getApiVersion(), body, context)); - } - - /** - * Endpoint for unconfiguring a pstn number by removing the configuration. - * - * @param body The phone number wrapper representing a number configuration request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> unconfigureNumberWithResponseAsync( - NumberConfigurationPhoneNumber body, Context context) { - return service.unconfigureNumber(this.client.getEndpoint(), this.client.getApiVersion(), body, context); - } - - /** - * Endpoint for unconfiguring a pstn number by removing the configuration. - * - * @param body The phone number wrapper representing a number configuration request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono unconfigureNumberAsync(NumberConfigurationPhoneNumber body) { - return unconfigureNumberWithResponseAsync(body).flatMap((Response res) -> Mono.empty()); - } - - /** - * Endpoint for unconfiguring a pstn number by removing the configuration. - * - * @param body The phone number wrapper representing a number configuration request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono unconfigureNumberAsync(NumberConfigurationPhoneNumber body, Context context) { - return unconfigureNumberWithResponseAsync(body, context).flatMap((Response res) -> Mono.empty()); - } - - /** - * Endpoint for unconfiguring a pstn number by removing the configuration. - * - * @param body The phone number wrapper representing a number configuration request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void unconfigureNumber(NumberConfigurationPhoneNumber body) { - unconfigureNumberAsync(body).block(); - } - - /** - * Endpoint for unconfiguring a pstn number by removing the configuration. - * - * @param body The phone number wrapper representing a number configuration request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void unconfigureNumber(NumberConfigurationPhoneNumber body, Context context) { - unconfigureNumberAsync(body, context).block(); - } - - /** - * Gets a list of phone plan groups for the given country. - * - * @param countryCode The ISO 3166-2 country code. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param includeRateInformation The includeRateInformation parameter. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plan groups for the given country. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlanGroupsSinglePageAsync( - String countryCode, String locale, Boolean includeRateInformation, Integer skip, Integer take) { - return FluxUtil.withContext( - context -> - service.getPhonePlanGroups( - this.client.getEndpoint(), - countryCode, - locale, - includeRateInformation, - skip, - take, - this.client.getApiVersion(), - context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhonePlanGroups(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets a list of phone plan groups for the given country. - * - * @param countryCode The ISO 3166-2 country code. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param includeRateInformation The includeRateInformation parameter. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plan groups for the given country. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlanGroupsSinglePageAsync( - String countryCode, - String locale, - Boolean includeRateInformation, - Integer skip, - Integer take, - Context context) { - return service.getPhonePlanGroups( - this.client.getEndpoint(), - countryCode, - locale, - includeRateInformation, - skip, - take, - this.client.getApiVersion(), - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhonePlanGroups(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets a list of phone plan groups for the given country. - * - * @param countryCode The ISO 3166-2 country code. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param includeRateInformation The includeRateInformation parameter. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plan groups for the given country. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getPhonePlanGroupsAsync( - String countryCode, String locale, Boolean includeRateInformation, Integer skip, Integer take) { - return new PagedFlux<>( - () -> getPhonePlanGroupsSinglePageAsync(countryCode, locale, includeRateInformation, skip, take), - nextLink -> getPhonePlanGroupsNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of phone plan groups for the given country. - * - * @param countryCode The ISO 3166-2 country code. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param includeRateInformation The includeRateInformation parameter. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plan groups for the given country. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getPhonePlanGroupsAsync( - String countryCode, - String locale, - Boolean includeRateInformation, - Integer skip, - Integer take, - Context context) { - return new PagedFlux<>( - () -> - getPhonePlanGroupsSinglePageAsync( - countryCode, locale, includeRateInformation, skip, take, context), - nextLink -> getPhonePlanGroupsNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of phone plan groups for the given country. - * - * @param countryCode The ISO 3166-2 country code. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param includeRateInformation The includeRateInformation parameter. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plan groups for the given country. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getPhonePlanGroups( - String countryCode, String locale, Boolean includeRateInformation, Integer skip, Integer take) { - return new PagedIterable<>(getPhonePlanGroupsAsync(countryCode, locale, includeRateInformation, skip, take)); - } - - /** - * Gets a list of phone plan groups for the given country. - * - * @param countryCode The ISO 3166-2 country code. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param includeRateInformation The includeRateInformation parameter. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plan groups for the given country. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getPhonePlanGroups( - String countryCode, - String locale, - Boolean includeRateInformation, - Integer skip, - Integer take, - Context context) { - return new PagedIterable<>( - getPhonePlanGroupsAsync(countryCode, locale, includeRateInformation, skip, take, context)); - } - - /** - * Gets a list of phone plans for a phone plan group. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plans for a phone plan group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlansSinglePageAsync( - String countryCode, String phonePlanGroupId, String locale, Integer skip, Integer take) { - return FluxUtil.withContext( - context -> - service.getPhonePlans( - this.client.getEndpoint(), - countryCode, - phonePlanGroupId, - locale, - skip, - take, - this.client.getApiVersion(), - context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhonePlans(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets a list of phone plans for a phone plan group. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plans for a phone plan group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlansSinglePageAsync( - String countryCode, String phonePlanGroupId, String locale, Integer skip, Integer take, Context context) { - return service.getPhonePlans( - this.client.getEndpoint(), - countryCode, - phonePlanGroupId, - locale, - skip, - take, - this.client.getApiVersion(), - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhonePlans(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets a list of phone plans for a phone plan group. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plans for a phone plan group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getPhonePlansAsync( - String countryCode, String phonePlanGroupId, String locale, Integer skip, Integer take) { - return new PagedFlux<>( - () -> getPhonePlansSinglePageAsync(countryCode, phonePlanGroupId, locale, skip, take), - nextLink -> getPhonePlansNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of phone plans for a phone plan group. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plans for a phone plan group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getPhonePlansAsync( - String countryCode, String phonePlanGroupId, String locale, Integer skip, Integer take, Context context) { - return new PagedFlux<>( - () -> getPhonePlansSinglePageAsync(countryCode, phonePlanGroupId, locale, skip, take, context), - nextLink -> getPhonePlansNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of phone plans for a phone plan group. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plans for a phone plan group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getPhonePlans( - String countryCode, String phonePlanGroupId, String locale, Integer skip, Integer take) { - return new PagedIterable<>(getPhonePlansAsync(countryCode, phonePlanGroupId, locale, skip, take)); - } - - /** - * Gets a list of phone plans for a phone plan group. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of phone plans for a phone plan group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getPhonePlans( - String countryCode, String phonePlanGroupId, String locale, Integer skip, Integer take, Context context) { - return new PagedIterable<>(getPhonePlansAsync(countryCode, phonePlanGroupId, locale, skip, take, context)); - } - - /** - * Gets a list of location options for a phone plan. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param phonePlanId The phonePlanId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of location options for a phone plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlanLocationOptionsWithResponseAsync( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale) { - return FluxUtil.withContext( - context -> - service.getPhonePlanLocationOptions( - this.client.getEndpoint(), - countryCode, - phonePlanGroupId, - phonePlanId, - locale, - this.client.getApiVersion(), - context)); - } - - /** - * Gets a list of location options for a phone plan. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param phonePlanId The phonePlanId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of location options for a phone plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlanLocationOptionsWithResponseAsync( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale, Context context) { - return service.getPhonePlanLocationOptions( - this.client.getEndpoint(), - countryCode, - phonePlanGroupId, - phonePlanId, - locale, - this.client.getApiVersion(), - context); - } - - /** - * Gets a list of location options for a phone plan. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param phonePlanId The phonePlanId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of location options for a phone plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPhonePlanLocationOptionsAsync( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale) { - return getPhonePlanLocationOptionsWithResponseAsync(countryCode, phonePlanGroupId, phonePlanId, locale) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a list of location options for a phone plan. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param phonePlanId The phonePlanId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of location options for a phone plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPhonePlanLocationOptionsAsync( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale, Context context) { - return getPhonePlanLocationOptionsWithResponseAsync(countryCode, phonePlanGroupId, phonePlanId, locale, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a list of location options for a phone plan. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param phonePlanId The phonePlanId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of location options for a phone plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LocationOptionsResponse getPhonePlanLocationOptions( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale) { - return getPhonePlanLocationOptionsAsync(countryCode, phonePlanGroupId, phonePlanId, locale).block(); - } - - /** - * Gets a list of location options for a phone plan. - * - * @param countryCode The ISO 3166-2 country code. - * @param phonePlanGroupId The phonePlanGroupId parameter. - * @param phonePlanId The phonePlanId parameter. - * @param locale A language-locale pairing which will be used to localize the names of countries. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of location options for a phone plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LocationOptionsResponse getPhonePlanLocationOptions( - String countryCode, String phonePlanGroupId, String phonePlanId, String locale, Context context) { - return getPhonePlanLocationOptionsAsync(countryCode, phonePlanGroupId, phonePlanId, locale, context).block(); - } - - /** - * Gets a release by a release id. - * - * @param releaseId Represents the release id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a release by a release id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getReleaseByIdWithResponseAsync(String releaseId) { - return FluxUtil.withContext( - context -> - service.getReleaseById( - this.client.getEndpoint(), releaseId, this.client.getApiVersion(), context)); - } - - /** - * Gets a release by a release id. - * - * @param releaseId Represents the release id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a release by a release id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getReleaseByIdWithResponseAsync(String releaseId, Context context) { - return service.getReleaseById(this.client.getEndpoint(), releaseId, this.client.getApiVersion(), context); - } - - /** - * Gets a release by a release id. - * - * @param releaseId Represents the release id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a release by a release id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getReleaseByIdAsync(String releaseId) { - return getReleaseByIdWithResponseAsync(releaseId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a release by a release id. - * - * @param releaseId Represents the release id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a release by a release id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getReleaseByIdAsync(String releaseId, Context context) { - return getReleaseByIdWithResponseAsync(releaseId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a release by a release id. - * - * @param releaseId Represents the release id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a release by a release id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PhoneNumberRelease getReleaseById(String releaseId) { - return getReleaseByIdAsync(releaseId).block(); - } - - /** - * Gets a release by a release id. - * - * @param releaseId Represents the release id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a release by a release id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PhoneNumberRelease getReleaseById(String releaseId, Context context) { - return getReleaseByIdAsync(releaseId, context).block(); - } - - /** - * Creates a release for the given phone numbers. - * - * @param body Represents a release request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a release response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releasePhoneNumbersWithResponseAsync(ReleaseRequest body) { - return FluxUtil.withContext( - context -> - service.releasePhoneNumbers( - this.client.getEndpoint(), this.client.getApiVersion(), body, context)); - } - - /** - * Creates a release for the given phone numbers. - * - * @param body Represents a release request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a release response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releasePhoneNumbersWithResponseAsync(ReleaseRequest body, Context context) { - return service.releasePhoneNumbers(this.client.getEndpoint(), this.client.getApiVersion(), body, context); - } - - /** - * Creates a release for the given phone numbers. - * - * @param body Represents a release request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a release response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono releasePhoneNumbersAsync(ReleaseRequest body) { - return releasePhoneNumbersWithResponseAsync(body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates a release for the given phone numbers. - * - * @param body Represents a release request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a release response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono releasePhoneNumbersAsync(ReleaseRequest body, Context context) { - return releasePhoneNumbersWithResponseAsync(body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates a release for the given phone numbers. - * - * @param body Represents a release request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a release response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReleaseResponse releasePhoneNumbers(ReleaseRequest body) { - return releasePhoneNumbersAsync(body).block(); - } - - /** - * Creates a release for the given phone numbers. - * - * @param body Represents a release request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a release response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReleaseResponse releasePhoneNumbers(ReleaseRequest body, Context context) { - return releasePhoneNumbersAsync(body, context).block(); - } - - /** - * Gets a list of all releases. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all releases. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllReleasesSinglePageAsync(Integer skip, Integer take) { - return FluxUtil.withContext( - context -> - service.getAllReleases( - this.client.getEndpoint(), skip, take, this.client.getApiVersion(), context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getEntities(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets a list of all releases. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all releases. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllReleasesSinglePageAsync( - Integer skip, Integer take, Context context) { - return service.getAllReleases(this.client.getEndpoint(), skip, take, this.client.getApiVersion(), context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getEntities(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets a list of all releases. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all releases. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getAllReleasesAsync(Integer skip, Integer take) { - return new PagedFlux<>( - () -> getAllReleasesSinglePageAsync(skip, take), - nextLink -> getAllReleasesNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of all releases. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all releases. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getAllReleasesAsync(Integer skip, Integer take, Context context) { - return new PagedFlux<>( - () -> getAllReleasesSinglePageAsync(skip, take, context), - nextLink -> getAllReleasesNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of all releases. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all releases. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getAllReleases(Integer skip, Integer take) { - return new PagedIterable<>(getAllReleasesAsync(skip, take)); - } - - /** - * Gets a list of all releases. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all releases. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getAllReleases(Integer skip, Integer take, Context context) { - return new PagedIterable<>(getAllReleasesAsync(skip, take, context)); - } - - /** - * Get search by search id. - * - * @param searchId The search id to be searched for. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return search by search id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSearchByIdWithResponseAsync(String searchId) { - return FluxUtil.withContext( - context -> - service.getSearchById( - this.client.getEndpoint(), searchId, this.client.getApiVersion(), context)); - } - - /** - * Get search by search id. - * - * @param searchId The search id to be searched for. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return search by search id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getSearchByIdWithResponseAsync(String searchId, Context context) { - return service.getSearchById(this.client.getEndpoint(), searchId, this.client.getApiVersion(), context); - } - - /** - * Get search by search id. - * - * @param searchId The search id to be searched for. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return search by search id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSearchByIdAsync(String searchId) { - return getSearchByIdWithResponseAsync(searchId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get search by search id. - * - * @param searchId The search id to be searched for. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return search by search id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getSearchByIdAsync(String searchId, Context context) { - return getSearchByIdWithResponseAsync(searchId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get search by search id. - * - * @param searchId The search id to be searched for. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return search by search id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PhoneNumberReservation getSearchById(String searchId) { - return getSearchByIdAsync(searchId).block(); - } - - /** - * Get search by search id. - * - * @param searchId The search id to be searched for. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return search by search id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PhoneNumberReservation getSearchById(String searchId, Context context) { - return getSearchByIdAsync(searchId, context).block(); - } - - /** - * Creates a phone number search. - * - * @param body Represents a search creation option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a search creation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createSearchWithResponseAsync(CreateReservationOptions body) { - return FluxUtil.withContext( - context -> service.createSearch(this.client.getEndpoint(), this.client.getApiVersion(), body, context)); - } - - /** - * Creates a phone number search. - * - * @param body Represents a search creation option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a search creation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createSearchWithResponseAsync( - CreateReservationOptions body, Context context) { - return service.createSearch(this.client.getEndpoint(), this.client.getApiVersion(), body, context); - } - - /** - * Creates a phone number search. - * - * @param body Represents a search creation option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a search creation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createSearchAsync(CreateReservationOptions body) { - return createSearchWithResponseAsync(body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates a phone number search. - * - * @param body Represents a search creation option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a search creation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createSearchAsync(CreateReservationOptions body, Context context) { - return createSearchWithResponseAsync(body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates a phone number search. - * - * @param body Represents a search creation option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a search creation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CreateReservationResponse createSearch(CreateReservationOptions body) { - return createSearchAsync(body).block(); - } - - /** - * Creates a phone number search. - * - * @param body Represents a search creation option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a search creation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CreateReservationResponse createSearch(CreateReservationOptions body, Context context) { - return createSearchAsync(body, context).block(); - } - - /** - * Gets a list of all searches. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all searches. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllSearchesSinglePageAsync(Integer skip, Integer take) { - return FluxUtil.withContext( - context -> - service.getAllSearches( - this.client.getEndpoint(), skip, take, this.client.getApiVersion(), context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getEntities(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets a list of all searches. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all searches. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllSearchesSinglePageAsync( - Integer skip, Integer take, Context context) { - return service.getAllSearches(this.client.getEndpoint(), skip, take, this.client.getApiVersion(), context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getEntities(), - res.getValue().getNextLink(), - null)); - } - - /** - * Gets a list of all searches. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all searches. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getAllSearchesAsync(Integer skip, Integer take) { - return new PagedFlux<>( - () -> getAllSearchesSinglePageAsync(skip, take), - nextLink -> getAllSearchesNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of all searches. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all searches. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux getAllSearchesAsync(Integer skip, Integer take, Context context) { - return new PagedFlux<>( - () -> getAllSearchesSinglePageAsync(skip, take, context), - nextLink -> getAllSearchesNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of all searches. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all searches. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getAllSearches(Integer skip, Integer take) { - return new PagedIterable<>(getAllSearchesAsync(skip, take)); - } - - /** - * Gets a list of all searches. - * - * @param skip An optional parameter for how many entries to skip, for pagination purposes. - * @param take An optional parameter for how many entries to return, for pagination purposes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all searches. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getAllSearches(Integer skip, Integer take, Context context) { - return new PagedIterable<>(getAllSearchesAsync(skip, take, context)); - } - - /** - * Cancels the search. This means existing numbers in the search will be made available. - * - * @param searchId The search id to be canceled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> cancelSearchWithResponseAsync(String searchId) { - return FluxUtil.withContext( - context -> - service.cancelSearch( - this.client.getEndpoint(), searchId, this.client.getApiVersion(), context)); - } - - /** - * Cancels the search. This means existing numbers in the search will be made available. - * - * @param searchId The search id to be canceled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> cancelSearchWithResponseAsync(String searchId, Context context) { - return service.cancelSearch(this.client.getEndpoint(), searchId, this.client.getApiVersion(), context); - } - - /** - * Cancels the search. This means existing numbers in the search will be made available. - * - * @param searchId The search id to be canceled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono cancelSearchAsync(String searchId) { - return cancelSearchWithResponseAsync(searchId).flatMap((Response res) -> Mono.empty()); - } - - /** - * Cancels the search. This means existing numbers in the search will be made available. - * - * @param searchId The search id to be canceled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono cancelSearchAsync(String searchId, Context context) { - return cancelSearchWithResponseAsync(searchId, context).flatMap((Response res) -> Mono.empty()); - } - - /** - * Cancels the search. This means existing numbers in the search will be made available. - * - * @param searchId The search id to be canceled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void cancelSearch(String searchId) { - cancelSearchAsync(searchId).block(); - } - - /** - * Cancels the search. This means existing numbers in the search will be made available. - * - * @param searchId The search id to be canceled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void cancelSearch(String searchId, Context context) { - cancelSearchAsync(searchId, context).block(); - } - - /** - * Purchases the phone number search. - * - * @param searchId The search id to be purchased. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> purchaseSearchWithResponseAsync(String searchId) { - return FluxUtil.withContext( - context -> - service.purchaseSearch( - this.client.getEndpoint(), searchId, this.client.getApiVersion(), context)); - } - - /** - * Purchases the phone number search. - * - * @param searchId The search id to be purchased. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> purchaseSearchWithResponseAsync(String searchId, Context context) { - return service.purchaseSearch(this.client.getEndpoint(), searchId, this.client.getApiVersion(), context); - } - - /** - * Purchases the phone number search. - * - * @param searchId The search id to be purchased. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono purchaseSearchAsync(String searchId) { - return purchaseSearchWithResponseAsync(searchId).flatMap((Response res) -> Mono.empty()); - } - - /** - * Purchases the phone number search. - * - * @param searchId The search id to be purchased. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono purchaseSearchAsync(String searchId, Context context) { - return purchaseSearchWithResponseAsync(searchId, context).flatMap((Response res) -> Mono.empty()); - } - - /** - * Purchases the phone number search. - * - * @param searchId The search id to be purchased. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void purchaseSearch(String searchId) { - purchaseSearchAsync(searchId).block(); - } - - /** - * Purchases the phone number search. - * - * @param searchId The search id to be purchased. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void purchaseSearch(String searchId, Context context) { - purchaseSearchAsync(searchId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a wrapper of list of phone numbers. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllPhoneNumbersNextSinglePageAsync(String nextLink) { - return FluxUtil.withContext(context -> service.getAllPhoneNumbersNext(nextLink, context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhoneNumbers(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a wrapper of list of phone numbers. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllPhoneNumbersNextSinglePageAsync( - String nextLink, Context context) { - return service.getAllPhoneNumbersNext(nextLink, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhoneNumbers(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a wrapper around a list of countries. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllSupportedCountriesNextSinglePageAsync(String nextLink) { - return FluxUtil.withContext(context -> service.getAllSupportedCountriesNext(nextLink, context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getCountries(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a wrapper around a list of countries. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllSupportedCountriesNextSinglePageAsync( - String nextLink, Context context) { - return service.getAllSupportedCountriesNext(nextLink, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getCountries(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a wrapper of list of plan groups. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlanGroupsNextSinglePageAsync(String nextLink) { - return FluxUtil.withContext(context -> service.getPhonePlanGroupsNext(nextLink, context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhonePlanGroups(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a wrapper of list of plan groups. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlanGroupsNextSinglePageAsync(String nextLink, Context context) { - return service.getPhonePlanGroupsNext(nextLink, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhonePlanGroups(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a wrapper around a list of countries. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlansNextSinglePageAsync(String nextLink) { - return FluxUtil.withContext(context -> service.getPhonePlansNext(nextLink, context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhonePlans(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a wrapper around a list of countries. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPhonePlansNextSinglePageAsync(String nextLink, Context context) { - return service.getPhonePlansNext(nextLink, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getPhonePlans(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of searches or releases, as part of the response when fetching all searches or - * releases. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllReleasesNextSinglePageAsync(String nextLink) { - return FluxUtil.withContext(context -> service.getAllReleasesNext(nextLink, context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getEntities(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of searches or releases, as part of the response when fetching all searches or - * releases. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllReleasesNextSinglePageAsync(String nextLink, Context context) { - return service.getAllReleasesNext(nextLink, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getEntities(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of searches or releases, as part of the response when fetching all searches or - * releases. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllSearchesNextSinglePageAsync(String nextLink) { - return FluxUtil.withContext(context -> service.getAllSearchesNext(nextLink, context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getEntities(), - res.getValue().getNextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of searches or releases, as part of the response when fetching all searches or - * releases. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAllSearchesNextSinglePageAsync(String nextLink, Context context) { - return service.getAllSearchesNext(nextLink, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getEntities(), - res.getValue().getNextLink(), - null)); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/package-info.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/package-info.java deleted file mode 100644 index f71cc823d4c3..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the implementations for PhoneNumberAdminClient. Azure Communication Phone Number Service. */ -package com.azure.communication.administration.implementation; diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AcquiredPhoneNumber.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AcquiredPhoneNumber.java deleted file mode 100644 index b82cb0d0f22e..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AcquiredPhoneNumber.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The AcquiredPhoneNumber model. */ -@Fluent -public final class AcquiredPhoneNumber { - /* - * String of the E.164 format of the phone number - */ - @JsonProperty(value = "phoneNumber", required = true) - private String phoneNumber; - - /* - * The set of all acquired capabilities of the phone number. - */ - @JsonProperty(value = "acquiredCapabilities", required = true) - private List acquiredCapabilities; - - /* - * The set of all available capabilities that can be acquired for this - * phone number. - */ - @JsonProperty(value = "availableCapabilities", required = true) - private List availableCapabilities; - - /* - * The assignment status of the phone number. Conveys what type of entity - * the number is assigned to. - */ - @JsonProperty(value = "assignmentStatus") - private AssignmentStatus assignmentStatus; - - /* - * The name of the place of the phone number. - */ - @JsonProperty(value = "placeName") - private String placeName; - - /* - * The activation state of the phone number. Can be "Activated", - * "AssignmentPending", "AssignmentFailed", "UpdatePending", "UpdateFailed" - */ - @JsonProperty(value = "activationState") - private ActivationState activationState; - - /** - * Get the phoneNumber property: String of the E.164 format of the phone number. - * - * @return the phoneNumber value. - */ - public String getPhoneNumber() { - return this.phoneNumber; - } - - /** - * Set the phoneNumber property: String of the E.164 format of the phone number. - * - * @param phoneNumber the phoneNumber value to set. - * @return the AcquiredPhoneNumber object itself. - */ - public AcquiredPhoneNumber setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - * Get the acquiredCapabilities property: The set of all acquired capabilities of the phone number. - * - * @return the acquiredCapabilities value. - */ - public List getAcquiredCapabilities() { - return this.acquiredCapabilities; - } - - /** - * Set the acquiredCapabilities property: The set of all acquired capabilities of the phone number. - * - * @param acquiredCapabilities the acquiredCapabilities value to set. - * @return the AcquiredPhoneNumber object itself. - */ - public AcquiredPhoneNumber setAcquiredCapabilities(List acquiredCapabilities) { - this.acquiredCapabilities = acquiredCapabilities; - return this; - } - - /** - * Get the availableCapabilities property: The set of all available capabilities that can be acquired for this phone - * number. - * - * @return the availableCapabilities value. - */ - public List getAvailableCapabilities() { - return this.availableCapabilities; - } - - /** - * Set the availableCapabilities property: The set of all available capabilities that can be acquired for this phone - * number. - * - * @param availableCapabilities the availableCapabilities value to set. - * @return the AcquiredPhoneNumber object itself. - */ - public AcquiredPhoneNumber setAvailableCapabilities(List availableCapabilities) { - this.availableCapabilities = availableCapabilities; - return this; - } - - /** - * Get the assignmentStatus property: The assignment status of the phone number. Conveys what type of entity the - * number is assigned to. - * - * @return the assignmentStatus value. - */ - public AssignmentStatus getAssignmentStatus() { - return this.assignmentStatus; - } - - /** - * Set the assignmentStatus property: The assignment status of the phone number. Conveys what type of entity the - * number is assigned to. - * - * @param assignmentStatus the assignmentStatus value to set. - * @return the AcquiredPhoneNumber object itself. - */ - public AcquiredPhoneNumber setAssignmentStatus(AssignmentStatus assignmentStatus) { - this.assignmentStatus = assignmentStatus; - return this; - } - - /** - * Get the placeName property: The name of the place of the phone number. - * - * @return the placeName value. - */ - public String getPlaceName() { - return this.placeName; - } - - /** - * Set the placeName property: The name of the place of the phone number. - * - * @param placeName the placeName value to set. - * @return the AcquiredPhoneNumber object itself. - */ - public AcquiredPhoneNumber setPlaceName(String placeName) { - this.placeName = placeName; - return this; - } - - /** - * Get the activationState property: The activation state of the phone number. Can be "Activated", - * "AssignmentPending", "AssignmentFailed", "UpdatePending", "UpdateFailed". - * - * @return the activationState value. - */ - public ActivationState getActivationState() { - return this.activationState; - } - - /** - * Set the activationState property: The activation state of the phone number. Can be "Activated", - * "AssignmentPending", "AssignmentFailed", "UpdatePending", "UpdateFailed". - * - * @param activationState the activationState value to set. - * @return the AcquiredPhoneNumber object itself. - */ - public AcquiredPhoneNumber setActivationState(ActivationState activationState) { - this.activationState = activationState; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ActivationState.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ActivationState.java deleted file mode 100644 index 533bdbeffddf..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ActivationState.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ActivationState. */ -public final class ActivationState extends ExpandableStringEnum { - /** Static value Activated for ActivationState. */ - public static final ActivationState ACTIVATED = fromString("Activated"); - - /** Static value AssignmentPending for ActivationState. */ - public static final ActivationState ASSIGNMENT_PENDING = fromString("AssignmentPending"); - - /** Static value AssignmentFailed for ActivationState. */ - public static final ActivationState ASSIGNMENT_FAILED = fromString("AssignmentFailed"); - - /** Static value UpdatePending for ActivationState. */ - public static final ActivationState UPDATE_PENDING = fromString("UpdatePending"); - - /** Static value UpdateFailed for ActivationState. */ - public static final ActivationState UPDATE_FAILED = fromString("UpdateFailed"); - - /** - * Creates or finds a ActivationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActivationState. - */ - @JsonCreator - public static ActivationState fromString(String name) { - return fromString(name, ActivationState.class); - } - - /** @return known ActivationState values. */ - public static Collection values() { - return values(ActivationState.class); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AreaCodes.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AreaCodes.java deleted file mode 100644 index 07a2c5a49268..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AreaCodes.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The AreaCodes model. */ -@Fluent -public final class AreaCodes { - /* - * Represents the list of primary area codes. - */ - @JsonProperty(value = "primaryAreaCodes") - private List primaryAreaCodes; - - /* - * Represents the list of secondary area codes. - */ - @JsonProperty(value = "secondaryAreaCodes") - private List secondaryAreaCodes; - - /* - * Represents the URL link to the next page - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the primaryAreaCodes property: Represents the list of primary area codes. - * - * @return the primaryAreaCodes value. - */ - public List getPrimaryAreaCodes() { - return this.primaryAreaCodes; - } - - /** - * Set the primaryAreaCodes property: Represents the list of primary area codes. - * - * @param primaryAreaCodes the primaryAreaCodes value to set. - * @return the AreaCodes object itself. - */ - public AreaCodes setPrimaryAreaCodes(List primaryAreaCodes) { - this.primaryAreaCodes = primaryAreaCodes; - return this; - } - - /** - * Get the secondaryAreaCodes property: Represents the list of secondary area codes. - * - * @return the secondaryAreaCodes value. - */ - public List getSecondaryAreaCodes() { - return this.secondaryAreaCodes; - } - - /** - * Set the secondaryAreaCodes property: Represents the list of secondary area codes. - * - * @param secondaryAreaCodes the secondaryAreaCodes value to set. - * @return the AreaCodes object itself. - */ - public AreaCodes setSecondaryAreaCodes(List secondaryAreaCodes) { - this.secondaryAreaCodes = secondaryAreaCodes; - return this; - } - - /** - * Get the nextLink property: Represents the URL link to the next page. - * - * @return the nextLink value. - */ - public String getNextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: Represents the URL link to the next page. - * - * @param nextLink the nextLink value to set. - * @return the AreaCodes object itself. - */ - public AreaCodes setNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AssignmentStatus.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AssignmentStatus.java deleted file mode 100644 index c4b7cf567a0e..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AssignmentStatus.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AssignmentStatus. */ -public final class AssignmentStatus extends ExpandableStringEnum { - /** Static value Unassigned for AssignmentStatus. */ - public static final AssignmentStatus UNASSIGNED = fromString("Unassigned"); - - /** Static value Unknown for AssignmentStatus. */ - public static final AssignmentStatus UNKNOWN = fromString("Unknown"); - - /** Static value UserAssigned for AssignmentStatus. */ - public static final AssignmentStatus USER_ASSIGNED = fromString("UserAssigned"); - - /** Static value ConferenceAssigned for AssignmentStatus. */ - public static final AssignmentStatus CONFERENCE_ASSIGNED = fromString("ConferenceAssigned"); - - /** Static value FirstPartyAppAssigned for AssignmentStatus. */ - public static final AssignmentStatus FIRST_PARTY_APP_ASSIGNED = fromString("FirstPartyAppAssigned"); - - /** Static value ThirdPartyAppAssigned for AssignmentStatus. */ - public static final AssignmentStatus THIRD_PARTY_APP_ASSIGNED = fromString("ThirdPartyAppAssigned"); - - /** - * Creates or finds a AssignmentStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding AssignmentStatus. - */ - @JsonCreator - public static AssignmentStatus fromString(String name) { - return fromString(name, AssignmentStatus.class); - } - - /** @return known AssignmentStatus values. */ - public static Collection values() { - return values(AssignmentStatus.class); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CapabilitiesUpdateStatus.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CapabilitiesUpdateStatus.java deleted file mode 100644 index b9829df4aad8..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CapabilitiesUpdateStatus.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for CapabilitiesUpdateStatus. */ -public final class CapabilitiesUpdateStatus extends ExpandableStringEnum { - /** Static value Pending for CapabilitiesUpdateStatus. */ - public static final CapabilitiesUpdateStatus PENDING = fromString("Pending"); - - /** Static value InProgress for CapabilitiesUpdateStatus. */ - public static final CapabilitiesUpdateStatus IN_PROGRESS = fromString("InProgress"); - - /** Static value Complete for CapabilitiesUpdateStatus. */ - public static final CapabilitiesUpdateStatus COMPLETE = fromString("Complete"); - - /** Static value Error for CapabilitiesUpdateStatus. */ - public static final CapabilitiesUpdateStatus ERROR = fromString("Error"); - - /** - * Creates or finds a CapabilitiesUpdateStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding CapabilitiesUpdateStatus. - */ - @JsonCreator - public static CapabilitiesUpdateStatus fromString(String name) { - return fromString(name, CapabilitiesUpdateStatus.class); - } - - /** @return known CapabilitiesUpdateStatus values. */ - public static Collection values() { - return values(CapabilitiesUpdateStatus.class); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/Capability.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/Capability.java deleted file mode 100644 index 43fcd66f8423..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/Capability.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Capability. */ -public final class Capability extends ExpandableStringEnum { - /** Static value UserAssignment for Capability. */ - public static final Capability USER_ASSIGNMENT = fromString("UserAssignment"); - - /** Static value FirstPartyVoiceAppAssignment for Capability. */ - public static final Capability FIRST_PARTY_VOICE_APP_ASSIGNMENT = fromString("FirstPartyVoiceAppAssignment"); - - /** Static value ConferenceAssignment for Capability. */ - public static final Capability CONFERENCE_ASSIGNMENT = fromString("ConferenceAssignment"); - - /** Static value P2PSmsEnabled for Capability. */ - public static final Capability P2PSMS_ENABLED = fromString("P2PSmsEnabled"); - - /** Static value Geographic for Capability. */ - public static final Capability GEOGRAPHIC = fromString("Geographic"); - - /** Static value NonGeographic for Capability. */ - public static final Capability NON_GEOGRAPHIC = fromString("NonGeographic"); - - /** Static value TollCalling for Capability. */ - public static final Capability TOLL_CALLING = fromString("TollCalling"); - - /** Static value TollFreeCalling for Capability. */ - public static final Capability TOLL_FREE_CALLING = fromString("TollFreeCalling"); - - /** Static value Premium for Capability. */ - public static final Capability PREMIUM = fromString("Premium"); - - /** Static value P2PSmsCapable for Capability. */ - public static final Capability P2PSMS_CAPABLE = fromString("P2PSmsCapable"); - - /** Static value A2PSmsCapable for Capability. */ - public static final Capability A2PSMS_CAPABLE = fromString("A2PSmsCapable"); - - /** Static value A2PSmsEnabled for Capability. */ - public static final Capability A2PSMS_ENABLED = fromString("A2PSmsEnabled"); - - /** Static value Calling for Capability. */ - public static final Capability CALLING = fromString("Calling"); - - /** Static value TollFree for Capability. */ - public static final Capability TOLL_FREE = fromString("TollFree"); - - /** Static value FirstPartyAppAssignment for Capability. */ - public static final Capability FIRST_PARTY_APP_ASSIGNMENT = fromString("FirstPartyAppAssignment"); - - /** Static value ThirdPartyAppAssignment for Capability. */ - public static final Capability THIRD_PARTY_APP_ASSIGNMENT = fromString("ThirdPartyAppAssignment"); - - /** Static value Azure for Capability. */ - public static final Capability AZURE = fromString("Azure"); - - /** Static value Office365 for Capability. */ - public static final Capability OFFICE365 = fromString("Office365"); - - /** Static value InboundCalling for Capability. */ - public static final Capability INBOUND_CALLING = fromString("InboundCalling"); - - /** Static value OutboundCalling for Capability. */ - public static final Capability OUTBOUND_CALLING = fromString("OutboundCalling"); - - /** Static value InboundA2PSms for Capability. */ - public static final Capability INBOUND_A2PSMS = fromString("InboundA2PSms"); - - /** Static value OutboundA2PSms for Capability. */ - public static final Capability OUTBOUND_A2PSMS = fromString("OutboundA2PSms"); - - /** Static value InboundP2PSms for Capability. */ - public static final Capability INBOUND_P2PSMS = fromString("InboundP2PSms"); - - /** Static value OutboundP2PSms for Capability. */ - public static final Capability OUTBOUND_P2PSMS = fromString("OutboundP2PSms"); - - /** - * Creates or finds a Capability from its string representation. - * - * @param name a name to look for. - * @return the corresponding Capability. - */ - @JsonCreator - public static Capability fromString(String name) { - return fromString(name, Capability.class); - } - - /** @return known Capability values. */ - public static Collection values() { - return values(Capability.class); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CarrierDetails.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CarrierDetails.java deleted file mode 100644 index afa3e2b753cb..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CarrierDetails.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The CarrierDetails model. */ -@Fluent -public final class CarrierDetails { - /* - * Name of carrier details - */ - @JsonProperty(value = "name") - private String name; - - /* - * Display name of carrier details - */ - @JsonProperty(value = "localizedName") - private String localizedName; - - /** - * Get the name property: Name of carrier details. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name of carrier details. - * - * @param name the name value to set. - * @return the CarrierDetails object itself. - */ - public CarrierDetails setName(String name) { - this.name = name; - return this; - } - - /** - * Get the localizedName property: Display name of carrier details. - * - * @return the localizedName value. - */ - public String getLocalizedName() { - return this.localizedName; - } - - /** - * Set the localizedName property: Display name of carrier details. - * - * @param localizedName the localizedName value to set. - * @return the CarrierDetails object itself. - */ - public CarrierDetails setLocalizedName(String localizedName) { - this.localizedName = localizedName; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CreateReservationOptions.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CreateReservationOptions.java deleted file mode 100644 index 27ddb16c2e70..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CreateReservationOptions.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The CreateReservationOptions model. */ -@Fluent -public final class CreateReservationOptions { - /* - * Display name of the search. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * Description of the search. - */ - @JsonProperty(value = "description", required = true) - private String description; - - /* - * The plan subtype ids from which to create the search. - */ - @JsonProperty(value = "phonePlanIds", required = true) - private List phonePlanIds; - - /* - * The area code from which to create the search. - */ - @JsonProperty(value = "areaCode", required = true) - private String areaCode; - - /* - * The quantity of phone numbers to request. - */ - @JsonProperty(value = "quantity") - private Integer quantity; - - /* - * The location options of the search. - */ - @JsonProperty(value = "locationOptions") - private List locationOptions; - - /** - * Get the displayName property: Display name of the search. - * - * @return the displayName value. - */ - public String getDisplayName() { - return this.displayName; - } - - /** - * Set the displayName property: Display name of the search. - * - * @param displayName the displayName value to set. - * @return the CreateReservationOptions object itself. - */ - public CreateReservationOptions setDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: Description of the search. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Description of the search. - * - * @param description the description value to set. - * @return the CreateReservationOptions object itself. - */ - public CreateReservationOptions setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the phonePlanIds property: The plan subtype ids from which to create the search. - * - * @return the phonePlanIds value. - */ - public List getPhonePlanIds() { - return this.phonePlanIds; - } - - /** - * Set the phonePlanIds property: The plan subtype ids from which to create the search. - * - * @param phonePlanIds the phonePlanIds value to set. - * @return the CreateReservationOptions object itself. - */ - public CreateReservationOptions setPhonePlanIds(List phonePlanIds) { - this.phonePlanIds = phonePlanIds; - return this; - } - - /** - * Get the areaCode property: The area code from which to create the search. - * - * @return the areaCode value. - */ - public String getAreaCode() { - return this.areaCode; - } - - /** - * Set the areaCode property: The area code from which to create the search. - * - * @param areaCode the areaCode value to set. - * @return the CreateReservationOptions object itself. - */ - public CreateReservationOptions setAreaCode(String areaCode) { - this.areaCode = areaCode; - return this; - } - - /** - * Get the quantity property: The quantity of phone numbers to request. - * - * @return the quantity value. - */ - public Integer getQuantity() { - return this.quantity; - } - - /** - * Set the quantity property: The quantity of phone numbers to request. - * - * @param quantity the quantity value to set. - * @return the CreateReservationOptions object itself. - */ - public CreateReservationOptions setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - /** - * Get the locationOptions property: The location options of the search. - * - * @return the locationOptions value. - */ - public List getLocationOptions() { - return this.locationOptions; - } - - /** - * Set the locationOptions property: The location options of the search. - * - * @param locationOptions the locationOptions value to set. - * @return the CreateReservationOptions object itself. - */ - public CreateReservationOptions setLocationOptions(List locationOptions) { - this.locationOptions = locationOptions; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CreateReservationResponse.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CreateReservationResponse.java deleted file mode 100644 index e49f696bd3ca..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CreateReservationResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The CreateReservationResponse model. */ -@Fluent -public final class CreateReservationResponse { - /* - * The search id of the search that was created. - */ - @JsonProperty(value = "searchId", required = true) - private String reservationId; - - /** - * Get the reservationId property: The search id of the search that was created. - * - * @return the reservationId value. - */ - public String getReservationId() { - return this.reservationId; - } - - /** - * Set the reservationId property: The search id of the search that was created. - * - * @param reservationId the reservationId value to set. - * @return the CreateReservationResponse object itself. - */ - public CreateReservationResponse setReservationId(String reservationId) { - this.reservationId = reservationId; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CurrencyType.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CurrencyType.java deleted file mode 100644 index cefdf7a18989..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/CurrencyType.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for CurrencyType. */ -public final class CurrencyType extends ExpandableStringEnum { - /** Static value USD for CurrencyType. */ - public static final CurrencyType USD = fromString("USD"); - - /** - * Creates or finds a CurrencyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CurrencyType. - */ - @JsonCreator - public static CurrencyType fromString(String name) { - return fromString(name, CurrencyType.class); - } - - /** @return known CurrencyType values. */ - public static Collection values() { - return values(CurrencyType.class); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ErrorBody.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ErrorBody.java deleted file mode 100644 index a229cee9d740..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ErrorBody.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ErrorBody model. */ -@Fluent -public final class ErrorBody { - /* - * The error code in the error response. - */ - @JsonProperty(value = "code") - private String code; - - /* - * The error message in the error response. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the code property: The error code in the error response. - * - * @return the code value. - */ - public String getCode() { - return this.code; - } - - /** - * Set the code property: The error code in the error response. - * - * @param code the code value to set. - * @return the ErrorBody object itself. - */ - public ErrorBody setCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message property: The error message in the error response. - * - * @return the message value. - */ - public String getMessage() { - return this.message; - } - - /** - * Set the message property: The error message in the error response. - * - * @param message the message value to set. - * @return the ErrorBody object itself. - */ - public ErrorBody setMessage(String message) { - this.message = message; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ErrorResponse.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ErrorResponse.java deleted file mode 100644 index 85c489097da1..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ErrorResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ErrorResponse model. */ -@Fluent -public final class ErrorResponse { - /* - * Represents a service error response body. - */ - @JsonProperty(value = "error") - private ErrorBody error; - - /** - * Get the error property: Represents a service error response body. - * - * @return the error value. - */ - public ErrorBody getError() { - return this.error; - } - - /** - * Set the error property: Represents a service error response body. - * - * @param error the error value to set. - * @return the ErrorResponse object itself. - */ - public ErrorResponse setError(ErrorBody error) { - this.error = error; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ErrorResponseException.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ErrorResponseException.java deleted file mode 100644 index 4cff9caa20d2..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ErrorResponseException.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.exception.HttpResponseException; -import com.azure.core.http.HttpResponse; - -/** Exception thrown for an invalid response with ErrorResponse information. */ -public final class ErrorResponseException extends HttpResponseException { - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public ErrorResponseException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorResponseException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public ErrorResponseException(String message, HttpResponse response, ErrorResponse value) { - super(message, response, value); - } - - @Override - public ErrorResponse getValue() { - return (ErrorResponse) super.getValue(); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptions.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptions.java deleted file mode 100644 index dbc78f5762f5..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptions.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The LocationOptions model. */ -@Fluent -public final class LocationOptions { - /* - * The label id of the location. - */ - @JsonProperty(value = "labelId") - private String labelId; - - /* - * The display name of the location. - */ - @JsonProperty(value = "labelName") - private String labelName; - - /* - * The underlying location option details. - */ - @JsonProperty(value = "options") - private List options; - - /** - * Get the labelId property: The label id of the location. - * - * @return the labelId value. - */ - public String getLabelId() { - return this.labelId; - } - - /** - * Set the labelId property: The label id of the location. - * - * @param labelId the labelId value to set. - * @return the LocationOptions object itself. - */ - public LocationOptions setLabelId(String labelId) { - this.labelId = labelId; - return this; - } - - /** - * Get the labelName property: The display name of the location. - * - * @return the labelName value. - */ - public String getLabelName() { - return this.labelName; - } - - /** - * Set the labelName property: The display name of the location. - * - * @param labelName the labelName value to set. - * @return the LocationOptions object itself. - */ - public LocationOptions setLabelName(String labelName) { - this.labelName = labelName; - return this; - } - - /** - * Get the options property: The underlying location option details. - * - * @return the options value. - */ - public List getOptions() { - return this.options; - } - - /** - * Set the options property: The underlying location option details. - * - * @param options the options value to set. - * @return the LocationOptions object itself. - */ - public LocationOptions setOptions(List options) { - this.options = options; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsDetails.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsDetails.java deleted file mode 100644 index 8a9ce15d8a91..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsDetails.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The LocationOptionsDetails model. */ -@Fluent -public final class LocationOptionsDetails { - /* - * The name of the location options - */ - @JsonProperty(value = "name") - private String name; - - /* - * The abbreviated name of the location options - */ - @JsonProperty(value = "value") - private String value; - - /* - * The underlying location options - */ - @JsonProperty(value = "locationOptions") - private List locationOptions; - - /** - * Get the name property: The name of the location options. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: The name of the location options. - * - * @param name the name value to set. - * @return the LocationOptionsDetails object itself. - */ - public LocationOptionsDetails setName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: The abbreviated name of the location options. - * - * @return the value value. - */ - public String getValue() { - return this.value; - } - - /** - * Set the value property: The abbreviated name of the location options. - * - * @param value the value value to set. - * @return the LocationOptionsDetails object itself. - */ - public LocationOptionsDetails setValue(String value) { - this.value = value; - return this; - } - - /** - * Get the locationOptions property: The underlying location options. - * - * @return the locationOptions value. - */ - public List getLocationOptions() { - return this.locationOptions; - } - - /** - * Set the locationOptions property: The underlying location options. - * - * @param locationOptions the locationOptions value to set. - * @return the LocationOptionsDetails object itself. - */ - public LocationOptionsDetails setLocationOptions(List locationOptions) { - this.locationOptions = locationOptions; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsQueries.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsQueries.java deleted file mode 100644 index 02d3cbb48656..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsQueries.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The LocationOptionsQueries model. */ -@Fluent -public final class LocationOptionsQueries { - /* - * Represents the underlying list of countries. - */ - @JsonProperty(value = "locationOptions") - private List locationOptions; - - /** - * Get the locationOptions property: Represents the underlying list of countries. - * - * @return the locationOptions value. - */ - public List getLocationOptions() { - return this.locationOptions; - } - - /** - * Set the locationOptions property: Represents the underlying list of countries. - * - * @param locationOptions the locationOptions value to set. - * @return the LocationOptionsQueries object itself. - */ - public LocationOptionsQueries setLocationOptions(List locationOptions) { - this.locationOptions = locationOptions; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsQuery.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsQuery.java deleted file mode 100644 index ba93c6d33e7f..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsQuery.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The LocationOptionsQuery model. */ -@Fluent -public final class LocationOptionsQuery { - /* - * Represents the location option label id, returned from the - * GetLocationOptions API. - */ - @JsonProperty(value = "labelId") - private String labelId; - - /* - * Represents the location options value, returned from the - * GetLocationOptions API. - */ - @JsonProperty(value = "optionsValue") - private String optionsValue; - - /** - * Get the labelId property: Represents the location option label id, returned from the GetLocationOptions API. - * - * @return the labelId value. - */ - public String getLabelId() { - return this.labelId; - } - - /** - * Set the labelId property: Represents the location option label id, returned from the GetLocationOptions API. - * - * @param labelId the labelId value to set. - * @return the LocationOptionsQuery object itself. - */ - public LocationOptionsQuery setLabelId(String labelId) { - this.labelId = labelId; - return this; - } - - /** - * Get the optionsValue property: Represents the location options value, returned from the GetLocationOptions API. - * - * @return the optionsValue value. - */ - public String getOptionsValue() { - return this.optionsValue; - } - - /** - * Set the optionsValue property: Represents the location options value, returned from the GetLocationOptions API. - * - * @param optionsValue the optionsValue value to set. - * @return the LocationOptionsQuery object itself. - */ - public LocationOptionsQuery setOptionsValue(String optionsValue) { - this.optionsValue = optionsValue; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsResponse.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsResponse.java deleted file mode 100644 index 18d35ee096e0..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationOptionsResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The LocationOptionsResponse model. */ -@Fluent -public final class LocationOptionsResponse { - /* - * Represents a location options. - */ - @JsonProperty(value = "locationOptions") - private LocationOptions locationOptions; - - /** - * Get the locationOptions property: Represents a location options. - * - * @return the locationOptions value. - */ - public LocationOptions getLocationOptions() { - return this.locationOptions; - } - - /** - * Set the locationOptions property: Represents a location options. - * - * @param locationOptions the locationOptions value to set. - * @return the LocationOptionsResponse object itself. - */ - public LocationOptionsResponse setLocationOptions(LocationOptions locationOptions) { - this.locationOptions = locationOptions; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationType.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationType.java deleted file mode 100644 index 5e4ef143e8a2..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/LocationType.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LocationType. */ -public final class LocationType extends ExpandableStringEnum { - /** Static value CivicAddress for LocationType. */ - public static final LocationType CIVIC_ADDRESS = fromString("CivicAddress"); - - /** Static value NotRequired for LocationType. */ - public static final LocationType NOT_REQUIRED = fromString("NotRequired"); - - /** Static value Selection for LocationType. */ - public static final LocationType SELECTION = fromString("Selection"); - - /** - * Creates or finds a LocationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding LocationType. - */ - @JsonCreator - public static LocationType fromString(String name) { - return fromString(name, LocationType.class); - } - - /** @return known LocationType values. */ - public static Collection values() { - return values(LocationType.class); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberConfiguration.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberConfiguration.java deleted file mode 100644 index a214ff5ad7d1..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberConfiguration.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The NumberConfiguration model. */ -@Fluent -public final class NumberConfiguration { - /* - * Definition for pstn number configuration - */ - @JsonProperty(value = "pstnConfiguration", required = true) - private PstnConfiguration pstnConfiguration; - - /* - * The phone number to configure - */ - @JsonProperty(value = "phoneNumber", required = true) - private String phoneNumber; - - /** - * Get the pstnConfiguration property: Definition for pstn number configuration. - * - * @return the pstnConfiguration value. - */ - public PstnConfiguration getPstnConfiguration() { - return this.pstnConfiguration; - } - - /** - * Set the pstnConfiguration property: Definition for pstn number configuration. - * - * @param pstnConfiguration the pstnConfiguration value to set. - * @return the NumberConfiguration object itself. - */ - public NumberConfiguration setPstnConfiguration(PstnConfiguration pstnConfiguration) { - this.pstnConfiguration = pstnConfiguration; - return this; - } - - /** - * Get the phoneNumber property: The phone number to configure. - * - * @return the phoneNumber value. - */ - public String getPhoneNumber() { - return this.phoneNumber; - } - - /** - * Set the phoneNumber property: The phone number to configure. - * - * @param phoneNumber the phoneNumber value to set. - * @return the NumberConfiguration object itself. - */ - public NumberConfiguration setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberConfigurationPhoneNumber.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberConfigurationPhoneNumber.java deleted file mode 100644 index a62271718e97..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberConfigurationPhoneNumber.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The NumberConfigurationPhoneNumber model. */ -@Fluent -public final class NumberConfigurationPhoneNumber { - /* - * The phone number in the E.164 format - */ - @JsonProperty(value = "phoneNumber", required = true) - private String phoneNumber; - - /** - * Get the phoneNumber property: The phone number in the E.164 format. - * - * @return the phoneNumber value. - */ - public String getPhoneNumber() { - return this.phoneNumber; - } - - /** - * Set the phoneNumber property: The phone number in the E.164 format. - * - * @param phoneNumber the phoneNumber value to set. - * @return the NumberConfigurationPhoneNumber object itself. - */ - public NumberConfigurationPhoneNumber setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberConfigurationResponse.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberConfigurationResponse.java deleted file mode 100644 index 57a4b370b8e6..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberConfigurationResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The NumberConfigurationResponse model. */ -@Fluent -public final class NumberConfigurationResponse { - /* - * Definition for pstn number configuration - */ - @JsonProperty(value = "pstnConfiguration", required = true) - private PstnConfiguration pstnConfiguration; - - /** - * Get the pstnConfiguration property: Definition for pstn number configuration. - * - * @return the pstnConfiguration value. - */ - public PstnConfiguration getPstnConfiguration() { - return this.pstnConfiguration; - } - - /** - * Set the pstnConfiguration property: Definition for pstn number configuration. - * - * @param pstnConfiguration the pstnConfiguration value to set. - * @return the NumberConfigurationResponse object itself. - */ - public NumberConfigurationResponse setPstnConfiguration(PstnConfiguration pstnConfiguration) { - this.pstnConfiguration = pstnConfiguration; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberUpdateCapabilities.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberUpdateCapabilities.java deleted file mode 100644 index 48ef2683c883..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/NumberUpdateCapabilities.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The NumberUpdateCapabilities model. */ -@Fluent -public final class NumberUpdateCapabilities { - /* - * Capabilities to be added to a phone number - */ - @JsonProperty(value = "add") - private List add; - - /* - * Capabilities to be removed from a phone number - */ - @JsonProperty(value = "remove") - private List remove; - - /** - * Get the add property: Capabilities to be added to a phone number. - * - * @return the add value. - */ - public List getAdd() { - return this.add; - } - - /** - * Set the add property: Capabilities to be added to a phone number. - * - * @param add the add value to set. - * @return the NumberUpdateCapabilities object itself. - */ - public NumberUpdateCapabilities setAdd(List add) { - this.add = add; - return this; - } - - /** - * Get the remove property: Capabilities to be removed from a phone number. - * - * @return the remove value. - */ - public List getRemove() { - return this.remove; - } - - /** - * Set the remove property: Capabilities to be removed from a phone number. - * - * @param remove the remove value to set. - * @return the NumberUpdateCapabilities object itself. - */ - public NumberUpdateCapabilities setRemove(List remove) { - this.remove = remove; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberCountries.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberCountries.java deleted file mode 100644 index f08a194045e3..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberCountries.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The PhoneNumberCountries model. */ -@Fluent -public final class PhoneNumberCountries { - /* - * Represents the underlying list of countries. - */ - @JsonProperty(value = "countries") - private List countries; - - /* - * Represents the URL link to the next page - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the countries property: Represents the underlying list of countries. - * - * @return the countries value. - */ - public List getCountries() { - return this.countries; - } - - /** - * Set the countries property: Represents the underlying list of countries. - * - * @param countries the countries value to set. - * @return the PhoneNumberCountries object itself. - */ - public PhoneNumberCountries setCountries(List countries) { - this.countries = countries; - return this; - } - - /** - * Get the nextLink property: Represents the URL link to the next page. - * - * @return the nextLink value. - */ - public String getNextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: Represents the URL link to the next page. - * - * @param nextLink the nextLink value to set. - * @return the PhoneNumberCountries object itself. - */ - public PhoneNumberCountries setNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberCountry.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberCountry.java deleted file mode 100644 index 6306b338624d..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberCountry.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The PhoneNumberCountry model. */ -@Fluent -public final class PhoneNumberCountry { - /* - * Represents the name of the country. - */ - @JsonProperty(value = "localizedName", required = true) - private String localizedName; - - /* - * Represents the abbreviated name of the country. - */ - @JsonProperty(value = "countryCode", required = true) - private String countryCode; - - /** - * Get the localizedName property: Represents the name of the country. - * - * @return the localizedName value. - */ - public String getLocalizedName() { - return this.localizedName; - } - - /** - * Set the localizedName property: Represents the name of the country. - * - * @param localizedName the localizedName value to set. - * @return the PhoneNumberCountry object itself. - */ - public PhoneNumberCountry setLocalizedName(String localizedName) { - this.localizedName = localizedName; - return this; - } - - /** - * Get the countryCode property: Represents the abbreviated name of the country. - * - * @return the countryCode value. - */ - public String getCountryCode() { - return this.countryCode; - } - - /** - * Set the countryCode property: Represents the abbreviated name of the country. - * - * @param countryCode the countryCode value to set. - * @return the PhoneNumberCountry object itself. - */ - public PhoneNumberCountry setCountryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberEntities.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberEntities.java deleted file mode 100644 index 08cbb112b1f6..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberEntities.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The PhoneNumberEntities model. */ -@Fluent -public final class PhoneNumberEntities { - /* - * The underlying list of entities. - */ - @JsonProperty(value = "entities") - private List entities; - - /* - * Represents the URL link to the next page - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the entities property: The underlying list of entities. - * - * @return the entities value. - */ - public List getEntities() { - return this.entities; - } - - /** - * Set the entities property: The underlying list of entities. - * - * @param entities the entities value to set. - * @return the PhoneNumberEntities object itself. - */ - public PhoneNumberEntities setEntities(List entities) { - this.entities = entities; - return this; - } - - /** - * Get the nextLink property: Represents the URL link to the next page. - * - * @return the nextLink value. - */ - public String getNextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: Represents the URL link to the next page. - * - * @param nextLink the nextLink value to set. - * @return the PhoneNumberEntities object itself. - */ - public PhoneNumberEntities setNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberEntity.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberEntity.java deleted file mode 100644 index ce82892bec20..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberEntity.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The PhoneNumberEntity model. */ -@Fluent -public final class PhoneNumberEntity { - /* - * The id of the entity. It is the search id of a search. It is the release - * id of a release. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Date and time the entity is created. - */ - @JsonProperty(value = "createdAt") - private OffsetDateTime createdAt; - - /* - * Name of the entity. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Quantity of requested phone numbers in the entity. - */ - @JsonProperty(value = "quantity") - private Integer quantity; - - /* - * Quantity of acquired phone numbers in the entity. - */ - @JsonProperty(value = "quantityObtained") - private Integer quantityObtained; - - /* - * Status of the entity. - */ - @JsonProperty(value = "status") - private String status; - - /* - * The Firm Order Confirmation date of the phone number entity. - */ - @JsonProperty(value = "focDate") - private OffsetDateTime focDate; - - /** - * Get the id property: The id of the entity. It is the search id of a search. It is the release id of a release. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: The id of the entity. It is the search id of a search. It is the release id of a release. - * - * @param id the id value to set. - * @return the PhoneNumberEntity object itself. - */ - public PhoneNumberEntity setId(String id) { - this.id = id; - return this; - } - - /** - * Get the createdAt property: Date and time the entity is created. - * - * @return the createdAt value. - */ - public OffsetDateTime getCreatedAt() { - return this.createdAt; - } - - /** - * Set the createdAt property: Date and time the entity is created. - * - * @param createdAt the createdAt value to set. - * @return the PhoneNumberEntity object itself. - */ - public PhoneNumberEntity setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get the displayName property: Name of the entity. - * - * @return the displayName value. - */ - public String getDisplayName() { - return this.displayName; - } - - /** - * Set the displayName property: Name of the entity. - * - * @param displayName the displayName value to set. - * @return the PhoneNumberEntity object itself. - */ - public PhoneNumberEntity setDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the quantity property: Quantity of requested phone numbers in the entity. - * - * @return the quantity value. - */ - public Integer getQuantity() { - return this.quantity; - } - - /** - * Set the quantity property: Quantity of requested phone numbers in the entity. - * - * @param quantity the quantity value to set. - * @return the PhoneNumberEntity object itself. - */ - public PhoneNumberEntity setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - /** - * Get the quantityObtained property: Quantity of acquired phone numbers in the entity. - * - * @return the quantityObtained value. - */ - public Integer getQuantityObtained() { - return this.quantityObtained; - } - - /** - * Set the quantityObtained property: Quantity of acquired phone numbers in the entity. - * - * @param quantityObtained the quantityObtained value to set. - * @return the PhoneNumberEntity object itself. - */ - public PhoneNumberEntity setQuantityObtained(Integer quantityObtained) { - this.quantityObtained = quantityObtained; - return this; - } - - /** - * Get the status property: Status of the entity. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the entity. - * - * @param status the status value to set. - * @return the PhoneNumberEntity object itself. - */ - public PhoneNumberEntity setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the focDate property: The Firm Order Confirmation date of the phone number entity. - * - * @return the focDate value. - */ - public OffsetDateTime getFocDate() { - return this.focDate; - } - - /** - * Set the focDate property: The Firm Order Confirmation date of the phone number entity. - * - * @param focDate the focDate value to set. - * @return the PhoneNumberEntity object itself. - */ - public PhoneNumberEntity setFocDate(OffsetDateTime focDate) { - this.focDate = focDate; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberRelease.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberRelease.java deleted file mode 100644 index 7e63ad267cf7..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberRelease.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** The PhoneNumberRelease model. */ -@Fluent -public final class PhoneNumberRelease { - /* - * The id of the release. - */ - @JsonProperty(value = "releaseId") - private String releaseId; - - /* - * The creation time of the release. - */ - @JsonProperty(value = "createdAt") - private OffsetDateTime createdAt; - - /* - * The release status. - */ - @JsonProperty(value = "status") - private ReleaseStatus status; - - /* - * The underlying error message of a release. - */ - @JsonProperty(value = "errorMessage") - private String errorMessage; - - /* - * The list of phone numbers in the release, mapped to its individual - * statuses. - */ - @JsonProperty(value = "phoneNumberReleaseStatusDetails") - private Map phoneNumberReleaseStatusDetails; - - /** - * Get the releaseId property: The id of the release. - * - * @return the releaseId value. - */ - public String getReleaseId() { - return this.releaseId; - } - - /** - * Set the releaseId property: The id of the release. - * - * @param releaseId the releaseId value to set. - * @return the PhoneNumberRelease object itself. - */ - public PhoneNumberRelease setReleaseId(String releaseId) { - this.releaseId = releaseId; - return this; - } - - /** - * Get the createdAt property: The creation time of the release. - * - * @return the createdAt value. - */ - public OffsetDateTime getCreatedAt() { - return this.createdAt; - } - - /** - * Set the createdAt property: The creation time of the release. - * - * @param createdAt the createdAt value to set. - * @return the PhoneNumberRelease object itself. - */ - public PhoneNumberRelease setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get the status property: The release status. - * - * @return the status value. - */ - public ReleaseStatus getStatus() { - return this.status; - } - - /** - * Set the status property: The release status. - * - * @param status the status value to set. - * @return the PhoneNumberRelease object itself. - */ - public PhoneNumberRelease setStatus(ReleaseStatus status) { - this.status = status; - return this; - } - - /** - * Get the errorMessage property: The underlying error message of a release. - * - * @return the errorMessage value. - */ - public String getErrorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: The underlying error message of a release. - * - * @param errorMessage the errorMessage value to set. - * @return the PhoneNumberRelease object itself. - */ - public PhoneNumberRelease setErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - /** - * Get the phoneNumberReleaseStatusDetails property: The list of phone numbers in the release, mapped to its - * individual statuses. - * - * @return the phoneNumberReleaseStatusDetails value. - */ - public Map getPhoneNumberReleaseStatusDetails() { - return this.phoneNumberReleaseStatusDetails; - } - - /** - * Set the phoneNumberReleaseStatusDetails property: The list of phone numbers in the release, mapped to its - * individual statuses. - * - * @param phoneNumberReleaseStatusDetails the phoneNumberReleaseStatusDetails value to set. - * @return the PhoneNumberRelease object itself. - */ - public PhoneNumberRelease setPhoneNumberReleaseStatusDetails( - Map phoneNumberReleaseStatusDetails) { - this.phoneNumberReleaseStatusDetails = phoneNumberReleaseStatusDetails; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberReleaseDetails.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberReleaseDetails.java deleted file mode 100644 index dad53e32db90..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberReleaseDetails.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The PhoneNumberReleaseDetails model. */ -@Fluent -public final class PhoneNumberReleaseDetails { - /* - * The release status of a phone number. - */ - @JsonProperty(value = "status") - private PhoneNumberReleaseStatus status; - - /* - * The error code in the case the status is error. - */ - @JsonProperty(value = "errorCode") - private Integer errorCode; - - /** - * Get the status property: The release status of a phone number. - * - * @return the status value. - */ - public PhoneNumberReleaseStatus getStatus() { - return this.status; - } - - /** - * Set the status property: The release status of a phone number. - * - * @param status the status value to set. - * @return the PhoneNumberReleaseDetails object itself. - */ - public PhoneNumberReleaseDetails setStatus(PhoneNumberReleaseStatus status) { - this.status = status; - return this; - } - - /** - * Get the errorCode property: The error code in the case the status is error. - * - * @return the errorCode value. - */ - public Integer getErrorCode() { - return this.errorCode; - } - - /** - * Set the errorCode property: The error code in the case the status is error. - * - * @param errorCode the errorCode value to set. - * @return the PhoneNumberReleaseDetails object itself. - */ - public PhoneNumberReleaseDetails setErrorCode(Integer errorCode) { - this.errorCode = errorCode; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberReleaseStatus.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberReleaseStatus.java deleted file mode 100644 index a06a27bf32ec..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberReleaseStatus.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PhoneNumberReleaseStatus. */ -public final class PhoneNumberReleaseStatus extends ExpandableStringEnum { - /** Static value Pending for PhoneNumberReleaseStatus. */ - public static final PhoneNumberReleaseStatus PENDING = fromString("Pending"); - - /** Static value Success for PhoneNumberReleaseStatus. */ - public static final PhoneNumberReleaseStatus SUCCESS = fromString("Success"); - - /** Static value Error for PhoneNumberReleaseStatus. */ - public static final PhoneNumberReleaseStatus ERROR = fromString("Error"); - - /** Static value InProgress for PhoneNumberReleaseStatus. */ - public static final PhoneNumberReleaseStatus IN_PROGRESS = fromString("InProgress"); - - /** - * Creates or finds a PhoneNumberReleaseStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PhoneNumberReleaseStatus. - */ - @JsonCreator - public static PhoneNumberReleaseStatus fromString(String name) { - return fromString(name, PhoneNumberReleaseStatus.class); - } - - /** @return known PhoneNumberReleaseStatus values. */ - public static Collection values() { - return values(PhoneNumberReleaseStatus.class); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberReservation.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberReservation.java deleted file mode 100644 index 2f0e5bf045e1..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberReservation.java +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** The PhoneNumberReservation model. */ -@Fluent -public final class PhoneNumberReservation { - /* - * The id of the search. - */ - @JsonProperty(value = "searchId") - private String reservationId; - - /* - * The name of the search. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The creation time of the search. - */ - @JsonProperty(value = "createdAt") - private OffsetDateTime createdAt; - - /* - * The description of the search. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The phone plan ids of the search. - */ - @JsonProperty(value = "phonePlanIds") - private List phonePlanIds; - - /* - * The area code of the search. - */ - @JsonProperty(value = "areaCode") - private String areaCode; - - /* - * The quantity of phone numbers in the search. - */ - @JsonProperty(value = "quantity") - private Integer quantity; - - /* - * The location options of the search. - */ - @JsonProperty(value = "locationOptions") - private List locationOptions; - - /* - * The status of the search. - */ - @JsonProperty(value = "status") - private SearchStatus status; - - /* - * The list of phone numbers in the search, in the case the status is - * reserved or success. - */ - @JsonProperty(value = "phoneNumbers") - private List phoneNumbers; - - /* - * The date that search expires and the numbers become available. - */ - @JsonProperty(value = "reservationExpiryDate") - private OffsetDateTime reservationExpiryDate; - - /* - * The error code of the search. - */ - @JsonProperty(value = "errorCode") - private Integer errorCode; - - /** - * Get the reservationId property: The id of the search. - * - * @return the reservationId value. - */ - public String getReservationId() { - return this.reservationId; - } - - /** - * Set the reservationId property: The id of the search. - * - * @param reservationId the reservationId value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setReservationId(String reservationId) { - this.reservationId = reservationId; - return this; - } - - /** - * Get the displayName property: The name of the search. - * - * @return the displayName value. - */ - public String getDisplayName() { - return this.displayName; - } - - /** - * Set the displayName property: The name of the search. - * - * @param displayName the displayName value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the createdAt property: The creation time of the search. - * - * @return the createdAt value. - */ - public OffsetDateTime getCreatedAt() { - return this.createdAt; - } - - /** - * Set the createdAt property: The creation time of the search. - * - * @param createdAt the createdAt value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get the description property: The description of the search. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: The description of the search. - * - * @param description the description value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the phonePlanIds property: The phone plan ids of the search. - * - * @return the phonePlanIds value. - */ - public List getPhonePlanIds() { - return this.phonePlanIds; - } - - /** - * Set the phonePlanIds property: The phone plan ids of the search. - * - * @param phonePlanIds the phonePlanIds value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setPhonePlanIds(List phonePlanIds) { - this.phonePlanIds = phonePlanIds; - return this; - } - - /** - * Get the areaCode property: The area code of the search. - * - * @return the areaCode value. - */ - public String getAreaCode() { - return this.areaCode; - } - - /** - * Set the areaCode property: The area code of the search. - * - * @param areaCode the areaCode value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setAreaCode(String areaCode) { - this.areaCode = areaCode; - return this; - } - - /** - * Get the quantity property: The quantity of phone numbers in the search. - * - * @return the quantity value. - */ - public Integer getQuantity() { - return this.quantity; - } - - /** - * Set the quantity property: The quantity of phone numbers in the search. - * - * @param quantity the quantity value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - /** - * Get the locationOptions property: The location options of the search. - * - * @return the locationOptions value. - */ - public List getLocationOptions() { - return this.locationOptions; - } - - /** - * Set the locationOptions property: The location options of the search. - * - * @param locationOptions the locationOptions value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setLocationOptions(List locationOptions) { - this.locationOptions = locationOptions; - return this; - } - - /** - * Get the status property: The status of the search. - * - * @return the status value. - */ - public SearchStatus getStatus() { - return this.status; - } - - /** - * Set the status property: The status of the search. - * - * @param status the status value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setStatus(SearchStatus status) { - this.status = status; - return this; - } - - /** - * Get the phoneNumbers property: The list of phone numbers in the search, in the case the status is reserved or - * success. - * - * @return the phoneNumbers value. - */ - public List getPhoneNumbers() { - return this.phoneNumbers; - } - - /** - * Set the phoneNumbers property: The list of phone numbers in the search, in the case the status is reserved or - * success. - * - * @param phoneNumbers the phoneNumbers value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setPhoneNumbers(List phoneNumbers) { - this.phoneNumbers = phoneNumbers; - return this; - } - - /** - * Get the reservationExpiryDate property: The date that search expires and the numbers become available. - * - * @return the reservationExpiryDate value. - */ - public OffsetDateTime getReservationExpiryDate() { - return this.reservationExpiryDate; - } - - /** - * Set the reservationExpiryDate property: The date that search expires and the numbers become available. - * - * @param reservationExpiryDate the reservationExpiryDate value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setReservationExpiryDate(OffsetDateTime reservationExpiryDate) { - this.reservationExpiryDate = reservationExpiryDate; - return this; - } - - /** - * Get the errorCode property: The error code of the search. - * - * @return the errorCode value. - */ - public Integer getErrorCode() { - return this.errorCode; - } - - /** - * Set the errorCode property: The error code of the search. - * - * @param errorCode the errorCode value to set. - * @return the PhoneNumberReservation object itself. - */ - public PhoneNumberReservation setErrorCode(Integer errorCode) { - this.errorCode = errorCode; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlan.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlan.java deleted file mode 100644 index 1918bffaba1c..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlan.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The PhonePlan model. */ -@Fluent -public final class PhonePlan { - /* - * The phone plan id - */ - @JsonProperty(value = "phonePlanId", required = true) - private String phonePlanId; - - /* - * The name of the phone plan - */ - @JsonProperty(value = "localizedName", required = true) - private String localizedName; - - /* - * The location type of the phone plan. - */ - @JsonProperty(value = "locationType", required = true) - private LocationType locationType; - - /* - * The list of available area codes in the phone plan. - */ - @JsonProperty(value = "areaCodes") - private List areaCodes; - - /* - * Capabilities of the phone plan. - */ - @JsonProperty(value = "capabilities") - private List capabilities; - - /* - * The maximum number of phone numbers one can acquire in a search in this - * phone plan. - */ - @JsonProperty(value = "maximumSearchSize") - private Integer maximumSearchSize; - - /** - * Get the phonePlanId property: The phone plan id. - * - * @return the phonePlanId value. - */ - public String getPhonePlanId() { - return this.phonePlanId; - } - - /** - * Set the phonePlanId property: The phone plan id. - * - * @param phonePlanId the phonePlanId value to set. - * @return the PhonePlan object itself. - */ - public PhonePlan setPhonePlanId(String phonePlanId) { - this.phonePlanId = phonePlanId; - return this; - } - - /** - * Get the localizedName property: The name of the phone plan. - * - * @return the localizedName value. - */ - public String getLocalizedName() { - return this.localizedName; - } - - /** - * Set the localizedName property: The name of the phone plan. - * - * @param localizedName the localizedName value to set. - * @return the PhonePlan object itself. - */ - public PhonePlan setLocalizedName(String localizedName) { - this.localizedName = localizedName; - return this; - } - - /** - * Get the locationType property: The location type of the phone plan. - * - * @return the locationType value. - */ - public LocationType getLocationType() { - return this.locationType; - } - - /** - * Set the locationType property: The location type of the phone plan. - * - * @param locationType the locationType value to set. - * @return the PhonePlan object itself. - */ - public PhonePlan setLocationType(LocationType locationType) { - this.locationType = locationType; - return this; - } - - /** - * Get the areaCodes property: The list of available area codes in the phone plan. - * - * @return the areaCodes value. - */ - public List getAreaCodes() { - return this.areaCodes; - } - - /** - * Set the areaCodes property: The list of available area codes in the phone plan. - * - * @param areaCodes the areaCodes value to set. - * @return the PhonePlan object itself. - */ - public PhonePlan setAreaCodes(List areaCodes) { - this.areaCodes = areaCodes; - return this; - } - - /** - * Get the capabilities property: Capabilities of the phone plan. - * - * @return the capabilities value. - */ - public List getCapabilities() { - return this.capabilities; - } - - /** - * Set the capabilities property: Capabilities of the phone plan. - * - * @param capabilities the capabilities value to set. - * @return the PhonePlan object itself. - */ - public PhonePlan setCapabilities(List capabilities) { - this.capabilities = capabilities; - return this; - } - - /** - * Get the maximumSearchSize property: The maximum number of phone numbers one can acquire in a search in this phone - * plan. - * - * @return the maximumSearchSize value. - */ - public Integer getMaximumSearchSize() { - return this.maximumSearchSize; - } - - /** - * Set the maximumSearchSize property: The maximum number of phone numbers one can acquire in a search in this phone - * plan. - * - * @param maximumSearchSize the maximumSearchSize value to set. - * @return the PhonePlan object itself. - */ - public PhonePlan setMaximumSearchSize(Integer maximumSearchSize) { - this.maximumSearchSize = maximumSearchSize; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlanGroup.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlanGroup.java deleted file mode 100644 index 1fc16d36ed2e..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlanGroup.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The PhonePlanGroup model. */ -@Fluent -public final class PhonePlanGroup { - /* - * The id of the plan group - */ - @JsonProperty(value = "phonePlanGroupId", required = true) - private String phonePlanGroupId; - - /* - * The phone number type of the plan group - */ - @JsonProperty(value = "phoneNumberType") - private PhoneNumberType phoneNumberType; - - /* - * The name of the plan group. - */ - @JsonProperty(value = "localizedName", required = true) - private String localizedName; - - /* - * The description of the plan group. - */ - @JsonProperty(value = "localizedDescription", required = true) - private String localizedDescription; - - /* - * Represents carrier details. - */ - @JsonProperty(value = "carrierDetails") - private CarrierDetails carrierDetails; - - /* - * Represents a wrapper of rate information - */ - @JsonProperty(value = "rateInformation") - private RateInformation rateInformation; - - /** - * Get the phonePlanGroupId property: The id of the plan group. - * - * @return the phonePlanGroupId value. - */ - public String getPhonePlanGroupId() { - return this.phonePlanGroupId; - } - - /** - * Set the phonePlanGroupId property: The id of the plan group. - * - * @param phonePlanGroupId the phonePlanGroupId value to set. - * @return the PhonePlanGroup object itself. - */ - public PhonePlanGroup setPhonePlanGroupId(String phonePlanGroupId) { - this.phonePlanGroupId = phonePlanGroupId; - return this; - } - - /** - * Get the phoneNumberType property: The phone number type of the plan group. - * - * @return the phoneNumberType value. - */ - public PhoneNumberType getPhoneNumberType() { - return this.phoneNumberType; - } - - /** - * Set the phoneNumberType property: The phone number type of the plan group. - * - * @param phoneNumberType the phoneNumberType value to set. - * @return the PhonePlanGroup object itself. - */ - public PhonePlanGroup setPhoneNumberType(PhoneNumberType phoneNumberType) { - this.phoneNumberType = phoneNumberType; - return this; - } - - /** - * Get the localizedName property: The name of the plan group. - * - * @return the localizedName value. - */ - public String getLocalizedName() { - return this.localizedName; - } - - /** - * Set the localizedName property: The name of the plan group. - * - * @param localizedName the localizedName value to set. - * @return the PhonePlanGroup object itself. - */ - public PhonePlanGroup setLocalizedName(String localizedName) { - this.localizedName = localizedName; - return this; - } - - /** - * Get the localizedDescription property: The description of the plan group. - * - * @return the localizedDescription value. - */ - public String getLocalizedDescription() { - return this.localizedDescription; - } - - /** - * Set the localizedDescription property: The description of the plan group. - * - * @param localizedDescription the localizedDescription value to set. - * @return the PhonePlanGroup object itself. - */ - public PhonePlanGroup setLocalizedDescription(String localizedDescription) { - this.localizedDescription = localizedDescription; - return this; - } - - /** - * Get the carrierDetails property: Represents carrier details. - * - * @return the carrierDetails value. - */ - public CarrierDetails getCarrierDetails() { - return this.carrierDetails; - } - - /** - * Set the carrierDetails property: Represents carrier details. - * - * @param carrierDetails the carrierDetails value to set. - * @return the PhonePlanGroup object itself. - */ - public PhonePlanGroup setCarrierDetails(CarrierDetails carrierDetails) { - this.carrierDetails = carrierDetails; - return this; - } - - /** - * Get the rateInformation property: Represents a wrapper of rate information. - * - * @return the rateInformation value. - */ - public RateInformation getRateInformation() { - return this.rateInformation; - } - - /** - * Set the rateInformation property: Represents a wrapper of rate information. - * - * @param rateInformation the rateInformation value to set. - * @return the PhonePlanGroup object itself. - */ - public PhonePlanGroup setRateInformation(RateInformation rateInformation) { - this.rateInformation = rateInformation; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlanGroups.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlanGroups.java deleted file mode 100644 index 832702aee3a7..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlanGroups.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The PhonePlanGroups model. */ -@Fluent -public final class PhonePlanGroups { - /* - * The underlying list of phone plan groups. - */ - @JsonProperty(value = "phonePlanGroups") - private List phonePlanGroups; - - /* - * Represents the URL link to the next page - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the phonePlanGroups property: The underlying list of phone plan groups. - * - * @return the phonePlanGroups value. - */ - public List getPhonePlanGroups() { - return this.phonePlanGroups; - } - - /** - * Set the phonePlanGroups property: The underlying list of phone plan groups. - * - * @param phonePlanGroups the phonePlanGroups value to set. - * @return the PhonePlanGroups object itself. - */ - public PhonePlanGroups setPhonePlanGroups(List phonePlanGroups) { - this.phonePlanGroups = phonePlanGroups; - return this; - } - - /** - * Get the nextLink property: Represents the URL link to the next page. - * - * @return the nextLink value. - */ - public String getNextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: Represents the URL link to the next page. - * - * @param nextLink the nextLink value to set. - * @return the PhonePlanGroups object itself. - */ - public PhonePlanGroups setNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlansResponse.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlansResponse.java deleted file mode 100644 index 382518af6485..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhonePlansResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The PhonePlansResponse model. */ -@Fluent -public final class PhonePlansResponse { - /* - * Represents the underlying list of phone plans. - */ - @JsonProperty(value = "phonePlans") - private List phonePlans; - - /* - * Represents the URL link to the next page - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the phonePlans property: Represents the underlying list of phone plans. - * - * @return the phonePlans value. - */ - public List getPhonePlans() { - return this.phonePlans; - } - - /** - * Set the phonePlans property: Represents the underlying list of phone plans. - * - * @param phonePlans the phonePlans value to set. - * @return the PhonePlansResponse object itself. - */ - public PhonePlansResponse setPhonePlans(List phonePlans) { - this.phonePlans = phonePlans; - return this; - } - - /** - * Get the nextLink property: Represents the URL link to the next page. - * - * @return the nextLink value. - */ - public String getNextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: Represents the URL link to the next page. - * - * @param nextLink the nextLink value to set. - * @return the PhonePlansResponse object itself. - */ - public PhonePlansResponse setNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PstnConfiguration.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PstnConfiguration.java deleted file mode 100644 index 5911e69cbb9d..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PstnConfiguration.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The PstnConfiguration model. */ -@Fluent -public final class PstnConfiguration { - /* - * The webhook URL on the phone number configuration. - */ - @JsonProperty(value = "callbackUrl", required = true) - private String callbackUrl; - - /* - * The application id of the application to which to configure - */ - @JsonProperty(value = "applicationId") - private String applicationId; - - /** - * Get the callbackUrl property: The webhook URL on the phone number configuration. - * - * @return the callbackUrl value. - */ - public String getCallbackUrl() { - return this.callbackUrl; - } - - /** - * Set the callbackUrl property: The webhook URL on the phone number configuration. - * - * @param callbackUrl the callbackUrl value to set. - * @return the PstnConfiguration object itself. - */ - public PstnConfiguration setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - return this; - } - - /** - * Get the applicationId property: The application id of the application to which to configure. - * - * @return the applicationId value. - */ - public String getApplicationId() { - return this.applicationId; - } - - /** - * Set the applicationId property: The application id of the application to which to configure. - * - * @param applicationId the applicationId value to set. - * @return the PstnConfiguration object itself. - */ - public PstnConfiguration setApplicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/RateInformation.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/RateInformation.java deleted file mode 100644 index 7c11e571b156..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/RateInformation.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The RateInformation model. */ -@Fluent -public final class RateInformation { - /* - * The monthly rate of a phone plan group - */ - @JsonProperty(value = "monthlyRate") - private Double monthlyRate; - - /* - * The currency of a phone plan group - */ - @JsonProperty(value = "currencyType") - private CurrencyType currencyType; - - /* - * The error code of a phone plan group - */ - @JsonProperty(value = "rateErrorMessage") - private String rateErrorMessage; - - /** - * Get the monthlyRate property: The monthly rate of a phone plan group. - * - * @return the monthlyRate value. - */ - public Double getMonthlyRate() { - return this.monthlyRate; - } - - /** - * Set the monthlyRate property: The monthly rate of a phone plan group. - * - * @param monthlyRate the monthlyRate value to set. - * @return the RateInformation object itself. - */ - public RateInformation setMonthlyRate(Double monthlyRate) { - this.monthlyRate = monthlyRate; - return this; - } - - /** - * Get the currencyType property: The currency of a phone plan group. - * - * @return the currencyType value. - */ - public CurrencyType getCurrencyType() { - return this.currencyType; - } - - /** - * Set the currencyType property: The currency of a phone plan group. - * - * @param currencyType the currencyType value to set. - * @return the RateInformation object itself. - */ - public RateInformation setCurrencyType(CurrencyType currencyType) { - this.currencyType = currencyType; - return this; - } - - /** - * Get the rateErrorMessage property: The error code of a phone plan group. - * - * @return the rateErrorMessage value. - */ - public String getRateErrorMessage() { - return this.rateErrorMessage; - } - - /** - * Set the rateErrorMessage property: The error code of a phone plan group. - * - * @param rateErrorMessage the rateErrorMessage value to set. - * @return the RateInformation object itself. - */ - public RateInformation setRateErrorMessage(String rateErrorMessage) { - this.rateErrorMessage = rateErrorMessage; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ReleaseRequest.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ReleaseRequest.java deleted file mode 100644 index eab5aecf8451..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ReleaseRequest.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The ReleaseRequest model. */ -@Fluent -public final class ReleaseRequest { - /* - * The list of phone numbers in the release request. - */ - @JsonProperty(value = "phoneNumbers", required = true) - private List phoneNumbers; - - /** - * Get the phoneNumbers property: The list of phone numbers in the release request. - * - * @return the phoneNumbers value. - */ - public List getPhoneNumbers() { - return this.phoneNumbers; - } - - /** - * Set the phoneNumbers property: The list of phone numbers in the release request. - * - * @param phoneNumbers the phoneNumbers value to set. - * @return the ReleaseRequest object itself. - */ - public ReleaseRequest setPhoneNumbers(List phoneNumbers) { - this.phoneNumbers = phoneNumbers; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ReleaseResponse.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ReleaseResponse.java deleted file mode 100644 index c7d3f5fe394e..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ReleaseResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ReleaseResponse model. */ -@Fluent -public final class ReleaseResponse { - /* - * The release id of a created release. - */ - @JsonProperty(value = "releaseId", required = true) - private String releaseId; - - /** - * Get the releaseId property: The release id of a created release. - * - * @return the releaseId value. - */ - public String getReleaseId() { - return this.releaseId; - } - - /** - * Set the releaseId property: The release id of a created release. - * - * @param releaseId the releaseId value to set. - * @return the ReleaseResponse object itself. - */ - public ReleaseResponse setReleaseId(String releaseId) { - this.releaseId = releaseId; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ReleaseStatus.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ReleaseStatus.java deleted file mode 100644 index bc1cc16cccba..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/ReleaseStatus.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ReleaseStatus. */ -public final class ReleaseStatus extends ExpandableStringEnum { - /** Static value Pending for ReleaseStatus. */ - public static final ReleaseStatus PENDING = fromString("Pending"); - - /** Static value InProgress for ReleaseStatus. */ - public static final ReleaseStatus IN_PROGRESS = fromString("InProgress"); - - /** Static value Complete for ReleaseStatus. */ - public static final ReleaseStatus COMPLETE = fromString("Complete"); - - /** Static value Failed for ReleaseStatus. */ - public static final ReleaseStatus FAILED = fromString("Failed"); - - /** Static value Expired for ReleaseStatus. */ - public static final ReleaseStatus EXPIRED = fromString("Expired"); - - /** - * Creates or finds a ReleaseStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReleaseStatus. - */ - @JsonCreator - public static ReleaseStatus fromString(String name) { - return fromString(name, ReleaseStatus.class); - } - - /** @return known ReleaseStatus values. */ - public static Collection values() { - return values(ReleaseStatus.class); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/SearchStatus.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/SearchStatus.java deleted file mode 100644 index 86cd985758e7..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/SearchStatus.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SearchStatus. */ -public final class SearchStatus extends ExpandableStringEnum { - /** Static value Pending for SearchStatus. */ - public static final SearchStatus PENDING = fromString("Pending"); - - /** Static value InProgress for SearchStatus. */ - public static final SearchStatus IN_PROGRESS = fromString("InProgress"); - - /** Static value Reserved for SearchStatus. */ - public static final SearchStatus RESERVED = fromString("Reserved"); - - /** Static value Expired for SearchStatus. */ - public static final SearchStatus EXPIRED = fromString("Expired"); - - /** Static value Expiring for SearchStatus. */ - public static final SearchStatus EXPIRING = fromString("Expiring"); - - /** Static value Completing for SearchStatus. */ - public static final SearchStatus COMPLETING = fromString("Completing"); - - /** Static value Refreshing for SearchStatus. */ - public static final SearchStatus REFRESHING = fromString("Refreshing"); - - /** Static value Success for SearchStatus. */ - public static final SearchStatus SUCCESS = fromString("Success"); - - /** Static value Manual for SearchStatus. */ - public static final SearchStatus MANUAL = fromString("Manual"); - - /** Static value Cancelled for SearchStatus. */ - public static final SearchStatus CANCELLED = fromString("Cancelled"); - - /** Static value Cancelling for SearchStatus. */ - public static final SearchStatus CANCELLING = fromString("Cancelling"); - - /** Static value Error for SearchStatus. */ - public static final SearchStatus ERROR = fromString("Error"); - - /** Static value PurchasePending for SearchStatus. */ - public static final SearchStatus PURCHASE_PENDING = fromString("PurchasePending"); - - /** - * Creates or finds a SearchStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SearchStatus. - */ - @JsonCreator - public static SearchStatus fromString(String name) { - return fromString(name, SearchStatus.class); - } - - /** @return known SearchStatus values. */ - public static Collection values() { - return values(SearchStatus.class); - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/UpdateNumberCapabilitiesRequest.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/UpdateNumberCapabilitiesRequest.java deleted file mode 100644 index 665d707b482a..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/UpdateNumberCapabilitiesRequest.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The UpdateNumberCapabilitiesRequest model. */ -@Fluent -public final class UpdateNumberCapabilitiesRequest { - /* - * The map of phone numbers to the capabilities update applied to the phone - * number. - */ - @JsonProperty(value = "phoneNumberCapabilitiesUpdate", required = true) - private Map phoneNumberCapabilitiesUpdate; - - /** - * Get the phoneNumberCapabilitiesUpdate property: The map of phone numbers to the capabilities update applied to - * the phone number. - * - * @return the phoneNumberCapabilitiesUpdate value. - */ - public Map getPhoneNumberCapabilitiesUpdate() { - return this.phoneNumberCapabilitiesUpdate; - } - - /** - * Set the phoneNumberCapabilitiesUpdate property: The map of phone numbers to the capabilities update applied to - * the phone number. - * - * @param phoneNumberCapabilitiesUpdate the phoneNumberCapabilitiesUpdate value to set. - * @return the UpdateNumberCapabilitiesRequest object itself. - */ - public UpdateNumberCapabilitiesRequest setPhoneNumberCapabilitiesUpdate( - Map phoneNumberCapabilitiesUpdate) { - this.phoneNumberCapabilitiesUpdate = phoneNumberCapabilitiesUpdate; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/UpdateNumberCapabilitiesResponse.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/UpdateNumberCapabilitiesResponse.java deleted file mode 100644 index 552c88e68753..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/UpdateNumberCapabilitiesResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The UpdateNumberCapabilitiesResponse model. */ -@Fluent -public final class UpdateNumberCapabilitiesResponse { - /* - * The capabilities id - */ - @JsonProperty(value = "capabilitiesUpdateId", required = true) - private String capabilitiesUpdateId; - - /** - * Get the capabilitiesUpdateId property: The capabilities id. - * - * @return the capabilitiesUpdateId value. - */ - public String getCapabilitiesUpdateId() { - return this.capabilitiesUpdateId; - } - - /** - * Set the capabilitiesUpdateId property: The capabilities id. - * - * @param capabilitiesUpdateId the capabilitiesUpdateId value to set. - * @return the UpdateNumberCapabilitiesResponse object itself. - */ - public UpdateNumberCapabilitiesResponse setCapabilitiesUpdateId(String capabilitiesUpdateId) { - this.capabilitiesUpdateId = capabilitiesUpdateId; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/UpdatePhoneNumberCapabilitiesResponse.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/UpdatePhoneNumberCapabilitiesResponse.java deleted file mode 100644 index e6a10bf3a9e8..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/UpdatePhoneNumberCapabilitiesResponse.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.administration.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** The UpdatePhoneNumberCapabilitiesResponse model. */ -@Fluent -public final class UpdatePhoneNumberCapabilitiesResponse { - /* - * The id of the phone number capabilities update - */ - @JsonProperty(value = "capabilitiesUpdateId") - private String capabilitiesUpdateId; - - /* - * The time the capabilities update was created - */ - @JsonProperty(value = "createdAt") - private OffsetDateTime createdAt; - - /* - * Status of the capabilities update. - */ - @JsonProperty(value = "capabilitiesUpdateStatus") - private CapabilitiesUpdateStatus capabilitiesUpdateStatus; - - /* - * The capabilities update for each of a set of phone numbers. - */ - @JsonProperty(value = "phoneNumberCapabilitiesUpdates") - private Map phoneNumberCapabilitiesUpdates; - - /** - * Get the capabilitiesUpdateId property: The id of the phone number capabilities update. - * - * @return the capabilitiesUpdateId value. - */ - public String getCapabilitiesUpdateId() { - return this.capabilitiesUpdateId; - } - - /** - * Set the capabilitiesUpdateId property: The id of the phone number capabilities update. - * - * @param capabilitiesUpdateId the capabilitiesUpdateId value to set. - * @return the UpdatePhoneNumberCapabilitiesResponse object itself. - */ - public UpdatePhoneNumberCapabilitiesResponse setCapabilitiesUpdateId(String capabilitiesUpdateId) { - this.capabilitiesUpdateId = capabilitiesUpdateId; - return this; - } - - /** - * Get the createdAt property: The time the capabilities update was created. - * - * @return the createdAt value. - */ - public OffsetDateTime getCreatedAt() { - return this.createdAt; - } - - /** - * Set the createdAt property: The time the capabilities update was created. - * - * @param createdAt the createdAt value to set. - * @return the UpdatePhoneNumberCapabilitiesResponse object itself. - */ - public UpdatePhoneNumberCapabilitiesResponse setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get the capabilitiesUpdateStatus property: Status of the capabilities update. - * - * @return the capabilitiesUpdateStatus value. - */ - public CapabilitiesUpdateStatus getCapabilitiesUpdateStatus() { - return this.capabilitiesUpdateStatus; - } - - /** - * Set the capabilitiesUpdateStatus property: Status of the capabilities update. - * - * @param capabilitiesUpdateStatus the capabilitiesUpdateStatus value to set. - * @return the UpdatePhoneNumberCapabilitiesResponse object itself. - */ - public UpdatePhoneNumberCapabilitiesResponse setCapabilitiesUpdateStatus( - CapabilitiesUpdateStatus capabilitiesUpdateStatus) { - this.capabilitiesUpdateStatus = capabilitiesUpdateStatus; - return this; - } - - /** - * Get the phoneNumberCapabilitiesUpdates property: The capabilities update for each of a set of phone numbers. - * - * @return the phoneNumberCapabilitiesUpdates value. - */ - public Map getPhoneNumberCapabilitiesUpdates() { - return this.phoneNumberCapabilitiesUpdates; - } - - /** - * Set the phoneNumberCapabilitiesUpdates property: The capabilities update for each of a set of phone numbers. - * - * @param phoneNumberCapabilitiesUpdates the phoneNumberCapabilitiesUpdates value to set. - * @return the UpdatePhoneNumberCapabilitiesResponse object itself. - */ - public UpdatePhoneNumberCapabilitiesResponse setPhoneNumberCapabilitiesUpdates( - Map phoneNumberCapabilitiesUpdates) { - this.phoneNumberCapabilitiesUpdates = phoneNumberCapabilitiesUpdates; - return this; - } -} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/package-info.java b/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/package-info.java deleted file mode 100644 index c02b99da2ee4..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the implementations for PhoneNumberAdminClient. Azure Communication Phone Number Service. */ - -package com.azure.communication.administration.models; diff --git a/sdk/communication/azure-communication-administration/src/main/java/module-info.java b/sdk/communication/azure-communication-administration/src/main/java/module-info.java deleted file mode 100644 index 36d84ebef389..000000000000 --- a/sdk/communication/azure-communication-administration/src/main/java/module-info.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -module com.azure.communication.administration { - - requires transitive com.azure.communication.common; - requires transitive com.azure.core; - - // public API surface area - exports com.azure.communication.administration; - exports com.azure.communication.administration.models; - - opens com.azure.communication.administration.models - to com.fasterxml.jackson.databind; -} 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 deleted file mode 100644 index 2320738960f1..000000000000 --- a/sdk/communication/azure-communication-administration/src/samples/java/com/azure/communication/administration/ReadmeSamples.java +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.administration; - -import java.time.Duration; -import java.util.ArrayList; -import java.util.List; -import com.azure.communication.administration.models.AcquiredPhoneNumber; -import com.azure.communication.administration.models.AreaCodes; -import com.azure.communication.administration.models.CreateReservationOptions; -import com.azure.communication.administration.models.LocationOptions; -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.PhoneNumberReservation; -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.common.PhoneNumberIdentifier; -import com.azure.core.http.HttpClient; -import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.polling.SyncPoller; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class ReadmeSamples { - - /** - * Sample code for creating a sync Phone Number Client. - * - * @return the Phone Number Client. - */ - public PhoneNumberClient createPhoneNumberClient() { - // You can find your endpoint and access token from your resource in the Azure Portal - String endpoint = "https://.communication.azure.com"; - String accessKey = "SECRET"; - - // Create an HttpClient builder of your choice and customize it - HttpClient httpClient = new NettyAsyncHttpClientBuilder().build(); - - PhoneNumberClient phoneNumberClient = new PhoneNumberClientBuilder() - .endpoint(endpoint) - .accessKey(accessKey) - .httpClient(httpClient) - .buildClient(); - - return phoneNumberClient; - } - - /** - * Sample code to get all supported countries - * - * @return supported countries - */ - public PagedIterable getSupportedCountries() { - String locale = "en-us"; - PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - - PagedIterable phoneNumberCountries = phoneNumberClient - .listAllSupportedCountries(locale); - - for (PhoneNumberCountry phoneNumberCountry - : phoneNumberCountries) { - System.out.println("Phone Number Country Code: " + phoneNumberCountry.getCountryCode()); - System.out.println("Phone Number Country Name: " + phoneNumberCountry.getLocalizedName()); - } - - return phoneNumberCountries; - } - - /** - * Sample code to get a list of all acquired phone numbers - * - * @return the acquired phone numbers - */ - public PagedIterable getAcquiredPhoneNumbers() { - String locale = "en-us"; - PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - - PagedIterable acquiredPhoneNumbers = phoneNumberClient - .listAllPhoneNumbers(locale); - - for (AcquiredPhoneNumber acquiredPhoneNumber - : acquiredPhoneNumbers) { - System.out.println("Acquired Phone Number: " + acquiredPhoneNumber.getPhoneNumber()); - } - - return acquiredPhoneNumbers; - } - - /** - * Sample code to get a list of all phone plan groups - * - * @return phone plans groups - */ - public PagedIterable getPhonePlanGroups() { - String countryCode = "US"; - String locale = "en-us"; - PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - - PagedIterable phonePlanGroups = phoneNumberClient - .listPhonePlanGroups(countryCode, locale, true); - - for (PhonePlanGroup phonePlanGroup - : phonePlanGroups) { - System.out.println("Phone Plan GroupId: " + phonePlanGroup.getPhonePlanGroupId()); - System.out.println("Phone Plan NumberType: " + phonePlanGroup.getPhoneNumberType()); - } - - return phonePlanGroups; - } - - /** - * Sample code to get a list of all phone plan instances in a group - * - * @return phone plans - */ - public PagedIterable getPhonePlansInGroup() { - String countryCode = "US"; - String locale = "en-us"; - String phonePlanGroupId = "PHONE_PLAN_GROUP_ID"; - PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - - PagedIterable phonePlans = phoneNumberClient - .listPhonePlans(countryCode, phonePlanGroupId, locale); - - for (PhonePlan phonePlan - : phonePlans) { - System.out.println("Phone Plan Id: " + phonePlan.getPhonePlanId()); - System.out.println("Phone Plan Name: " + phonePlan.getLocalizedName()); - System.out.println("Phone Plan Capabilities: " + phonePlan.getCapabilities()); - System.out.println("Phone Plan Area Codes: " + phonePlan.getAreaCodes()); - } - - return phonePlans; - } - - /** - * Sample code to get the location options for a phone plan - * - * @return Location Options for a phone plan - */ - public LocationOptions getPhonePlanLocationOptions() { - String countryCode = "US"; - String locale = "en-us"; - String phonePlanGroupId = "PHONE_PLAN_GROUP_ID"; - String phonePlanId = "PHONE_PLAN_ID"; - PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - - LocationOptions locationOptions = phoneNumberClient - .getPhonePlanLocationOptions(countryCode, phonePlanGroupId, phonePlanId, locale) - .getLocationOptions(); - - System.out.println("Getting LocationOptions for: " + locationOptions.getLabelId()); - for (LocationOptionsDetails locationOptionsDetails - : locationOptions.getOptions()) { - System.out.println(locationOptionsDetails.getValue()); - for (LocationOptions locationOptions1 - : locationOptionsDetails.getLocationOptions()) { - System.out.println("Getting LocationOptions for: " + locationOptions1.getLabelId()); - for (LocationOptionsDetails locationOptionsDetails1 - : locationOptions1.getOptions()) { - System.out.println(locationOptionsDetails1.getValue()); - } - } - } - - return locationOptions; - } - - /** - * Sample code to get the area codes for a location - * - * @return Area Codes for a location - */ - public AreaCodes getAreaCodes() { - String countryCode = "US"; - String phonePlanId = "PHONE_PLAN_ID"; - - List locationOptions = new ArrayList<>(); - LocationOptionsQuery query = new LocationOptionsQuery(); - query.setLabelId("state"); - query.setOptionsValue("LOCATION_OPTION_STATE"); - locationOptions.add(query); - - query = new LocationOptionsQuery(); - query.setLabelId("city"); - query.setOptionsValue("LOCATION_OPTION_CITY"); - locationOptions.add(query); - PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - - AreaCodes areaCodes = phoneNumberClient - .getAllAreaCodes("selection", countryCode, phonePlanId, locationOptions); - - for (String areaCode - : areaCodes.getPrimaryAreaCodes()) { - System.out.println(areaCode); - } - - return areaCodes; - } - - /** - * Sample code to configure a phone number - */ - public void configurePhoneNumber() { - PhoneNumberIdentifier phoneNumber = new PhoneNumberIdentifier("PHONENUMBER_TO_CONFIGURE"); - PstnConfiguration pstnConfiguration = new PstnConfiguration(); - pstnConfiguration.setApplicationId("APPLICATION_ID"); - pstnConfiguration.setCallbackUrl("CALLBACK_URL"); - PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - phoneNumberClient.configureNumber(phoneNumber, pstnConfiguration); - } - - /** - * Sample code to create a reservation as a long running operation - */ - public void beginCreateReservation() { - String phonePlanId = "PHONE_PLAN_ID"; - - List phonePlanIds = new ArrayList<>(); - phonePlanIds.add(phonePlanId); - - CreateReservationOptions createReservationOptions = new CreateReservationOptions(); - createReservationOptions - .setAreaCode("AREA_CODE_FOR_RESERVATION") - .setDescription("DESCRIPTION_FOR_RESERVATION") - .setDisplayName("NAME_FOR_RESERVATION") - .setPhonePlanIds(phonePlanIds) - .setQuantity(2); - - Duration duration = Duration.ofSeconds(1); - PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - - SyncPoller res = - phoneNumberClient.beginCreateReservation(createReservationOptions, duration); - res.waitForCompletion(); - PhoneNumberReservation result = res.getFinalResult(); - - System.out.println("Reservation Id: " + result.getReservationId()); - for (String phoneNumber: result.getPhoneNumbers()) { - System.out.println("Phone Number: " + phoneNumber); - } - } - - /** - * Sample code to purchase a reservation as a long running operation - */ - public void beginPurchaseReservation() { - Duration duration = Duration.ofSeconds(1); - String phoneNumberReservationId = "RESERVATION_ID_TO_PURCHASE"; - PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); - - SyncPoller res = - phoneNumberClient.beginPurchaseReservation(phoneNumberReservationId, duration); - res.waitForCompletion(); - } - - /** - * Sample code to release a phone number as a long running operation - */ - public void beginReleasePhoneNumbers() { - Duration duration = Duration.ofSeconds(1); - PhoneNumberIdentifier phoneNumber = new PhoneNumberIdentifier("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()); - } - - /** - * Sample code for creating a sync Phone Number Client using AAD authentication. - * - * @return the Phone Number Client. - */ - public PhoneNumberClient createPhoneNumberClientWithAAD() { - // You can find your endpoint and access key from your resource in the Azure Portal - String endpoint = "https://.communication.azure.com"; - - // Create an HttpClient builder of your choice and customize it - HttpClient httpClient = new NettyAsyncHttpClientBuilder().build(); - - PhoneNumberClient phoneNumberClient = new PhoneNumberClientBuilder() - .endpoint(endpoint) - .credential(new DefaultAzureCredentialBuilder().build()) - .httpClient(httpClient) - .buildClient(); - - return phoneNumberClient; - } -} 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 deleted file mode 100644 index 1dbb608933ee..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberAsyncClientIntegrationTest.java +++ /dev/null @@ -1,651 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.communication.administration; - -import com.azure.communication.administration.models.AcquiredPhoneNumber; -import com.azure.communication.administration.models.AreaCodes; -import com.azure.communication.administration.models.Capability; -import com.azure.communication.administration.models.CreateReservationOptions; -import com.azure.communication.administration.models.LocationOptionsQuery; -import com.azure.communication.administration.models.LocationOptionsResponse; -import com.azure.communication.administration.models.LocationType; -import com.azure.communication.administration.models.NumberConfigurationResponse; -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.PhoneNumberReservation; -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.ReleaseStatus; -import com.azure.communication.administration.models.UpdateNumberCapabilitiesResponse; -import com.azure.communication.administration.models.UpdatePhoneNumberCapabilitiesResponse; -import com.azure.communication.common.PhoneNumberIdentifier; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.Response; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.Context; - -import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; - -import reactor.core.publisher.Mono; -import reactor.test.StepVerifier; - -import java.time.Duration; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class PhoneNumberAsyncClientIntegrationTest extends PhoneNumberIntegrationTestBase { - - private PhoneNumberAsyncClient getClientWithConnectionString(HttpClient httpClient, String testName) { - PhoneNumberClientBuilder builder = super.getClientBuilderWithConnectionString(httpClient); - return addLoggingPolicy(builder, testName).buildAsyncClient(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void createAsyncPhoneNumberClientWithConnectionString(HttpClient httpClient) { - PhoneNumberAsyncClient phoneNumberAsyncClient = this.getClientWithConnectionString(httpClient, "createAsyncClient"); - assertNotNull(phoneNumberAsyncClient); - - // Smoke test using phoneNumberAsyncClient to list all phone numbers - PagedFlux pagedFlux = phoneNumberAsyncClient.listAllPhoneNumbers(LOCALE); - StepVerifier.create(pagedFlux.next()) - .assertNext(item -> { - assertNotNull(item.getPhoneNumber()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void createAsyncPhoneNumberClientWithManagedIdentity(HttpClient httpClient) { - PhoneNumberAsyncClient phoneNumberAsyncClient = getClientBuilderUsingManagedIdentity(httpClient).buildAsyncClient(); - assertNotNull(phoneNumberAsyncClient); - - // Smoke test using phoneNumberAsyncClient to list all phone numbers - PagedFlux pagedFlux = phoneNumberAsyncClient.listAllPhoneNumbers(LOCALE); - StepVerifier.create(pagedFlux.next()) - .assertNext(item -> { - assertNotNull(item.getPhoneNumber()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listAllPhoneNumbers(HttpClient httpClient) { - PagedFlux pagedFlux = this.getClientWithConnectionString(httpClient, "listAllPhoneNumbers").listAllPhoneNumbers(LOCALE); - - StepVerifier.create(pagedFlux.next()) - .assertNext(item -> { - assertNotNull(item.getPhoneNumber()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listPhonePlanGroups(HttpClient httpClient) { - PagedFlux pagedFlux = - this.getClientWithConnectionString(httpClient, "listPhonePlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - - StepVerifier.create(pagedFlux.next()) - .assertNext(item -> { - assertNotNull(item.getPhonePlanGroupId()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listPhonePlans(HttpClient httpClient) { - StepVerifier.create( - this.getClientWithConnectionString(httpClient, "listPhonePlans_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true).next() - .flatMap((PhonePlanGroup phonePlanGroup) -> { - return this.getClientWithConnectionString(httpClient, "listPhonePlans").listPhonePlans(COUNTRY_CODE, phonePlanGroup.getPhonePlanGroupId(), LOCALE).next(); - })) - .assertNext((PhonePlan phonePlan) -> { - assertNotNull(phonePlan.getPhonePlanId()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listAllReleases(HttpClient httpClient) { - PagedFlux pagedFlux = this.getClientWithConnectionString(httpClient, "listAllReleases").listAllReleases(); - - StepVerifier.create(pagedFlux.next()) - .assertNext(item -> { - assertNotNull(item.getId()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listAllReservations(HttpClient httpClient) { - PagedFlux pagedFlux = this.getClientWithConnectionString(httpClient, "listAllReservations").listAllReservations(); - - StepVerifier.create(pagedFlux.next()) - .assertNext(item -> { - assertNotNull(item.getId()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listAllSupportedCountries(HttpClient httpClient) { - PagedFlux pagedFlux = this.getClientWithConnectionString(httpClient, "listAllSupportedCountries").listAllSupportedCountries(LOCALE); - - StepVerifier.create(pagedFlux.next()) - .assertNext(item -> { - assertNotNull(item.getCountryCode()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getPhonePlanLocationOptions(HttpClient httpClient) { - StepVerifier.create( - this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptions_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true).next() - .flatMap((PhonePlanGroup phonePlanGroup) -> { - return this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptions_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroup.getPhonePlanGroupId(), LOCALE).next() - .flatMap((PhonePlan phonePlan) -> { - return this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptions").getPhonePlanLocationOptions(COUNTRY_CODE, phonePlanGroup.getPhonePlanGroupId(), phonePlan.getPhonePlanId(), LOCALE); - }); - })) - .assertNext(item -> { - assertNotNull(item.getLocationOptions().getLabelId()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getAllAreaCodes(HttpClient httpClient) { - List locationOptions = new ArrayList<>(); - LocationOptionsQuery query = new LocationOptionsQuery(); - query.setLabelId("state"); - query.setOptionsValue(LOCATION_OPTION_STATE); - locationOptions.add(query); - - query = new LocationOptionsQuery(); - query.setLabelId("city"); - query.setOptionsValue(LOCATION_OPTION_CITY); - locationOptions.add(query); - - StepVerifier.create( - this.getClientWithConnectionString(httpClient, "getAllAreaCodes_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true).next() - .flatMap(phonePlanGroups -> { - return this.getClientWithConnectionString(httpClient, "getAllAreaCodes_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroups.getPhonePlanGroupId(), LOCALE).next() - .flatMap(phonePlans -> { - return this.getClientWithConnectionString(httpClient, "getAllAreaCodes").getAllAreaCodes(LocationType.SELECTION.toString(), COUNTRY_CODE, phonePlans.getPhonePlanId(), locationOptions); - }); - })) - .assertNext(item -> { - assertTrue(item.getPrimaryAreaCodes().size() > 0); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getAllAreaCodesWithResponse(HttpClient httpClient) { - List locationOptions = new ArrayList<>(); - LocationOptionsQuery query = new LocationOptionsQuery(); - query.setLabelId("state"); - query.setOptionsValue(LOCATION_OPTION_STATE); - locationOptions.add(query); - - query = new LocationOptionsQuery(); - query.setLabelId("city"); - query.setOptionsValue(LOCATION_OPTION_CITY); - locationOptions.add(query); - - StepVerifier.create( - this.getClientWithConnectionString(httpClient, "getAllAreaCodesWithResponse_listPlanGroups") - .listPhonePlanGroups(COUNTRY_CODE, LOCALE, true).next() - .flatMap(phonePlanGroups -> { - return this.getClientWithConnectionString(httpClient, "getAllAreaCodesWithResponse_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroups.getPhonePlanGroupId(), LOCALE).next() - .flatMap(phonePlans -> { - return this.getClientWithConnectionString(httpClient, "getAllAreaCodesWithResponse").getAllAreaCodesWithResponse(LocationType.SELECTION.toString(), COUNTRY_CODE, phonePlans.getPhonePlanId(), locationOptions, Context.NONE); - }); - })) - .assertNext(item -> { - assertEquals(200, item.getStatusCode()); - assertTrue(item.getValue().getPrimaryAreaCodes().size() > 0); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void beginCreateReservationGetReservationByIdCancelReservation(HttpClient httpClient) { - StepVerifier.create( - // Setting up for phone number reservation creation - this.getClientWithConnectionString(httpClient, "reservationTests_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true).next() - .flatMap((PhonePlanGroup phonePlanGroup) -> { - return this.getClientWithConnectionString(httpClient, "reservationTests_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroup.getPhonePlanGroupId(), LOCALE).next() - .flatMap((PhonePlan phonePlan) -> { - // Create Reservation - return beginCreateReservation(httpClient, phonePlan, "reservationTests_beginCreateReservation").last() - .flatMap((AsyncPollResponse createdRes) -> { - assertEquals(createdRes.getValue().getPhoneNumbers().size(), 1); - assertNotNull(createdRes.getValue().getReservationId()); - // Get Reservation by id - return this.getClientWithConnectionString(httpClient, "reservationTests_getReservationById").getReservationById(createdRes.getValue().getReservationId()). - flatMap(reservation -> { - assertEquals(createdRes.getValue().getReservationId(), reservation.getReservationId()); - // Cancel Reservation - return this.getClientWithConnectionString(httpClient, "reservationTests_cancelReservation").cancelReservation(reservation.getReservationId()); - }); - }); - }); - })) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void beginCreateReservationGetReservationByIdCancelReservationWithResponse(HttpClient httpClient) { - StepVerifier.create( - // Setting up for phone number reservation creation - this.getClientWithConnectionString(httpClient, "reservationWithResponseTests_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true).next() - .flatMap((PhonePlanGroup phonePlanGroup) -> { - return this.getClientWithConnectionString(httpClient, "reservationWithResponseTests_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroup.getPhonePlanGroupId(), LOCALE).next() - .flatMap((PhonePlan phonePlan) -> { - // Create Reservation - return beginCreateReservation(httpClient, phonePlan, "reservationWithResponseTests_beginCreateReservation").last() - .flatMap((AsyncPollResponse createdRes) -> { - assertEquals(createdRes.getValue().getPhoneNumbers().size(), 1); - assertNotNull(createdRes.getValue().getReservationId()); - // Get Reservation by id with response - return this.getClientWithConnectionString(httpClient, "reservationWithResponseTests_getResponseById").getReservationByIdWithResponse(createdRes.getValue().getReservationId()) - .flatMap((Response reservationResponse) -> { - assertEquals(200, reservationResponse.getStatusCode()); - assertEquals(createdRes.getValue().getReservationId(), reservationResponse.getValue().getReservationId()); - // Cancel Reservation with response - return this.getClientWithConnectionString(httpClient, "reservationWithResponseTests_cancelReservation").cancelReservationWithResponse(reservationResponse.getValue().getReservationId()); - }); - }); - }); - })) - .assertNext(cancelReservationResponse -> { - assertEquals(202, cancelReservationResponse.getStatusCode()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - @DisabledIfEnvironmentVariable( - named = "SKIP_LIVE_TEST", - matches = "(?i)(true)") - public void purchaseReservationBeginReleasePhoneNumber(HttpClient httpClient) { - StepVerifier.create( - // Setting up for phone number reservation creation - this.getClientWithConnectionString(httpClient, "purchaseReleaseNumberTests_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true).next() - .flatMap((PhonePlanGroup phonePlanGroup) -> { - return this.getClientWithConnectionString(httpClient, "purchaseReleaseNumberTests_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroup.getPhonePlanGroupId(), LOCALE).next() - .flatMap((PhonePlan phonePlan) -> { - // Create Reservation - return beginCreateReservation(httpClient, phonePlan, "purchaseReleaseNumberTests_beginCreateReservation").last() - .flatMap((AsyncPollResponse createdRes) -> { - assertEquals(createdRes.getValue().getPhoneNumbers().size(), 1); - String purchasedNumber = createdRes.getValue().getPhoneNumbers().get(0); - // Purchase Reservation - return beginPurchaseReservation(httpClient, createdRes.getValue().getReservationId(), "purchaseReleaseNumberTests_beginPurchaseReservation").last() - .flatMap((AsyncPollResponse response) -> { - assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED.toString(), response.getStatus().toString()); - return beginReleasePhoneNumbers(httpClient, purchasedNumber, "purchaseReleaseNumberTests_beginReleasePhoneNumbers").last(); - }); - }); - }); - })) - .assertNext((AsyncPollResponse releaseNumberResponse) -> { - assertEquals(ReleaseStatus.COMPLETE, releaseNumberResponse.getValue().getStatus()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void configureNumberGetNumberConfigurationUnconfigureNumberWithResponse(HttpClient httpClient) { - // Configuring purchased number - PhoneNumberIdentifier number = new PhoneNumberIdentifier(PHONE_NUMBER); - PstnConfiguration pstnConfiguration = new PstnConfiguration(); - pstnConfiguration.setApplicationId("ApplicationId"); - pstnConfiguration.setCallbackUrl("https://callbackurl"); - StepVerifier.create( - this.getClientWithConnectionString(httpClient, "configureNumberWithResponseTests_configureNumber").configureNumberWithResponse(number, pstnConfiguration) - .flatMap((Response configResponse) -> { - assertEquals(200, configResponse.getStatusCode()); - // Get configurations of purchased number - return this.getClientWithConnectionString(httpClient, "configureNumberWithResponseTests_getNumberConfig").getNumberConfigurationWithResponse(number) - .flatMap((Response getConfigResponse) -> { - assertEquals(200, getConfigResponse.getStatusCode()); - assertNotNull(getConfigResponse.getValue().getPstnConfiguration().getApplicationId()); - assertNotNull(getConfigResponse.getValue().getPstnConfiguration().getCallbackUrl()); - // Unconfigure the purchased number - return this.getClientWithConnectionString(httpClient, "configureNumberWithResponseTests_unconfigureNumber").unconfigureNumberWithResponse(number); - }); - })) - .assertNext((Response unconfigureResponse) -> { - assertEquals(200, unconfigureResponse.getStatusCode()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void configureNumberGetNumberConfigurationUnconfigureNumber(HttpClient httpClient) { - // Configuring purchased number - PhoneNumberIdentifier number = new PhoneNumberIdentifier(PHONE_NUMBER); - PstnConfiguration pstnConfiguration = new PstnConfiguration(); - pstnConfiguration.setApplicationId("ApplicationId"); - pstnConfiguration.setCallbackUrl("https://callbackurl"); - StepVerifier.create( - this.getClientWithConnectionString(httpClient, "configureNumberTests_configureNumber").configureNumber(number, pstnConfiguration) - .flatMap(response -> { - // Get configurations of purchased number - return this.getClientWithConnectionString(httpClient, "configureNumberTests_getNumberConfig").getNumberConfiguration(number) - .flatMap((NumberConfigurationResponse configResponse) -> { - assertNotNull(configResponse.getPstnConfiguration().getApplicationId()); - assertNotNull(configResponse.getPstnConfiguration().getCallbackUrl()); - // Unconfigure the purchased number - return this.getClientWithConnectionString(httpClient, "configureNumberTests_unconfigureNumber").unconfigureNumber(number); - }); - })) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void updateCapabilitiesGetCapabilitiesUpdateWithResponse(HttpClient httpClient) { - List capabilitiesToAdd = new ArrayList<>(); - capabilitiesToAdd.add(Capability.INBOUND_CALLING); - NumberUpdateCapabilities update = new NumberUpdateCapabilities(); - update.setAdd(capabilitiesToAdd); - Map updateMap = new HashMap<>(); - updateMap.put(new PhoneNumberIdentifier(PHONE_NUMBER), update); - - StepVerifier.create( - this.getClientWithConnectionString(httpClient, "capabilitiesWithResponseTests_updateCapabilities").updateCapabilitiesWithResponse(updateMap) - .flatMap((Response updateResponse) -> { - assertEquals(200, updateResponse.getStatusCode()); - // Get capabilities update - String capabilitiesUpdateId = updateResponse.getValue().getCapabilitiesUpdateId(); - assertNotNull(capabilitiesUpdateId); - return this.getClientWithConnectionString(httpClient, "capabilitiesWithResponseTests_getCapabilitiesUpdate").getCapabilitiesUpdateWithResponse(capabilitiesUpdateId); - })) - .assertNext((Response retrievedUpdateResponse) -> { - assertEquals(200, retrievedUpdateResponse.getStatusCode()); - assertNotNull(retrievedUpdateResponse.getValue().getCapabilitiesUpdateId()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void updateCapabilitiesGetCapabilitiesUpdate(HttpClient httpClient) { - List capabilitiesToAdd = new ArrayList<>(); - capabilitiesToAdd.add(Capability.INBOUND_CALLING); - NumberUpdateCapabilities update = new NumberUpdateCapabilities(); - update.setAdd(capabilitiesToAdd); - Map updateMap = new HashMap<>(); - updateMap.put(new PhoneNumberIdentifier(PHONE_NUMBER), update); - - StepVerifier.create( - this.getClientWithConnectionString(httpClient, "capabilitiesTests_updateCapabilities").updateCapabilities(updateMap) - .flatMap((UpdateNumberCapabilitiesResponse updateResponse) -> { - // Get capabilities update - String capabilitiesUpdateId = updateResponse.getCapabilitiesUpdateId(); - assertNotNull(capabilitiesUpdateId); - return this.getClientWithConnectionString(httpClient, "capabilitiesTests_getCapabilitiesUpdate").getCapabilitiesUpdate(capabilitiesUpdateId); - })) - .assertNext((UpdatePhoneNumberCapabilitiesResponse retrievedUpdateResponse) -> { - assertNotNull(retrievedUpdateResponse.getCapabilitiesUpdateId()); - }) - .verifyComplete(); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listPhonePlansNullCountryCode(HttpClient httpClient) { - PagedFlux pagedFlux = this.getClientWithConnectionString(httpClient, "listPhonePlansNullCountryCode") - .listPhonePlans(null, "PHONE_PLAN_GROUP_ID", LOCALE); - - StepVerifier.create(pagedFlux.next()) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listPhonePlansNullPhonePlanGroupId(HttpClient httpClient) { - PagedFlux phonePlans = - this.getClientWithConnectionString(httpClient, "listPhonePlansNullPhonePlanGroupId").listPhonePlans(COUNTRY_CODE, null, LOCALE); - - StepVerifier.create(phonePlans) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getPhonePlanLocationOptionsWithResponseNullCountryCode(HttpClient httpClient) { - Mono mono = - this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptionsWithResponseNullCountryCode") - .getPhonePlanLocationOptions(null, "PHONE_PLAN_GROUP_ID", "PHONE_PLAN_ID", LOCALE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getPhonePlanLocationOptionsWithResponseNullPhonePlanGroupId(HttpClient httpClient) { - Mono mono = - this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptionsWithResponseNullPhonePlanGroupId") - .getPhonePlanLocationOptions(COUNTRY_CODE, null, "PHONE_PLAN_ID", LOCALE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getPhonePlanLocationOptionsWithResponseNullPhonePlanId(HttpClient httpClient) { - Mono mono = - this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptionsWithResponseNullPhonePlanId") - .getPhonePlanLocationOptions(COUNTRY_CODE, "PHONE_PLAN_GROUP_ID", null, LOCALE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getAllAreaCodesWithResponseNullLocationType(HttpClient httpClient) { - List locationOptions = new ArrayList<>(); - Mono> mono = this.getClientWithConnectionString(httpClient, "getAllAreaCodesWithResponseNullLocationType") - .getAllAreaCodesWithResponse(null, COUNTRY_CODE, "PHONE_PLAN_ID", locationOptions, Context.NONE); - - StepVerifier.create(mono) - .verifyError(java.lang.RuntimeException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getAllAreaCodesWithResponseNullCountryCode(HttpClient httpClient) { - List locationOptions = new ArrayList<>(); - Mono> mono = this.getClientWithConnectionString(httpClient, "getAllAreaCodesWithResponseNullCountryCode") - .getAllAreaCodesWithResponse("selection", null, "PHONE_PLAN_ID", locationOptions, Context.NONE); - - StepVerifier.create(mono) - .verifyError(java.lang.RuntimeException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getAllAreaCodesWithResponseNullPhonePlanId(HttpClient httpClient) { - List locationOptions = new ArrayList<>(); - Mono> mono = this.getClientWithConnectionString(httpClient, "getAllAreaCodesWithResponseNullPhonePlanId") - .getAllAreaCodesWithResponse("selection", COUNTRY_CODE, null, locationOptions, Context.NONE); - - StepVerifier.create(mono) - .verifyError(java.lang.RuntimeException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void updateCapabilitiesWithResponseNullPhoneNumberCapabilitiesUpdate(HttpClient httpClient) { - Mono> mono = - this.getClientWithConnectionString(httpClient, "updateCapabilitiesWithResponseNullPhoneNumberCapabilitiesUpdate") - .updateCapabilitiesWithResponse(null, Context.NONE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getReservationByIdWithResponseNullSearchId(HttpClient httpClient) { - Mono> mono = this.getClientWithConnectionString(httpClient, "getReservationByIdWithResponseNullSearchId") - .getReservationByIdWithResponse(null, Context.NONE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void cancelReservationWithResponseNullReservationId(HttpClient httpClient) { - Mono> mono = this.getClientWithConnectionString(httpClient, "cancelReservationWithResponseNullReservationId") - .cancelReservationWithResponse(null, Context.NONE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void configureNumberWithResponseNullPhoneNumber(HttpClient httpClient) { - PstnConfiguration pstnConfiguration = new PstnConfiguration(); - pstnConfiguration.setApplicationId("ApplicationId"); - pstnConfiguration.setCallbackUrl("https://callbackurl"); - - Mono> mono = this.getClientWithConnectionString(httpClient, "configureNumberWithResponseNullPhoneNumber") - .configureNumberWithResponse(null, pstnConfiguration, Context.NONE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void configureNumberWithResponseNullPstnConfig(HttpClient httpClient) { - PhoneNumberIdentifier number = new PhoneNumberIdentifier("PHONENUMBER_TO_CONFIGURE"); - Mono> mono = this.getClientWithConnectionString(httpClient, "configureNumberWithResponseNullPstnConfig") - .configureNumberWithResponse(number, null, Context.NONE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getNumberConfigurationWithResponseNullPhoneNumber(HttpClient httpClient) { - Mono> mono = - this.getClientWithConnectionString(httpClient, "getNumberConfigurationWithResponseNullPhoneNumber") - .getNumberConfigurationWithResponse(null, Context.NONE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getCapabilitiesUpdateWithResponseNullCapabilitiesId(HttpClient httpClient) { - Mono> mono = this.getClientWithConnectionString(httpClient, "getCapabilitiesUpdateWithResponseNullCapabilitiesId") - .getCapabilitiesUpdateWithResponse(null, Context.NONE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void unconfigureNumberWithResponseNullPhoneNumber(HttpClient httpClient) { - Mono> mono = this.getClientWithConnectionString(httpClient, "unconfigureNumberWithResponseNullPhoneNumber") - .unconfigureNumberWithResponse(null, Context.NONE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listPhonePlanGroupsNullCountryCode(HttpClient httpClient) { - PagedFlux phonePlanGroups = this.getClientWithConnectionString(httpClient, "listPhonePlanGroupsNullCountryCode") - .listPhonePlanGroups(null, LOCALE, true, Context.NONE); - - StepVerifier.create(phonePlanGroups) - .verifyError(NullPointerException.class); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getReleaseByIdWithResponseNullReleaseId(HttpClient httpClient) { - Mono> mono = this.getClientWithConnectionString(httpClient, "getReleaseByIdWithResponseNullReleaseId") - .getReleaseByIdWithResponse(null, Context.NONE); - - StepVerifier.create(mono) - .verifyError(NullPointerException.class); - } - - - private PollerFlux beginReleasePhoneNumbers(HttpClient httpClient, String phoneNumber, String testName) { - PhoneNumberIdentifier releasedPhoneNumber = new PhoneNumberIdentifier(phoneNumber); - List phoneNumbers = new ArrayList<>(); - phoneNumbers.add(releasedPhoneNumber); - Duration pollInterval = Duration.ofSeconds(1); - return this.getClientWithConnectionString(httpClient, testName).beginReleasePhoneNumbers(phoneNumbers, pollInterval); - } - - private PollerFlux beginCreateReservation(HttpClient httpClient, PhonePlan phonePlan, String testName) { - List phonePlanIds = new ArrayList<>(); - phonePlanIds.add(phonePlan.getPhonePlanId()); - - CreateReservationOptions createReservationOptions = new CreateReservationOptions(); - createReservationOptions - .setAreaCode(AREA_CODE) - .setDescription(RESERVATION_OPTIONS_DESCRIPTION) - .setDisplayName(RESERVATION_OPTIONS_NAME) - .setPhonePlanIds(phonePlanIds) - .setQuantity(1); - - Duration duration = Duration.ofSeconds(1); - return this.getClientWithConnectionString(httpClient, testName).beginCreateReservation(createReservationOptions, duration); - } - - private PollerFlux beginPurchaseReservation(HttpClient httpClient, String reservationId, String testName) { - Duration pollInterval = Duration.ofSeconds(1); - return this.getClientWithConnectionString(httpClient, testName) - .beginPurchaseReservation(reservationId, pollInterval); - } -} 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 deleted file mode 100644 index bcc903c8c30b..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberClientIntegrationTest.java +++ /dev/null @@ -1,423 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.communication.administration; - -import com.azure.communication.administration.models.AcquiredPhoneNumber; -import com.azure.communication.administration.models.AreaCodes; -import com.azure.communication.administration.models.Capability; -import com.azure.communication.administration.models.CreateReservationOptions; -import com.azure.communication.administration.models.LocationOptionsQuery; -import com.azure.communication.administration.models.LocationOptionsResponse; -import com.azure.communication.administration.models.NumberConfigurationResponse; -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.PhoneNumberReservation; -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.ReleaseStatus; -import com.azure.communication.administration.models.UpdateNumberCapabilitiesResponse; -import com.azure.communication.administration.models.UpdatePhoneNumberCapabilitiesResponse; -import com.azure.communication.common.PhoneNumberIdentifier; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; - -import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; - -import java.time.Duration; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class PhoneNumberClientIntegrationTest extends PhoneNumberIntegrationTestBase { - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listAllPhoneNumbers(HttpClient httpClient) { - PagedIterable pagedIterable = this.getClientWithConnectionString(httpClient, "listAllPhoneNumbersSync").listAllPhoneNumbers(LOCALE); - assertNotNull(pagedIterable.iterator().next().getPhoneNumber()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listAllPhoneNumbersWithContext(HttpClient httpClient) { - PagedIterable pagedIterable = this.getClientWithConnectionString(httpClient, "listAllPhoneNumbersWithContextSync").listAllPhoneNumbers(LOCALE, Context.NONE); - assertNotNull(pagedIterable.iterator().next().getPhoneNumber()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listPhonePlanGroups(HttpClient httpClient) { - PagedIterable pagedIterable = - this.getClientWithConnectionString(httpClient, "listPhonePlanGroupsSync").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - - assertNotNull(pagedIterable.iterator().next().getPhonePlanGroupId()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listPhonePlanGroupsWithContext(HttpClient httpClient) { - PagedIterable pagedIterable = - this.getClientWithConnectionString(httpClient, "listPhonePlanGroupsWithContextSync").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true, Context.NONE); - - assertNotNull(pagedIterable.iterator().next().getPhonePlanGroupId()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listPhonePlans(HttpClient httpClient) { - PagedIterable phonePlanGroupsPagedIterable = - this.getClientWithConnectionString(httpClient, "listPhonePlansSync_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - PagedIterable phonePlanPagedIterable = - this.getClientWithConnectionString(httpClient, "listPhonePlansSync").listPhonePlans(COUNTRY_CODE, phonePlanGroupsPagedIterable.iterator().next().getPhonePlanGroupId(), LOCALE); - - assertNotNull(phonePlanPagedIterable.iterator().next().getPhonePlanId()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listPhonePlansWithContext(HttpClient httpClient) { - PagedIterable phonePlanGroupsPagedIterable = - this.getClientWithConnectionString(httpClient, "listPhonePlansWithContextSync_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - PagedIterable phonePlanPagedIterable = - this.getClientWithConnectionString(httpClient, "listPhonePlansWithContextSync").listPhonePlans(COUNTRY_CODE, phonePlanGroupsPagedIterable.iterator().next().getPhonePlanGroupId(), LOCALE, Context.NONE); - - assertNotNull(phonePlanPagedIterable.iterator().next().getPhonePlanId()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getPhonePlanLocationOptionsWithResponse(HttpClient httpClient) { - PagedIterable phonePlanGroupsPagedIterable = - this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptionsWithResponseSync_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - String planGroupId = phonePlanGroupsPagedIterable.iterator().next().getPhonePlanGroupId(); - PagedIterable phonePlanPagedIterable = - this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptionsWithResponseSync_listPlans").listPhonePlans(COUNTRY_CODE, planGroupId, LOCALE, Context.NONE); - String planId = phonePlanPagedIterable.iterator().next().getPhonePlanId(); - Response locationOptionsResponse = this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptionsWithResponseSync").getPhonePlanLocationOptionsWithResponse(COUNTRY_CODE, planGroupId, planId, LOCALE, Context.NONE); - assertEquals(locationOptionsResponse.getStatusCode(), 200); - assertNotNull(locationOptionsResponse.getValue().getLocationOptions().getLabelId()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listAllReleases(HttpClient httpClient) { - PagedIterable pagedIterable = this.getClientWithConnectionString(httpClient, "listAllReleasesSync").listAllReleases(); - assertNotNull(pagedIterable.iterator().next().getId()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listAllSupportedCountries(HttpClient httpClient) { - PagedIterable pagedIterable = this.getClientWithConnectionString(httpClient, "listAllSupportedCountriesSync").listAllSupportedCountries(LOCALE); - assertNotNull(pagedIterable.iterator().next().getCountryCode()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listAllSupportedCountriesWithContext(HttpClient httpClient) { - PagedIterable pagedIterable = this.getClientWithConnectionString(httpClient, "listAllSupportedCountriesWithContextSync").listAllSupportedCountries(LOCALE, Context.NONE); - assertNotNull(pagedIterable.iterator().next().getCountryCode()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void listAllReservations(HttpClient httpClient) { - PagedIterable pagedIterable = this.getClientWithConnectionString(httpClient, "listAllReservationsSync").listAllReservations(Context.NONE); - assertNotNull(pagedIterable.iterator().next()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getPhonePlanLocationOptions(HttpClient httpClient) { - PagedIterable phonePlanGroupsPagedIterable = - this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptionsSync_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - String phonePlanGroupId = phonePlanGroupsPagedIterable.iterator().next().getPhonePlanGroupId(); - PagedIterable phonePlanPagedIterable = - this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptionsSync_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroupId, LOCALE); - LocationOptionsResponse response = - this.getClientWithConnectionString(httpClient, "getPhonePlanLocationOptionsSync").getPhonePlanLocationOptions(COUNTRY_CODE, phonePlanGroupId, phonePlanPagedIterable.iterator().next().getPhonePlanId(), LOCALE); - assertNotNull(response.getLocationOptions().getLabelId()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getAllAreaCodes(HttpClient httpClient) { - PagedIterable phonePlanGroupsPagedIterable = - this.getClientWithConnectionString(httpClient, "getAllAreaCodesSync_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - String phonePlanGroupId = phonePlanGroupsPagedIterable.iterator().next().getPhonePlanGroupId(); - PagedIterable phonePlanPagedIterable = - this.getClientWithConnectionString(httpClient, "getAllAreaCodesSync_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroupId, LOCALE); - - List locationOptions = new ArrayList<>(); - LocationOptionsQuery query = new LocationOptionsQuery(); - query.setLabelId("state"); - query.setOptionsValue(LOCATION_OPTION_STATE); - locationOptions.add(query); - - query = new LocationOptionsQuery(); - query.setLabelId("city"); - query.setOptionsValue(LOCATION_OPTION_CITY); - locationOptions.add(query); - - AreaCodes areaCodes = - this.getClientWithConnectionString(httpClient, "getAllAreaCodesSync").getAllAreaCodes("selection", COUNTRY_CODE, phonePlanPagedIterable.iterator().next().getPhonePlanId(), locationOptions); - - assertTrue(areaCodes.getPrimaryAreaCodes().size() > 0); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void getAllAreaCodesWithResponse(HttpClient httpClient) { - PagedIterable phonePlanGroupsPagedIterable = - this.getClientWithConnectionString(httpClient, "getAllAreaCodesWithResponseSync_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - String phonePlanGroupId = phonePlanGroupsPagedIterable.iterator().next().getPhonePlanGroupId(); - PagedIterable phonePlanPagedIterable = - this.getClientWithConnectionString(httpClient, "getAllAreaCodesWithResponseSync_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroupId, LOCALE); - - List locationOptions = new ArrayList<>(); - LocationOptionsQuery query = new LocationOptionsQuery(); - query.setLabelId("state"); - query.setOptionsValue(LOCATION_OPTION_STATE); - locationOptions.add(query); - - query = new LocationOptionsQuery(); - query.setLabelId("city"); - query.setOptionsValue(LOCATION_OPTION_CITY); - locationOptions.add(query); - - Response areaCodesResponse = this.getClientWithConnectionString(httpClient, "getAllAreaCodesWithResponseSync").getAllAreaCodesWithResponse( - "selection", COUNTRY_CODE, phonePlanPagedIterable.iterator().next().getPhonePlanId(), locationOptions, Context.NONE); - - assertEquals(200, areaCodesResponse.getStatusCode()); - assertTrue(areaCodesResponse.getValue().getPrimaryAreaCodes().size() > 0); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void beginCreateReservationGetReservationByIdCancelReservationSync(HttpClient httpClient) { - // Setting up for phone number reservation creation - PagedIterable phonePlanGroupsPagedIterable = - this.getClientWithConnectionString(httpClient, "reservationTests_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - String phonePlanGroupId = phonePlanGroupsPagedIterable.iterator().next().getPhonePlanGroupId(); - PagedIterable phonePlanPagedIterable = - this.getClientWithConnectionString(httpClient, "reservationTests_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroupId, LOCALE); - - // Create reservation - PhoneNumberReservation reservation = beginCreateReservation(httpClient, phonePlanPagedIterable.iterator().next(), "reservationTests_beginCreateReservation").getFinalResult(); - String reservationId = reservation.getReservationId(); - assertEquals(reservation.getPhoneNumbers().size(), 1); - assertNotNull(reservationId); - - // Get reservation By Id - PhoneNumberReservation search = this.getClientWithConnectionString(httpClient, "reservationTests_getReservationById").getReservationById(reservationId); - assertEquals(reservationId, search.getReservationId()); - - // Cancel reservation - this.getClientWithConnectionString(httpClient, "reservationTests_cancelReservation").cancelReservation(reservationId); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void beginCreateReservationGetReservationByIdCancelReservationWithResponseSync(HttpClient httpClient) { - // Setting up for phone number reservation creation - PagedIterable phonePlanGroupsPagedIterable = - this.getClientWithConnectionString(httpClient, "reservationWithResponseTestsSync_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - String phonePlanGroupId = phonePlanGroupsPagedIterable.iterator().next().getPhonePlanGroupId(); - PagedIterable phonePlanPagedIterable = - this.getClientWithConnectionString(httpClient, "reservationWithResponseTestsSync_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroupId, LOCALE); - - // Create Reservation - PhoneNumberReservation reservation = beginCreateReservation(httpClient, phonePlanPagedIterable.iterator().next(), "reservationWithResponseTestsSync_beginCreateReservation").getFinalResult(); - String reservationId = reservation.getReservationId(); - assertEquals(reservation.getPhoneNumbers().size(), 1); - assertNotNull(reservationId); - - // Get reservation By Id - Response search = this.getClientWithConnectionString(httpClient, "reservationWithResponseTestsSync_getReservationById").getReservationByIdWithResponse(reservationId, Context.NONE); - assertEquals(200, search.getStatusCode()); - assertEquals(reservationId, search.getValue().getReservationId()); - - // Cancel reservation - Response cancelResponse = this.getClientWithConnectionString(httpClient, "reservationWithResponseTestsSync_cancelReservation").cancelReservationWithResponse(reservationId, Context.NONE); - assertEquals(202, cancelResponse.getStatusCode()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - @DisabledIfEnvironmentVariable( - named = "SKIP_LIVE_TEST", - matches = "(?i)(true)") - public void purchaseReservationBeginReleasePhoneNumberSync(HttpClient httpClient) { - // Setting up for phone number reservation creation - PagedIterable phonePlanGroupsPagedIterable = - this.getClientWithConnectionString(httpClient, "purchaseReleaseNumberTestsSync_listPlanGroups").listPhonePlanGroups(COUNTRY_CODE, LOCALE, true); - String phonePlanGroupId = phonePlanGroupsPagedIterable.iterator().next().getPhonePlanGroupId(); - PagedIterable phonePlanPagedIterable = - this.getClientWithConnectionString(httpClient, "purchaseReleaseNumberTestsSync_listPlans").listPhonePlans(COUNTRY_CODE, phonePlanGroupId, LOCALE); - - // Create reservation - PhoneNumberReservation reservation = beginCreateReservation(httpClient, phonePlanPagedIterable.iterator().next(), "purchaseReleaseNumberTestsSync_beginCreateReservation").getFinalResult(); - String reservationId = reservation.getReservationId(); - List phoneNumbers = reservation.getPhoneNumbers(); - assertEquals(phoneNumbers.size(), 1); - - String phoneNumber = phoneNumbers.get(0); - assertNotNull(reservationId); - - // Purchase reservation - beginPurchaseReservation(httpClient, reservationId, "purchaseReleaseNumberTestsSync_beginPurchaseReservation").getFinalResult(); - - // Release phone number - PhoneNumberRelease phoneNumberRelease = beginReleasePhoneNumbers(httpClient, phoneNumber, "purchaseReleaseNumberTestsSync_beginReleasePhoneNumbers").getFinalResult(); - assertEquals(ReleaseStatus.COMPLETE, phoneNumberRelease.getStatus()); - - // Get release by id - PhoneNumberRelease getPhoneNumberRelease = this.getClientWithConnectionString(httpClient, "purchaseReleaseNumberTestsSync_getReleaseById").getReleaseById(phoneNumberRelease.getReleaseId()); - assertNotNull(getPhoneNumberRelease); - - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void configureNumberGetNumberConfigurationUnconfigureNumberWithResponse(HttpClient httpClient) { - // Configure number with response - PhoneNumberIdentifier number = new PhoneNumberIdentifier(PHONE_NUMBER); - PstnConfiguration pstnConfiguration = new PstnConfiguration(); - pstnConfiguration.setApplicationId("ApplicationId"); - pstnConfiguration.setCallbackUrl("https://callbackurl"); - Response configResponse = this.getClientWithConnectionString(httpClient, "configureWithResponseTestsSync_configureNumber").configureNumberWithResponse(number, pstnConfiguration, Context.NONE); - - assertEquals(200, configResponse.getStatusCode()); - - // Get number configuration with response - Response getResponse = - this.getClientWithConnectionString(httpClient, "configureWithResponseTestsSync_getNumberConfig").getNumberConfigurationWithResponse(number, Context.NONE); - - assertEquals(200, getResponse.getStatusCode()); - assertNotNull(getResponse.getValue().getPstnConfiguration().getApplicationId()); - assertNotNull(getResponse.getValue().getPstnConfiguration().getCallbackUrl()); - - - // Unconfigure number with response - Response unconfigureResponse = this.getClientWithConnectionString(httpClient, "configureWithResponseTestsSync_unconfigureNumber").unconfigureNumberWithResponse(number, Context.NONE); - assertEquals(200, unconfigureResponse.getStatusCode()); - } - - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void configureNumberGetNumberConfigurationUnconfigureNumber(HttpClient httpClient) { - // Configure number with response - PhoneNumberIdentifier number = new PhoneNumberIdentifier(PHONE_NUMBER); - PstnConfiguration pstnConfiguration = new PstnConfiguration(); - pstnConfiguration.setApplicationId("ApplicationId"); - pstnConfiguration.setCallbackUrl("https://callbackurl"); - this.getClientWithConnectionString(httpClient, "configureTestsSync_configureNumber").configureNumber(number, pstnConfiguration); - - // Get number configuration with response - NumberConfigurationResponse configResponse = - this.getClientWithConnectionString(httpClient, "configureTestsSync_getNumberConfig").getNumberConfiguration(number); - - assertNotNull(configResponse.getPstnConfiguration().getApplicationId()); - assertNotNull(configResponse.getPstnConfiguration().getCallbackUrl()); - - // Unconfigure number with response - this.getClientWithConnectionString(httpClient, "configureTestsSync_unconfigureNumber").unconfigureNumber(number); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void updateCapabilitiesGetCapabilitiesUpdateWithResponse(HttpClient httpClient) { - // Update capabilities with response - List capabilitiesToAdd = new ArrayList<>(); - capabilitiesToAdd.add(Capability.INBOUND_CALLING); - - NumberUpdateCapabilities update = new NumberUpdateCapabilities(); - update.setAdd(capabilitiesToAdd); - - Map updateMap = new HashMap<>(); - updateMap.put(new PhoneNumberIdentifier(PHONE_NUMBER), update); - - Response updateResponse = - this.getClientWithConnectionString(httpClient, "capabilitiesWithResponseTestsSync_updateCapabilties").updateCapabilitiesWithResponse(updateMap, Context.NONE); - String capabilitiesUpdateId = updateResponse.getValue().getCapabilitiesUpdateId(); - assertEquals(200, updateResponse.getStatusCode()); - assertNotNull(capabilitiesUpdateId); - - // Get capabilities update - Response getResponse = - this.getClientWithConnectionString(httpClient, "capabilitiesWithResponseTestsSync_getCapabilitiesUpdate").getCapabilitiesUpdateWithResponse(capabilitiesUpdateId, Context.NONE); - assertEquals(200, getResponse.getStatusCode()); - assertEquals(capabilitiesUpdateId, getResponse.getValue().getCapabilitiesUpdateId()); - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void updateCapabilitiesGetCapabilitiesUpdate(HttpClient httpClient) { - // Update capabilities with response - List capabilitiesToAdd = new ArrayList<>(); - capabilitiesToAdd.add(Capability.INBOUND_CALLING); - - NumberUpdateCapabilities update = new NumberUpdateCapabilities(); - update.setAdd(capabilitiesToAdd); - - Map updateMap = new HashMap<>(); - updateMap.put(new PhoneNumberIdentifier(PHONE_NUMBER), update); - - UpdateNumberCapabilitiesResponse updateResponse = - this.getClientWithConnectionString(httpClient, "capabilitiesTestsSync_updateCapabilties").updateCapabilities(updateMap); - String capabilitiesUpdateId = updateResponse.getCapabilitiesUpdateId(); - assertNotNull(capabilitiesUpdateId); - - // Get capabilities update - UpdatePhoneNumberCapabilitiesResponse getResponse = - this.getClientWithConnectionString(httpClient, "capabilitiesTestsSync_getCapabilitiesUpdate").getCapabilitiesUpdate(capabilitiesUpdateId); - assertEquals(capabilitiesUpdateId, getResponse.getCapabilitiesUpdateId()); - } - - private SyncPoller beginCreateReservation(HttpClient httpClient, PhonePlan phonePlan, String testName) { - List phonePlanIds = new ArrayList<>(); - phonePlanIds.add(phonePlan.getPhonePlanId()); - - CreateReservationOptions createReservationOptions = new CreateReservationOptions(); - createReservationOptions - .setAreaCode(AREA_CODE) - .setDescription(RESERVATION_OPTIONS_DESCRIPTION) - .setDisplayName(RESERVATION_OPTIONS_NAME) - .setPhonePlanIds(phonePlanIds) - .setQuantity(1); - - Duration duration = Duration.ofSeconds(1); - return this.getClientWithConnectionString(httpClient, testName).beginCreateReservation(createReservationOptions, duration); - } - - private SyncPoller beginPurchaseReservation(HttpClient httpClient, String reservationId, String testName) { - Duration pollInterval = Duration.ofSeconds(1); - return this.getClientWithConnectionString(httpClient, testName).beginPurchaseReservation(reservationId, pollInterval); - } - - private SyncPoller beginReleasePhoneNumbers(HttpClient httpClient, String phoneNumber, String testName) { - PhoneNumberIdentifier releasedPhoneNumber = new PhoneNumberIdentifier(phoneNumber); - List phoneNumbers = new ArrayList<>(); - phoneNumbers.add(releasedPhoneNumber); - Duration pollInterval = Duration.ofSeconds(1); - return this.getClientWithConnectionString(httpClient, testName).beginReleasePhoneNumbers(phoneNumbers, pollInterval); - } - - private PhoneNumberClient getClientWithConnectionString(HttpClient httpClient, String testName) { - PhoneNumberClientBuilder builder = super.getClientBuilderWithConnectionString(httpClient); - return addLoggingPolicy(builder, testName).buildClient(); - } -} diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservation.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservation.json deleted file mode 100644 index b63bcbe23dff..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservation.json +++ /dev/null @@ -1,491 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1549ms", - "MS-CV" : "KF28g+ex4km/r5swhBu+Ug.0", - "retry-after" : "0", - "X-Azure-Ref" : "0JJutXwAAAABJZ39jN7AOTJ9aZXEng2gcTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "201", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\"}", - "Date" : "Thu, 12 Nov 2020 20:29:25 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "266ms", - "MS-CV" : "T971ThWTs021syMbW3KmgA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0JputXwAAAACYerL3IcJiSbloajY8YcRhTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:26 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "267ms", - "MS-CV" : "hp/h3JsAl0mDdTK5xfOEXA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0J5utXwAAAAD8vN1HyrAjTZ2c4GnIPZajTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:27 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "268ms", - "MS-CV" : "E/l1yiCZ+kaSl+nU+BKm1Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0KZutXwAAAABDrtZIU0yOTpZjus8jNhXWTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:28 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "268ms", - "MS-CV" : "2Zqq4pKzZ0SomCGFxk720g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0KputXwAAAACGTWxiN/nVT7QBHaxxrEW3TEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:30 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1440ms", - "MS-CV" : "NLBbJ+i6jEKZyBFRjpdmGA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0K5utXwAAAABVW1PTxDUJT6GCITEv4VrhTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:32 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "327ms", - "MS-CV" : "d2AUI3iZPEe55AhAtcdPrg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0LputXwAAAABrOpcisChgTZqaAUFNSZbTTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:34 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "261ms", - "MS-CV" : "vZmQJ5LuJkmHxx3qI66MCg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0L5utXwAAAACBGxhn6NlOSYr3g7AxcXxrTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:35 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "307ms", - "MS-CV" : "7VccK+kptkiGdXhgpRjbNw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0MZutXwAAAABJ/BrKbetBS4B1hkaGd4CzTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:36 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "266ms", - "MS-CV" : "4DpW4b9BE0yhnXkN2ujeQg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0MputXwAAAACuyq890jfPTLMbKXR8z34OTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:38 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "291ms", - "MS-CV" : "UA/sBUGDa0ORFQs+zqiyqw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0M5utXwAAAABpRJZRV35nRrcY8mOATTkNTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:39 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "271ms", - "MS-CV" : "4nim9JaxwkqSJU9TPgM2kA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0NZutXwAAAAD1vlQFGD2FTqXO3JWB7T5xTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:41 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "368ms", - "MS-CV" : "X5kOjFEeV0K1Gtvx5jeP6Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0NputXwAAAADK9U6e83psQKWY/RdI1tz1TEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:42 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "261ms", - "MS-CV" : "jJOveGcphEicNwW7D0VWqA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0N5utXwAAAAB5Dxx2SR3mSLO2L/gw3lHFTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:43 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "266ms", - "MS-CV" : "akd9EGlvhkOtQK1tfwu7nw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0OZutXwAAAADnBwlDxgTRT52U+VcXKItjTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:45 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "300ms", - "MS-CV" : "YNhITarc50G7bIICm1aVwg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0OputXwAAAAC2hk2Qb9/hTLn9v+l7/zTxTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:46 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "407ms", - "MS-CV" : "G2jo2XaFPUWGwTo5TJs7dw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0O5utXwAAAADiUewk1UdnTKOyDTTEjEpHTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:48 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "265ms", - "MS-CV" : "gDUDPiKha0C8Lh/T/M8HjA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0PZutXwAAAADpZNNTpSsdQZvPH8NJnyChTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:49 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "301ms", - "MS-CV" : "1gPI64GGjkuauhXEX94YuA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0PputXwAAAADfm2lL8bLPQLkN4E45uh2WTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:50 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "345ms", - "MS-CV" : "44HDSdM0yE2oa+nsaiJWpg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QJutXwAAAADXMF2J53CTTKq4fmEaTHECTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:52 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "285ms", - "MS-CV" : "3uwxmioAVUWpVtthYYYxbw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QZutXwAAAACEEPXdSYZnS47ff1HQffEjTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:53 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "263ms", - "MS-CV" : "7+NRcvRAukizlcPYh5iXwQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QputXwAAAAA+PVB7U4RHSr6U2XOz7UKrTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:54 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "361ms", - "MS-CV" : "7VIkwqulgkSgQaiKBWfl6Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0RJutXwAAAADJ3rJQQv/GQIza9DGFHhoiTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:56 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "267ms", - "MS-CV" : "EPJ1y7O7Tk6any+oxt47zA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0RZutXwAAAAC7FZ+tV2DxR5gh+VfKbJiWTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:57 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "445ms", - "MS-CV" : "tEiXgaA68kW24C8dkizj8g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0R5utXwAAAADs11xGbUqFQI5mmHk2b+34TEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:29:59 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "266ms", - "MS-CV" : "ZO8Y+BqwN02OCcMQ+VYjVw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0SJutXwAAAACca/d/LUg3Spq7C3jsXaTXTEFYRURHRTEyMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[]}", - "Date" : "Thu, 12 Nov 2020 20:30:00 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/5950a5b1-2207-46ec-a93e-e18b0734446d?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "577ms", - "MS-CV" : "6x8R7lVQn0mxymAWAZev6Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0SputXwAAAAA+kfR4nsRiTY1s1+kT024oTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"5950a5b1-2207-46ec-a93e-e18b0734446d\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T20:29:25.2447424+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+13234882257\",\"+13234882258\"],\"reservationExpiryDate\":\"2020-11-12T20:45:58.457675+00:00\"}", - "Date" : "Thu, 12 Nov 2020 20:30:02 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservation.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservation.json deleted file mode 100644 index d73000c3d13b..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservation.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "2665ms", - "MS-CV" : "jC/dIsc8GE+FPdbovZ2uzg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0OF64XwAAAABn+LhOARBkQbpkQkxkUT44WVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:24:26 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "297ms", - "MS-CV" : "IDfgyrvUuEePm/4DCNAWBw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Ol64XwAAAADZmGObkjQ8RbsOAiRm6CILWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:24:26 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "862ms", - "MS-CV" : "DPh0wk6tvUKePTNZDP1ocA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0O164XwAAAABGmNYTj++rSq+/1zmLj8zZWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "201", - "Body" : "{\"searchId\":\"d423b2be-b4d0-4a15-8350-38b164c991b5\"}", - "Date" : "Sat, 21 Nov 2020 00:24:27 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d423b2be-b4d0-4a15-8350-38b164c991b5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "270ms", - "MS-CV" : "JZlN54lVH0SbW4DSMaa2Cg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0PF64XwAAAADOb2L/jcP1TqHCayowI18lWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d423b2be-b4d0-4a15-8350-38b164c991b5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:24:27.5545443+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:24:27 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d423b2be-b4d0-4a15-8350-38b164c991b5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "272ms", - "MS-CV" : "5sTtIOwgtkKq+mRfYIIYVQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0PV64XwAAAABSGz391Te/TZG48LpCPN9IWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d423b2be-b4d0-4a15-8350-38b164c991b5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:24:27.5545443+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:24:29 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d423b2be-b4d0-4a15-8350-38b164c991b5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "340ms", - "MS-CV" : "ohZOZrnSuE213CsPUWWKzA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Pl64XwAAAACANOUK+5qaQLbgEvnzkFYEWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d423b2be-b4d0-4a15-8350-38b164c991b5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:24:27.5545443+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:24:30 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d423b2be-b4d0-4a15-8350-38b164c991b5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "271ms", - "MS-CV" : "a2rZRz9I8EmD5vubXHJeFQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QF64XwAAAADRGnPkf7jxToZU5hHEiQgHWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d423b2be-b4d0-4a15-8350-38b164c991b5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:24:27.5545443+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:24:32 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d423b2be-b4d0-4a15-8350-38b164c991b5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "335ms", - "MS-CV" : "aRRLkz7c1UeW+SagXpVzYQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QV64XwAAAABgy6SoBqkERLR/nm9Gmg/3WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d423b2be-b4d0-4a15-8350-38b164c991b5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:24:27.5545443+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:24:33 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d423b2be-b4d0-4a15-8350-38b164c991b5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "494ms", - "MS-CV" : "N7Slu225MUuVx46UEGMdVQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Q164XwAAAABoq/uU7tU1QozdlgNudI7LWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d423b2be-b4d0-4a15-8350-38b164c991b5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:24:27.5545443+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+12133442205\"],\"reservationExpiryDate\":\"2020-11-21T00:40:34.1050002+00:00\"}", - "Date" : "Sat, 21 Nov 2020 00:24:34 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d423b2be-b4d0-4a15-8350-38b164c991b5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "280ms", - "MS-CV" : "kLf97HL3Nky5akS8NscZqw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Q164XwAAAADn2Uk7lYRzRJ5Fn3rEwPD0WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d423b2be-b4d0-4a15-8350-38b164c991b5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:24:27.5545443+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+12133442205\"],\"reservationExpiryDate\":\"2020-11-21T00:40:34.1050002+00:00\"}", - "Date" : "Sat, 21 Nov 2020 00:24:35 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d423b2be-b4d0-4a15-8350-38b164c991b5/cancel?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "X-Processing-Time" : "684ms", - "MS-CV" : "/Cc8JbPCCkC1NRRVx4Tfvg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Q164XwAAAAD+cQ2AyI27QIyiGVcrVkdeWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "202", - "Date" : "Sat, 21 Nov 2020 00:24:36 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservationSync.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservationSync.json deleted file mode 100644 index ac74a08b2ebb..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservationSync.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "3360ms", - "MS-CV" : "ZswqwPcxeka92Ai8rYHx9w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0AmW4XwAAAADK2O+qFW3FTYAixdoR0fqwWVZSMzBFREdFMDQxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:53:24 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "392ms", - "MS-CV" : "cUhRy4KTX0uk5yr0Pq6+Qw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0BWW4XwAAAADPppxcGXRvToc8wWsNy/JvWVZSMzBFREdFMDQxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:53:25 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1087ms", - "MS-CV" : "W5sMZeog20iOg2QI9tiTOw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0BmW4XwAAAADHv2lqWXv4S4rwOitY6BFrWVZSMzBFREdFMDQxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "201", - "Body" : "{\"searchId\":\"f285ce24-201e-4aec-a560-a9a021ee25e5\"}", - "Date" : "Sat, 21 Nov 2020 00:53:26 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/f285ce24-201e-4aec-a560-a9a021ee25e5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "522ms", - "MS-CV" : "2aLK+7ILoE6x0Ib8gpcbfg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0B2W4XwAAAABsfAhMr0EkT4afLMl1pv45WVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"f285ce24-201e-4aec-a560-a9a021ee25e5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:53:26.7577403+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:53:27 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/f285ce24-201e-4aec-a560-a9a021ee25e5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "278ms", - "MS-CV" : "2X5uF+0i4UmXvP45cnKQgw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0CWW4XwAAAAA0g6T22CHaQ5iGw4TW61DzWVZSMzBFREdFMDQxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"f285ce24-201e-4aec-a560-a9a021ee25e5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:53:26.7577403+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:53:28 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/f285ce24-201e-4aec-a560-a9a021ee25e5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "295ms", - "MS-CV" : "9YYC62v+WUGwNM9ioyelXw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0CmW4XwAAAAAvDBw83iwnTI4vp3R1iloNWVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"f285ce24-201e-4aec-a560-a9a021ee25e5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:53:26.7577403+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:53:30 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/f285ce24-201e-4aec-a560-a9a021ee25e5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "341ms", - "MS-CV" : "v8wZ9ivetkiwi1ADQHCAGQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0C2W4XwAAAAB/ZGCvbQP+T5lwp0oRF6cOWVZSMzBFREdFMDQxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"f285ce24-201e-4aec-a560-a9a021ee25e5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:53:26.7577403+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:53:32 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/f285ce24-201e-4aec-a560-a9a021ee25e5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "280ms", - "MS-CV" : "TjxCFu52GEGtcOooa+q65Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0DWW4XwAAAADAPDorF8kRTLoX/KsfMJwCWVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"f285ce24-201e-4aec-a560-a9a021ee25e5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:53:26.7577403+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:53:32 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/f285ce24-201e-4aec-a560-a9a021ee25e5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "266ms", - "MS-CV" : "n2EpPg85BEmG+HfeD/lqPA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0DmW4XwAAAAC8QTlgGqvSR5NCMKXqqMEAWVZSMzBFREdFMDQxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"f285ce24-201e-4aec-a560-a9a021ee25e5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:53:26.7577403+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+12133442215\"],\"reservationExpiryDate\":\"2020-11-21T01:09:33.5142701+00:00\"}", - "Date" : "Sat, 21 Nov 2020 00:53:34 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/f285ce24-201e-4aec-a560-a9a021ee25e5?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "271ms", - "MS-CV" : "PzEtqTpoZ0WCD5eY6htr0w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0DmW4XwAAAAAUFehiF8MFSK99/Rb0EF1+WVZSMzBFREdFMDQwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"f285ce24-201e-4aec-a560-a9a021ee25e5\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:53:26.7577403+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+12133442215\"],\"reservationExpiryDate\":\"2020-11-21T01:09:33.5142701+00:00\"}", - "Date" : "Sat, 21 Nov 2020 00:53:34 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/f285ce24-201e-4aec-a560-a9a021ee25e5/cancel?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "X-Processing-Time" : "646ms", - "MS-CV" : "6ejInkON+064ug+SZoHlxA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0D2W4XwAAAACrjKKBeM+fSpzoYSOTpwcEWVZSMzBFREdFMDQxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "202", - "Date" : "Sat, 21 Nov 2020 00:53:35 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservationWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservationWithResponse.json deleted file mode 100644 index 475d4e528387..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservationWithResponse.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1765ms", - "MS-CV" : "bzjyLz6xPkyUXcsKDR7IuQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0qF24XwAAAABdOkld007uTZcMBqA9cvQMWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:22:01 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "259ms", - "MS-CV" : "6KENKkI4Ak2iDDqlhq6/Sg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0ql24XwAAAABnaEcpqJlHQbyPxLtDTwLTWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:22:02 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1324ms", - "MS-CV" : "yHHZvdJlI0GcmSMBrSXHmw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0ql24XwAAAABdq51V6QY/RIoi+JPIfHeZWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "201", - "Body" : "{\"searchId\":\"d8703a93-a8c0-434d-ac3c-edf14a8ef4a0\"}", - "Date" : "Sat, 21 Nov 2020 00:22:03 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d8703a93-a8c0-434d-ac3c-edf14a8ef4a0?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "280ms", - "MS-CV" : "1VWLyh+Jw0K7/TVmr7pv9A.0", - "retry-after" : "0", - "X-Azure-Ref" : "0rF24XwAAAABPMSddKxdgRKRCoBSzFwE7WVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d8703a93-a8c0-434d-ac3c-edf14a8ef4a0\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:22:02.9561068+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:22:04 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d8703a93-a8c0-434d-ac3c-edf14a8ef4a0?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "276ms", - "MS-CV" : "Yfggl2FZiUOi1VhCIeLUzg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0rV24XwAAAABZX6iwI2V/TrcYYNqtRpJQWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d8703a93-a8c0-434d-ac3c-edf14a8ef4a0\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:22:02.9561068+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:22:04 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d8703a93-a8c0-434d-ac3c-edf14a8ef4a0?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "272ms", - "MS-CV" : "OvYpNKncqUGH7hihrLS7cQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0rl24XwAAAABAPE29PhR+RYC69CjGKEn+WVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d8703a93-a8c0-434d-ac3c-edf14a8ef4a0\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:22:02.9561068+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:22:06 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d8703a93-a8c0-434d-ac3c-edf14a8ef4a0?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "340ms", - "MS-CV" : "/qLpIlSAJU6u6FQv4ADSuw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0sF24XwAAAAB6afG3Y/zZT4eU0nZFEEApWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d8703a93-a8c0-434d-ac3c-edf14a8ef4a0\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:22:02.9561068+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:22:07 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d8703a93-a8c0-434d-ac3c-edf14a8ef4a0?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "265ms", - "MS-CV" : "vlxkyEhkaUKQeo7cgFpmNQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0sV24XwAAAABsyk2c0K9dTZR5TZ6WjVtMWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d8703a93-a8c0-434d-ac3c-edf14a8ef4a0\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:22:02.9561068+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+12133442196\"],\"reservationExpiryDate\":\"2020-11-21T00:38:09.0614129+00:00\"}", - "Date" : "Sat, 21 Nov 2020 00:22:09 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d8703a93-a8c0-434d-ac3c-edf14a8ef4a0?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "269ms", - "MS-CV" : "Mnrftl2EAkuWv/YuDtFuhg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0sV24XwAAAACVyK0HeEWwT521H1XcuY+PWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"d8703a93-a8c0-434d-ac3c-edf14a8ef4a0\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:22:02.9561068+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+12133442196\"],\"reservationExpiryDate\":\"2020-11-21T00:38:09.0614129+00:00\"}", - "Date" : "Sat, 21 Nov 2020 00:22:10 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/d8703a93-a8c0-434d-ac3c-edf14a8ef4a0/cancel?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "X-Processing-Time" : "920ms", - "MS-CV" : "8r5Hyzy0C060mxkTnnPS4A.0", - "retry-after" : "0", - "X-Azure-Ref" : "0sl24XwAAAACFxRZdSRMSSq5XGzXt0M4gWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "202", - "Date" : "Sat, 21 Nov 2020 00:22:10 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservationWithResponseSync.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservationWithResponseSync.json deleted file mode 100644 index bafbb584ae15..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginCreateReservationGetReservationByIdCancelReservationWithResponseSync.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "2754ms", - "MS-CV" : "8Y9RUKJff0G+0NOEkb/UBQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0TmW4XwAAAAB1WjcAzHwDT5koPsD/gQ41WVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:54:40 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "295ms", - "MS-CV" : "ASlqexH650Kyoa0imKQfQQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0UWW4XwAAAABzCXf/kr28QaT8N9WbU/JQWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:54:41 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1099ms", - "MS-CV" : "BBwsd1EkwUWKu09By6NAWg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0UWW4XwAAAADo2m8Ba8lkTZab5hlIt6nbWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "201", - "Body" : "{\"searchId\":\"2bad3a1c-92d4-4b68-b846-20c453b2e4dc\"}", - "Date" : "Sat, 21 Nov 2020 00:54:42 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/2bad3a1c-92d4-4b68-b846-20c453b2e4dc?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "558ms", - "MS-CV" : "BH4zBit2FUaoUMNJbUhe6Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0UmW4XwAAAACnCu0InlWsQIDmfJ+bE894WVZSMzBFREdFMDMxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"2bad3a1c-92d4-4b68-b846-20c453b2e4dc\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:54:41.8117098+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:54:42 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/2bad3a1c-92d4-4b68-b846-20c453b2e4dc?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "298ms", - "MS-CV" : "RqsVN+vKT0uCK3j0pwrdhQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0VGW4XwAAAACcm2lSbTO6RI9QK523whr6WVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"2bad3a1c-92d4-4b68-b846-20c453b2e4dc\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:54:41.8117098+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:54:44 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/2bad3a1c-92d4-4b68-b846-20c453b2e4dc?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "639ms", - "MS-CV" : "c3mb/iK/HU6paAjKdFiEgQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0VWW4XwAAAADVPrBoC4trQJe8CYwkQSomWVZSMzBFREdFMDMxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"2bad3a1c-92d4-4b68-b846-20c453b2e4dc\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:54:41.8117098+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:54:45 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/2bad3a1c-92d4-4b68-b846-20c453b2e4dc?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "278ms", - "MS-CV" : "fbBeq85y2U21pNk5F+0oWQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0V2W4XwAAAAAS6vQG0epwTqvd6FZ79o0kWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"2bad3a1c-92d4-4b68-b846-20c453b2e4dc\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:54:41.8117098+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[]}", - "Date" : "Sat, 21 Nov 2020 00:54:47 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/2bad3a1c-92d4-4b68-b846-20c453b2e4dc?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "293ms", - "MS-CV" : "qBNGVQtPtEm4qYBFB767rw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0WGW4XwAAAAB1p+uFqvJ3RpwqgJlC5s0bWVZSMzBFREdFMDMxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"2bad3a1c-92d4-4b68-b846-20c453b2e4dc\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:54:41.8117098+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+12133442215\"],\"reservationExpiryDate\":\"2020-11-21T01:10:48.5658037+00:00\"}", - "Date" : "Sat, 21 Nov 2020 00:54:48 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/2bad3a1c-92d4-4b68-b846-20c453b2e4dc?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "274ms", - "MS-CV" : "5bk8sDrzQEmkq6k6fEmXxQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0WWW4XwAAAACFFtQBVnXrRr/SQKLJpIMWWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"2bad3a1c-92d4-4b68-b846-20c453b2e4dc\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-21T00:54:41.8117098+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+12133442215\"],\"reservationExpiryDate\":\"2020-11-21T01:10:48.5658037+00:00\"}", - "Date" : "Sat, 21 Nov 2020 00:54:49 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/2bad3a1c-92d4-4b68-b846-20c453b2e4dc/cancel?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "X-Processing-Time" : "872ms", - "MS-CV" : "ZlCIxbdKVUmdGmt7nycxyQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0WWW4XwAAAAAT19aqyBVXTbszfLC1KnS2WVZSMzBFREdFMDMxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "202", - "Date" : "Sat, 21 Nov 2020 00:54:49 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginPurchaseReservation.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginPurchaseReservation.json deleted file mode 100644 index 3a7f43c13f31..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginPurchaseReservation.json +++ /dev/null @@ -1,632 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1/purchase?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" : { - "X-Processing-Time" : "1454ms", - "MS-CV" : "Mv4PBSLGnkOjMDD2/7UnfQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "016OYXwAAAAD+h+uEJ+K6QI1JRVRcsKrxREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "202", - "Date" : "Tue, 27 Oct 2020 22:48:57 GMT" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "358ms", - "MS-CV" : "mQ4/m0i5I0aERWi+F6kbPA.0", - "retry-after" : "0", - "X-Azure-Ref" : "02qOYXwAAAACj4Om3krHfQaMHILLESNEfREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:48:58 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "276ms", - "MS-CV" : "fglR9kKwskihil18D0RbXw.0", - "retry-after" : "0", - "X-Azure-Ref" : "03KOYXwAAAAClBcLkVYRgRKK5u1u9hROSREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:00 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "453ms", - "MS-CV" : "RMMWm4Bp4U6OQ+b1duSeRA.0", - "retry-after" : "0", - "X-Azure-Ref" : "03aOYXwAAAAAx+QjqIxgUTo7ViLgxaZpoREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:01 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "289ms", - "MS-CV" : "fcDWL3hAHEKRiPHZcu0zog.0", - "retry-after" : "0", - "X-Azure-Ref" : "036OYXwAAAAAGI5ktzTzTQ7KxE5pc3htmREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:03 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "284ms", - "MS-CV" : "vHX2ABcmWUuupb4J6aEFyA.0", - "retry-after" : "0", - "X-Azure-Ref" : "04KOYXwAAAAB4aWpAmiz3RbbH4Xd5aOkGREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:04 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "272ms", - "MS-CV" : "cIA0/YZCYEGFOugymyOn6g.0", - "retry-after" : "0", - "X-Azure-Ref" : "04aOYXwAAAACjoIzQO5l6SpNW1u9aJ7LSREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:06 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "477ms", - "MS-CV" : "oE4FXkMHwESr2kRSqv++3A.0", - "retry-after" : "0", - "X-Azure-Ref" : "046OYXwAAAACp/p2mwMhqSLHFgJj4+od1REVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:07 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "280ms", - "MS-CV" : "AtLP4YeKEEK/iiHUTZaTNA.0", - "retry-after" : "0", - "X-Azure-Ref" : "05aOYXwAAAABQQ3MyYOpjT6064KD0IM3RREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:09 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "374ms", - "MS-CV" : "lNfyVZ2Npk60JlQC27cxBA.0", - "retry-after" : "0", - "X-Azure-Ref" : "05qOYXwAAAAD7sRA7/+96R5hgGhHx/l6WREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:10 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "296ms", - "MS-CV" : "pP/QPoO/y0GEAiAvlykrDA.0", - "retry-after" : "0", - "X-Azure-Ref" : "056OYXwAAAADRBlWI2CR9SbSedKBTGTtbREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:11 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "301ms", - "MS-CV" : "N1ZuWxChFUKHyRLzsbBV/A.0", - "retry-after" : "0", - "X-Azure-Ref" : "06aOYXwAAAABAoDBoJiDQQquGSjvGhYo5REVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:13 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "284ms", - "MS-CV" : "K+Ltgh1E1kiyqiWWRe0S3Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "06qOYXwAAAACy6bWKoeI3Ta5oOWTMJIjkREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:14 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "331ms", - "MS-CV" : "rycjNJPLzEWM2RBV3fFv3w.0", - "retry-after" : "0", - "X-Azure-Ref" : "07KOYXwAAAAAx31k3PK4kQarpRlY7e8cAREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:16 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "385ms", - "MS-CV" : "ZuXr4HIFtE6UWGR/3411Vw.0", - "retry-after" : "0", - "X-Azure-Ref" : "07aOYXwAAAAA9An47am1kRY45e5a6mHZUREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:17 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "Dluba6xMUkql/+F6Ci8xmw.0", - "retry-after" : "0", - "X-Azure-Ref" : "076OYXwAAAAAUXgawLg4uRKMl8KGahmcjREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:19 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "288ms", - "MS-CV" : "JWrM5b6I+EWNV1wGbFPjvA.0", - "retry-after" : "0", - "X-Azure-Ref" : "08KOYXwAAAAC6aOlT+nenQYIWbED2zexLREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:20 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "387ms", - "MS-CV" : "bxceYgePg0exXvxbSc2FUg.0", - "retry-after" : "0", - "X-Azure-Ref" : "08aOYXwAAAAC8RcpEINaaTowSfXzODF3fREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:22 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "567ms", - "MS-CV" : "ZJeAPruvuUOB2ewat2CZbA.0", - "retry-after" : "0", - "X-Azure-Ref" : "086OYXwAAAAD1tXRlXcfmRqZ+Fgn6oR/2REVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:23 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "297ms", - "MS-CV" : "mfKe2XJxREiHXjbIgFN1CA.0", - "retry-after" : "0", - "X-Azure-Ref" : "09aOYXwAAAAD0a4oVUJfbQriz6b4c1Pc9REVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:25 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "287ms", - "MS-CV" : "fdFrbWdSp0SM0ZYY6oZ59g.0", - "retry-after" : "0", - "X-Azure-Ref" : "09qOYXwAAAACePbt4kWOySbER6FR6xITGREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:26 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "289ms", - "MS-CV" : "ROt6Ep5gBEuFdvRWPe7a6g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0+KOYXwAAAACMIxeOpfIlTr2/GbwHtXBTREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:28 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "311ms", - "MS-CV" : "N6wduNYeRkOJ+iYnIuGQmQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0+aOYXwAAAABHUS6vAcF3QauWD0FRHjtMREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:29 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "581ms", - "MS-CV" : "CawDI5+pD0CjKTxwNFXP9w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0+qOYXwAAAAAGSqPib7moTpFDw8vkDNlyREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:31 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "303ms", - "MS-CV" : "jDx5jMcGFk+/GrLytXUdFA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0/KOYXwAAAACLxS3FMwB6TriEqzEZdnKVREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:32 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "417ms", - "MS-CV" : "1AmO4tp/Y06/ljh8ffWq7g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0/qOYXwAAAAB2jL/qmAqER7fBCsd6QLPDREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:34 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "297ms", - "MS-CV" : "58gUG3WMh0ev5xg8tkRTwg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0/6OYXwAAAADyzH/fP2soTouU8oIO67tzREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:35 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "304ms", - "MS-CV" : "GMQgSDgc7UK6786GFOl4yw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0AaSYXwAAAABofq1JUB9UTYb44w0Bq0ErREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:37 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "292ms", - "MS-CV" : "xxfrNAJdgEGQodsdghnsyg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0AqSYXwAAAABnsqScZkobQIvuotT1yITmREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:38 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "289ms", - "MS-CV" : "t9L5z/sEnky7d8xUwUCKbw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0A6SYXwAAAACPWkAHP7biQpxSTraN714rREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:39 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "287ms", - "MS-CV" : "0ZhUpZqO/0avEk3k6jyLig.0", - "retry-after" : "0", - "X-Azure-Ref" : "0BaSYXwAAAAC4b7vdlr2fT6B3V/LbkX0mREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:41 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "299ms", - "MS-CV" : "VGJSA8i69EyCrmWCt94nPQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0BqSYXwAAAABl6+cFTONoTIduG7Qvs1oxREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:42 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "485ms", - "MS-CV" : "lGBXxkaT9UqcWoZGNF9Ppg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0CKSYXwAAAAD+KGRZOXTyQpKzCBumEA3QREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:44 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "283ms", - "MS-CV" : "YpMfVudN70KVIVGWJL7R/A.0", - "retry-after" : "0", - "X-Azure-Ref" : "0CaSYXwAAAACV4jyJ0GWtR4xjVTRJ7I0IREVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Success\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:45 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?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" : "297ms", - "MS-CV" : "cLWeHx7HY0arBKOchFl0cQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0CqSYXwAAAADOI7TnDoXMRbSGoZR4qkr8REVOMDJFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testreservation20200014\",\"createdAt\":\"2020-10-27T22:46:25.5026489+00:00\",\"description\":\"testreservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"213\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Success\",\"phoneNumbers\":[\"+12134592995\",\"+12134592997\"],\"reservationExpiryDate\":\"2020-10-27T23:02:41.3187451+00:00\"}", - "Date" : "Tue, 27 Oct 2020 22:49:46 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} 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 deleted file mode 100644 index a8a3f3df061d..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/beginReleasePhoneNumbers.json +++ /dev/null @@ -1,473 +0,0 @@ -{ - "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 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1148ms", - "MS-CV" : "kYcVVMX+GEexVLb+OgEYEA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0DZytXwAAAAAG4saHzAKKRK78R7n3wqQETEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\"}", - "Date" : "Thu, 12 Nov 2020 20:33:17 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "524ms", - "MS-CV" : "xxKPyg/JIkuIMX2hlC56ag.0", - "retry-after" : "0", - "X-Azure-Ref" : "0DpytXwAAAAAulBJGzzdXTaVnCv9t8ZUGTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"Pending\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:18 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "184ms", - "MS-CV" : "AxD/NgI+ok+AryXumzaezg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0EJytXwAAAACD+8u0ThAzR5tj66NU7Ly/TEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"Pending\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:19 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "188ms", - "MS-CV" : "6wgQh7pda0q7qUjsUjNJtA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0EZytXwAAAACHJiD4VMd8T5B2+87oTpBxTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"Pending\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:20 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "188ms", - "MS-CV" : "CQYd70LN8U+bHU5G/zLLtA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0EpytXwAAAAA0XSmx9exyRZpXHCCt3ELITEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"Pending\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:22 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "256ms", - "MS-CV" : "MTb5lXaHAU+isY2y+7VBUA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0FJytXwAAAABNJTSS7ousT7WrjVljGQp0TEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"Pending\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:23 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "183ms", - "MS-CV" : "nqBrJAlUqki8NcoasbGFKg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0FZytXwAAAACIyd/pMI9VTLurmbce146GTEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:25 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "190ms", - "MS-CV" : "li06UdeyjUK4eFC6ycKaOg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0FpytXwAAAAD6lwCJGviKR5boatLu6l8tTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:26 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "241ms", - "MS-CV" : "TYisPdehNU+4Y/U5i3qutA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0F5ytXwAAAABLh/IaiWEIRI/EqP1FjK/eTEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:27 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "243ms", - "MS-CV" : "WHnM9R0js0aX6DibJfFJrQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0GZytXwAAAAAgYc1PdkSyR5sBJvm0GVRoTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:28 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "199ms", - "MS-CV" : "uv+1b/p5EkGX5GR4QcScgQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0GpytXwAAAAAOSKHNuT+cQYA/NepFbJcOTEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:30 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "262ms", - "MS-CV" : "kZfMzryQp0SJCvnNj/e1HA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0G5ytXwAAAAA9J29FViYuR76d3IsiLZpdTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:31 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "223ms", - "MS-CV" : "hGTsLSN9c0+Hb3Y0Av0bIQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0HZytXwAAAADdrH26tAHeQqUktSMAQFpVTEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:32 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "194ms", - "MS-CV" : "R3Spn034ykSniWgTu/3fgQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0HpytXwAAAACYq5LSpza7QbpP8bWXJcCkTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:34 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "190ms", - "MS-CV" : "5+uZcW+bikuZvDw9JS5KFA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0H5ytXwAAAAC4bojcjoWoQKbJ3XZ0QnwfTEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:35 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "190ms", - "MS-CV" : "ikG/CbJ+n0m98rLy6nO8tw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0IZytXwAAAADyyymSih3KQqMZXPrFBSfgTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:36 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "196ms", - "MS-CV" : "uJG2+UiS2ECDIN8AsoLPJg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0IpytXwAAAADtR3aEWLKcRJ/eIL6SGOriTEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:37 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "184ms", - "MS-CV" : "Mw5/zQhoN0OLQeo551As1A.0", - "retry-after" : "0", - "X-Azure-Ref" : "0I5ytXwAAAAC4XXBS65Q8QISSAdDiexJfTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:39 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "210ms", - "MS-CV" : "G0F+Cqqc30Kdj4etQDfPGg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0JZytXwAAAACcaQ1mZ/xHSq+p1mj14tNdTEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:40 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "269ms", - "MS-CV" : "GeFZ4845QEunIgFyPdROgw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0JpytXwAAAAB9tbIUNhEKTKAEnkvhp4XkTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:41 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "179ms", - "MS-CV" : "bsE1LHdLUkeqy2e/DtQr8g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0J5ytXwAAAADaSdWEt2FhTLogq9l3D+iITEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:43 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "197ms", - "MS-CV" : "H9+3PMVs/EeLP5maN23Isg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0KJytXwAAAAD7EdfTHb0rRbTcnNnRU71rTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:44 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "191ms", - "MS-CV" : "durqSPaKeUulIzn3z33rfw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0KpytXwAAAACXjpfpRABwQZXmcmE0dxgHTEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:45 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "179ms", - "MS-CV" : "slAWCQ9l80GADy9KT7DNXg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0K5ytXwAAAAASn/1GuL5QSKAk3J2c56J/TEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:46 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "199ms", - "MS-CV" : "tuVelZMVV0u7aQLSTs6vdQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0LJytXwAAAABtLF8lnpHaRJpAunaF7XW2TEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"InProgress\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:48 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/e5bdeee1-ebca-4a2d-9a38-81998ff34737?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "201ms", - "MS-CV" : "ZIMWUB08BUmt8ahfsCXL9w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0LpytXwAAAADB7GHMSKNETpum3chSuJ+cTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"e5bdeee1-ebca-4a2d-9a38-81998ff34737\",\"createdAt\":\"2020-11-12T20:33:17.5723749+00:00\",\"status\":\"Complete\",\"phoneNumberReleaseStatusDetails\":{\"+13234882258\":{\"status\":\"Success\"}}}", - "Date" : "Thu, 12 Nov 2020 20:33:49 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/cancelReservation.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/cancelReservation.json deleted file mode 100644 index 87d1be6886d8..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/cancelReservation.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-2/cancel?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "X-Processing-Time" : "261ms", - "MS-CV" : "75fbF5PspE+xZHHBXU0Avg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QuysXwAAAAD0RRxhmp7PR40y8OpLt8GSTEFYRURHRTEyMTkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "Content-Length" : "0", - "StatusCode" : "202", - "Date" : "Thu, 12 Nov 2020 08:03:14 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/cancelReservationWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/cancelReservationWithResponse.json deleted file mode 100644 index 023309aa35e5..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/cancelReservationWithResponse.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-2/cancel?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "X-Processing-Time" : "1337ms", - "MS-CV" : "dml3KGYkokGft0szL1Pa/g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QeysXwAAAABtXTlcFvJPTIKdp9YCE8VqTEFYRURHRTEyMTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "Content-Length" : "0", - "StatusCode" : "202", - "Date" : "Thu, 12 Nov 2020 08:03:14 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumber.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumber.json deleted file mode 100644 index 5b617226fa80..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumber.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PATCH", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration/configure?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "X-Processing-Time" : "747ms", - "MS-CV" : "FXayA2Q73Um3gmoKDsdAVA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0MqKtXwAAAAB412Qnk4/3QblygwkW0zLrTEFYRURHRTEyMTkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "Content-Length" : "0", - "StatusCode" : "200", - "Date" : "Thu, 12 Nov 2020 20:59:31 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberGetNumberConfigurationUnconfigureNumber.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberGetNumberConfigurationUnconfigureNumber.json deleted file mode 100644 index 4769d5cadc4b..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberGetNumberConfigurationUnconfigureNumber.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PATCH", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration/configure?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "X-Processing-Time" : "754ms", - "MS-CV" : "Pj8yUyk+Hkm3BAlO3sPmYg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0FJLFXwAAAAB08zUZ+LlOQZKecB8JhaSGWVZSMzBFREdFMDMxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "200", - "Date" : "Tue, 01 Dec 2020 00:45:08 GMT" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "138ms", - "MS-CV" : "s062cTvzn0uWCjSqfTHo1w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0FZLFXwAAAAC467gfV1TvQbRERL8PvHkpWVZSMzBFREdFMDMxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"pstnConfiguration\":{\"callbackUrl\":\"https://callbackurl\",\"applicationId\":\"REDACTED\",\"azurePstnTargetId\":\"0561dcfa-a298-4f8e-95aa-c0c3bb35c7ea\"}}", - "Date" : "Tue, 01 Dec 2020 00:45:08 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "PATCH", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration/unconfigure?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "X-Processing-Time" : "392ms", - "MS-CV" : "Hm/ETkV02EukKHny4yUFYA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0FZLFXwAAAABdPUG9h1lbTZ3yDktNf3wvWVZSMzBFREdFMDMxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "200", - "Date" : "Tue, 01 Dec 2020 00:45:09 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberGetNumberConfigurationUnconfigureNumberWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberGetNumberConfigurationUnconfigureNumberWithResponse.json deleted file mode 100644 index d23d87388368..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberGetNumberConfigurationUnconfigureNumberWithResponse.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PATCH", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration/configure?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "X-Processing-Time" : "590ms", - "MS-CV" : "tjmThbSIAEaWwsEcsN1Y5g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0PozFXwAAAAALpu3O6gmcS4swb7CjDxMFWVZSMzBFREdFMDMxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "200", - "Date" : "Tue, 01 Dec 2020 00:20:15 GMT" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "648ms", - "MS-CV" : "11HWg4+ym0WymCp/jEB8iQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0P4zFXwAAAADDVLO9/ZhLRo7rX47lK0vBWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"pstnConfiguration\":{\"callbackUrl\":\"https://callbackurl\",\"applicationId\":\"REDACTED\",\"azurePstnTargetId\":\"60a6f158-d79b-42d4-835d-f42a2736c6b2\"}}", - "Date" : "Tue, 01 Dec 2020 00:20:16 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "PATCH", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration/unconfigure?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "X-Processing-Time" : "431ms", - "MS-CV" : "3ekroRYkQEKayLUNElHGFA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QIzFXwAAAABt6jIS8fjySb+nYnwYhSGVWVZSMzBFREdFMDMxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "200", - "Date" : "Tue, 01 Dec 2020 00:20:16 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberWithResponse.json deleted file mode 100644 index 8f05197981bc..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberWithResponse.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PATCH", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration/configure?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "X-Processing-Time" : "714ms", - "MS-CV" : "H0ifjbpkJE6RaN1BipBmJQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QuysXwAAAACKzsWvr5iHTqO7Ua25KZtjTEFYRURHRTEyMTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "Content-Length" : "0", - "StatusCode" : "200", - "Date" : "Thu, 12 Nov 2020 08:03:15 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncIdentityClientUsingConnectionString.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncIdentityClientUsingConnectionString.json deleted file mode 100644 index 2aa55fe3c72c..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncIdentityClientUsingConnectionString.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2020-07-20-preview2", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.2 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview1, 2020-07-20-preview2", - "X-Processing-Time" : "85ms", - "MS-CV" : "joUbsOqF2ECkTrjNxRXfOQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "02ct3XwAAAACUPkk1qGxvRZoV/a8Ps01CWVZSMzBFREdFMDMyMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"id\":\"REDACTED\"}", - "Date" : "Sat, 03 Oct 2020 00:54:49 GMT", - "x-ms-client-request-id" : "78e615f7-0e68-4b0b-ac37-176390c9f888", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncIdentityClientUsingManagedIdentity.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncIdentityClientUsingManagedIdentity.json deleted file mode 100644 index 4f4f29144daa..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncIdentityClientUsingManagedIdentity.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2020-07-20-preview2", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2", - "X-Processing-Time" : "894ms", - "MS-CV" : "ibeQW1NtqEWkUrrghlaQHg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0KmzJXwAAAADyBVf0Du24TofZ8x38MV62TEFYRURHRTEyMjEAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"id\":\"REDACTED\"}", - "Date" : "Thu, 03 Dec 2020 22:52:26 GMT", - "x-ms-client-request-id" : "68f2d849-c077-401f-9d61-68935734bc98", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] - } \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncPhoneNumberClientWithConnectionString.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncPhoneNumberClientWithConnectionString.json deleted file mode 100644 index ced5aec2a679..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncPhoneNumberClientWithConnectionString.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/phonenumbers?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "473ms", - "MS-CV" : "MmfrOs5KNUaCz9DFWj/tKA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0N164XwAAAABYb9kMAW5ARaRnuxSsn8VLWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phoneNumbers\":[{\"phoneNumber\":\"+12133140924\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133169475\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133255546\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133285595\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133441882\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133441884\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133442070\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+18443281555\",\"acquiredCapabilities\":[\"Azure\",\"ThirdPartyAppAssignment\",\"InboundA2PSms\",\"OutboundA2PSms\",\"TollFree\"],\"availableCapabilities\":[\"Azure\",\"Office365\",\"InboundCalling\",\"OutboundCalling\",\"ThirdPartyAppAssignment\",\"ConferenceAssignment\",\"FirstPartyAppAssignment\",\"TollFree\",\"InboundA2PSms\",\"OutboundA2PSms\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Toll-Free, United States\",\"activationState\":\"Activated\"}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:24:23 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncPhoneNumberClientWithManagedIdentity.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncPhoneNumberClientWithManagedIdentity.json deleted file mode 100644 index fb477bc5d850..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createAsyncPhoneNumberClientWithManagedIdentity.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/phonenumbers?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1152ms", - "MS-CV" : "9c1kEPQJJU+bhQNSjtAUhA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0kK8JYAAAAAB3XMI/BsSwQ6Lbo+6NqNmXTEFYRURHRTEyMTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"phoneNumbers\":[{\"phoneNumber\":\"+16194895839\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895842\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895873\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895875\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895877\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895878\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895879\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895880\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895881\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895882\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895883\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895885\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895886\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895887\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+16194895889\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"San Diego, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+18332271680\",\"acquiredCapabilities\":[\"Azure\",\"ThirdPartyAppAssignment\",\"OutboundA2PSms\",\"TollFree\"],\"availableCapabilities\":[\"Azure\",\"Office365\",\"InboundCalling\",\"OutboundCalling\",\"ThirdPartyAppAssignment\",\"ConferenceAssignment\",\"FirstPartyAppAssignment\",\"TollFree\",\"InboundA2PSms\",\"OutboundA2PSms\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"Toll-Free, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+18335260208\",\"acquiredCapabilities\":[\"Azure\",\"ThirdPartyAppAssignment\",\"InboundA2PSms\",\"OutboundA2PSms\",\"TollFree\",\"InboundCalling\"],\"availableCapabilities\":[\"ConferenceAssignment\",\"TollFree\",\"FirstPartyAppAssignment\",\"ThirdPartyAppAssignment\",\"Azure\",\"Office365\",\"InboundCalling\",\"OutboundCalling\",\"InboundA2PSms\",\"OutboundA2PSms\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Toll-Free, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+18336369501\",\"acquiredCapabilities\":[\"ConferenceAssignment\",\"TollFree\",\"FirstPartyAppAssignment\",\"ThirdPartyAppAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Azure\"],\"availableCapabilities\":[\"ConferenceAssignment\",\"TollFree\",\"FirstPartyAppAssignment\",\"ThirdPartyAppAssignment\",\"Azure\",\"Office365\",\"InboundCalling\",\"OutboundCalling\",\"InboundA2PSms\",\"OutboundA2PSms\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"Toll-Free, United States\",\"activationState\":\"Activated\"}],\"nextLink\":null}", - "Date" : "Thu, 21 Jan 2021 16:45:05 GMT", - "Request-Context" : "appId=", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] - } \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createIdentityClientUsingConnectionString.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/createIdentityClientUsingConnectionString.json deleted file mode 100644 index f4e901a6c552..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createIdentityClientUsingConnectionString.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2020-07-20-preview2", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2", - "X-Processing-Time" : "19ms", - "MS-CV" : "mekR+CC7TkGGvsx2EAwqyQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0AkW8XwAAAABhz+HBlyV+SZnP/9bihuymWVZSMzBFREdFMDMxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"id\":\"8:acs:5862fd15-f8ad-478e-b108-d211094ed9cd_00000006-974f-37bd-0338-3b3a0d001987\"}", - "Date" : "Mon, 23 Nov 2020 23:25:54 GMT", - "x-ms-client-request-id" : "8a3f7ae9-11bb-403b-940a-c7599d3e803e", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createIdentityClientUsingManagedIdentity.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/createIdentityClientUsingManagedIdentity.json deleted file mode 100644 index 71a6327e594c..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createIdentityClientUsingManagedIdentity.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2020-07-20-preview2", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2", - "X-Processing-Time" : "851ms", - "MS-CV" : "Lrnpzjv6X0iO5Oks4imTog.0", - "retry-after" : "0", - "X-Azure-Ref" : "0eNPPXwAAAAAV740P14wfSZfGnRMOk8axTEFYRURHRTEyMDYAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"id\":\"REDACTED\"}", - "Date" : "Tue, 08 Dec 2020 19:26:48 GMT", - "x-ms-client-request-id" : "704ba480-63dd-4ed8-9f5f-e5f91f190386", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] - } \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createReservation.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/createReservation.json deleted file mode 100644 index bd20429db277..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createReservation.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1189ms", - "MS-CV" : "SoV6sw+JME+e4gJoyE4YVg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QeysXwAAAADKbXoFcPCwQahQO5VoIYLpTEFYRURHRTEyMDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "201", - "Body" : "{\"searchId\":\"7167fcf6-8496-4b9e-922f-e60a0af289b8\"}", - "Date" : "Thu, 12 Nov 2020 08:03:14 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createReservationWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/createReservationWithResponse.json deleted file mode 100644 index d632f50219bd..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createReservationWithResponse.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1448ms", - "MS-CV" : "kzsWWjOiCUaxtOLgqgRtXQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QeysXwAAAABuL3eFw/rwT71NWnbmhkOCTEFYRURHRTEyMTgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "201", - "Body" : "{\"searchId\":\"ebbffd18-5ed1-46c8-99bb-5173ec53514c\"}", - "Date" : "Thu, 12 Nov 2020 08:03:13 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createReservationWithResponseNullSearchOptions.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/createReservationWithResponseNullSearchOptions.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createReservationWithResponseNullSearchOptions.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createSearchWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/createSearchWithResponse.json deleted file mode 100644 index 31d6fd2c714f..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/createSearchWithResponse.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.1 (11.0.8; Mac OS X 10.15.6)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1908ms", - "MS-CV" : "iCPTyFxnGUasIRC0sjS6EA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0UnxpXwAAAABYXg8D9ghBTbGgsb0s0ChSWVZSMzBFREdFMDMwOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "201", - "Body" : "{\"searchId\":\"5689cba3-0436-4917-8ce9-8841b2b2ee35\"}", - "Date" : "Tue, 22 Sep 2020 04:23:47 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodes.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodes.json deleted file mode 100644 index 5ed29a81e537..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodes.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1572ms", - "MS-CV" : "IkbsrFoIzkKA3nmcuX/iCA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0s124XwAAAAAUisniJ3V6SKX0Pmh8dsauWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:22:12 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "256ms", - "MS-CV" : "6HC8xm0Kd0GJlJemqx1UiQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0tF24XwAAAACHt7i6RGTqQKL/Y08HX2wkWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:22:12 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/areacodes?locationType=Selection&phonePlanId=REDACTED&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "184ms", - "MS-CV" : "YubFw8iBKU6VH3hHpQV7WQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0tV24XwAAAABydk950LkDR6GtIpj2++eTWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"primaryAreaCodes\":[\"213\"],\"secondaryAreaCodes\":[],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:22:13 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponse.json deleted file mode 100644 index 3f94b930c655..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponse.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "2849ms", - "MS-CV" : "c3cua5nLFUS3FsIjQT8vjA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0ol24XwAAAAAjurbM6/bGSbiZviOG+ky8WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:21:56 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "512ms", - "MS-CV" : "FLPPIMlUbEe2XncZzTEjCQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0pV24XwAAAACNcyylnciYQoyGGTavVf7pWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:21:58 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/areacodes?locationType=Selection&phonePlanId=REDACTED&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "295ms", - "MS-CV" : "ecYyO6pk40CE75p2rHqbTg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0pl24XwAAAACJwgQ9OgaFTJTuTPSntc5CWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"primaryAreaCodes\":[\"213\"],\"secondaryAreaCodes\":[],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:21:58 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponseNullCountryCode.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponseNullCountryCode.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponseNullCountryCode.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponseNullLocationType.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponseNullLocationType.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponseNullLocationType.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponseNullPhonePlanId.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponseNullPhonePlanId.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getAllAreaCodesWithResponseNullPhonePlanId.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getCapabilitiesUpdate.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getCapabilitiesUpdate.json deleted file mode 100644 index 8f414ea65512..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getCapabilitiesUpdate.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/capabilities/capabilities-id-1?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "565ms", - "MS-CV" : "/zJhMJ2NbUqkHso2/YwqDA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QuysXwAAAADB6MD6Z/T8SJZ4S8d5vojMTEFYRURHRTEyMDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"capabilitiesUpdateId\":\"capabilities-id-1\",\"createdAt\":\"2020-11-12T04:14:33.1025041+00:00\",\"capabilitiesUpdateStatus\":\"Complete\",\"phoneNumberCapabilitiesUpdates\":{\"+12133285934\":{\"add\":[\"InboundCalling\"],\"remove\":[]}}}", - "Date" : "Thu, 12 Nov 2020 08:03:14 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getCapabilitiesUpdateWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getCapabilitiesUpdateWithResponse.json deleted file mode 100644 index fefafa504a64..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getCapabilitiesUpdateWithResponse.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/capabilities/capabilities-id-1?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "276ms", - "MS-CV" : "qf2BClHxhEqL9ek8pMp7MA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Q+ysXwAAAABEhM+bmntmT6wop8/QCv04TEFYRURHRTEyMDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"capabilitiesUpdateId\":\"capabilities-id-1\",\"createdAt\":\"2020-11-12T04:14:33.1025041+00:00\",\"capabilitiesUpdateStatus\":\"Complete\",\"phoneNumberCapabilitiesUpdates\":{\"+12133285934\":{\"add\":[\"InboundCalling\"],\"remove\":[]}}}", - "Date" : "Thu, 12 Nov 2020 08:03:14 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getCapabilitiesUpdateWithResponseNullCapabilitiesId.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getCapabilitiesUpdateWithResponseNullCapabilitiesId.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getCapabilitiesUpdateWithResponseNullCapabilitiesId.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getNumberConfiguration.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getNumberConfiguration.json deleted file mode 100644 index a221dd26c4a3..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getNumberConfiguration.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "802ms", - "MS-CV" : "/TF1eYUPXkGHBtiTC20t9w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0TKKtXwAAAAAdaw7X/YnoQLE3sY0jesBhTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"pstnConfiguration\":{\"callbackUrl\":\"https://callbackurl\",\"applicationId\":\"ApplicationId\"}}", - "Date" : "Thu, 12 Nov 2020 20:59:56 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getNumberConfigurationWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getNumberConfigurationWithResponse.json deleted file mode 100644 index 2a3b60220ce2..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getNumberConfigurationWithResponse.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "497ms", - "MS-CV" : "tkNxYo7nm0WiH3JlZ2xYEg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0aqKtXwAAAADw5O9t54OZRZ/BguzYUS6GTEFYRURHRTEyMTYAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"pstnConfiguration\":{\"callbackUrl\":\"https://callbackurl\",\"applicationId\":\"ApplicationId\"}}", - "Date" : "Thu, 12 Nov 2020 21:00:26 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getNumberConfigurationWithResponseNullPhoneNumber.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getNumberConfigurationWithResponseNullPhoneNumber.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getNumberConfigurationWithResponseNullPhoneNumber.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptions.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptions.json deleted file mode 100644 index 4bb12de9ea14..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptions.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1567ms", - "MS-CV" : "sKARBP123ES+kUGm/UseAQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0t124XwAAAAArHBgVheaKRYWOpBfewSLAWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:22:16 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "639ms", - "MS-CV" : "T/ecuJfUdkiNtfg2O4Mj1Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0uF24XwAAAAA6RNlpwKMzTZjOW+mG7qyFWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:22:16 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans/REDACTED/locationoptions?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "713ms", - "MS-CV" : "GUCUgxLMYU+0bI3GYYV1cw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0uV24XwAAAAAa09BNMlMlQLJny7Qg5Os1WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"locationOptions\":{\"labelId\":\"state\",\"labelName\":\"State\",\"options\":[{\"name\":\"AL\",\"value\":\"AL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Birmingham\",\"value\":\"NOAM-US-AL-BI\",\"locationOptions\":[]},{\"name\":\"Huntsville\",\"value\":\"NOAM-US-AL-HN\",\"locationOptions\":[]},{\"name\":\"Mobile\",\"value\":\"NOAM-US-AL-MO\",\"locationOptions\":[]},{\"name\":\"Montgomery\",\"value\":\"NOAM-US-AL-MN\",\"locationOptions\":[]}]}]},{\"name\":\"AR\",\"value\":\"AR\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Fort Smith\",\"value\":\"NOAM-US-AR-FS\",\"locationOptions\":[]},{\"name\":\"Jonesboro\",\"value\":\"NOAM-US-AR-JO\",\"locationOptions\":[]},{\"name\":\"Little Rock\",\"value\":\"NOAM-US-AR-LR\",\"locationOptions\":[]}]}]},{\"name\":\"AZ\",\"value\":\"AZ\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Phoenix\",\"value\":\"NOAM-US-AZ-PH\",\"locationOptions\":[]}]}]},{\"name\":\"CA\",\"value\":\"CA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Burbank\",\"value\":\"NOAM-US-CA-BU\",\"locationOptions\":[]},{\"name\":\"Concord\",\"value\":\"NOAM-US-CA-CO\",\"locationOptions\":[]},{\"name\":\"Fresno\",\"value\":\"NOAM-US-CA-FR\",\"locationOptions\":[]},{\"name\":\"Irvine\",\"value\":\"NOAM-US-CA-IR\",\"locationOptions\":[]},{\"name\":\"Los Angeles\",\"value\":\"NOAM-US-CA-LA\",\"locationOptions\":[]},{\"name\":\"Riverside\",\"value\":\"NOAM-US-CA-RI\",\"locationOptions\":[]},{\"name\":\"Sacramento\",\"value\":\"NOAM-US-CA-SA\",\"locationOptions\":[]},{\"name\":\"Salinas\",\"value\":\"NOAM-US-CA-SL\",\"locationOptions\":[]},{\"name\":\"San Diego\",\"value\":\"NOAM-US-CA-SD\",\"locationOptions\":[]},{\"name\":\"San Francisco\",\"value\":\"NOAM-US-CA-SF\",\"locationOptions\":[]},{\"name\":\"San Jose\",\"value\":\"NOAM-US-CA-SJ\",\"locationOptions\":[]},{\"name\":\"Santa Barbara\",\"value\":\"NOAM-US-CA-SB\",\"locationOptions\":[]},{\"name\":\"Santa Clarita\",\"value\":\"NOAM-US-CA-SC\",\"locationOptions\":[]},{\"name\":\"Santa Rosa\",\"value\":\"NOAM-US-CA-SR\",\"locationOptions\":[]},{\"name\":\"Stockton\",\"value\":\"NOAM-US-CA-ST\",\"locationOptions\":[]}]}]},{\"name\":\"CL\",\"value\":\"CL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Washington DC\",\"value\":\"NOAM-US-CL-DC\",\"locationOptions\":[]}]}]},{\"name\":\"CO\",\"value\":\"CO\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Denver\",\"value\":\"NOAM-US-CO-DE\",\"locationOptions\":[]},{\"name\":\"Pueblo\",\"value\":\"NOAM-US-CO-PU\",\"locationOptions\":[]}]}]},{\"name\":\"CT\",\"value\":\"CT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Bridgeport\",\"value\":\"NOAM-US-CT-BR\",\"locationOptions\":[]},{\"name\":\"Hartford\",\"value\":\"NOAM-US-CT-HA\",\"locationOptions\":[]}]}]},{\"name\":\"DE\",\"value\":\"DE\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Wilmington\",\"value\":\"NOAM-US-DE-WI\",\"locationOptions\":[]}]}]},{\"name\":\"FL\",\"value\":\"FL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Cape Coral\",\"value\":\"NOAM-US-FL-CC\",\"locationOptions\":[]},{\"name\":\"Fort Lauderdale\",\"value\":\"NOAM-US-FL-FL\",\"locationOptions\":[]},{\"name\":\"Gainesville\",\"value\":\"NOAM-US-FL-GA\",\"locationOptions\":[]},{\"name\":\"Jacksonville\",\"value\":\"NOAM-US-FL-JA\",\"locationOptions\":[]},{\"name\":\"Lakeland\",\"value\":\"NOAM-US-FL-LA\",\"locationOptions\":[]},{\"name\":\"Miami\",\"value\":\"NOAM-US-FL-MI\",\"locationOptions\":[]},{\"name\":\"Orlando\",\"value\":\"NOAM-US-FL-OR\",\"locationOptions\":[]},{\"name\":\"Port St Lucie\",\"value\":\"NOAM-US-FL-PS\",\"locationOptions\":[]},{\"name\":\"Sarasota\",\"value\":\"NOAM-US-FL-SA\",\"locationOptions\":[]},{\"name\":\"St. Petersburg\",\"value\":\"NOAM-US-FL-SP\",\"locationOptions\":[]},{\"name\":\"Tallahassee\",\"value\":\"NOAM-US-FL-TA\",\"locationOptions\":[]},{\"name\":\"West Palm Beach\",\"value\":\"NOAM-US-FL-WP\",\"locationOptions\":[]}]}]},{\"name\":\"GA\",\"value\":\"GA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Albany\",\"value\":\"NOAM-US-GA-AL\",\"locationOptions\":[]},{\"name\":\"Atlanta\",\"value\":\"NOAM-US-GA-AT\",\"locationOptions\":[]},{\"name\":\"Augusta\",\"value\":\"NOAM-US-GA-AU\",\"locationOptions\":[]},{\"name\":\"Macon\",\"value\":\"NOAM-US-GA-MA\",\"locationOptions\":[]},{\"name\":\"Savannah\",\"value\":\"NOAM-US-GA-SA\",\"locationOptions\":[]}]}]},{\"name\":\"HI\",\"value\":\"HI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Honolulu\",\"value\":\"NOAM-US-HI-HO\",\"locationOptions\":[]}]}]},{\"name\":\"IA\",\"value\":\"IA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Cedar Rapids\",\"value\":\"NOAM-US-IA-CR\",\"locationOptions\":[]},{\"name\":\"Davenport\",\"value\":\"NOAM-US-IA-DA\",\"locationOptions\":[]},{\"name\":\"Mason City\",\"value\":\"NOAM-US-IA-MC\",\"locationOptions\":[]},{\"name\":\"Sioux City\",\"value\":\"NOAM-US-IA-SC\",\"locationOptions\":[]}]}]},{\"name\":\"ID\",\"value\":\"ID\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Boise\",\"value\":\"NOAM-US-ID-BO\",\"locationOptions\":[]}]}]},{\"name\":\"IL\",\"value\":\"IL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Alton\",\"value\":\"NOAM-US-IL-AL\",\"locationOptions\":[]},{\"name\":\"Aurora\",\"value\":\"NOAM-US-IL-AU\",\"locationOptions\":[]},{\"name\":\"Big Rock\",\"value\":\"NOAM-US-IL-BK\",\"locationOptions\":[]},{\"name\":\"Chicago\",\"value\":\"NOAM-US-IL-CH\",\"locationOptions\":[]},{\"name\":\"Rock Island\",\"value\":\"NOAM-US-IL-RI\",\"locationOptions\":[]},{\"name\":\"Rockford\",\"value\":\"NOAM-US-IL-RO\",\"locationOptions\":[]},{\"name\":\"Waukegan\",\"value\":\"NOAM-US-IL-WK\",\"locationOptions\":[]}]}]},{\"name\":\"IN\",\"value\":\"IN\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Evansville\",\"value\":\"NOAM-US-IN-EV\",\"locationOptions\":[]},{\"name\":\"Fort Wayne\",\"value\":\"NOAM-US-IN-FW\",\"locationOptions\":[]},{\"name\":\"Gary\",\"value\":\"NOAM-US-IN-GA\",\"locationOptions\":[]},{\"name\":\"Indianapolis\",\"value\":\"NOAM-US-IN-IN\",\"locationOptions\":[]},{\"name\":\"South Bend\",\"value\":\"NOAM-US-IN-SB\",\"locationOptions\":[]}]}]},{\"name\":\"KS\",\"value\":\"KS\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Kansas City\",\"value\":\"NOAM-US-KS-KS\",\"locationOptions\":[]},{\"name\":\"Topeka\",\"value\":\"NOAM-US-KS-TO\",\"locationOptions\":[]},{\"name\":\"Wichita\",\"value\":\"NOAM-US-KS-WI\",\"locationOptions\":[]}]}]},{\"name\":\"KY\",\"value\":\"KY\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Lexington\",\"value\":\"NOAM-US-KY-LE\",\"locationOptions\":[]},{\"name\":\"Louisville\",\"value\":\"NOAM-US-KY-LO\",\"locationOptions\":[]}]}]},{\"name\":\"LA\",\"value\":\"LA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Baton Rouge\",\"value\":\"NOAM-US-LA-BR\",\"locationOptions\":[]},{\"name\":\"Lafayette\",\"value\":\"NOAM-US-LA-LA\",\"locationOptions\":[]},{\"name\":\"New Orleans\",\"value\":\"NOAM-US-LA-NO\",\"locationOptions\":[]},{\"name\":\"Shreveport\",\"value\":\"NOAM-US-LA-SH\",\"locationOptions\":[]}]}]},{\"name\":\"MA\",\"value\":\"MA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Lowell\",\"value\":\"NOAM-US-MA-LO\",\"locationOptions\":[]}]}]},{\"name\":\"MD\",\"value\":\"MD\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Baltimore\",\"value\":\"NOAM-US-MD-BA\",\"locationOptions\":[]}]}]},{\"name\":\"ME\",\"value\":\"ME\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Portland\",\"value\":\"NOAM-US-ME-PO\",\"locationOptions\":[]}]}]},{\"name\":\"MI\",\"value\":\"MI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Ann Arbor\",\"value\":\"NOAM-US-MI-AA\",\"locationOptions\":[]},{\"name\":\"Detroit\",\"value\":\"NOAM-US-MI-DE\",\"locationOptions\":[]},{\"name\":\"Flint\",\"value\":\"NOAM-US-MI-FL\",\"locationOptions\":[]},{\"name\":\"Grand Rapids\",\"value\":\"NOAM-US-MI-GP\",\"locationOptions\":[]},{\"name\":\"Grant\",\"value\":\"NOAM-US-MI-GR\",\"locationOptions\":[]},{\"name\":\"Lansing\",\"value\":\"NOAM-US-MI-LA\",\"locationOptions\":[]},{\"name\":\"Otsego\",\"value\":\"NOAM-US-MI-OT\",\"locationOptions\":[]},{\"name\":\"Saginaw\",\"value\":\"NOAM-US-MI-SA\",\"locationOptions\":[]},{\"name\":\"Sault Ste Marie\",\"value\":\"NOAM-US-MI-SS\",\"locationOptions\":[]},{\"name\":\"Troy\",\"value\":\"NOAM-US-MI-TR\",\"locationOptions\":[]}]}]},{\"name\":\"MN\",\"value\":\"MN\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Alexandria\",\"value\":\"NOAM-US-MN-AL\",\"locationOptions\":[]},{\"name\":\"Duluth\",\"value\":\"NOAM-US-MN-DU\",\"locationOptions\":[]},{\"name\":\"Minneapolis\",\"value\":\"NOAM-US-MN-MI\",\"locationOptions\":[]},{\"name\":\"Plymouth\",\"value\":\"NOAM-US-MN-PL\",\"locationOptions\":[]}]}]},{\"name\":\"MO\",\"value\":\"MO\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Columbia\",\"value\":\"NOAM-US-MO-CO\",\"locationOptions\":[]},{\"name\":\"Kansas City\",\"value\":\"NOAM-US-MO-KS\",\"locationOptions\":[]},{\"name\":\"Marshall\",\"value\":\"NOAM-US-MO-MA\",\"locationOptions\":[]},{\"name\":\"Springfield\",\"value\":\"NOAM-US-MO-SP\",\"locationOptions\":[]},{\"name\":\"St. Charles\",\"value\":\"NOAM-US-MO-SC\",\"locationOptions\":[]},{\"name\":\"St. Louis\",\"value\":\"NOAM-US-MO-SL\",\"locationOptions\":[]}]}]},{\"name\":\"MS\",\"value\":\"MS\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Biloxi\",\"value\":\"NOAM-US-MS-BI\",\"locationOptions\":[]},{\"name\":\"Jackson\",\"value\":\"NOAM-US-MS-JA\",\"locationOptions\":[]},{\"name\":\"Starkville\",\"value\":\"NOAM-US-MS-ST\",\"locationOptions\":[]}]}]},{\"name\":\"MT\",\"value\":\"MT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Billings\",\"value\":\"NOAM-US-MT-BI\",\"locationOptions\":[]}]}]},{\"name\":\"NC\",\"value\":\"NC\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Asheville\",\"value\":\"NOAM-US-NC-AS\",\"locationOptions\":[]},{\"name\":\"Charlotte\",\"value\":\"NOAM-US-NC-CH\",\"locationOptions\":[]},{\"name\":\"Fayetteville\",\"value\":\"NOAM-US-NC-FA\",\"locationOptions\":[]},{\"name\":\"Greensboro\",\"value\":\"NOAM-US-NC-GR\",\"locationOptions\":[]},{\"name\":\"Raleigh\",\"value\":\"NOAM-US-NC-RA\",\"locationOptions\":[]},{\"name\":\"Rocky Mount\",\"value\":\"NOAM-US-NC-RM\",\"locationOptions\":[]}]}]},{\"name\":\"ND\",\"value\":\"ND\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Fargo\",\"value\":\"NOAM-US-ND-FA\",\"locationOptions\":[]}]}]},{\"name\":\"NE\",\"value\":\"NE\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Kearney\",\"value\":\"NOAM-US-NE-KE\",\"locationOptions\":[]},{\"name\":\"Omaha\",\"value\":\"NOAM-US-NE-OM\",\"locationOptions\":[]}]}]},{\"name\":\"NJ\",\"value\":\"NJ\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Atlantic City\",\"value\":\"NOAM-US-NJ-AC\",\"locationOptions\":[]},{\"name\":\"Camden\",\"value\":\"NOAM-US-NJ-CA\",\"locationOptions\":[]},{\"name\":\"Edison\",\"value\":\"NOAM-US-NJ-ED\",\"locationOptions\":[]},{\"name\":\"Elizabeth\",\"value\":\"NOAM-US-NJ-EL\",\"locationOptions\":[]},{\"name\":\"Jersey City\",\"value\":\"NOAM-US-NJ-JC\",\"locationOptions\":[]},{\"name\":\"Newark\",\"value\":\"NOAM-US-NJ-NE\",\"locationOptions\":[]}]}]},{\"name\":\"NM\",\"value\":\"NM\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Albuquerque\",\"value\":\"NOAM-US-NM-AL\",\"locationOptions\":[]},{\"name\":\"Las Cruces\",\"value\":\"NOAM-US-NM-LC\",\"locationOptions\":[]}]}]},{\"name\":\"NV\",\"value\":\"NV\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Las Vegas\",\"value\":\"NOAM-US-NV-LV\",\"locationOptions\":[]},{\"name\":\"Reno\",\"value\":\"NOAM-US-NV-RE\",\"locationOptions\":[]}]}]},{\"name\":\"NY\",\"value\":\"NY\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Albany\",\"value\":\"NOAM-US-NY-AL\",\"locationOptions\":[]},{\"name\":\"Brentwood\",\"value\":\"NOAM-US-NY-BR\",\"locationOptions\":[]},{\"name\":\"Elmira\",\"value\":\"NOAM-US-NY-EL\",\"locationOptions\":[]},{\"name\":\"Hempstead\",\"value\":\"NOAM-US-NY-HE\",\"locationOptions\":[]},{\"name\":\"New York City\",\"value\":\"NOAM-US-NY-NY\",\"locationOptions\":[]},{\"name\":\"Niagara Falls\",\"value\":\"NOAM-US-NY-NF\",\"locationOptions\":[]},{\"name\":\"Rochester\",\"value\":\"NOAM-US-NY-RO\",\"locationOptions\":[]},{\"name\":\"Syracuse\",\"value\":\"NOAM-US-NY-SY\",\"locationOptions\":[]},{\"name\":\"Yonkers\",\"value\":\"NOAM-US-NY-YO\",\"locationOptions\":[]}]}]},{\"name\":\"OH\",\"value\":\"OH\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Akron\",\"value\":\"NOAM-US-OH-AK\",\"locationOptions\":[]},{\"name\":\"Cincinnati\",\"value\":\"NOAM-US-OH-CI\",\"locationOptions\":[]},{\"name\":\"Cleveland\",\"value\":\"NOAM-US-OH-CL\",\"locationOptions\":[]},{\"name\":\"Columbus\",\"value\":\"NOAM-US-OH-CO\",\"locationOptions\":[]},{\"name\":\"Dayton\",\"value\":\"NOAM-US-OH-DA\",\"locationOptions\":[]},{\"name\":\"Toledo\",\"value\":\"NOAM-US-OH-TO\",\"locationOptions\":[]}]}]},{\"name\":\"OK\",\"value\":\"OK\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Lawton\",\"value\":\"NOAM-US-OK-LA\",\"locationOptions\":[]},{\"name\":\"Oklahoma City\",\"value\":\"NOAM-US-OK-OC\",\"locationOptions\":[]},{\"name\":\"Tulsa\",\"value\":\"NOAM-US-OK-TU\",\"locationOptions\":[]}]}]},{\"name\":\"OR\",\"value\":\"OR\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Portland\",\"value\":\"NOAM-US-OR-PO\",\"locationOptions\":[]}]}]},{\"name\":\"PA\",\"value\":\"PA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Erie\",\"value\":\"NOAM-US-PA-ER\",\"locationOptions\":[]},{\"name\":\"Lancaster\",\"value\":\"NOAM-US-PA-LA\",\"locationOptions\":[]},{\"name\":\"Philadelphia\",\"value\":\"NOAM-US-PA-PI\",\"locationOptions\":[]},{\"name\":\"Pittsburgh\",\"value\":\"NOAM-US-PA-PT\",\"locationOptions\":[]},{\"name\":\"Scranton\",\"value\":\"NOAM-US-PA-SC\",\"locationOptions\":[]}]}]},{\"name\":\"RI\",\"value\":\"RI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Providence\",\"value\":\"NOAM-US-RI-PR\",\"locationOptions\":[]}]}]},{\"name\":\"SC\",\"value\":\"SC\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Charleston\",\"value\":\"NOAM-US-SC-CH\",\"locationOptions\":[]},{\"name\":\"Columbia\",\"value\":\"NOAM-US-SC-CO\",\"locationOptions\":[]},{\"name\":\"Greenville\",\"value\":\"NOAM-US-SC-GR\",\"locationOptions\":[]}]}]},{\"name\":\"SD\",\"value\":\"SD\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Sioux Falls\",\"value\":\"NOAM-US-SD-SF\",\"locationOptions\":[]}]}]},{\"name\":\"TN\",\"value\":\"TN\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Chattanooga\",\"value\":\"NOAM-US-TN-CH\",\"locationOptions\":[]},{\"name\":\"Clarksville\",\"value\":\"NOAM-US-TN-CL\",\"locationOptions\":[]},{\"name\":\"Jackson\",\"value\":\"NOAM-US-TN-JA\",\"locationOptions\":[]},{\"name\":\"Knoxville\",\"value\":\"NOAM-US-TN-KN\",\"locationOptions\":[]},{\"name\":\"Memphis\",\"value\":\"NOAM-US-TN-ME\",\"locationOptions\":[]},{\"name\":\"Nashville\",\"value\":\"NOAM-US-TN-NA\",\"locationOptions\":[]}]}]},{\"name\":\"TX\",\"value\":\"TX\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Abilene\",\"value\":\"NOAM-US-TX-AB\",\"locationOptions\":[]},{\"name\":\"Austin\",\"value\":\"NOAM-US-TX-AU\",\"locationOptions\":[]},{\"name\":\"Bryan\",\"value\":\"NOAM-US-TX-BR\",\"locationOptions\":[]},{\"name\":\"Corpus Christi\",\"value\":\"NOAM-US-TX-CC\",\"locationOptions\":[]},{\"name\":\"Denton\",\"value\":\"NOAM-US-TX-DE\",\"locationOptions\":[]},{\"name\":\"El Paso\",\"value\":\"NOAM-US-TX-EP\",\"locationOptions\":[]},{\"name\":\"Fort Worth\",\"value\":\"NOAM-US-TX-FW\",\"locationOptions\":[]},{\"name\":\"Galveston\",\"value\":\"NOAM-US-TX-GA\",\"locationOptions\":[]},{\"name\":\"Houston\",\"value\":\"NOAM-US-TX-HO\",\"locationOptions\":[]},{\"name\":\"Huntsville\",\"value\":\"NOAM-US-TX-HU\",\"locationOptions\":[]},{\"name\":\"Laredo\",\"value\":\"NOAM-US-TX-LA\",\"locationOptions\":[]},{\"name\":\"Lubbock\",\"value\":\"NOAM-US-TX-LU\",\"locationOptions\":[]},{\"name\":\"Tyler\",\"value\":\"NOAM-US-TX-TY\",\"locationOptions\":[]}]}]},{\"name\":\"UT\",\"value\":\"UT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"St. George\",\"value\":\"NOAM-US-UT-SG\",\"locationOptions\":[]}]}]},{\"name\":\"VA\",\"value\":\"VA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Arlington\",\"value\":\"NOAM-US-VA-AR\",\"locationOptions\":[]},{\"name\":\"Danville\",\"value\":\"NOAM-US-VA-DA\",\"locationOptions\":[]},{\"name\":\"Lynchburg\",\"value\":\"NOAM-US-VA-LY\",\"locationOptions\":[]},{\"name\":\"Richmond\",\"value\":\"NOAM-US-VA-RI\",\"locationOptions\":[]},{\"name\":\"Roanoke\",\"value\":\"NOAM-US-VA-RO\",\"locationOptions\":[]},{\"name\":\"Virginia Beach\",\"value\":\"NOAM-US-VA-VB\",\"locationOptions\":[]}]}]},{\"name\":\"VT\",\"value\":\"VT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Brattleboro\",\"value\":\"NOAM-US-VT-BR\",\"locationOptions\":[]},{\"name\":\"Burlington\",\"value\":\"NOAM-US-VT-BU\",\"locationOptions\":[]},{\"name\":\"Newport\",\"value\":\"NOAM-US-VT-NE\",\"locationOptions\":[]}]}]},{\"name\":\"WI\",\"value\":\"WI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Eau Claire\",\"value\":\"NOAM-US-WI-EC\",\"locationOptions\":[]},{\"name\":\"Green Bay\",\"value\":\"NOAM-US-WI-GB\",\"locationOptions\":[]},{\"name\":\"Kenosha\",\"value\":\"NOAM-US-WI-KE\",\"locationOptions\":[]},{\"name\":\"Madison\",\"value\":\"NOAM-US-WI-MA\",\"locationOptions\":[]},{\"name\":\"Milwaukee\",\"value\":\"NOAM-US-WI-MI\",\"locationOptions\":[]}]}]},{\"name\":\"WY\",\"value\":\"WY\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Laramie\",\"value\":\"NOAM-US-WY-LA\",\"locationOptions\":[]}]}]}]}}", - "Date" : "Sat, 21 Nov 2020 00:22:18 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponse.json deleted file mode 100644 index c210ee93846b..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponse.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "3131ms", - "MS-CV" : "aMJBCmIOyUqRUeE/ePD2Kg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0JJi8XwAAAAC907qlqm6/TbIsq9Yg0x8gWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Tue, 24 Nov 2020 05:20:39 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "283ms", - "MS-CV" : "zrNJtt4dw0yZsD5Y12HbFg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0J5i8XwAAAAAVLylvGhraTKIPlywfiE0EWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Tue, 24 Nov 2020 05:20:39 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans/REDACTED/locationoptions?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "249ms", - "MS-CV" : "t7ktrCLr0kKQA15RqlfV7w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0KJi8XwAAAAA1SAr+XtXiSIX5ry/0V1GKWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"locationOptions\":{\"labelId\":\"state\",\"labelName\":\"State\",\"options\":[{\"name\":\"AL\",\"value\":\"AL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Birmingham\",\"value\":\"NOAM-US-AL-BI\",\"locationOptions\":[]},{\"name\":\"Huntsville\",\"value\":\"NOAM-US-AL-HN\",\"locationOptions\":[]},{\"name\":\"Mobile\",\"value\":\"NOAM-US-AL-MO\",\"locationOptions\":[]},{\"name\":\"Montgomery\",\"value\":\"NOAM-US-AL-MN\",\"locationOptions\":[]}]}]},{\"name\":\"AR\",\"value\":\"AR\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Fort Smith\",\"value\":\"NOAM-US-AR-FS\",\"locationOptions\":[]},{\"name\":\"Jonesboro\",\"value\":\"NOAM-US-AR-JO\",\"locationOptions\":[]},{\"name\":\"Little Rock\",\"value\":\"NOAM-US-AR-LR\",\"locationOptions\":[]}]}]},{\"name\":\"AZ\",\"value\":\"AZ\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Phoenix\",\"value\":\"NOAM-US-AZ-PH\",\"locationOptions\":[]}]}]},{\"name\":\"CA\",\"value\":\"CA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Burbank\",\"value\":\"NOAM-US-CA-BU\",\"locationOptions\":[]},{\"name\":\"Concord\",\"value\":\"NOAM-US-CA-CO\",\"locationOptions\":[]},{\"name\":\"Fresno\",\"value\":\"NOAM-US-CA-FR\",\"locationOptions\":[]},{\"name\":\"Irvine\",\"value\":\"NOAM-US-CA-IR\",\"locationOptions\":[]},{\"name\":\"Los Angeles\",\"value\":\"NOAM-US-CA-LA\",\"locationOptions\":[]},{\"name\":\"Riverside\",\"value\":\"NOAM-US-CA-RI\",\"locationOptions\":[]},{\"name\":\"Sacramento\",\"value\":\"NOAM-US-CA-SA\",\"locationOptions\":[]},{\"name\":\"Salinas\",\"value\":\"NOAM-US-CA-SL\",\"locationOptions\":[]},{\"name\":\"San Diego\",\"value\":\"NOAM-US-CA-SD\",\"locationOptions\":[]},{\"name\":\"San Francisco\",\"value\":\"NOAM-US-CA-SF\",\"locationOptions\":[]},{\"name\":\"San Jose\",\"value\":\"NOAM-US-CA-SJ\",\"locationOptions\":[]},{\"name\":\"Santa Barbara\",\"value\":\"NOAM-US-CA-SB\",\"locationOptions\":[]},{\"name\":\"Santa Clarita\",\"value\":\"NOAM-US-CA-SC\",\"locationOptions\":[]},{\"name\":\"Santa Rosa\",\"value\":\"NOAM-US-CA-SR\",\"locationOptions\":[]},{\"name\":\"Stockton\",\"value\":\"NOAM-US-CA-ST\",\"locationOptions\":[]}]}]},{\"name\":\"CL\",\"value\":\"CL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Washington DC\",\"value\":\"NOAM-US-CL-DC\",\"locationOptions\":[]}]}]},{\"name\":\"CO\",\"value\":\"CO\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Denver\",\"value\":\"NOAM-US-CO-DE\",\"locationOptions\":[]},{\"name\":\"Pueblo\",\"value\":\"NOAM-US-CO-PU\",\"locationOptions\":[]}]}]},{\"name\":\"CT\",\"value\":\"CT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Bridgeport\",\"value\":\"NOAM-US-CT-BR\",\"locationOptions\":[]},{\"name\":\"Hartford\",\"value\":\"NOAM-US-CT-HA\",\"locationOptions\":[]}]}]},{\"name\":\"DE\",\"value\":\"DE\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Wilmington\",\"value\":\"NOAM-US-DE-WI\",\"locationOptions\":[]}]}]},{\"name\":\"FL\",\"value\":\"FL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Cape Coral\",\"value\":\"NOAM-US-FL-CC\",\"locationOptions\":[]},{\"name\":\"Fort Lauderdale\",\"value\":\"NOAM-US-FL-FL\",\"locationOptions\":[]},{\"name\":\"Gainesville\",\"value\":\"NOAM-US-FL-GA\",\"locationOptions\":[]},{\"name\":\"Jacksonville\",\"value\":\"NOAM-US-FL-JA\",\"locationOptions\":[]},{\"name\":\"Lakeland\",\"value\":\"NOAM-US-FL-LA\",\"locationOptions\":[]},{\"name\":\"Miami\",\"value\":\"NOAM-US-FL-MI\",\"locationOptions\":[]},{\"name\":\"Orlando\",\"value\":\"NOAM-US-FL-OR\",\"locationOptions\":[]},{\"name\":\"Port St Lucie\",\"value\":\"NOAM-US-FL-PS\",\"locationOptions\":[]},{\"name\":\"Sarasota\",\"value\":\"NOAM-US-FL-SA\",\"locationOptions\":[]},{\"name\":\"St. Petersburg\",\"value\":\"NOAM-US-FL-SP\",\"locationOptions\":[]},{\"name\":\"Tallahassee\",\"value\":\"NOAM-US-FL-TA\",\"locationOptions\":[]},{\"name\":\"West Palm Beach\",\"value\":\"NOAM-US-FL-WP\",\"locationOptions\":[]}]}]},{\"name\":\"GA\",\"value\":\"GA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Albany\",\"value\":\"NOAM-US-GA-AL\",\"locationOptions\":[]},{\"name\":\"Atlanta\",\"value\":\"NOAM-US-GA-AT\",\"locationOptions\":[]},{\"name\":\"Augusta\",\"value\":\"NOAM-US-GA-AU\",\"locationOptions\":[]},{\"name\":\"Macon\",\"value\":\"NOAM-US-GA-MA\",\"locationOptions\":[]},{\"name\":\"Savannah\",\"value\":\"NOAM-US-GA-SA\",\"locationOptions\":[]}]}]},{\"name\":\"HI\",\"value\":\"HI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Honolulu\",\"value\":\"NOAM-US-HI-HO\",\"locationOptions\":[]}]}]},{\"name\":\"IA\",\"value\":\"IA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Cedar Rapids\",\"value\":\"NOAM-US-IA-CR\",\"locationOptions\":[]},{\"name\":\"Davenport\",\"value\":\"NOAM-US-IA-DA\",\"locationOptions\":[]},{\"name\":\"Mason City\",\"value\":\"NOAM-US-IA-MC\",\"locationOptions\":[]},{\"name\":\"Sioux City\",\"value\":\"NOAM-US-IA-SC\",\"locationOptions\":[]}]}]},{\"name\":\"ID\",\"value\":\"ID\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Boise\",\"value\":\"NOAM-US-ID-BO\",\"locationOptions\":[]}]}]},{\"name\":\"IL\",\"value\":\"IL\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Alton\",\"value\":\"NOAM-US-IL-AL\",\"locationOptions\":[]},{\"name\":\"Aurora\",\"value\":\"NOAM-US-IL-AU\",\"locationOptions\":[]},{\"name\":\"Big Rock\",\"value\":\"NOAM-US-IL-BK\",\"locationOptions\":[]},{\"name\":\"Champaign\",\"value\":\"NOAM-US-IL-CA\",\"locationOptions\":[]},{\"name\":\"Chicago\",\"value\":\"NOAM-US-IL-CH\",\"locationOptions\":[]},{\"name\":\"Rock Island\",\"value\":\"NOAM-US-IL-RI\",\"locationOptions\":[]},{\"name\":\"Rockford\",\"value\":\"NOAM-US-IL-RO\",\"locationOptions\":[]},{\"name\":\"Waukegan\",\"value\":\"NOAM-US-IL-WK\",\"locationOptions\":[]}]}]},{\"name\":\"IN\",\"value\":\"IN\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Evansville\",\"value\":\"NOAM-US-IN-EV\",\"locationOptions\":[]},{\"name\":\"Fort Wayne\",\"value\":\"NOAM-US-IN-FW\",\"locationOptions\":[]},{\"name\":\"Gary\",\"value\":\"NOAM-US-IN-GA\",\"locationOptions\":[]},{\"name\":\"Indianapolis\",\"value\":\"NOAM-US-IN-IN\",\"locationOptions\":[]},{\"name\":\"South Bend\",\"value\":\"NOAM-US-IN-SB\",\"locationOptions\":[]}]}]},{\"name\":\"KS\",\"value\":\"KS\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Kansas City\",\"value\":\"NOAM-US-KS-KS\",\"locationOptions\":[]},{\"name\":\"Topeka\",\"value\":\"NOAM-US-KS-TO\",\"locationOptions\":[]},{\"name\":\"Wichita\",\"value\":\"NOAM-US-KS-WI\",\"locationOptions\":[]}]}]},{\"name\":\"KY\",\"value\":\"KY\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Lexington\",\"value\":\"NOAM-US-KY-LE\",\"locationOptions\":[]},{\"name\":\"Louisville\",\"value\":\"NOAM-US-KY-LO\",\"locationOptions\":[]}]}]},{\"name\":\"LA\",\"value\":\"LA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Baton Rouge\",\"value\":\"NOAM-US-LA-BR\",\"locationOptions\":[]},{\"name\":\"Lafayette\",\"value\":\"NOAM-US-LA-LA\",\"locationOptions\":[]},{\"name\":\"New Orleans\",\"value\":\"NOAM-US-LA-NO\",\"locationOptions\":[]},{\"name\":\"Shreveport\",\"value\":\"NOAM-US-LA-SH\",\"locationOptions\":[]}]}]},{\"name\":\"MA\",\"value\":\"MA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Lowell\",\"value\":\"NOAM-US-MA-LO\",\"locationOptions\":[]}]}]},{\"name\":\"MD\",\"value\":\"MD\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Baltimore\",\"value\":\"NOAM-US-MD-BA\",\"locationOptions\":[]}]}]},{\"name\":\"ME\",\"value\":\"ME\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Portland\",\"value\":\"NOAM-US-ME-PO\",\"locationOptions\":[]}]}]},{\"name\":\"MI\",\"value\":\"MI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Ann Arbor\",\"value\":\"NOAM-US-MI-AA\",\"locationOptions\":[]},{\"name\":\"Detroit\",\"value\":\"NOAM-US-MI-DE\",\"locationOptions\":[]},{\"name\":\"Flint\",\"value\":\"NOAM-US-MI-FL\",\"locationOptions\":[]},{\"name\":\"Grand Rapids\",\"value\":\"NOAM-US-MI-GP\",\"locationOptions\":[]},{\"name\":\"Grant\",\"value\":\"NOAM-US-MI-GR\",\"locationOptions\":[]},{\"name\":\"Lansing\",\"value\":\"NOAM-US-MI-LA\",\"locationOptions\":[]},{\"name\":\"Otsego\",\"value\":\"NOAM-US-MI-OT\",\"locationOptions\":[]},{\"name\":\"Saginaw\",\"value\":\"NOAM-US-MI-SA\",\"locationOptions\":[]},{\"name\":\"Sault Ste Marie\",\"value\":\"NOAM-US-MI-SS\",\"locationOptions\":[]},{\"name\":\"Troy\",\"value\":\"NOAM-US-MI-TR\",\"locationOptions\":[]}]}]},{\"name\":\"MN\",\"value\":\"MN\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Alexandria\",\"value\":\"NOAM-US-MN-AL\",\"locationOptions\":[]},{\"name\":\"Duluth\",\"value\":\"NOAM-US-MN-DU\",\"locationOptions\":[]},{\"name\":\"Minneapolis\",\"value\":\"NOAM-US-MN-MI\",\"locationOptions\":[]},{\"name\":\"Plymouth\",\"value\":\"NOAM-US-MN-PL\",\"locationOptions\":[]}]}]},{\"name\":\"MO\",\"value\":\"MO\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Columbia\",\"value\":\"NOAM-US-MO-CO\",\"locationOptions\":[]},{\"name\":\"Kansas City\",\"value\":\"NOAM-US-MO-KS\",\"locationOptions\":[]},{\"name\":\"Marshall\",\"value\":\"NOAM-US-MO-MA\",\"locationOptions\":[]},{\"name\":\"Springfield\",\"value\":\"NOAM-US-MO-SP\",\"locationOptions\":[]},{\"name\":\"St. Charles\",\"value\":\"NOAM-US-MO-SC\",\"locationOptions\":[]},{\"name\":\"St. Louis\",\"value\":\"NOAM-US-MO-SL\",\"locationOptions\":[]}]}]},{\"name\":\"MS\",\"value\":\"MS\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Biloxi\",\"value\":\"NOAM-US-MS-BI\",\"locationOptions\":[]},{\"name\":\"Jackson\",\"value\":\"NOAM-US-MS-JA\",\"locationOptions\":[]},{\"name\":\"Starkville\",\"value\":\"NOAM-US-MS-ST\",\"locationOptions\":[]}]}]},{\"name\":\"MT\",\"value\":\"MT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Billings\",\"value\":\"NOAM-US-MT-BI\",\"locationOptions\":[]}]}]},{\"name\":\"NC\",\"value\":\"NC\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Asheville\",\"value\":\"NOAM-US-NC-AS\",\"locationOptions\":[]},{\"name\":\"Charlotte\",\"value\":\"NOAM-US-NC-CH\",\"locationOptions\":[]},{\"name\":\"Fayetteville\",\"value\":\"NOAM-US-NC-FA\",\"locationOptions\":[]},{\"name\":\"Greensboro\",\"value\":\"NOAM-US-NC-GR\",\"locationOptions\":[]},{\"name\":\"Raleigh\",\"value\":\"NOAM-US-NC-RA\",\"locationOptions\":[]},{\"name\":\"Rocky Mount\",\"value\":\"NOAM-US-NC-RM\",\"locationOptions\":[]}]}]},{\"name\":\"ND\",\"value\":\"ND\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Fargo\",\"value\":\"NOAM-US-ND-FA\",\"locationOptions\":[]}]}]},{\"name\":\"NE\",\"value\":\"NE\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Kearney\",\"value\":\"NOAM-US-NE-KE\",\"locationOptions\":[]},{\"name\":\"Omaha\",\"value\":\"NOAM-US-NE-OM\",\"locationOptions\":[]}]}]},{\"name\":\"NJ\",\"value\":\"NJ\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Atlantic City\",\"value\":\"NOAM-US-NJ-AC\",\"locationOptions\":[]},{\"name\":\"Camden\",\"value\":\"NOAM-US-NJ-CA\",\"locationOptions\":[]},{\"name\":\"Edison\",\"value\":\"NOAM-US-NJ-ED\",\"locationOptions\":[]},{\"name\":\"Elizabeth\",\"value\":\"NOAM-US-NJ-EL\",\"locationOptions\":[]},{\"name\":\"Jersey City\",\"value\":\"NOAM-US-NJ-JC\",\"locationOptions\":[]},{\"name\":\"Newark\",\"value\":\"NOAM-US-NJ-NE\",\"locationOptions\":[]}]}]},{\"name\":\"NM\",\"value\":\"NM\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Albuquerque\",\"value\":\"NOAM-US-NM-AL\",\"locationOptions\":[]},{\"name\":\"Las Cruces\",\"value\":\"NOAM-US-NM-LC\",\"locationOptions\":[]}]}]},{\"name\":\"NV\",\"value\":\"NV\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Las Vegas\",\"value\":\"NOAM-US-NV-LV\",\"locationOptions\":[]},{\"name\":\"Reno\",\"value\":\"NOAM-US-NV-RE\",\"locationOptions\":[]}]}]},{\"name\":\"NY\",\"value\":\"NY\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Albany\",\"value\":\"NOAM-US-NY-AL\",\"locationOptions\":[]},{\"name\":\"Brentwood\",\"value\":\"NOAM-US-NY-BR\",\"locationOptions\":[]},{\"name\":\"Elmira\",\"value\":\"NOAM-US-NY-EL\",\"locationOptions\":[]},{\"name\":\"Hempstead\",\"value\":\"NOAM-US-NY-HE\",\"locationOptions\":[]},{\"name\":\"New York City\",\"value\":\"NOAM-US-NY-NY\",\"locationOptions\":[]},{\"name\":\"Niagara Falls\",\"value\":\"NOAM-US-NY-NF\",\"locationOptions\":[]},{\"name\":\"Rochester\",\"value\":\"NOAM-US-NY-RO\",\"locationOptions\":[]},{\"name\":\"Syracuse\",\"value\":\"NOAM-US-NY-SY\",\"locationOptions\":[]},{\"name\":\"Yonkers\",\"value\":\"NOAM-US-NY-YO\",\"locationOptions\":[]}]}]},{\"name\":\"OH\",\"value\":\"OH\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Akron\",\"value\":\"NOAM-US-OH-AK\",\"locationOptions\":[]},{\"name\":\"Cincinnati\",\"value\":\"NOAM-US-OH-CI\",\"locationOptions\":[]},{\"name\":\"Cleveland\",\"value\":\"NOAM-US-OH-CL\",\"locationOptions\":[]},{\"name\":\"Columbus\",\"value\":\"NOAM-US-OH-CO\",\"locationOptions\":[]},{\"name\":\"Dayton\",\"value\":\"NOAM-US-OH-DA\",\"locationOptions\":[]},{\"name\":\"Toledo\",\"value\":\"NOAM-US-OH-TO\",\"locationOptions\":[]}]}]},{\"name\":\"OK\",\"value\":\"OK\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Lawton\",\"value\":\"NOAM-US-OK-LA\",\"locationOptions\":[]},{\"name\":\"Oklahoma City\",\"value\":\"NOAM-US-OK-OC\",\"locationOptions\":[]},{\"name\":\"Tulsa\",\"value\":\"NOAM-US-OK-TU\",\"locationOptions\":[]}]}]},{\"name\":\"OR\",\"value\":\"OR\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Portland\",\"value\":\"NOAM-US-OR-PO\",\"locationOptions\":[]}]}]},{\"name\":\"PA\",\"value\":\"PA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Erie\",\"value\":\"NOAM-US-PA-ER\",\"locationOptions\":[]},{\"name\":\"Lancaster\",\"value\":\"NOAM-US-PA-LA\",\"locationOptions\":[]},{\"name\":\"Philadelphia\",\"value\":\"NOAM-US-PA-PI\",\"locationOptions\":[]},{\"name\":\"Pittsburgh\",\"value\":\"NOAM-US-PA-PT\",\"locationOptions\":[]},{\"name\":\"Scranton\",\"value\":\"NOAM-US-PA-SC\",\"locationOptions\":[]}]}]},{\"name\":\"RI\",\"value\":\"RI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Providence\",\"value\":\"NOAM-US-RI-PR\",\"locationOptions\":[]}]}]},{\"name\":\"SC\",\"value\":\"SC\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Charleston\",\"value\":\"NOAM-US-SC-CH\",\"locationOptions\":[]},{\"name\":\"Columbia\",\"value\":\"NOAM-US-SC-CO\",\"locationOptions\":[]},{\"name\":\"Greenville\",\"value\":\"NOAM-US-SC-GR\",\"locationOptions\":[]}]}]},{\"name\":\"SD\",\"value\":\"SD\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Sioux Falls\",\"value\":\"NOAM-US-SD-SF\",\"locationOptions\":[]}]}]},{\"name\":\"TN\",\"value\":\"TN\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Chattanooga\",\"value\":\"NOAM-US-TN-CH\",\"locationOptions\":[]},{\"name\":\"Clarksville\",\"value\":\"NOAM-US-TN-CL\",\"locationOptions\":[]},{\"name\":\"Jackson\",\"value\":\"NOAM-US-TN-JA\",\"locationOptions\":[]},{\"name\":\"Memphis\",\"value\":\"NOAM-US-TN-ME\",\"locationOptions\":[]},{\"name\":\"Nashville\",\"value\":\"NOAM-US-TN-NA\",\"locationOptions\":[]}]}]},{\"name\":\"TX\",\"value\":\"TX\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Abilene\",\"value\":\"NOAM-US-TX-AB\",\"locationOptions\":[]},{\"name\":\"Austin\",\"value\":\"NOAM-US-TX-AU\",\"locationOptions\":[]},{\"name\":\"Bryan\",\"value\":\"NOAM-US-TX-BR\",\"locationOptions\":[]},{\"name\":\"Corpus Christi\",\"value\":\"NOAM-US-TX-CC\",\"locationOptions\":[]},{\"name\":\"Denton\",\"value\":\"NOAM-US-TX-DE\",\"locationOptions\":[]},{\"name\":\"El Paso\",\"value\":\"NOAM-US-TX-EP\",\"locationOptions\":[]},{\"name\":\"Fort Worth\",\"value\":\"NOAM-US-TX-FW\",\"locationOptions\":[]},{\"name\":\"Galveston\",\"value\":\"NOAM-US-TX-GA\",\"locationOptions\":[]},{\"name\":\"Houston\",\"value\":\"NOAM-US-TX-HO\",\"locationOptions\":[]},{\"name\":\"Huntsville\",\"value\":\"NOAM-US-TX-HU\",\"locationOptions\":[]},{\"name\":\"Laredo\",\"value\":\"NOAM-US-TX-LA\",\"locationOptions\":[]},{\"name\":\"Lubbock\",\"value\":\"NOAM-US-TX-LU\",\"locationOptions\":[]},{\"name\":\"Tyler\",\"value\":\"NOAM-US-TX-TY\",\"locationOptions\":[]}]}]},{\"name\":\"UT\",\"value\":\"UT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Salt Lake City\",\"value\":\"NOAM-US-UT-SL\",\"locationOptions\":[]},{\"name\":\"St. George\",\"value\":\"NOAM-US-UT-SG\",\"locationOptions\":[]}]}]},{\"name\":\"VA\",\"value\":\"VA\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Arlington\",\"value\":\"NOAM-US-VA-AR\",\"locationOptions\":[]},{\"name\":\"Danville\",\"value\":\"NOAM-US-VA-DA\",\"locationOptions\":[]},{\"name\":\"Lynchburg\",\"value\":\"NOAM-US-VA-LY\",\"locationOptions\":[]},{\"name\":\"Richmond\",\"value\":\"NOAM-US-VA-RI\",\"locationOptions\":[]},{\"name\":\"Roanoke\",\"value\":\"NOAM-US-VA-RO\",\"locationOptions\":[]},{\"name\":\"Virginia Beach\",\"value\":\"NOAM-US-VA-VB\",\"locationOptions\":[]}]}]},{\"name\":\"VT\",\"value\":\"VT\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Brattleboro\",\"value\":\"NOAM-US-VT-BR\",\"locationOptions\":[]},{\"name\":\"Burlington\",\"value\":\"NOAM-US-VT-BU\",\"locationOptions\":[]},{\"name\":\"Newport\",\"value\":\"NOAM-US-VT-NE\",\"locationOptions\":[]}]}]},{\"name\":\"WI\",\"value\":\"WI\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Eau Claire\",\"value\":\"NOAM-US-WI-EC\",\"locationOptions\":[]},{\"name\":\"Green Bay\",\"value\":\"NOAM-US-WI-GB\",\"locationOptions\":[]},{\"name\":\"Kenosha\",\"value\":\"NOAM-US-WI-KE\",\"locationOptions\":[]},{\"name\":\"Madison\",\"value\":\"NOAM-US-WI-MA\",\"locationOptions\":[]},{\"name\":\"Milwaukee\",\"value\":\"NOAM-US-WI-MI\",\"locationOptions\":[]}]}]},{\"name\":\"WY\",\"value\":\"WY\",\"locationOptions\":[{\"labelId\":\"city\",\"labelName\":\"City\",\"options\":[{\"name\":\"Laramie\",\"value\":\"NOAM-US-WY-LA\",\"locationOptions\":[]}]}]}]}}", - "Date" : "Tue, 24 Nov 2020 05:20:40 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponseNullCountryCode.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponseNullCountryCode.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponseNullCountryCode.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponseNullPhonePlanGroupId.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponseNullPhonePlanGroupId.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponseNullPhonePlanGroupId.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponseNullPhonePlanId.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponseNullPhonePlanId.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getPhonePlanLocationOptionsWithResponseNullPhonePlanId.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReleaseByIdWithResponseNullReleaseId.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReleaseByIdWithResponseNullReleaseId.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReleaseByIdWithResponseNullReleaseId.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReservationById.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReservationById.json deleted file mode 100644 index 5b24dc078d71..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReservationById.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "297ms", - "MS-CV" : "h2QDsvqSOUufz9pcicrGmg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QeysXwAAAAA/nerhDLkNQZ4KOw8bHzDbTEFYRURHRTEyMTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T07:43:27.7822718+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Cancelled\",\"phoneNumbers\":[\"+13234882403\",\"+13234882404\"],\"reservationExpiryDate\":\"2020-11-12T07:59:47.4823703+00:00\"}", - "Date" : "Thu, 12 Nov 2020 08:03:13 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReservationByIdWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReservationByIdWithResponse.json deleted file mode 100644 index e5a3069ca3bb..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReservationByIdWithResponse.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/reservation-id-1?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "271ms", - "MS-CV" : "S3jBWMkSakmdvwc1QqOkWQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QuysXwAAAABGa0TQ6PwAQ6xLK4o1urPmTEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"reservation-id-1\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-11-12T07:43:27.7822718+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"27b53eec-8ff4-4070-8900-fbeaabfd158a\"],\"areaCode\":\"323\",\"quantity\":2,\"locationOptions\":[],\"status\":\"Cancelled\",\"phoneNumbers\":[\"+13234882403\",\"+13234882404\"],\"reservationExpiryDate\":\"2020-11-12T07:59:47.4823703+00:00\"}", - "Date" : "Thu, 12 Nov 2020 08:03:14 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReservationByIdWithResponseNullSearchId.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReservationByIdWithResponseNullSearchId.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/getReservationByIdWithResponseNullSearchId.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllPhoneNumbers.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllPhoneNumbers.json deleted file mode 100644 index 428e1261ca6a..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllPhoneNumbers.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/phonenumbers?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "796ms", - "MS-CV" : "RJ1at931BkOtvEJO0aSr3A.0", - "retry-after" : "0", - "X-Azure-Ref" : "0+l24XwAAAABGBGVPEu58SamXsapC/lHwWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phoneNumbers\":[{\"phoneNumber\":\"+12133140924\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133169475\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133255546\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133285595\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133441882\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133441884\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133442070\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+18443281555\",\"acquiredCapabilities\":[\"Azure\",\"ThirdPartyAppAssignment\",\"InboundA2PSms\",\"OutboundA2PSms\",\"TollFree\"],\"availableCapabilities\":[\"Azure\",\"Office365\",\"InboundCalling\",\"OutboundCalling\",\"ThirdPartyAppAssignment\",\"ConferenceAssignment\",\"FirstPartyAppAssignment\",\"TollFree\",\"InboundA2PSms\",\"OutboundA2PSms\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Toll-Free, United States\",\"activationState\":\"Activated\"}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:23:23 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllPhoneNumbersWithContext.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllPhoneNumbersWithContext.json deleted file mode 100644 index 55c55b004608..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllPhoneNumbersWithContext.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/phonenumbers?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "800ms", - "MS-CV" : "7cxdvkH5dE21NbBL7+S8EQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Q5e8XwAAAABCdtDeu3fwT5ah5EMqQ60hWVZSMzBFREdFMDQxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phoneNumbers\":[{\"phoneNumber\":\"+12133140924\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133169475\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133255546\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133285595\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133441882\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133441884\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+12133442070\",\"acquiredCapabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"availableCapabilities\":[\"UserAssignment\",\"InboundCalling\",\"OutboundCalling\",\"Geographic\",\"Office365\",\"Azure\"],\"assignmentStatus\":\"Unknown\",\"placeName\":\"Los Angeles, United States\",\"activationState\":\"Activated\"},{\"phoneNumber\":\"+18443281555\",\"acquiredCapabilities\":[\"Azure\",\"ThirdPartyAppAssignment\",\"InboundA2PSms\",\"OutboundA2PSms\",\"TollFree\"],\"availableCapabilities\":[\"Azure\",\"Office365\",\"InboundCalling\",\"OutboundCalling\",\"ThirdPartyAppAssignment\",\"ConferenceAssignment\",\"FirstPartyAppAssignment\",\"TollFree\",\"InboundA2PSms\",\"OutboundA2PSms\"],\"assignmentStatus\":\"Unassigned\",\"placeName\":\"Toll-Free, United States\",\"activationState\":\"Activated\"}],\"nextLink\":null}", - "Date" : "Tue, 24 Nov 2020 05:16:51 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllReleases.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllReleases.json deleted file mode 100644 index 4bc56ada5e2a..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllReleases.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "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.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "295ms", - "MS-CV" : "stzOvrM5lEuMYPWpSlmSbA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0RF64XwAAAADZ4NLJ0TWCT5c7jGDTz+UwWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"entities\":[{\"id\":\"3c1f7c1d-9682-4232-8a46-9356d41527a2\",\"createdAt\":\"2020-11-21T00:24:04.1747198+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"7625d6f5-50c1-48bb-8f56-fc8143eb7d70\",\"createdAt\":\"2020-11-21T00:22:54.7519192+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"bb20d4c4-31aa-4475-bbca-69170ef866fc\",\"createdAt\":\"2020-11-20T22:55:43.9282497+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"2f6f6e21-7d7e-4c48-b767-d3956c922530\",\"createdAt\":\"2020-11-19T21:48:59.8078555+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"1a62d69f-7a2c-427b-814d-53a8320b539e\",\"createdAt\":\"2020-11-19T21:47:53.6513134+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"75fb4ba5-f711-4e80-ad38-6c139d22ff06\",\"createdAt\":\"2020-11-19T21:46:07.8339133+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"4cdce746-fb88-460b-bd00-4c51483c35ca\",\"createdAt\":\"2020-11-19T21:44:52.7242669+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"e898bca6-8674-46a0-b6ff-bc928d87f889\",\"createdAt\":\"2020-11-19T21:34:36.8795179+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"12805eba-94ef-47af-9461-84f436ee7c86\",\"createdAt\":\"2020-11-19T21:34:07.6919628+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"3d491b8a-f3ea-4764-b562-8a50493c1b6d\",\"createdAt\":\"2020-11-19T21:33:35.3781163+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"5ab3a6f6-1c03-4605-ab87-9b3a2abcc5f2\",\"createdAt\":\"2020-11-19T21:32:57.8119605+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"a62e1a38-5cae-4fc3-b61c-4ffc8503daf7\",\"createdAt\":\"2020-11-19T21:31:59.3243368+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"7ff534d2-cdb7-46e3-b143-1ddc1c2b2609\",\"createdAt\":\"2020-11-19T21:31:33.811927+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"85b46967-d160-42c3-ac97-c04798ae7300\",\"createdAt\":\"2020-11-19T21:30:46.1510533+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"e1b701a3-ae60-4bf0-96d1-096714636254\",\"createdAt\":\"2020-11-19T21:30:43.1709787+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"c2eb3289-c6e5-4616-bf48-e517a84ce98f\",\"createdAt\":\"2020-11-19T21:30:42.0135667+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"ff0d32d0-8d54-49d9-94e4-a5828770bb98\",\"createdAt\":\"2020-11-19T21:30:40.2132101+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"a06de339-27c6-49ae-ab3d-ace08ee4b54b\",\"createdAt\":\"2020-11-19T21:30:18.8584896+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"7a21d61d-e417-44c1-839d-46c0d487217b\",\"createdAt\":\"2020-11-19T21:30:10.8193047+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"4d967344-9c8f-4338-b6cd-7038343264bf\",\"createdAt\":\"2020-11-19T21:29:52.3819244+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"2ce77f04-ab43-4982-b2d0-515405784599\",\"createdAt\":\"2020-11-19T21:29:29.1960216+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"47ca16f6-60ba-41ad-8921-9556ba9801d2\",\"createdAt\":\"2020-11-19T21:29:13.856037+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"b85a65f3-0c96-4db0-8348-51b45893e33a\",\"createdAt\":\"2020-11-19T21:29:13.5241655+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"51e7a764-7de8-4d56-9576-f0c7ff82b727\",\"createdAt\":\"2020-11-19T21:28:57.7378957+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"be96ccd6-4d2b-48e4-8663-a8993f0219a0\",\"createdAt\":\"2020-11-19T21:28:26.2178908+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"f0a9c27f-4573-4c3f-96b9-d2ced880e97f\",\"createdAt\":\"2020-11-19T21:28:19.1519387+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"7551d313-52ff-4159-9dcd-8eb21d56de50\",\"createdAt\":\"2020-11-19T21:27:23.7239164+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"a46fae07-2271-4b9e-b120-3dedb2d628d8\",\"createdAt\":\"2020-11-19T21:27:21.6237066+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"656fa28f-5f54-4d37-9c14-7d14abcd858f\",\"createdAt\":\"2020-11-19T21:27:09.8937965+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"60605200-e039-4d03-a5b2-64355ea3cedc\",\"createdAt\":\"2020-11-19T21:26:34.4567492+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"029108ba-cb4c-4859-9efc-ebc1876a8d3a\",\"createdAt\":\"2020-11-19T21:26:27.5829462+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"b3793cbe-5b48-47a4-b768-7f39b1eeb6e3\",\"createdAt\":\"2020-11-19T21:26:25.9905038+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"0302981d-bed9-4a55-a038-cd0ec2a8e665\",\"createdAt\":\"2020-11-19T21:26:24.9706847+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"0497ee21-2a19-43e8-84c1-ebfb611a8100\",\"createdAt\":\"2020-11-19T21:25:35.8988579+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"6e5db8eb-7334-4182-9cf1-5bf0cc7b766c\",\"createdAt\":\"2020-11-19T21:25:28.4634716+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"f1027bec-d835-44b9-834c-714085b0a53c\",\"createdAt\":\"2020-11-19T21:25:15.4925993+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"b4931e14-ee85-49c2-8e4c-a3bee4e94ae2\",\"createdAt\":\"2020-11-19T20:30:29.7229656+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"cb504bfa-86e1-4bd9-8f5e-e760f45e987d\",\"createdAt\":\"2020-11-19T20:25:11.8764818+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"e1f855ef-4c45-45da-ba16-43a132553d9c\",\"createdAt\":\"2020-11-19T20:08:28.1424297+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"eb218f63-240a-44d2-9b09-131141e65080\",\"createdAt\":\"2020-11-19T20:06:59.4996108+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"fd53b943-cd02-434d-9bda-a90bdeab1c6b\",\"createdAt\":\"2020-11-19T20:04:24.0225794+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"cc290b1c-3ca1-40da-b467-dc36ade211d1\",\"createdAt\":\"2020-11-19T19:52:11.1314145+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"31d5d046-2933-47b4-94f2-d43cb84418a8\",\"createdAt\":\"2020-11-19T07:48:38.0988059+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"ed64c72a-a0e7-4566-a7f2-bf3cf911b581\",\"createdAt\":\"2020-11-19T07:46:31.0064135+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"5d6e09c2-c919-4fc3-a1bf-72600db342cb\",\"createdAt\":\"2020-11-19T07:46:23.8185503+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"07ff25cf-59b7-4300-ac0e-0f66a0e9b745\",\"createdAt\":\"2020-11-19T07:45:59.7662331+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"7933464d-d8e6-4b4c-94f3-f50ce232f568\",\"createdAt\":\"2020-11-19T07:44:39.8249721+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"180f3b11-6c25-4636-b400-59770f71f1ba\",\"createdAt\":\"2020-11-19T07:44:07.627835+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"0a8b23a6-46f0-4b67-a786-69b27497c700\",\"createdAt\":\"2020-11-19T07:43:25.5938611+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"693d0e2a-4729-414d-9e38-b1d8a1f88159\",\"createdAt\":\"2020-11-19T07:43:14.8364382+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"16834e25-d109-4460-ab3e-822cd939cd5f\",\"createdAt\":\"2020-11-19T07:43:13.0995307+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"6923e2b7-4167-4ada-984e-4b4f0de94625\",\"createdAt\":\"2020-11-19T07:42:40.6398807+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"c0598284-25b8-45d0-997c-b2eb003281bc\",\"createdAt\":\"2020-11-19T07:41:25.7884998+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"d5724495-e4a5-486b-9966-e2f38f24e019\",\"createdAt\":\"2020-11-19T07:41:09.9296451+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"59deb087-9ce5-45dd-a0f1-610a9dc6df33\",\"createdAt\":\"2020-11-19T06:01:42.4290481+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"d283f861-d87d-4dfc-a0ff-019bfc657488\",\"createdAt\":\"2020-11-19T05:59:47.5107286+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"171a0931-2e5e-4441-8dc4-efaf1ded1ed0\",\"createdAt\":\"2020-11-19T05:56:26.6114542+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"d3c14f18-3f47-4f2b-9b58-6e7b7688f7bd\",\"createdAt\":\"2020-11-19T05:53:58.437038+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"72c09798-f560-4e00-8be2-207124971af4\",\"createdAt\":\"2020-11-19T05:48:30.3672935+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"80c8021a-71b3-4007-8877-5d71adb6db2c\",\"createdAt\":\"2020-11-19T05:46:20.8475489+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"19868396-a621-434b-bb77-6f027561d8d6\",\"createdAt\":\"2020-11-19T01:03:34.8407423+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"2239b82d-6322-466e-a4e8-d6084ebbaa92\",\"createdAt\":\"2020-11-19T01:01:37.0120966+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"b21d9d0f-a367-4d2d-82cf-3a1f4e9796cf\",\"createdAt\":\"2020-11-19T00:54:27.3638144+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"0419cb8f-68e8-443c-a845-1c6cc93f43ef\",\"createdAt\":\"2020-11-19T00:52:13.9029348+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"bb3c47ac-d50c-43fb-8c7f-6f478c88fbda\",\"createdAt\":\"2020-11-19T00:49:27.7677635+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"11c8af5c-9240-4cee-a3ff-d48f08b4792f\",\"createdAt\":\"2020-11-19T00:47:42.7812874+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"c8339d49-ddb0-45e0-8790-80defb94c722\",\"createdAt\":\"2020-11-19T00:42:13.9206592+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"b4e5c4f0-6c31-4e68-bcc9-6b7fad1b8aa1\",\"createdAt\":\"2020-11-19T00:40:22.3784682+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"fc93d91a-a40b-45cd-a86b-2bc710bce81a\",\"createdAt\":\"2020-11-19T00:36:19.4563926+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"7dc7cc5d-69e5-4d82-9ec3-513fe78cc71d\",\"createdAt\":\"2020-11-19T00:34:41.5704077+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"09a4be0c-0b7a-4592-a59a-256caa384c74\",\"createdAt\":\"2020-11-19T00:29:47.6439+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"d460e3b2-5a0b-4204-a7eb-c2b270178a7e\",\"createdAt\":\"2020-11-19T00:28:11.5845171+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"78f4c385-12b9-48f9-9f81-bce56577820d\",\"createdAt\":\"2020-11-18T23:46:58.4952804+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"dd7871b7-26f3-4376-b2ed-f83e24674d22\",\"createdAt\":\"2020-11-18T23:45:25.5615637+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"288cbd1c-d6d5-4137-ab6c-d96c15d761b3\",\"createdAt\":\"2020-11-18T23:15:08.4112261+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"5af660e6-6ab6-4c3c-813c-96e22267c5fb\",\"createdAt\":\"2020-11-18T23:13:20.9609693+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"cacafee8-b7c3-4149-9b95-f01a0af4abe9\",\"createdAt\":\"2020-11-18T22:34:34.0321766+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Complete\"},{\"id\":\"9b9a4991-ea17-4a0e-be4d-a15c69b14dd7\",\"createdAt\":\"2020-11-18T19:24:38.8208942+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"dc3460d3-8b47-45da-a551-dd92f4db49c6\",\"createdAt\":\"2020-11-18T18:10:50.8433547+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"c54f6227-fcfd-46f8-a67b-30440cfcd38e\",\"createdAt\":\"2020-11-18T00:12:10.8948031+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"fdfa9cd2-b1fd-4d3d-8a34-f34c452bcf73\",\"createdAt\":\"2020-11-17T23:48:04.2087243+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"},{\"id\":\"6d7d2a7e-9274-47e0-afe8-ac069208c9ab\",\"createdAt\":\"2020-11-17T22:57:47.1311107+00:00\",\"displayName\":\"\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Failed\"}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:24:36 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllReservations.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllReservations.json deleted file mode 100644 index 7a09d0f17e86..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllReservations.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1072ms", - "MS-CV" : "jFr/yU4lOkyXycE+JHbpIg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0oZm8XwAAAAB6NleoO87hRaUtBhwCgyA+WVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"entities\":[{\"id\":\"fb29bd6d-bae3-44d6-b5b0-468c4922b153\",\"createdAt\":\"2020-11-24T04:51:45.622753+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"f271f339-b5dd-440f-bd5a-2c8c1bd27253\",\"createdAt\":\"2020-11-24T04:24:16.4406163+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"e2bf6134-2554-400a-8293-21fdec479b9c\",\"createdAt\":\"2020-11-24T01:20:13.2770781+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"6d558655-08e5-4644-99b4-f5706c8a1b36\",\"createdAt\":\"2020-11-24T01:19:13.5354655+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"8815c9c3-fe8c-4f78-8e67-edc061743fb1\",\"createdAt\":\"2020-11-24T01:18:09.0281327+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"d14ba2c4-aca7-4f18-833b-f508d666b6bc\",\"createdAt\":\"2020-11-24T01:17:57.0938064+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"f2745818-c585-4178-99d7-bd108fa6a06f\",\"createdAt\":\"2020-11-24T01:17:37.2123704+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"20cf2be5-e96f-404a-a528-eada63ed73c9\",\"createdAt\":\"2020-11-24T01:16:41.289695+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"bc2e0107-d810-4255-bcf9-af8c2baec000\",\"createdAt\":\"2020-11-24T01:15:34.4157983+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"ed54fdb8-587b-4683-97f4-8c79f2166ecb\",\"createdAt\":\"2020-11-24T01:15:14.6577599+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"ec43c548-1577-4e94-bfee-089537b87bff\",\"createdAt\":\"2020-11-24T00:17:45.0830483+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"8463abff-0322-4a2b-be65-a43af3913071\",\"createdAt\":\"2020-11-21T00:58:07.0482792+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"44fe90c9-77cf-462b-9834-71f3a121feb0\",\"createdAt\":\"2020-11-21T00:55:33.8601098+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"2bad3a1c-92d4-4b68-b846-20c453b2e4dc\",\"createdAt\":\"2020-11-21T00:54:41.8117098+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"f285ce24-201e-4aec-a560-a9a021ee25e5\",\"createdAt\":\"2020-11-21T00:53:26.7577403+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"d423b2be-b4d0-4a15-8350-38b164c991b5\",\"createdAt\":\"2020-11-21T00:24:27.5545443+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"6b233043-1b1d-4e5e-ac09-62dc346fcdc9\",\"createdAt\":\"2020-11-21T00:23:27.9180684+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"0d32a9c5-0cee-40ae-9725-001e136e7590\",\"createdAt\":\"2020-11-21T00:22:20.6117085+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"d8703a93-a8c0-434d-ac3c-edf14a8ef4a0\",\"createdAt\":\"2020-11-21T00:22:02.9561068+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"63fbc8b4-e6af-4e85-8bfb-26d1c1297eda\",\"createdAt\":\"2020-11-20T22:56:13.5607474+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"6198797f-fda1-4f5a-b346-1d2265c357f8\",\"createdAt\":\"2020-11-20T22:55:01.8058254+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"48c7981d-84ba-4cca-8ba1-9591e6e00e3d\",\"createdAt\":\"2020-11-20T22:54:36.6496815+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"a40a6b23-d9ee-4fbf-9cf5-d6528ac958ab\",\"createdAt\":\"2020-11-19T21:49:20.383809+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"2341da2f-db34-4364-863f-c488e1c2c6a5\",\"createdAt\":\"2020-11-19T21:48:24.4527886+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"b3cf0545-fb8e-4d2b-8090-536d59669881\",\"createdAt\":\"2020-11-19T21:47:12.2469926+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"693bef68-3ccd-47bf-a4ef-bf9e743f52a0\",\"createdAt\":\"2020-11-19T21:47:01.4712806+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"81420bb5-1787-4309-91e6-20d7fb29f8cb\",\"createdAt\":\"2020-11-19T21:46:36.9879812+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"518c91be-06e4-4cf6-803f-c20227919080\",\"createdAt\":\"2020-11-19T21:45:26.9933596+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"26b404f2-733b-4f3f-a8b5-6b27a85f84d6\",\"createdAt\":\"2020-11-19T21:44:06.2461507+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"fc893105-18f7-47f1-b712-4099f24281d2\",\"createdAt\":\"2020-11-19T21:43:45.3293455+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"7116b564-6db3-493d-a5a6-7c0c82edb610\",\"createdAt\":\"2020-11-19T21:34:59.4153469+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"3dda1dc0-82e9-4d91-a2f3-387726620fb0\",\"createdAt\":\"2020-11-19T21:34:34.3446308+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"c240b178-9d6d-488c-a76d-a0a77d3d6e95\",\"createdAt\":\"2020-11-19T21:34:05.3320005+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"af995ffb-c5e5-4ba0-ae81-2dc3e150272e\",\"createdAt\":\"2020-11-19T21:33:30.6649646+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"049f79f2-09cb-47e0-85c2-f1601d266e54\",\"createdAt\":\"2020-11-19T21:33:00.1132595+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"bfcc0fa1-0d2b-4805-9efc-a4957e053c34\",\"createdAt\":\"2020-11-19T21:32:45.6536286+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"5b293875-27d4-4245-a736-b08aeb80a1d7\",\"createdAt\":\"2020-11-19T21:32:30.9886997+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"dc71ee40-8e28-469e-a912-9a73931bbc99\",\"createdAt\":\"2020-11-19T21:32:22.4668231+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"520081a3-2b0f-4a8b-a71a-a0580e5127ac\",\"createdAt\":\"2020-11-19T21:32:18.4740841+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"e0a7aa5e-1bdf-4000-955a-dcaba3ce76be\",\"createdAt\":\"2020-11-19T21:32:03.2993818+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"3906649a-fa4e-4a02-86a7-c5496db2da09\",\"createdAt\":\"2020-11-19T21:31:28.8874593+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"d2aa9cfc-3ac7-42c3-8836-69c2cb719983\",\"createdAt\":\"2020-11-19T21:31:23.672374+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"0a6fc08c-1fb3-4eee-922a-e7ee14b4b44c\",\"createdAt\":\"2020-11-19T21:31:18.2574306+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"6f185775-ce90-4dff-9fe3-5a89cdbb51e5\",\"createdAt\":\"2020-11-19T21:31:18.2504931+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"bc4ce3c0-b008-469b-8981-39aacf8a9b3e\",\"createdAt\":\"2020-11-19T21:31:17.2964999+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"05a844f6-6782-45cb-98fc-ab43d96fb6ae\",\"createdAt\":\"2020-11-19T21:31:14.2717507+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"e73e8317-c668-41a2-9952-dcbb45e244aa\",\"createdAt\":\"2020-11-19T21:31:08.9042999+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"716d090c-387a-46a1-878d-d69a1608a21f\",\"createdAt\":\"2020-11-19T21:31:08.1662939+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Expired\"},{\"id\":\"68ebca8b-6a35-4bbb-8920-ecb0104c8fa7\",\"createdAt\":\"2020-11-19T21:30:55.9373878+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"b0589255-3b0a-46c0-900b-5dbe9825d897\",\"createdAt\":\"2020-11-19T21:30:50.468298+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"47e1ab2a-02df-4c0f-998a-9fa2484a592d\",\"createdAt\":\"2020-11-19T21:30:24.8420554+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"a2c887b9-d002-4ff2-b15b-c90eea0a1a51\",\"createdAt\":\"2020-11-19T21:30:02.6883228+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"b5c7d9a8-ad15-4eeb-84a8-ca9ee97f7d96\",\"createdAt\":\"2020-11-19T21:30:02.5320715+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"c90f4d17-667b-41cf-bcc4-a09a6d75c679\",\"createdAt\":\"2020-11-19T21:30:01.797484+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"b845aa74-f000-42a0-8550-9a2d23261d85\",\"createdAt\":\"2020-11-19T21:29:56.6607433+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"0bd20bdc-495e-4435-8f0b-0039d523a6b1\",\"createdAt\":\"2020-11-19T21:29:39.5179265+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"84034b87-8840-487e-a556-05c493b66267\",\"createdAt\":\"2020-11-19T21:29:33.8031797+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"361b8e8c-c760-492b-b5c4-f83f7d0eac9a\",\"createdAt\":\"2020-11-19T21:29:30.0395267+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"ecaf4055-5152-4938-9117-16531859d376\",\"createdAt\":\"2020-11-19T21:29:17.8601024+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"0ff91e7b-539f-40d4-b9c9-0f8f30687459\",\"createdAt\":\"2020-11-19T21:29:13.2694242+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"e15ea2ff-a7a0-4eef-a4af-5ca9694471eb\",\"createdAt\":\"2020-11-19T21:28:52.3330263+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"f4f3be08-a698-4181-8e5e-e35b4877936f\",\"createdAt\":\"2020-11-19T21:28:49.5221311+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"fbd80fe2-7289-4ce1-9c15-e71762afc0cb\",\"createdAt\":\"2020-11-19T21:28:37.941156+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"b2007683-a9f6-4307-ae40-0e682cdc1adb\",\"createdAt\":\"2020-11-19T21:28:30.4529629+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"7a5999e8-40e0-478f-8e43-f58a64b12774\",\"createdAt\":\"2020-11-19T21:28:21.8188395+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"395f6fcf-edff-4caf-95dc-8f9a81a95366\",\"createdAt\":\"2020-11-19T21:28:21.2203538+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"559fac7c-c9d1-4ee7-b604-fb1390f09489\",\"createdAt\":\"2020-11-19T21:28:09.8311928+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"9a6485b1-3ce1-40b8-9f06-3e4c56aee5d5\",\"createdAt\":\"2020-11-19T21:28:09.3602498+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"d62c012e-1d9d-4b2d-8301-31909b88ade0\",\"createdAt\":\"2020-11-19T21:27:51.9046444+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"da1c38f4-1c01-45e6-aacd-80118c0d67e0\",\"createdAt\":\"2020-11-19T21:27:49.1392229+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"cf181d92-2acc-4f7b-b65b-266add6fad2d\",\"createdAt\":\"2020-11-19T21:27:40.8604043+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"b738a24b-b78d-47ea-8915-f51dc3fa09d8\",\"createdAt\":\"2020-11-19T21:27:33.8371648+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"069fc1b8-a82e-4bbb-a0c9-dfb6e36da098\",\"createdAt\":\"2020-11-19T21:27:32.7747347+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"8d9d9af8-c853-4a58-891d-2d7cf03097f6\",\"createdAt\":\"2020-11-19T21:27:22.9289279+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"2096d485-173b-4072-8e6a-4223c8bc89e8\",\"createdAt\":\"2020-11-19T21:27:10.4945032+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"37c6037b-a73a-4479-b5fc-e8cb8dcdafdc\",\"createdAt\":\"2020-11-19T21:27:03.3238887+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"7e91156a-91e5-4070-8f9f-78ca3c915926\",\"createdAt\":\"2020-11-19T21:26:43.0420529+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"8ae42e8a-f3f7-4230-947c-7bc07738e7e7\",\"createdAt\":\"2020-11-19T21:26:41.3075903+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"44b8e630-cb9c-4172-84b7-782a50860f40\",\"createdAt\":\"2020-11-19T21:26:21.1972162+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"2a7385a6-84c9-4b6d-9163-f4cc046e207f\",\"createdAt\":\"2020-11-19T21:26:04.8028794+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"3fbe4aca-8dfc-46c6-be36-02462badead7\",\"createdAt\":\"2020-11-19T21:25:57.4124414+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"8b131ddb-5ad2-4ed6-bf79-852893706d7c\",\"createdAt\":\"2020-11-19T21:25:40.2807902+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"60013ab5-a712-47f0-a5ec-7ece2c18d4c4\",\"createdAt\":\"2020-11-19T21:25:39.8068464+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"afba4626-3808-4270-8019-18bedd53c5c4\",\"createdAt\":\"2020-11-19T21:25:07.4169296+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"120dd347-dbf9-4cc0-abb0-014ce6818a40\",\"createdAt\":\"2020-11-19T21:24:56.8677886+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"35aa1f2a-5246-4575-8fba-189458d25a58\",\"createdAt\":\"2020-11-19T21:24:46.1173353+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"df676f17-27d4-454e-863b-9533bb3581f2\",\"createdAt\":\"2020-11-19T21:24:42.4508478+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"53434e12-75bc-4433-b778-caec534e5048\",\"createdAt\":\"2020-11-19T21:24:35.9786975+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"1c9e29bb-85a5-4358-b56f-be8e054aa0d0\",\"createdAt\":\"2020-11-19T21:24:27.4711275+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"d4661ee1-e5af-4c37-9a53-82c63100efb1\",\"createdAt\":\"2020-11-19T21:24:20.8680357+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"756e297d-5fc2-489f-8e4d-dacf6f01151a\",\"createdAt\":\"2020-11-19T20:29:39.8467523+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"c2b7ba28-3758-42e9-a8ad-a30fb0b5a339\",\"createdAt\":\"2020-11-19T20:24:27.2064601+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"2dc94ee8-3b74-4ddc-a181-c700a7dd26a4\",\"createdAt\":\"2020-11-19T20:22:58.053547+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"cea26add-6577-4c2e-be22-787c87386d71\",\"createdAt\":\"2020-11-19T20:20:53.017997+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"8b287214-a24f-4eb5-b9f0-3ec3bb4435f9\",\"createdAt\":\"2020-11-19T20:08:51.498793+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"643730f8-7d96-4917-a6d1-44f4f0030162\",\"createdAt\":\"2020-11-19T20:07:44.535897+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"b31b30b4-f75a-4b42-be2f-615b704012b0\",\"createdAt\":\"2020-11-19T20:06:04.994273+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"e815a18e-6cc5-4e90-b2a6-39c9cba25211\",\"createdAt\":\"2020-11-19T20:05:51.4004994+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Cancelled\"},{\"id\":\"e12119c1-99f5-4cc3-bab5-0a05d0058ec1\",\"createdAt\":\"2020-11-19T20:03:12.749541+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"},{\"id\":\"cf0a5ad7-2a59-4da5-98e5-e23a1ad7b483\",\"createdAt\":\"2020-11-19T19:50:28.7893319+00:00\",\"displayName\":\"testReservation20200014\",\"quantity\":1,\"quantityObtained\":1,\"status\":\"Success\"}],\"nextLink\":\"https://23.100.38.234/administration/phonenumbers/searches?api-version=2020-07-20-preview1&skip=100&take=100\"}", - "Date" : "Tue, 24 Nov 2020 05:26:58 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllSupportedCountries.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllSupportedCountries.json deleted file mode 100644 index 3e9ceda36f8d..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllSupportedCountries.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "793ms", - "MS-CV" : "fI+lzeh5akyqdicX3qBEFA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0vJi8XwAAAADHCxNZqu+QTZKxxVhX/6wTWVZSMzBFREdFMDQwOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"countries\":[{\"localizedName\":\"Canada\",\"countryCode\":\"CA\"},{\"localizedName\":\"United States\",\"countryCode\":\"US\"}],\"nextLink\":null}", - "Date" : "Tue, 24 Nov 2020 05:23:08 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllSupportedCountriesWithContext.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllSupportedCountriesWithContext.json deleted file mode 100644 index dc2d6b270c68..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listAllSupportedCountriesWithContext.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "808ms", - "MS-CV" : "0dRJ2GUXbkqb+p1+6WSRYg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0NZm8XwAAAADEe5Unt4+5RpxGufMrKq4bWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"countries\":[{\"localizedName\":\"Canada\",\"countryCode\":\"CA\"},{\"localizedName\":\"United States\",\"countryCode\":\"US\"}],\"nextLink\":null}", - "Date" : "Tue, 24 Nov 2020 05:25:09 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlanGroups.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlanGroups.json deleted file mode 100644 index a9aaaea6b7c2..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlanGroups.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1796ms", - "MS-CV" : "wtF3fC1VHEKqwKJr5DW95w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0tV24XwAAAABmhbGRHgdETZUcsJ/cQPdAWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:22:14 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlanGroupsNullCountryCode.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlanGroupsNullCountryCode.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlanGroupsNullCountryCode.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlanGroupsWithContext.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlanGroupsWithContext.json deleted file mode 100644 index 35187a202a40..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlanGroupsWithContext.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "3056ms", - "MS-CV" : "AdDZ4dEWF0al/W0BUeMcLQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0oZe8XwAAAACw1VPbXi26QIyDaZG/j/dWWVZSMzBFREdFMDQxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Tue, 24 Nov 2020 05:18:28 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlans.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlans.json deleted file mode 100644 index 694df5b73a7e..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlans.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1710ms", - "MS-CV" : "GW9YuFGXb0mLL7aokBtKUg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0+124XwAAAADpujIGXEc+S4+F8rsneJnDWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:23:25 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "291ms", - "MS-CV" : "j1aOcxXTVkGU5CZ3hffTRA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0/V24XwAAAAAKTqL11W3xS6XroIkBrCkNWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:23:25 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlansNullCountryCode.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlansNullCountryCode.json deleted file mode 100644 index 28f3a54cabac..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlansNullCountryCode.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1621ms", - "MS-CV" : "VHNag9wVk0ye5gDmwpkA9A.0", - "retry-after" : "0", - "X-Azure-Ref" : "0pl24XwAAAAAPZiKPeMblQaNrHvJGu/qKWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Sat, 21 Nov 2020 00:22:00 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlansNullPhonePlanGroupId.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlansNullPhonePlanGroupId.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlansNullPhonePlanGroupId.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlansWithContext.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlansWithContext.json deleted file mode 100644 index d41fde57468f..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/listPhonePlansWithContext.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "3398ms", - "MS-CV" : "6fHMjRHnyUK2lrILpwHqDQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0nJa8XwAAAABKfoJ4xvxMQK9ZqylxZw1fWVZSMzBFREdFMDQxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Tue, 24 Nov 2020 05:14:07 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "675ms", - "MS-CV" : "z6SXnFRhS0a0CM+0FqZdrw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0n5a8XwAAAADGmLBO2LTOTJpUja22p/+TWVZSMzBFREdFMDQxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"Azure\",\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Tue, 24 Nov 2020 05:14:07 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/purchaseReservationBeginReleasePhoneNumber.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/purchaseReservationBeginReleasePhoneNumber.json deleted file mode 100644 index 661c7565e726..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/purchaseReservationBeginReleasePhoneNumber.json +++ /dev/null @@ -1,778 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "3614ms", - "MS-CV" : "2ALW9GuYxkCFnNdykD9jWQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0kaXjXwAAAAD2xzilmBWKRJlbHBCR7FQpWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Wed, 23 Dec 2020 20:16:21 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "566ms", - "MS-CV" : "9wV7+A9KgkuglV6Tpo+zEw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0lqXjXwAAAAD2LFdGwmZlRalkyoInZnHoWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Wed, 23 Dec 2020 20:16:22 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1936ms", - "MS-CV" : "yaLwNn9K30aCOq+v55RLTw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0lqXjXwAAAAAYZOtd1lBfTbEd+AOE/jwoWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "201", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\"}", - "Date" : "Wed, 23 Dec 2020 20:16:24 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "262ms", - "MS-CV" : "oW2AjScdKEmrsVTHCjhrNg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0mKXjXwAAAADslSw9OAfXR7Q2P5Z4PBBSWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[],\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:24 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "302ms", - "MS-CV" : "ZCPmY4LT10SDLMkEQF5wdQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0mqXjXwAAAADUOI+0iF+bRZZfkvxcCS5EWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[],\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:26 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "263ms", - "MS-CV" : "Mu9z+ogem0G0pzk4vy/a/Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0m6XjXwAAAABzrKW7KG4nR5kiysmUvfLpWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[],\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:27 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "292ms", - "MS-CV" : "Po9ARSEa9UG6azCaiMmR1g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0nKXjXwAAAADiEp52ATUATaRV5x2rxFteWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[],\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:28 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "325ms", - "MS-CV" : "rlqxWNTYSEafPwS6F2SUxw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0nqXjXwAAAABuwPFzl3OPQJqjXFIpBbs5WVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[],\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:29 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "291ms", - "MS-CV" : "Cwm9bJkeC0iigQbxH6fJow.0", - "retry-after" : "0", - "X-Azure-Ref" : "0n6XjXwAAAACNpVJ8QksyT55+q4Glcc8SWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:31 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267/purchase?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "X-Processing-Time" : "719ms", - "MS-CV" : "YjpoNTqvxUmMKlpMEXHtTg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0oKXjXwAAAACsorVVEUr8S47mjO7Y6qlFWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "202", - "Date" : "Wed, 23 Dec 2020 20:16:32 GMT" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "393ms", - "MS-CV" : "AjH1xsfj2UCgw8wMEsL4fA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0oaXjXwAAAAA3uCyu+H01SbtHeTlVYZkOWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:33 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "295ms", - "MS-CV" : "y6nVytNdoESk6VKKTiSjZQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0o6XjXwAAAAAF6TIyqk68RZYMP48IY2f+WVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:34 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "287ms", - "MS-CV" : "3OXKqsEyz0GRjA716LGbng.0", - "retry-after" : "0", - "X-Azure-Ref" : "0pKXjXwAAAADPV2xz4850Q7DdX4VSlbUEWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:36 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "345ms", - "MS-CV" : "ZymI/Y+lDU+FlQy0YBKY4w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0paXjXwAAAABRIPe44FxYQbEVYWQEX7+dWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:37 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "291ms", - "MS-CV" : "WFW2AjIGPEaQG0iDIz7AUQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0p6XjXwAAAAABFKK11rHmR4gosducZnpfWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:39 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "281ms", - "MS-CV" : "cOZDPvKzA0KgtRgSZOPkvA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0qKXjXwAAAADb4wdoIq6yRJjHsCgn+DmEWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:40 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "293ms", - "MS-CV" : "xQP+uZm260ybesqBH54RkA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0qqXjXwAAAADKmgNn35/4QpGLA6pZNrLvWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:41 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "270ms", - "MS-CV" : "fiGfqAOP+kSwAHEAI5pcVg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0q6XjXwAAAAApIYWhsHTsQYfpaKV7HuOWWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:43 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "301ms", - "MS-CV" : "bIjiQWvSeUGn18VFJiy8og.0", - "retry-after" : "0", - "X-Azure-Ref" : "0rKXjXwAAAADusMEJ8UY9Q6Aw6RiESEweWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:44 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "288ms", - "MS-CV" : "UEo2RZiYvECnRNaixmoqBQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0rqXjXwAAAAAYg2MfNMqOS68hJ4JMCohFWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:45 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "287ms", - "MS-CV" : "xbOFLxFnP0K+4fnX8f6ziw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0r6XjXwAAAAC7T5UQLLHPTZJlOnvDSwt4WVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:47 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "264ms", - "MS-CV" : "II0RZNC/+0y4n5BPw/qdug.0", - "retry-after" : "0", - "X-Azure-Ref" : "0saXjXwAAAAD8ecjGWeBBTZOZ5DO7b+BYWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:48 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "286ms", - "MS-CV" : "Mjvc3xVJHkeivi9skvY5Tw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0sqXjXwAAAAB49q0DffUTQ4Eu0YGUEM18WVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:50 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "304ms", - "MS-CV" : "mWyv6ME8XkOlpmLuAKn/Bw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0s6XjXwAAAACw3uCLXGsZSou55yCltNV+WVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:51 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "301ms", - "MS-CV" : "hj9xFX+dJE2tpPyA3p3SMw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0taXjXwAAAAAWHPRzxRirSZzKogcPyeUKWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:52 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "306ms", - "MS-CV" : "hSrXYWuOqU23D/ZFe6HB3w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0tqXjXwAAAADPjB3aZwb4TJm+7A+9U+OcWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:54 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "300ms", - "MS-CV" : "qloB3V+ls0GCEKtiNcm2RA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0t6XjXwAAAACbaio03IRgQbHDaqH8Pw+tWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:55 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "277ms", - "MS-CV" : "VY9Lxf/V0kSIZe0BmCBWAg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0uaXjXwAAAACoRt1SnY5PRb269sHI7sD3WVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:57 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/fcfaed78-2482-4c2f-be92-fcda03aa0267?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "306ms", - "MS-CV" : "DSEmgc6r1Uaa8ltNuiSoXw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0uqXjXwAAAADZFmgSfoNYSqMCxNlHLREUWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"fcfaed78-2482-4c2f-be92-fcda03aa0267\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:16:23.8577566+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Success\",\"phoneNumbers\":[\"+16199001576\"],\"reservationExpiryDate\":\"2020-12-23T20:32:30.12429+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:16:58 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "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.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "923ms", - "MS-CV" : "gCx8x63uSkGo3PacCrPvPA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0u6XjXwAAAABdq/S6r8XlRKEquiNJK4ftWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\"}", - "Date" : "Wed, 23 Dec 2020 20:16:59 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "210ms", - "MS-CV" : "tmS7+wzJhUKkqNnD4igVDQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0vKXjXwAAAAAyH783zOK/Spkw7C5a5WHeWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:16:59 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "186ms", - "MS-CV" : "a2anQiHbs0+X2WN7DUGqmw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0vaXjXwAAAADCWHHPbp8GTLsr6Xdi4QauWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:01 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "215ms", - "MS-CV" : "1r+WVfsTyE2+bLIs3HoXvw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0vqXjXwAAAAA/1mVDe28IR6kEsZCYe7YEWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:02 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "211ms", - "MS-CV" : "nJxbMsMXeEGQIVJrR92lgA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0wKXjXwAAAADPGBIJ5PcuS5olnMl6uWikWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:03 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "213ms", - "MS-CV" : "seBZOZ4VKU+wiihUP6EctA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0waXjXwAAAAAwhcY5vTpZRJX624DEeO+JWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:04 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "215ms", - "MS-CV" : "a6tjjfjKbEOrHfsdyoxLxQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0wqXjXwAAAABU0LwpJ6bCRa8n3Od84hDPWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:06 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "598ms", - "MS-CV" : "s2R7DeGrxE2WZFuwfKfWyg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0w6XjXwAAAACRttE/oaJXTLswm6hn8HJiWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:07 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "186ms", - "MS-CV" : "qHxV2/3eoU2OO6g9Lcrt4Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0xaXjXwAAAACnZEHew+2rQ6SP/tSq6798WVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:09 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "212ms", - "MS-CV" : "eQDolCysaUSnBmKBZuHvMg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0xqXjXwAAAAD+hRA8jFQ6S6Z9edW4yyl2WVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"InProgress\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:11 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "210ms", - "MS-CV" : "W74I5l6H+UKwox9RVg/e8Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0yKXjXwAAAABk3WWTr6gnTpKukegos5XSWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"InProgress\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:12 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "205ms", - "MS-CV" : "mb0hCAAXvk65eMNqX9qQww.0", - "retry-after" : "0", - "X-Azure-Ref" : "0yaXjXwAAAADAVYDofBQsTqO41y40+lGmWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"InProgress\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:13 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "431ms", - "MS-CV" : "c4pd9fla1Ui3jv4DGchnMA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0yqXjXwAAAADjIeLBOkvGSpL+QPChu888WVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"InProgress\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:14 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/3d262582-7868-4cfc-8eee-34332594fb0b?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "198ms", - "MS-CV" : "iX0GW4oZbEeetmaIEcQFdw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0zKXjXwAAAABiHfJP2n/jRZXbugPeNPk2WVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"3d262582-7868-4cfc-8eee-34332594fb0b\",\"createdAt\":\"2020-12-23T20:16:59.5061936+00:00\",\"status\":\"Complete\",\"phoneNumberReleaseStatusDetails\":{\"+16199001576\":{\"status\":\"Success\"}}}", - "Date" : "Wed, 23 Dec 2020 20:17:16 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/purchaseReservationBeginReleasePhoneNumberSync.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/purchaseReservationBeginReleasePhoneNumberSync.json deleted file mode 100644 index abe2e9ab858b..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/purchaseReservationBeginReleasePhoneNumberSync.json +++ /dev/null @@ -1,832 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups?locale=en-us&includeRateInformation=true&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "2631ms", - "MS-CV" : "5PaYf81Yj0a4T1frrs8zrA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0PabjXwAAAABdGpk1mM5QQqz6E0EacxpYWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlanGroups\":[{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure- User - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"Geographic\",\"localizedName\":\"Azure - Geographic\",\"localizedDescription\":\"These are numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":1.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}},{\"phonePlanGroupId\":\"REDACTED\",\"phoneNumberType\":\"TollFree\",\"localizedName\":\"Azure - Toll Free\",\"localizedDescription\":\"These are toll free numbers used by Azure resources.\",\"rateInformation\":{\"monthlyRate\":2.0,\"currencyType\":\"USD\",\"rateErrorMessage\":null}}],\"nextLink\":null}", - "Date" : "Wed, 23 Dec 2020 20:19:12 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/countries/US/phoneplangroups/REDACTED/phoneplans?locale=en-us&api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "295ms", - "MS-CV" : "JN+LOdKSE0urwncP2qGxhQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QKbjXwAAAACglO2951sfSI86Lrzd80rmWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"phonePlans\":[{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Outbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"OutboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20},{\"phonePlanId\":\"REDACTED\",\"localizedName\":\"Inbound Only PSTN For User - Geographic\",\"locationType\":\"Selection\",\"areaCodes\":[],\"capabilities\":[\"InboundCalling\",\"UserAssignment\",\"Geographic\"],\"maximumSearchSize\":20}],\"nextLink\":null}", - "Date" : "Wed, 23 Dec 2020 20:19:12 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1165ms", - "MS-CV" : "FM+0yuoeOE23QwwYsIZHqg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QabjXwAAAAAw50XkJFChRLt0Gff6wcnhWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "201", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\"}", - "Date" : "Wed, 23 Dec 2020 20:19:14 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "487ms", - "MS-CV" : "z/qgO/QOGE6pi8jXVtsoxw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QqbjXwAAAADZLGtMMKOJQaMo7ZvpyNLhWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[],\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:14 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "291ms", - "MS-CV" : "nzOw2siLGkGyfmItIOzyBA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0RKbjXwAAAACdkjhrRfk0RrPlegEQopa4WVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[],\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:16 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "294ms", - "MS-CV" : "bKtHyGOSJUq0EPMpacEFkQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0RabjXwAAAAAgPrVHh/VxQ7g2NJOACBTKWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Pending\",\"phoneNumbers\":[],\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:17 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "430ms", - "MS-CV" : "kkKR/7M4eEutkaHy30Ru3g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0R6bjXwAAAACvrJ+0tg2sRaWhFBfFWn/5WVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[],\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:19 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "696ms", - "MS-CV" : "SicYTd6JiUGRPGhqmw1vlQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0SKbjXwAAAAD4qgU7/tVMT7U+5Hg38TP+WVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"InProgress\",\"phoneNumbers\":[],\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:20 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "496ms", - "MS-CV" : "VJuhhpgqtkKDzXqncvo/RA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0SqbjXwAAAADL2VOEL+jbT6toKBXRE5j0WVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Reserved\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:22 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3/purchase?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "X-Processing-Time" : "838ms", - "MS-CV" : "ifIAYN/+B0qofvh/FbDhIQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0S6bjXwAAAABnY/X64nYdRp7VwSnP68eQWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Content-Length" : "0", - "StatusCode" : "202", - "Date" : "Wed, 23 Dec 2020 20:19:23 GMT" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "335ms", - "MS-CV" : "MGKBpBk8dkKuweYWR0yFQw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0TabjXwAAAABzK8iwkwIUQ6i2KfMLUGoFWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:25 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "309ms", - "MS-CV" : "NrQLAHLn/UmnE90W3HhZ7Q.0", - "retry-after" : "0", - "X-Azure-Ref" : "0TqbjXwAAAACDVxfVoURNS6eiurVNjzcYWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:26 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "294ms", - "MS-CV" : "WTK08KMHsUmMkJJ3fclUOg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0UKbjXwAAAAAM7sHVkGYZTpqtgaQ4GZStWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Completing\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:27 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "481ms", - "MS-CV" : "KoevpNrf9kK+IlfoZk2gXQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0UabjXwAAAADZnS/Cfh9CSrMw1Lx0D9+xWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:29 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "349ms", - "MS-CV" : "CcufTneYBE26ug3XWqWuzQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0U6bjXwAAAACbIO7cvZvpT5xoBJ0sjt0xWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:30 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "291ms", - "MS-CV" : "EQbwkUgNB0mJ/tqv2lGCIw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0VKbjXwAAAAD2cI7YCcO2Qr+hVYSpwDSJWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:32 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "289ms", - "MS-CV" : "AI5geDUeFkWKuvRMrpDtVA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0VabjXwAAAAAMPJCxLCVERK2aj43hyfoaWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:33 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "339ms", - "MS-CV" : "sZ9/a8ljgkql5BLX+2NX5w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0V6bjXwAAAAACfbRF/tmBTZKNpkULHyUCWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:34 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "292ms", - "MS-CV" : "+tQCW//SHkCf5KjE9ZsZTg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0WKbjXwAAAADapd37ir3VRpBpfsMJv5YQWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:36 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "440ms", - "MS-CV" : "S9zLiV6qHUuJJFN2OGmpvA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0WqbjXwAAAAC8ox/N1t8gS6mL2R/IrwMxWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:37 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "712ms", - "MS-CV" : "YTjtrfCaG0CGuKeQiKJxSg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0W6bjXwAAAAD1e88OXopgQpJ/W2r+CqgOWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:39 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "532ms", - "MS-CV" : "tcOofxd3ykGxDJLM54Q9nA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0XabjXwAAAACTGzx5tYF7T4y9GaoATIHcWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:42 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "291ms", - "MS-CV" : "y8B86OqeSEyELH50qQK4ew.0", - "retry-after" : "0", - "X-Azure-Ref" : "0X6bjXwAAAABi5GNyzZv/QZmPlB+CGYXcWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:42 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "305ms", - "MS-CV" : "PLcrUAa4KE65Vo5zkap9bw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0YKbjXwAAAAA4clS9GgMhTKjg2l8mMRaLWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:45 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "288ms", - "MS-CV" : "6R2HHMFz0UOu+zHMFmRi0A.0", - "retry-after" : "0", - "X-Azure-Ref" : "0YqbjXwAAAAA5n3HKDP/NRb7gjKEYJFaEWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:45 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "303ms", - "MS-CV" : "I4tKz6jROkeoGYieozjnfw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Y6bjXwAAAAC3cZkAkRNNSrc6i7jodgTsWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:47 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "305ms", - "MS-CV" : "wEoYN+hBo0+zyEWqcb3RZA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0ZKbjXwAAAABNQQpRcHWXQ5zF5gG84FiIWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"PurchasePending\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:48 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/searches/728c29f7-efb7-42f8-9dc7-e144516e77a3?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "285ms", - "MS-CV" : "C9IB/+gG1U6mjkfq/6gW3g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0ZqbjXwAAAAD1Wu7tTkYWTYh3fE480wSRWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"searchId\":\"728c29f7-efb7-42f8-9dc7-e144516e77a3\",\"displayName\":\"testReservation20200014\",\"createdAt\":\"2020-12-23T20:19:13.43223+00:00\",\"description\":\"testReservation20200014\",\"phonePlanIds\":[\"01432411-5169-4665-b13e-3fa56c10e1d1\"],\"areaCode\":\"619\",\"quantity\":1,\"locationOptions\":[],\"status\":\"Success\",\"phoneNumbers\":[\"+16199001571\"],\"reservationExpiryDate\":\"2020-12-23T20:35:20.6728652+00:00\",\"error\":\"NoError\"}", - "Date" : "Wed, 23 Dec 2020 20:19:50 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "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.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "628ms", - "MS-CV" : "zcXDKTFl5Ea6hBwpL32yXA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0ZqbjXwAAAACbAVG1ICwITqPjDq9KuSx5WVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\"}", - "Date" : "Wed, 23 Dec 2020 20:19:51 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "199ms", - "MS-CV" : "7JVT6mJTXkGAeTJ9KhP6rg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Z6bjXwAAAAAxfyuOpgf7Rrk+ErB2q3aeWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:19:51 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "202ms", - "MS-CV" : "EdocBaWdUEq8yP31/rmdQQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0aKbjXwAAAAC/jxfmOOFnSaZrf8iP+PVTWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:19:53 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "219ms", - "MS-CV" : "J4BH/5Fjm0inOQR2guBC0w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0aqbjXwAAAABf3dpDmFNfR6kg4dkfHwK5WVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"Pending\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:19:54 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "205ms", - "MS-CV" : "4dQ0m1YtSkuYdwX9n96vQw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0a6bjXwAAAAD4Yu1RfzYRR4L0tZwRB6JsWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:19:55 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "203ms", - "MS-CV" : "CaSY02MonUmP46Cs0poFCA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0bKbjXwAAAACQBdtPdN2jTaXmF+m4CrxzWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:19:56 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "244ms", - "MS-CV" : "EHdRiwA8KkGMZd08RxxvNQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0bqbjXwAAAAAYeEMtSvV4Tpx2koaCbTA5WVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:19:58 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "201ms", - "MS-CV" : "JxSpCCCS+Uuw5I61eYegiQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0b6bjXwAAAADK10OlXbYhQYAqZ3L01Y3uWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:19:59 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "209ms", - "MS-CV" : "0oWyWNwwAUKEGaHymrbo9g.0", - "retry-after" : "0", - "X-Azure-Ref" : "0cKbjXwAAAAABUvQz6GjySJefTZqPzsQ1WVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:20:00 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "211ms", - "MS-CV" : "fTBuKrbT6Uah9Ep/T3oTsQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0cabjXwAAAAAkQ4bL3ELfSJ/pV05Tar3XWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:20:01 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "206ms", - "MS-CV" : "lpzPbk5/QEeoQYtT2D8TQw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0c6bjXwAAAABnM+/R1PTeSYmi4EHjmgH1WVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Pending\"}}}", - "Date" : "Wed, 23 Dec 2020 20:20:03 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "197ms", - "MS-CV" : "4C1Bwum250mQfMrAijDlZw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0dKbjXwAAAAAumqgJCUpNQrJbfOETYXTAWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"InProgress\"}}}", - "Date" : "Wed, 23 Dec 2020 20:20:04 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "203ms", - "MS-CV" : "cghF5AHfcUS57nVTFUNi6w.0", - "retry-after" : "0", - "X-Azure-Ref" : "0dabjXwAAAADGV1jDvwv0TYSC6GTZjIKQWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"InProgress\"}}}", - "Date" : "Wed, 23 Dec 2020 20:20:05 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "199ms", - "MS-CV" : "4yOZ4GUrIkGlnWpkM2LoQg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0d6bjXwAAAAAriQj9JmibS5ooWBhWdhyNWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"InProgress\"}}}", - "Date" : "Wed, 23 Dec 2020 20:20:06 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "221ms", - "MS-CV" : "gLzNOzdPNEKOViqH4/BnpA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0eKbjXwAAAAABrifa0pZmS7BnY2tZVDziWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"InProgress\"}}}", - "Date" : "Wed, 23 Dec 2020 20:20:08 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "199ms", - "MS-CV" : "6uQz54qAjk+xMG4YBGP1yA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0eabjXwAAAADOFD9mNrjaRJz2Ao+7qxPKWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"InProgress\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"InProgress\"}}}", - "Date" : "Wed, 23 Dec 2020 20:20:09 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "466ms", - "MS-CV" : "Oh097vKz8U6PS4luGrsE0A.0", - "retry-after" : "0", - "X-Azure-Ref" : "0e6bjXwAAAACgFDF3h1QnTJQnZ6PZiU1QWVZSMzBFREdFMDMxMgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"Complete\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Success\"}}}", - "Date" : "Wed, 23 Dec 2020 20:20:11 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/releases/524bfe97-0fa6-43cb-914e-290b2625c165?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "197ms", - "MS-CV" : "DaTb3sLTpUeizgL2M04JCQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0e6bjXwAAAAAzh0MRnUiITKUd9I+qhXVNWVZSMzBFREdFMDMwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"releaseId\":\"524bfe97-0fa6-43cb-914e-290b2625c165\",\"createdAt\":\"2020-12-23T20:19:50.9987321+00:00\",\"status\":\"Complete\",\"phoneNumberReleaseStatusDetails\":{\"+16199001571\":{\"status\":\"Success\"}}}", - "Date" : "Wed, 23 Dec 2020 20:20:11 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/unconfigureNumber.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/unconfigureNumber.json deleted file mode 100644 index b84a6d033abe..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/unconfigureNumber.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PATCH", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration/unconfigure?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "X-Processing-Time" : "1097ms", - "MS-CV" : "lIVW7irZ1UmDxpXo/M+WGQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Le2sXwAAAADHZIdpS6EcQLzOHKn5kefiTEFYRURHRTEyMTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "Content-Length" : "0", - "StatusCode" : "200", - "Date" : "Thu, 12 Nov 2020 08:07:09 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/unconfigureNumberWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/unconfigureNumberWithResponse.json deleted file mode 100644 index 0a0d27bab90b..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/unconfigureNumberWithResponse.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PATCH", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/numberconfiguration/unconfigure?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "X-Processing-Time" : "778ms", - "MS-CV" : "UTJGvdOEJEmWOah5zK6NBg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Q+ysXwAAAADe6E3Kd5H7SITFsm1wx8gwTEFYRURHRTEyMDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "Content-Length" : "0", - "StatusCode" : "200", - "Date" : "Thu, 12 Nov 2020 08:03:15 GMT" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/unconfigureNumberWithResponseNullPhoneNumber.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/unconfigureNumberWithResponseNullPhoneNumber.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/unconfigureNumberWithResponseNullPhoneNumber.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilities.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilities.json deleted file mode 100644 index df96f2a2a857..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilities.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/capabilities?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1169ms", - "MS-CV" : "k99P0b/1dkm8PmhGVS9tlQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QeysXwAAAADv0rJd0U9MSKX82Bw7wcTITEFYRURHRTEyMTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"capabilitiesUpdateId\":\"bfcdad6c-c039-4b62-8ed3-f7a16ca45536\"}", - "Date" : "Thu, 12 Nov 2020 08:03:14 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesGetCapabilitiesUpdate.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesGetCapabilitiesUpdate.json deleted file mode 100644 index 576aeda754d9..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesGetCapabilitiesUpdate.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/capabilities?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "870ms", - "MS-CV" : "XcTZN8xScEqy2oSb/5M+HA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0fY3FXwAAAACXmzQ63eMPRpcPBmFkh9KXWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"capabilitiesUpdateId\":\"e9e7ee3c-f996-44c2-ab53-52fa9fe4fce1\"}", - "Date" : "Tue, 01 Dec 2020 00:25:33 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/capabilities/e9e7ee3c-f996-44c2-ab53-52fa9fe4fce1?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "322ms", - "MS-CV" : "3qCTb9bd80CLmPNv26udBg.0", - "retry-after" : "0", - "X-Azure-Ref" : "0fo3FXwAAAAAETn5zoe8+TYlysjR/PRdyWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"capabilitiesUpdateId\":\"e9e7ee3c-f996-44c2-ab53-52fa9fe4fce1\",\"createdAt\":\"2020-12-01T00:25:33.5934221+00:00\",\"capabilitiesUpdateStatus\":\"Pending\",\"phoneNumberCapabilitiesUpdates\":{\"+18332143261\":{\"add\":[\"InboundCalling\"],\"remove\":[]}}}", - "Date" : "Tue, 01 Dec 2020 00:25:34 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesGetCapabilitiesUpdateWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesGetCapabilitiesUpdateWithResponse.json deleted file mode 100644 index 22d5d572e0c8..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesGetCapabilitiesUpdateWithResponse.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/capabilities?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "1291ms", - "MS-CV" : "oW9k/EzEPUyrTZz3cmt+sw.0", - "retry-after" : "0", - "X-Azure-Ref" : "0Qo3FXwAAAADE3rlcYfRsQ4zOtnNfv/dzWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"capabilitiesUpdateId\":\"5eff8b66-4bd4-42ba-b87a-2df6ac870b1a\"}", - "Date" : "Tue, 01 Dec 2020 00:24:35 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/capabilities/5eff8b66-4bd4-42ba-b87a-2df6ac870b1a?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.4 (11.0.8; Windows 10; 10.0)" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "319ms", - "MS-CV" : "NdM2ddMvdEiQtPL2FcXmOQ.0", - "retry-after" : "0", - "X-Azure-Ref" : "0RI3FXwAAAADFU8laDTzbTYeQtkrkWc9RWVZSMzBFREdFMDMxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "StatusCode" : "200", - "Body" : "{\"capabilitiesUpdateId\":\"5eff8b66-4bd4-42ba-b87a-2df6ac870b1a\",\"createdAt\":\"2020-12-01T00:24:35.5020038+00:00\",\"capabilitiesUpdateStatus\":\"Pending\",\"phoneNumberCapabilitiesUpdates\":{\"+18332143261\":{\"add\":[\"InboundCalling\"],\"remove\":[]}}}", - "Date" : "Tue, 01 Dec 2020 00:24:36 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesWithResponse.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesWithResponse.json deleted file mode 100644 index 2636fdadb836..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesWithResponse.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/administration/phonenumbers/capabilities?api-version=2020-07-20-preview1", - "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-administration/1.0.0-beta.3 (15.0.1; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "X-Processing-Time" : "895ms", - "MS-CV" : "kb4kc3LGw0yOPL3QIXuYmA.0", - "retry-after" : "0", - "X-Azure-Ref" : "0QeysXwAAAADnrJJKKIhZQbP0lgw2GX9wTEFYRURHRTEyMDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "StatusCode" : "200", - "Body" : "{\"capabilitiesUpdateId\":\"e2f266a6-f706-4e18-ad1c-d9a1f7cca05e\"}", - "Date" : "Thu, 12 Nov 2020 08:03:13 GMT", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesWithResponseNullPhoneNumberCapabilitiesUpdate.json b/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesWithResponseNullPhoneNumberCapabilitiesUpdate.json deleted file mode 100644 index ba5f37f8f855..000000000000 --- a/sdk/communication/azure-communication-administration/src/test/resources/session-records/updateCapabilitiesWithResponseNullPhoneNumberCapabilitiesUpdate.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "networkCallRecords" : [ ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/swagger/README.md b/sdk/communication/azure-communication-administration/swagger/README.md deleted file mode 100644 index d8158d14ec46..000000000000 --- a/sdk/communication/azure-communication-administration/swagger/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# Azure Communication Administration library for Java - -> see https://aka.ms/autorest -## Getting Started - -To build the SDK for Communication Administration library, simply Install AutoRest and in this folder, run: - -### Setup -```ps -Fork and clone https://github.com/Azure/autorest.java -git checkout v4 -git submodule update --init --recursive -mvn package -Dlocal -npm install -npm install -g autorest -``` - -### Generation -```ps -cd -autorest README.md --java --v4 --use=@autorest/java@4.0.1 --tag=phonenumber -``` - -### Tag: phonenumber - -These settings apply only when `--tag=phonenumber` is specified on the command line. - -``` yaml $(tag) == 'phonenumber' -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/257f060be8b60d8468584682aa2d71b1faa5f82c/specification/communication/data-plane/Microsoft.CommunicationServicesAdministration/preview/2020-07-20-preview1/communicationservicesadministration.json -override-client-name: PhoneNumberAdminClient -``` - -### Rename searchId to reservationId in CreateSearchResponse - -``` yaml -directive: - - from: swagger-document - where: $.definitions.CreateSearchResponse.properties.searchId - transform: > - $["x-ms-client-name"] = "reservationId"; -``` -### Rename searchId to reservationId in PhoneNumberSearch - -``` yaml -directive: - - from: swagger-document - where: $.definitions.PhoneNumberSearch.properties.searchId - transform: > - $["x-ms-client-name"] = "reservationId"; -``` - -### Rename PhoneNumberSearch to PhoneNumberReservation - -``` yaml -directive: - - rename-model: - from: PhoneNumberSearch - to: PhoneNumberReservation -``` - -### Rename CreateSearchOptions to CreateReservationOptions - -``` yaml -directive: - - rename-model: - from: CreateSearchOptions - to: CreateReservationOptions -``` - -### Rename CreateSearchResponse to CreateReservationResponse - -``` yaml -directive: - - rename-model: - from: CreateSearchResponse - to: CreateReservationResponse -``` - -### Code generation settings - -``` yaml -java: true -output-folder: ..\ -license-header: MICROSOFT_MIT_SMALL -namespace: com.azure.communication.administration -generate-client-as-impl: true -custom-types-subpackage: models -sync-methods: all -context-client-method-parameter: true -``` diff --git a/sdk/communication/azure-communication-common/src/main/java/module-info.java b/sdk/communication/azure-communication-common/src/main/java/module-info.java index c7add1524ca7..0305a83e51e5 100644 --- a/sdk/communication/azure-communication-common/src/main/java/module-info.java +++ b/sdk/communication/azure-communication-common/src/main/java/module-info.java @@ -15,6 +15,7 @@ com.azure.communication.administration, com.azure.communication.sms, com.azure.communication.identity, + com.azure.communication.phonenumbers, com.azure.communication.chat; opens com.azure.communication.common.implementation; diff --git a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md new file mode 100644 index 000000000000..bb87955ea1de --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md @@ -0,0 +1,12 @@ +# Release History + +## 1.0.0-beta.5 (Unreleased) +### Added +- Added PhoneNumbersClient and PhoneNumbersAsyncClient (originally was part of the azure.communication.administration package). +- Added support for Azure Active Directory Authentication. + +### Breaking Changes +- PhoneNumberAsyncClient has been replaced with PhoneNumbersAsyncClient, which has the same functionality but different APIs. To learn more about how PhoneNumbersAsyncClient works, refer to the [README.md][https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-phonenumbers/README.md]. +- PhoneNumberClient has been replaced with PhoneNumbersClient, which has the same functionality but different APIs. To learn more about how PhoneNumbersClient works, refer to the [README.md][https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-phonenumbers/README.md]. + + diff --git a/sdk/communication/azure-communication-phonenumbers/README.md b/sdk/communication/azure-communication-phonenumbers/README.md new file mode 100644 index 000000000000..33dabb929df9 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/README.md @@ -0,0 +1,195 @@ +# Azure Communication Phone Numbers client library for Java + +The phone numbers package provides capabilities for phone number management. + +Acquired phone numbers can come with many capabilities, depending on the country, number type and phone plan. Examples of capabilities are SMS inbound and outbound usage, calling inbound and outbound usage. Phone numbers can also be assigned to a bot via a webhook URL. + +[Source code][source] | [Package (Maven)][package] | [API reference documentation][api_documentation] +| [Product documentation][product_docs] +## Getting started + +### Prerequisites + +- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). +- [Java Development Kit (JDK)](https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable) version 8 or above. +- [Apache Maven](https://maven.apache.org/download.cgi). +- A deployed Communication Services resource. You can use the [Azure Portal](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp) or the [Azure PowerShell](https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice) to set it up. + +### Include the package + +[//]: # ({x-version-update-start;com.azure:azure-communication-phonenumbers;current}) +```xml + + com.azure + azure-communication-phonenumbers + 1.0.0-beta.5 + +``` + +## Key concepts + +### Initializing Phone Number Client +The PhoneNumberClientBuilder is enabled to use Azure Active Directory Authentication + +```java +// You can find your endpoint and access key from your resource in the Azure Portal +String endpoint = "https://.communication.azure.com"; + +// Create an HttpClient builder of your choice and customize it +HttpClient httpClient = new NettyAsyncHttpClientBuilder().build(); + +PhoneNumbersClient phoneNumberClient = new PhoneNumbersClientBuilder() + .endpoint(endpoint) + .credential(new DefaultAzureCredentialBuilder().build()) + .httpClient(httpClient) + .buildClient(); +``` + +Using the endpoint and access key from the communication resource to authenticate is also posible. + +```java +// You can find your endpoint and access token from your resource in the Azure Portal +String endpoint = "https://.communication.azure.com"; +String accessKey = "SECRET"; + +// Create an HttpClient builder of your choice and customize it +HttpClient httpClient = new NettyAsyncHttpClientBuilder().build(); + +PhoneNumbersClient phoneNumberClient = new PhoneNumbersClientBuilder() + .endpoint(endpoint) + .accessKey(accessKey) + .httpClient(httpClient) + .buildClient(); +``` +Alternatively, you can provide the entire connection string using the connectionString() function of the PhoneNumberClientBuilder instead of providing the endpoint and access key. + +### Phone Number Types overview + +Phone numbers come in two types; Geographic and Toll-Free. Geographic phone plans are phone plans associated with a location, whose phone numbers' area codes are associated with the area code of a geographic location. Toll-Free phone plans are phone plans not associated location. For example, in the US, toll-free numbers can come with area codes such as 800 or 888. + +### Searching and Purchasing and Releasing numbers + +Phone numbers can be searched through the search creation API by providing an area code, quantity of phone numbers, application type, phone number type, and capabilities. The provided quantity of phone numbers will be reserved for ten minutes and can be purchased within this time. If the search is not purchased, the phone numbers will become available to others after ten minutes. If the search is purchased, then the phone numbers are acquired for the Azure resources. + +Phone numbers can also be released using the release API. + +## Examples + +### Get Phone Number +Gets the specified acquired phone number. + + +```java +AcquiredPhoneNumber phoneNumber = phoneNumberClient.getPhoneNumber("+18001234567"); +System.out.println("Phone Number Value: " + phoneNumber.getPhoneNumber()); +System.out.println("Phone Number Country Code: " + phoneNumber.getCountryCode()); +``` + +### Get All Phone Numbers +Lists all the acquired phone numbers. + + +```java +PagedIterable phoneNumbers = createPhoneNumberClient().listPhoneNumbers(Context.NONE); +AcquiredPhoneNumber phoneNumber = phoneNumbers.iterator().next(); +System.out.println("Phone Number Value: " + phoneNumber.getPhoneNumber()); +System.out.println("Phone Number Country Code: " + phoneNumber.getCountryCode()); +``` + +## Long Running Operations + +The Phone Number Client supports a variety of long running operations that allow indefinite polling time to the functions listed down below. + +### Search for Available Phone Numbers +Search for available phone numbers by providing the area code, assignment type, phone number capabilities, phone number type, and quantity. The result of the search can then be used to purchase the numbers. Note that for the toll-free phone number type, providing the area code is optional. + + +```java +PhoneNumberSearchRequest searchRequest = new PhoneNumberSearchRequest(); +searchRequest + .setAreaCode("800") // Area code is optional for toll free numbers + .setAssignmentType(PhoneNumberAssignmentType.USER) + .setCapabilities(new PhoneNumberCapabilities() + .setCalling(PhoneNumberCapabilityValue.INBOUND) + .setSms(PhoneNumberCapabilityValue.INBOUND_OUTBOUND)) + .setPhoneNumberType(PhoneNumberType.GEOGRAPHIC) + .setQuantity(1); // Quantity is optional, default is 1 + +PhoneNumberSearchResult searchResult = phoneNumberClient + .beginSearchAvailablePhoneNumbers("US", searchRequest, Context.NONE) + .getFinalResult(); + +System.out.println("Searched phone numbers: " + searchResult.getPhoneNumbers()); +System.out.println("Search expires by: " + searchResult.getSearchExpiresBy()); +System.out.println("Phone number costs:" + searchResult.getCost().getAmount()); +``` + +### Purchase Phone Numbers +The result of searching for phone numbers is a `PhoneNumberSearchResult`. This can be used to get the numbers' details and purchase numbers by passing in the `searchId` to the purchase number API. + + +```java +PollResponse purchaseResponse = + phoneNumberClient.beginPurchasePhoneNumbers(searchResult.getSearchId(), Context.NONE).waitForCompletion(); +System.out.println("Purchase phone numbers is complete: " + purchaseResponse.getStatus()); +``` + +### Release Phone Number +Releases an acquired phone number. + + +```java +PollResponse releaseResponse = + phoneNumberClient.beginReleasePhoneNumber("+18001234567", Context.NONE).waitForCompletion(); +System.out.println("Release phone number is complete: " + releaseResponse.getStatus()); +``` + +### Updating Phone Number Capabilities +Updates Phone Number Capabilities for Calling and SMS to one of: +- `PhoneNumberCapabilityValue.NONE` +- `PhoneNumberCapabilityValue.INBOUND` +- `PhoneNumberCapabilityValue.OUTBOUND` +- `PhoneNumberCapabilityValue.INBOUND_OUTBOUND` + + +```java +PhoneNumberCapabilitiesRequest capabilitiesRequest = new PhoneNumberCapabilitiesRequest(); +capabilitiesRequest + .setCalling(PhoneNumberCapabilityValue.INBOUND) + .setSms(PhoneNumberCapabilityValue.INBOUND_OUTBOUND); +AcquiredPhoneNumber phoneNumber = phoneNumberClient.beginUpdatePhoneNumberCapabilities("+18001234567", capabilitiesRequest, Context.NONE).getFinalResult(); + +System.out.println("Phone Number Calling capabilities: " + phoneNumber.getCapabilities().getCalling()); //Phone Number Calling capabilities: inbound +System.out.println("Phone Number SMS capabilities: " + phoneNumber.getCapabilities().getSms()); //Phone Number SMS capabilities: inbound+outbound +``` + +## 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. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + +## Troubleshooting + +In progress. + +## Next steps + +Check out other client libraries for Azure communication service + + +[cla]: https://cla.microsoft.com +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com +[product_docs]: https://docs.microsoft.com/azure/communication-services/ +[package]: https://search.maven.org/artifact/com.azure/azure-communication-phonenumbers +[api_documentation]: https://aka.ms/java-docs +[source]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/communication/azure-communication-phonenumbers/src + + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcommunication%2Fazure-communication-phonenumbers%2FREADME.png) diff --git a/sdk/communication/azure-communication-phonenumbers/pom.xml b/sdk/communication/azure-communication-phonenumbers/pom.xml new file mode 100644 index 000000000000..aae7c729625c --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/pom.xml @@ -0,0 +1,174 @@ + + + + 4.0.0 + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-communication-phonenumbers + jar + 1.0.0-beta.5 + + Microsoft Azure client phone numbers library for communication + + This package contains APIs for managing phone numbers in Microsoft Azure Communication Services. + For this release, see notes - https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-phonenumbers/README.md and https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md. + Microsoft Azure Communication Administration quickstart - https://docs.microsoft.com/azure/communication-services/quickstarts/access-tokens?pivots=programming-language-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + src/main + src/test + 0.60 + 0.50 + + + + + com.azure + azure-core + 1.13.0 + + + com.azure + azure-communication-common + 1.0.0-beta.5 + + + org.junit.jupiter + junit-jupiter-api + 5.6.3 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.6.3 + test + + + org.junit.jupiter + junit-jupiter-params + 5.6.3 + test + + + io.projectreactor + reactor-test + 3.3.12.RELEASE + test + + + com.nimbusds + nimbus-jose-jwt + 8.19 + test + + + com.azure + azure-core-test + 1.6.0-beta.1 + test + + + org.mockito + mockito-core + 3.3.3 + test + + + com.azure + azure-core-http-okhttp + 1.5.0 + test + + + com.azure + azure-identity + 1.2.3 + test + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + com/azure/communication/phonenumbers/*.class + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + + + com.azure:* + + + + + + + + + + + is.jdk.11 + + [9,) + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + --add-opens com.azure.communication.phonenumbers/com.azure.communication.phonenumbers=ALL-UNNAMED + + + + + + + + diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClient.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClient.java new file mode 100644 index 000000000000..608a9687c7cc --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClient.java @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.communication.phonenumbers; + +import com.azure.communication.phonenumbers.implementation.PhoneNumberAdminClientImpl; +import com.azure.communication.phonenumbers.implementation.PhoneNumbersImpl; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumbersPurchasePhoneNumbersResponse; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumberPurchaseRequest; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumbersSearchAvailablePhoneNumbersResponse; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumbersReleasePhoneNumberResponse; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumbersUpdateCapabilitiesResponse; +import com.azure.communication.phonenumbers.models.AcquiredPhoneNumber; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilitiesRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberOperation; +import com.azure.communication.phonenumbers.models.PhoneNumberOperationStatus; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchResult; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingContext; +import reactor.core.publisher.Mono; + +import java.time.Duration; +import java.util.Objects; +import java.util.function.BiFunction; +import java.util.function.Function; + +import static com.azure.core.util.FluxUtil.monoError; +import static com.azure.core.util.FluxUtil.withContext; + +/** + * Asynchronous client for Communication service phone number operations + */ +@ServiceClient(builder = PhoneNumbersClientBuilder.class, isAsync = true) +public final class PhoneNumbersAsyncClient { + private final ClientLogger logger = new ClientLogger(PhoneNumbersAsyncClient.class); + private final PhoneNumbersImpl client; + private final Duration defaultPollInterval = Duration.ofSeconds(1); + + PhoneNumbersAsyncClient(PhoneNumberAdminClientImpl phoneNumberAdminClient) { + this.client = phoneNumberAdminClient.getPhoneNumbers(); + } + + /** + * Gets information about an acquired phone number. + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded + * as %2B. + * @return {@link AcquiredPhoneNumber} representing the acquired telephone number. + * @throws NullPointerException if {@code phoneNumber} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPhoneNumber(String phoneNumber) { + if (Objects.isNull(phoneNumber)) { + return monoError(logger, new NullPointerException("'phoneNumber' cannot be null.")); + } + return client.getByNumberAsync(phoneNumber); + } + + /** + * Gets information about an acquired phone number with response. + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded + * as %2B. + * @return {@link AcquiredPhoneNumber} representing the acquired telephone number. + * @throws NullPointerException if {@code phoneNumber} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPhoneNumberWithResponse(String phoneNumber) { + if (Objects.isNull(phoneNumber)) { + return monoError(logger, new NullPointerException("'phoneNumber' cannot be null.")); + } + return client.getByNumberWithResponseAsync(phoneNumber); + } + + /** + * Gets the list of the acquired phone numbers. + * + * @return A {@link PagedFlux} of {@link AcquiredPhoneNumber} instances representing acquired telephone numbers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listPhoneNumbers() { + try { + return client.listPhoneNumbersAsync(null, null); + } catch (RuntimeException ex) { + return new PagedFlux<>(() -> monoError(logger, ex)); + } + } + + /** + * Starts the search for available phone numbers to purchase. + * + * @param countryCode The ISO 3166-2 country code. + * @param searchRequest {@link PhoneNumberSearchRequest} specifying the search request + * until it gets a result from the server + * @return A {@link PollerFlux} object with the reservation result + * @throws NullPointerException if {@code countryCode} or {@code searchRequest} is null. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginSearchAvailablePhoneNumbers( + String countryCode, PhoneNumberSearchRequest searchRequest) { + return beginSearchAvailablePhoneNumbers(countryCode, searchRequest, null); + } + + PollerFlux beginSearchAvailablePhoneNumbers( + String countryCode, PhoneNumberSearchRequest searchRequest, Context context) { + try { + Objects.requireNonNull(countryCode, "'countryCode' cannot be null."); + Objects.requireNonNull(searchRequest, "'searchRequest' cannot be null."); + + return new PollerFlux<>(defaultPollInterval, + searchAvailableNumbersInitOperation(countryCode, searchRequest, context), + pollOperation(), + cancelOperation(), + searchAvailableNumbersFetchFinalResultOperation()); + + } catch (RuntimeException ex) { + return PollerFlux.error(ex); + } + } + + private Function, Mono> + searchAvailableNumbersInitOperation(String countryCode, PhoneNumberSearchRequest searchRequest, Context context) { + return (pollingContext) -> { + return withContext(contextValue -> { + if (context != null) { + contextValue = context; + } + return client.searchAvailablePhoneNumbersWithResponseAsync(countryCode, searchRequest, contextValue) + .flatMap((PhoneNumbersSearchAvailablePhoneNumbersResponse response) -> { + pollingContext.setData("operationId", response.getDeserializedHeaders().getOperationId()); + pollingContext.setData("searchId", response.getDeserializedHeaders().getSearchId()); + return client.getOperationAsync(pollingContext.getData("operationId")); + }); + }); + }; + } + + private Function, Mono>> + pollOperation() { + return (pollingContext) -> { + return client.getOperationAsync(pollingContext.getData("operationId")) + .flatMap(operation -> { + if (operation.getStatus().toString().equalsIgnoreCase(PhoneNumberOperationStatus.SUCCEEDED.toString())) { + return Mono.just(new PollResponse<>( + LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, operation)); + } else if (operation.getStatus().toString().equalsIgnoreCase(PhoneNumberOperationStatus.FAILED.toString())) { + return Mono.just(new PollResponse<>( + LongRunningOperationStatus.FAILED, operation)); + } else if (operation.getStatus().toString().equalsIgnoreCase(PhoneNumberOperationStatus.NOT_STARTED.toString())) { + return Mono.just(new PollResponse<>( + LongRunningOperationStatus.NOT_STARTED, operation)); + } + return Mono.just(new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, operation)); + }); + }; + } + + private BiFunction, + PollResponse, Mono> + cancelOperation() { + return (pollingContext, firstResponse) -> { + if (firstResponse == null || firstResponse.getValue() == null) { + return Mono.error(logger.logExceptionAsError( + new IllegalArgumentException("Cannot cancel a poll response that never started."))); + } + String operationId = firstResponse.getValue().getId(); + if (!CoreUtils.isNullOrEmpty(operationId)) { + logger.info("Cancelling search available phone numbers operation for operation id: {}", operationId); + return client.cancelOperationAsync(operationId).thenReturn(firstResponse.getValue()); + } + return Mono.empty(); + }; + } + + private Function, Mono> + searchAvailableNumbersFetchFinalResultOperation() { + return (pollingContext) -> { + return client.getSearchResultAsync(pollingContext.getData("searchId")); + }; + } + + /** + * Starts the purchase of the phone number(s) in the search result associated with a given id. + * + * @param searchId ID of the search + * @return A {@link PollerFlux} object. + * @throws NullPointerException if {@code searchId} is null. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginPurchasePhoneNumbers(String searchId) { + return beginPurchasePhoneNumbers(searchId, null); + } + + PollerFlux beginPurchasePhoneNumbers(String searchId, Context context) { + try { + Objects.requireNonNull(searchId, "'searchId' cannot be null."); + return new PollerFlux<>(defaultPollInterval, + purchaseNumbersInitOperation(searchId, context), + pollOperation(), + (pollingContext, firstResponse) -> Mono.error(logger.logExceptionAsError(new RuntimeException("Cancellation is not supported"))), + (pollingContext) -> Mono.empty()); + } catch (RuntimeException ex) { + return PollerFlux.error(ex); + } + } + + private Function, Mono> + purchaseNumbersInitOperation(String searchId, Context context) { + return (pollingContext) -> { + return withContext(contextValue -> { + if (context != null) { + contextValue = context; + } + return client.purchasePhoneNumbersWithResponseAsync(new PhoneNumberPurchaseRequest().setSearchId(searchId), contextValue) + .flatMap((PhoneNumbersPurchasePhoneNumbersResponse response) -> { + pollingContext.setData("operationId", response.getDeserializedHeaders().getOperationId()); + return client.getOperationAsync(pollingContext.getData("operationId")); + }); + }); + }; + } + + /** + * Begins release of an acquired phone number. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the + * operation is complete. + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded + * as %2B. + * @return A {@link PollerFlux} object. + * @throws NullPointerException if {@code phoneNumber} is null. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginReleasePhoneNumber(String phoneNumber) { + return beginReleasePhoneNumber(phoneNumber, null); + } + + PollerFlux beginReleasePhoneNumber(String phoneNumber, Context context) { + try { + Objects.requireNonNull(phoneNumber, "'phoneNumber' cannot be null."); + return new PollerFlux<>(defaultPollInterval, + releaseNumberInitOperation(phoneNumber, context), + pollOperation(), + (pollingContext, firstResponse) -> Mono.error(logger.logExceptionAsError(new RuntimeException("Cancellation is not supported"))), + (pollingContext) -> Mono.empty()); + } catch (RuntimeException ex) { + return PollerFlux.error(ex); + } + } + + private Function, Mono> + releaseNumberInitOperation(String phoneNumber, Context context) { + return (pollingContext) -> { + return withContext(contextValue -> { + if (context != null) { + contextValue = context; + } + return client.releasePhoneNumberWithResponseAsync(phoneNumber, contextValue) + .flatMap((PhoneNumbersReleasePhoneNumberResponse response) -> { + pollingContext.setData("operationId", response.getDeserializedHeaders().getOperationId()); + return client.getOperationAsync(pollingContext.getData("operationId")); + }); + }); + }; + } + + /** + * Update capabilities of an acquired phone number. + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded + * as %2B. + * @param capabilitiesUpdateRequest Update capabilities of an acquired phone number. + * @return A {@link PollerFlux} object. + * @throws NullPointerException if {@code phoneNumber} or {@code capabilitiesUpdateRequest} is null. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux + beginUpdatePhoneNumberCapabilities(String phoneNumber, PhoneNumberCapabilitiesRequest capabilitiesUpdateRequest) { + return beginUpdatePhoneNumberCapabilities(phoneNumber, capabilitiesUpdateRequest, null); + } + + PollerFlux + beginUpdatePhoneNumberCapabilities(String phoneNumber, PhoneNumberCapabilitiesRequest capabilitiesUpdateRequest, Context context) { + try { + Objects.requireNonNull(phoneNumber, "'phoneNumber' cannot be null."); + Objects.requireNonNull(capabilitiesUpdateRequest, "'capabilitiesUpdateRequest' cannot be null."); + + return new PollerFlux<>(defaultPollInterval, + updateNumberCapabilitiesInitOperation(phoneNumber, capabilitiesUpdateRequest, context), + pollOperation(), + (pollingContext, firstResponse) -> Mono.error(logger.logExceptionAsError(new RuntimeException("Cancellation is not supported"))), + updateNumberCapabilitiesFetchFinalResultOperation(phoneNumber)); + } catch (RuntimeException ex) { + return PollerFlux.error(ex); + } + } + + private Function, Mono> + updateNumberCapabilitiesInitOperation(String phoneNumber, PhoneNumberCapabilitiesRequest capabilitiesUpdateRequest, Context context) { + return (pollingContext) -> { + return withContext(contextValue -> { + if (context != null) { + contextValue = context; + } + return client.updateCapabilitiesWithResponseAsync(phoneNumber, capabilitiesUpdateRequest, contextValue) + .flatMap((PhoneNumbersUpdateCapabilitiesResponse response) -> { + pollingContext.setData("operationId", response.getDeserializedHeaders().getOperationId()); + return client.getOperationAsync(pollingContext.getData("operationId")); + }); + }); + }; + } + + private Function, Mono> + updateNumberCapabilitiesFetchFinalResultOperation(String phoneNumber) { + return (pollingContext) -> { + return client.getByNumberAsync(phoneNumber); + }; + } + +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClient.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClient.java new file mode 100644 index 000000000000..5ead88bc3112 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClient.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.communication.phonenumbers; + +import java.util.Objects; + +import com.azure.communication.phonenumbers.implementation.PhoneNumberAdminClientImpl; +import com.azure.communication.phonenumbers.implementation.PhoneNumbersImpl; +import com.azure.communication.phonenumbers.models.AcquiredPhoneNumber; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilitiesRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberOperation; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchResult; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.SyncPoller; + +/** + * Synchronous client for Communication service phone number operations + */ +@ServiceClient(builder = PhoneNumbersClientBuilder.class, isAsync = false) +public final class PhoneNumbersClient { + + private final ClientLogger logger = new ClientLogger(PhoneNumbersClient.class); + private final PhoneNumbersImpl client; + private final PhoneNumbersAsyncClient asyncClient; + + PhoneNumbersClient(PhoneNumberAdminClientImpl phoneNumberAdminClient, PhoneNumbersAsyncClient asyncClient) { + this.client = phoneNumberAdminClient.getPhoneNumbers(); + this.asyncClient = asyncClient; + } + + /** + * Gets information about an acquired phone number. + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded + * as %2B. + * @return {@link AcquiredPhoneNumber} representing the acquired telephone number. + * @throws NullPointerException if {@code phoneNumber} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AcquiredPhoneNumber getPhoneNumber(String phoneNumber) { + Objects.requireNonNull(phoneNumber, "'phoneNumber' cannot be null."); + return client.getByNumber(phoneNumber); + } + + /** + * Gets information about an acquired phone number with response. + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded + * as %2B. + * @param context A {@link Context} representing the request context. + * @return {@link AcquiredPhoneNumber} representing the acquired telephone number. + * @throws NullPointerException if {@code phoneNumber} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPhoneNumberWithResponse(String phoneNumber, Context context) { + Objects.requireNonNull(phoneNumber, "'phoneNumber' cannot be null."); + context = context == null ? Context.NONE : context; + return client.getByNumberWithResponseAsync(phoneNumber, context).block(); + } + + /** + * Gets the list of the acquired phone numbers with context. + * + * @param context A {@link Context} representing the request context. + * @return A {@link PagedIterable} of {@link AcquiredPhoneNumber} instances representing acquired telephone numbers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPhoneNumbers(Context context) { + context = context == null ? Context.NONE : context; + return client.listPhoneNumbers(null, null, context); + } + + /** + * Starts the search for available phone numbers to purchase. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the + * operation is complete. + * + * @param countryCode The ISO 3166-2 country code. + * @param searchRequest The search request + * @param context A {@link Context} representing the request context. + * @return A {@link SyncPoller} object with the reservation result + * @throws NullPointerException if {@code countryCode} or {@code searchRequest} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginSearchAvailablePhoneNumbers( + String countryCode, PhoneNumberSearchRequest searchRequest, Context context) { + return asyncClient.beginSearchAvailablePhoneNumbers(countryCode, searchRequest, context).getSyncPoller(); + } + + /** + * Starts the purchase of the phone number(s) in the search result associated with a given id. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the + * operation is complete. + * + * @param searchId ID of the search + * @param context A {@link Context} representing the request context. + * @return A {@link SyncPoller} object. + * @throws NullPointerException if {@code searchId} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginPurchasePhoneNumbers(String searchId, Context context) { + return asyncClient.beginPurchasePhoneNumbers(searchId, context).getSyncPoller(); + } + + /** + * Starts the update of capabilities for an acquired phone number. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the + * operation is complete. + * + * + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded + * as %2B. + * @param context A {@link Context} representing the request context. + * @return A {@link SyncPoller} object. + * @throws NullPointerException if {@code phoneNumber} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginReleasePhoneNumber(String phoneNumber, Context context) { + return asyncClient.beginReleasePhoneNumber(phoneNumber).getSyncPoller(); + } + + /** + * Update capabilities of an acquired phone number. + * + * This function returns a Long Running Operation poller that allows you to wait indefinitely until the + * operation is complete. + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded + * as %2B. + * @param capabilitiesUpdateRequest Update capabilities of an acquired phone number. + * @param context A {@link Context} representing the request context. + * @return A {@link SyncPoller} object + * @throws NullPointerException if {@code phoneNumber} or {@code capabilitiesUpdateRequest} is null. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller beginUpdatePhoneNumberCapabilities(String phoneNumber, PhoneNumberCapabilitiesRequest capabilitiesUpdateRequest, Context context) { + return asyncClient.beginUpdatePhoneNumberCapabilities(phoneNumber, capabilitiesUpdateRequest, context).getSyncPoller(); + } +} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberClientBuilder.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClientBuilder.java similarity index 72% rename from sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberClientBuilder.java rename to sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClientBuilder.java index 530795bf1c6f..47d00a08d97e 100644 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberClientBuilder.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersClientBuilder.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.communication.administration; +package com.azure.communication.phonenumbers; -import com.azure.communication.administration.implementation.PhoneNumberAdminClientImpl; -import com.azure.communication.administration.implementation.PhoneNumberAdminClientImplBuilder; +import com.azure.communication.phonenumbers.implementation.PhoneNumberAdminClientImpl; +import com.azure.communication.phonenumbers.implementation.PhoneNumberAdminClientImplBuilder; import com.azure.communication.common.implementation.CommunicationConnectionString; import com.azure.communication.common.implementation.HmacAuthenticationPolicy; import com.azure.core.annotation.ServiceClientBuilder; @@ -20,6 +20,7 @@ import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -32,16 +33,16 @@ /** * Builder for creating clients of Communication Service phone number configuration */ -@ServiceClientBuilder(serviceClients = {PhoneNumberClient.class, PhoneNumberAsyncClient.class}) -public final class PhoneNumberClientBuilder { +@ServiceClientBuilder(serviceClients = {PhoneNumbersClient.class, PhoneNumbersAsyncClient.class}) +public final class PhoneNumbersClientBuilder { private static final Map PROPERTIES = - CoreUtils.getProperties("azure-communication-administration.properties"); + CoreUtils.getProperties("azure-communication-phonenumbers.properties"); private static final String SDK_NAME = "name"; private static final String SDK_VERSION = "version"; - private final ClientLogger logger = new ClientLogger(PhoneNumberClientBuilder.class); + private final ClientLogger logger = new ClientLogger(PhoneNumbersClientBuilder.class); - private PhoneNumberServiceVersion version; + private PhoneNumbersServiceVersion version; private String endpoint; private HttpPipeline pipeline; private HttpClient httpClient; @@ -49,16 +50,17 @@ public final class PhoneNumberClientBuilder { private AzureKeyCredential azureKeyCredential; private TokenCredential tokenCredential; private Configuration configuration; + private ClientOptions clientOptions; private final List additionalPolicies = new ArrayList<>(); /** * Set endpoint of the service * * @param endpoint url of the service - * @return The updated {@link PhoneNumberClientBuilder} object. + * @return The updated {@link PhoneNumbersClientBuilder} object. * @throws NullPointerException If {@code endpoint} is {@code null}. */ - public PhoneNumberClientBuilder endpoint(String endpoint) { + public PhoneNumbersClientBuilder endpoint(String endpoint) { this.endpoint = Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); return this; } @@ -67,12 +69,12 @@ public PhoneNumberClientBuilder endpoint(String endpoint) { * Sets the HTTP pipeline to use for the service client *

* If {@code pipeline} is set, all other settings aside from - * {@link PhoneNumberClientBuilder#endpoint(String) endpoint} are ignored. + * {@link PhoneNumbersClientBuilder#endpoint(String) endpoint} are ignored. * * @param pipeline HttpPipeline to use - * @return The updated {@link PhoneNumberClientBuilder} object. + * @return The updated {@link PhoneNumbersClientBuilder} object. */ - public PhoneNumberClientBuilder pipeline(HttpPipeline pipeline) { + public PhoneNumbersClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -81,10 +83,10 @@ public PhoneNumberClientBuilder pipeline(HttpPipeline pipeline) { * Set HttpClient to use * * @param httpClient HttpClient to use - * @return The updated {@link PhoneNumberClientBuilder} object. + * @return The updated {@link PhoneNumbersClientBuilder} object. * @throws NullPointerException If {@code httpClient} is {@code null}. */ - public PhoneNumberClientBuilder httpClient(HttpClient httpClient) { + public PhoneNumbersClientBuilder httpClient(HttpClient httpClient) { this.httpClient = httpClient; return this; } @@ -95,9 +97,9 @@ public PhoneNumberClientBuilder httpClient(HttpClient httpClient) { *

If logLevel is not provided, default value of {@link HttpLogDetailLevel#NONE} is set.

* * @param httpLogOptions The logging configuration to use when sending and receiving HTTP requests/responses. - * @return the updated {@link PhoneNumberClientBuilder} object. + * @return the updated {@link PhoneNumbersClientBuilder} object. */ - public PhoneNumberClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + public PhoneNumbersClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { this.httpLogOptions = httpLogOptions; return this; } @@ -106,10 +108,10 @@ public PhoneNumberClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { * Set AzureKeyCredential for authorization * * @param accessKey access key for initalizing AzureKeyCredential - * @return The updated {@link PhoneNumberClientBuilder} object. + * @return The updated {@link PhoneNumbersClientBuilder} object. * @throws NullPointerException If {@code accessKey} is {@code null}. */ - public PhoneNumberClientBuilder accessKey(String accessKey) { + public PhoneNumbersClientBuilder accessKey(String accessKey) { Objects.requireNonNull(accessKey, "'accessKey' cannot be null."); this.azureKeyCredential = new AzureKeyCredential(accessKey); return this; @@ -119,10 +121,10 @@ public PhoneNumberClientBuilder accessKey(String accessKey) { * Sets the {@link TokenCredential} used to authenticate HTTP requests. * * @param tokenCredential {@link TokenCredential} used to authenticate HTTP requests. - * @return The updated {@link PhoneNumberClientBuilder} object. + * @return The updated {@link PhoneNumbersClientBuilder} object. * @throws NullPointerException If {@code tokenCredential} is null. */ - public PhoneNumberClientBuilder credential(TokenCredential tokenCredential) { + public PhoneNumbersClientBuilder credential(TokenCredential tokenCredential) { this.tokenCredential = Objects.requireNonNull(tokenCredential, "'tokenCredential' cannot be null."); return this; } @@ -132,10 +134,10 @@ public PhoneNumberClientBuilder credential(TokenCredential tokenCredential) { * Set the endpoint and AzureKeyCredential for authorization * * @param connectionString connection string for setting endpoint and initalizing AzureKeyCredential - * @return The updated {@link PhoneNumberClientBuilder} object. + * @return The updated {@link PhoneNumbersClientBuilder} object. * @throws NullPointerException If {@code connectionString} is {@code null}. */ - public PhoneNumberClientBuilder connectionString(String connectionString) { + public PhoneNumbersClientBuilder connectionString(String connectionString) { Objects.requireNonNull(connectionString, "'connectionString' cannot be null."); CommunicationConnectionString connectionStringObject = new CommunicationConnectionString(connectionString); String endpoint = connectionStringObject.getEndpoint(); @@ -150,9 +152,9 @@ public PhoneNumberClientBuilder connectionString(String connectionString) { * Sets the configuration object used to retrieve environment configuration values during building of the client. * * @param configuration Configuration store used to retrieve environment configurations. - * @return The updated {@link PhoneNumberClientBuilder} object. + * @return The updated {@link PhoneNumbersClientBuilder} object. */ - public PhoneNumberClientBuilder configuration(Configuration configuration) { + public PhoneNumbersClientBuilder configuration(Configuration configuration) { this.configuration = configuration; return this; } @@ -161,25 +163,37 @@ public PhoneNumberClientBuilder configuration(Configuration configuration) { * Adds a policy to the set of existing policies that are executed after required policies. * * @param policy The retry policy for service requests. - * @return The updated {@link PhoneNumberClientBuilder} object. + * @return The updated {@link PhoneNumbersClientBuilder} object. * @throws NullPointerException If {@code policy} is {@code null}. */ - public PhoneNumberClientBuilder addPolicy(HttpPipelinePolicy policy) { + public PhoneNumbersClientBuilder addPolicy(HttpPipelinePolicy policy) { this.additionalPolicies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); return this; } /** - * Sets the {@link PhoneNumberServiceVersion} that is used when making API requests. + * Sets the client options for all the requests made through the client. + * + * @param clientOptions {@link ClientOptions}. + * @return The updated {@link PhoneNumbersClientBuilder} object. + * @throws NullPointerException If {@code clientOptions} is {@code null}. + */ + public PhoneNumbersClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = Objects.requireNonNull(clientOptions, "'clientOptions' cannot be null."); + return this; + } + + /** + * Sets the {@link PhoneNumbersServiceVersion} that is used when making API requests. *

* If a service version is not provided, the service version that will be used will be the latest known service * version based on the version of the client library being used. If no service version is specified, updating to a * newer version the client library will have the result of potentially moving to a newer service version. * - * @param version {@link PhoneNumberServiceVersion} of the service to be used when making requests. - * @return The updated {@link PhoneNumberClientBuilder} object. + * @param version {@link PhoneNumbersServiceVersion} of the service to be used when making requests. + * @return The updated {@link PhoneNumbersClientBuilder} object. */ - public PhoneNumberClientBuilder serviceVersion(PhoneNumberServiceVersion version) { + public PhoneNumbersClientBuilder serviceVersion(PhoneNumbersServiceVersion version) { this.version = version; return this; } @@ -189,10 +203,16 @@ public PhoneNumberClientBuilder serviceVersion(PhoneNumberServiceVersion version * UserAgentPolicy, RetryPolicy, and CookiePolicy. * Additional HttpPolicies specified by additionalPolicies will be applied after them * - * @return {@link PhoneNumberClient} instance + * @return {@link PhoneNumbersClient} instance */ - public PhoneNumberClient buildClient() { - return new PhoneNumberClient(this.buildAsyncClient()); + public PhoneNumbersClient buildClient() { + this.validateRequiredFields(); + + if (this.version != null) { + logger.info("Build client for service version" + this.version.getVersion()); + } + PhoneNumberAdminClientImpl adminClient = this.createPhoneNumberAdminClient(); + return new PhoneNumbersClient(adminClient, this.createPhoneNumberAsyncClient(adminClient)); } /** @@ -200,9 +220,9 @@ public PhoneNumberClient buildClient() { * UserAgentPolicy, RetryPolicy, and CookiePolicy. * Additional HttpPolicies specified by additionalPolicies will be applied after them * - * @return {@link PhoneNumberAsyncClient} instance + * @return {@link PhoneNumbersAsyncClient} instance */ - public PhoneNumberAsyncClient buildAsyncClient() { + public PhoneNumbersAsyncClient buildAsyncClient() { this.validateRequiredFields(); if (this.version != null) { @@ -212,8 +232,8 @@ public PhoneNumberAsyncClient buildAsyncClient() { return this.createPhoneNumberAsyncClient(this.createPhoneNumberAdminClient()); } - PhoneNumberAsyncClient createPhoneNumberAsyncClient(PhoneNumberAdminClientImpl phoneNumberAdminClient) { - return new PhoneNumberAsyncClient(phoneNumberAdminClient); + PhoneNumbersAsyncClient createPhoneNumberAsyncClient(PhoneNumberAdminClientImpl phoneNumberAdminClient) { + return new PhoneNumbersAsyncClient(phoneNumberAdminClient); } HttpPipelinePolicy createAuthenticationPolicy() { @@ -298,6 +318,7 @@ private HttpPipeline createHttpPipeline() { return new HttpPipelineBuilder() .policies(policyList.toArray(new HttpPipelinePolicy[0])) .httpClient(this.httpClient) + .clientOptions(clientOptions) .build(); } diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberServiceVersion.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersServiceVersion.java similarity index 68% rename from sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberServiceVersion.java rename to sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersServiceVersion.java index ed642f3eae24..46df7eb9057a 100644 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/PhoneNumberServiceVersion.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/PhoneNumbersServiceVersion.java @@ -1,19 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.communication.administration; +package com.azure.communication.phonenumbers; import com.azure.core.util.ServiceVersion; /** * The versions of Phone Number Admin Service supported by this client library. */ -public enum PhoneNumberServiceVersion implements ServiceVersion { +public enum PhoneNumbersServiceVersion implements ServiceVersion { V2020_07_20_PREVIEW_1("2020-07-20-preview1"); private final String version; - PhoneNumberServiceVersion(String version) { + PhoneNumbersServiceVersion(String version) { this.version = version; } @@ -30,9 +30,9 @@ public String getVersion() { /** * Gets the latest service version supported by this client library * - * @return the latest {@link PhoneNumberServiceVersion} + * @return the latest {@link PhoneNumbersServiceVersion} */ - public static PhoneNumberServiceVersion getLatest() { + public static PhoneNumbersServiceVersion getLatest() { return V2020_07_20_PREVIEW_1; } diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/ReservationStatus.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/ReservationStatus.java similarity index 98% rename from sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/ReservationStatus.java rename to sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/ReservationStatus.java index 335d7cba2d37..edc1f00d56c5 100644 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/ReservationStatus.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/ReservationStatus.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.communication.administration; +package com.azure.communication.phonenumbers; import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/PhoneNumberAdminClientImpl.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/PhoneNumberAdminClientImpl.java similarity index 52% rename from sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/PhoneNumberAdminClientImpl.java rename to sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/PhoneNumberAdminClientImpl.java index 9911c4c2de4f..f3a8363a1bbe 100644 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/PhoneNumberAdminClientImpl.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/PhoneNumberAdminClientImpl.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.communication.administration.implementation; +package com.azure.communication.phonenumbers.implementation; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; /** Initializes a new instance of the PhoneNumberAdminClient type. */ public final class PhoneNumberAdminClientImpl { - /** The endpoint of the Azure Communication resource. */ + /** The communication resource, for example https://resourcename.communication.azure.com. */ private final String endpoint; /** - * Gets The endpoint of the Azure Communication resource. + * Gets The communication resource, for example https://resourcename.communication.azure.com. * * @return the endpoint value. */ @@ -48,16 +50,28 @@ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The PhoneNumberAdministrationsImpl object to access its operations. */ - private final PhoneNumberAdministrationsImpl phoneNumberAdministrations; + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; /** - * Gets the PhoneNumberAdministrationsImpl object to access its operations. + * Gets The serializer to serialize an object into a string. * - * @return the PhoneNumberAdministrationsImpl object. + * @return the serializerAdapter value. */ - public PhoneNumberAdministrationsImpl getPhoneNumberAdministrations() { - return this.phoneNumberAdministrations; + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The PhoneNumbersImpl object to access its operations. */ + private final PhoneNumbersImpl phoneNumbers; + + /** + * Gets the PhoneNumbersImpl object to access its operations. + * + * @return the PhoneNumbersImpl object. + */ + public PhoneNumbersImpl getPhoneNumbers() { + return this.phoneNumbers; } /** Initializes an instance of PhoneNumberAdminClient client. */ @@ -66,6 +80,7 @@ public PhoneNumberAdministrationsImpl getPhoneNumberAdministrations() { new HttpPipelineBuilder() .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) .build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint); } @@ -75,9 +90,20 @@ public PhoneNumberAdministrationsImpl getPhoneNumberAdministrations() { * @param httpPipeline The HTTP pipeline to send requests through. */ PhoneNumberAdminClientImpl(HttpPipeline httpPipeline, String endpoint) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint); + } + + /** + * Initializes an instance of PhoneNumberAdminClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + */ + PhoneNumberAdminClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint) { this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; - this.apiVersion = "2020-07-20-preview1"; - this.phoneNumberAdministrations = new PhoneNumberAdministrationsImpl(this); + this.apiVersion = "2021-03-07"; + this.phoneNumbers = new PhoneNumbersImpl(this); } } diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/PhoneNumberAdminClientImplBuilder.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/PhoneNumberAdminClientImplBuilder.java similarity index 64% rename from sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/PhoneNumberAdminClientImplBuilder.java rename to sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/PhoneNumberAdminClientImplBuilder.java index 3f4cf3ffd2c3..425704ad03a3 100644 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/implementation/PhoneNumberAdminClientImplBuilder.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/PhoneNumberAdminClientImplBuilder.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.communication.administration.implementation; +package com.azure.communication.phonenumbers.implementation; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; @@ -10,17 +10,20 @@ import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; /** A builder for creating a new instance of the PhoneNumberAdminClient type. */ @ServiceClientBuilder(serviceClients = {PhoneNumberAdminClientImpl.class}) public final class PhoneNumberAdminClientImplBuilder { /* - * The endpoint of the Azure Communication resource. + * The communication resource, for example + * https://resourcename.communication.azure.com */ private String endpoint; /** - * Sets The endpoint of the Azure Communication resource. + * Sets The communication resource, for example https://resourcename.communication.azure.com. * * @param endpoint the endpoint value. * @return the PhoneNumberAdminClientImplBuilder. @@ -46,6 +49,22 @@ public PhoneNumberAdminClientImplBuilder pipeline(HttpPipeline pipeline) { return this; } + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the PhoneNumberAdminClientImplBuilder. + */ + public PhoneNumberAdminClientImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + /** * Builds an instance of PhoneNumberAdminClientImpl with the provided parameters. * @@ -58,7 +77,10 @@ public PhoneNumberAdminClientImpl buildClient() { .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) .build(); } - PhoneNumberAdminClientImpl client = new PhoneNumberAdminClientImpl(pipeline, endpoint); + if (serializerAdapter == null) { + this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); + } + PhoneNumberAdminClientImpl client = new PhoneNumberAdminClientImpl(pipeline, serializerAdapter, endpoint); return client; } } diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/PhoneNumbersImpl.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/PhoneNumbersImpl.java new file mode 100644 index 000000000000..2116635c3f6c --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/PhoneNumbersImpl.java @@ -0,0 +1,1185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation; + +import com.azure.communication.phonenumbers.implementation.models.AcquiredPhoneNumbers; +import com.azure.communication.phonenumbers.implementation.models.CommunicationErrorResponseException; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumberPurchaseRequest; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumbersGetOperationResponse; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumbersPurchasePhoneNumbersResponse; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumbersReleasePhoneNumberResponse; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumbersSearchAvailablePhoneNumbersResponse; +import com.azure.communication.phonenumbers.implementation.models.PhoneNumbersUpdateCapabilitiesResponse; +import com.azure.communication.phonenumbers.models.AcquiredPhoneNumber; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilitiesRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberOperation; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchResult; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PhoneNumbers. */ +public final class PhoneNumbersImpl { + /** The proxy service used to perform REST calls. */ + private final PhoneNumbersService service; + + /** The service client containing this operation class. */ + private final PhoneNumberAdminClientImpl client; + + /** + * Initializes an instance of PhoneNumbersImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PhoneNumbersImpl(PhoneNumberAdminClientImpl client) { + this.service = + RestProxy.create(PhoneNumbersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PhoneNumberAdminClientPhoneNumbers to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PhoneNumberAdminClie") + private interface PhoneNumbersService { + @Post("/availablePhoneNumbers/countries/{countryCode}/:search") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono searchAvailablePhoneNumbers( + @HostParam("endpoint") String endpoint, + @PathParam("countryCode") String countryCode, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PhoneNumberSearchRequest body, + Context context); + + @Get("/availablePhoneNumbers/searchResults/{searchId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> getSearchResult( + @HostParam("endpoint") String endpoint, + @PathParam("searchId") String searchId, + @QueryParam("api-version") String apiVersion, + Context context); + + @Post("/availablePhoneNumbers/:purchase") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono purchasePhoneNumbers( + @HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PhoneNumberPurchaseRequest body, + Context context); + + @Get("/phoneNumbers/operations/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono getOperation( + @HostParam("endpoint") String endpoint, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + Context context); + + @Delete("/phoneNumbers/operations/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> cancelOperation( + @HostParam("endpoint") String endpoint, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + Context context); + + @Get("/phoneNumbers/{phoneNumber}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> getByNumber( + @HostParam("endpoint") String endpoint, + @PathParam("phoneNumber") String phoneNumber, + @QueryParam("api-version") String apiVersion, + Context context); + + @Delete("/phoneNumbers/{phoneNumber}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono releasePhoneNumber( + @HostParam("endpoint") String endpoint, + @PathParam("phoneNumber") String phoneNumber, + @QueryParam("api-version") String apiVersion, + Context context); + + @Get("/phoneNumbers") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> listPhoneNumbers( + @HostParam("endpoint") String endpoint, + @QueryParam("skip") Integer skip, + @QueryParam("top") Integer top, + @QueryParam("api-version") String apiVersion, + Context context); + + @Patch("/phoneNumbers/{phoneNumber}/capabilities") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono updateCapabilities( + @HostParam("endpoint") String endpoint, + @PathParam("phoneNumber") String phoneNumber, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/merge-patch+json") PhoneNumberCapabilitiesRequest body, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> listPhoneNumbersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, Context context); + } + + /** + * Search for available phone numbers to purchase. + * + * @param countryCode The ISO 3166-2 country code, e.g. US. + * @param body Represents a phone number search request to find phone numbers. Found phone numbers are temporarily + * held for a following purchase. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono searchAvailablePhoneNumbersWithResponseAsync( + String countryCode, PhoneNumberSearchRequest body) { + return FluxUtil.withContext( + context -> + service.searchAvailablePhoneNumbers( + this.client.getEndpoint(), countryCode, this.client.getApiVersion(), body, context)); + } + + /** + * Search for available phone numbers to purchase. + * + * @param countryCode The ISO 3166-2 country code, e.g. US. + * @param body Represents a phone number search request to find phone numbers. Found phone numbers are temporarily + * held for a following purchase. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono searchAvailablePhoneNumbersWithResponseAsync( + String countryCode, PhoneNumberSearchRequest body, Context context) { + return service.searchAvailablePhoneNumbers( + this.client.getEndpoint(), countryCode, this.client.getApiVersion(), body, context); + } + + /** + * Search for available phone numbers to purchase. + * + * @param countryCode The ISO 3166-2 country code, e.g. US. + * @param body Represents a phone number search request to find phone numbers. Found phone numbers are temporarily + * held for a following purchase. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono searchAvailablePhoneNumbersAsync( + String countryCode, PhoneNumberSearchRequest body) { + return searchAvailablePhoneNumbersWithResponseAsync(countryCode, body) + .flatMap( + (PhoneNumbersSearchAvailablePhoneNumbersResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Search for available phone numbers to purchase. + * + * @param countryCode The ISO 3166-2 country code, e.g. US. + * @param body Represents a phone number search request to find phone numbers. Found phone numbers are temporarily + * held for a following purchase. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono searchAvailablePhoneNumbersAsync( + String countryCode, PhoneNumberSearchRequest body, Context context) { + return searchAvailablePhoneNumbersWithResponseAsync(countryCode, body, context) + .flatMap( + (PhoneNumbersSearchAvailablePhoneNumbersResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Search for available phone numbers to purchase. + * + * @param countryCode The ISO 3166-2 country code, e.g. US. + * @param body Represents a phone number search request to find phone numbers. Found phone numbers are temporarily + * held for a following purchase. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PhoneNumberSearchResult searchAvailablePhoneNumbers(String countryCode, PhoneNumberSearchRequest body) { + return searchAvailablePhoneNumbersAsync(countryCode, body).block(); + } + + /** + * Search for available phone numbers to purchase. + * + * @param countryCode The ISO 3166-2 country code, e.g. US. + * @param body Represents a phone number search request to find phone numbers. Found phone numbers are temporarily + * held for a following purchase. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PhoneNumberSearchResult searchAvailablePhoneNumbers( + String countryCode, PhoneNumberSearchRequest body, Context context) { + return searchAvailablePhoneNumbersAsync(countryCode, body, context).block(); + } + + /** + * Gets a phone number search result by search id. + * + * @param searchId The search Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a phone number search result by search id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSearchResultWithResponseAsync(String searchId) { + return FluxUtil.withContext( + context -> + service.getSearchResult( + this.client.getEndpoint(), searchId, this.client.getApiVersion(), context)); + } + + /** + * Gets a phone number search result by search id. + * + * @param searchId The search Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a phone number search result by search id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSearchResultWithResponseAsync(String searchId, Context context) { + return service.getSearchResult(this.client.getEndpoint(), searchId, this.client.getApiVersion(), context); + } + + /** + * Gets a phone number search result by search id. + * + * @param searchId The search Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a phone number search result by search id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSearchResultAsync(String searchId) { + return getSearchResultWithResponseAsync(searchId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a phone number search result by search id. + * + * @param searchId The search Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a phone number search result by search id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSearchResultAsync(String searchId, Context context) { + return getSearchResultWithResponseAsync(searchId, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a phone number search result by search id. + * + * @param searchId The search Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a phone number search result by search id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PhoneNumberSearchResult getSearchResult(String searchId) { + return getSearchResultAsync(searchId).block(); + } + + /** + * Gets a phone number search result by search id. + * + * @param searchId The search Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a phone number search result by search id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PhoneNumberSearchResult getSearchResult(String searchId, Context context) { + return getSearchResultAsync(searchId, context).block(); + } + + /** + * Purchases phone numbers. + * + * @param body The phone number search purchase request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono purchasePhoneNumbersWithResponseAsync( + PhoneNumberPurchaseRequest body) { + return FluxUtil.withContext( + context -> + service.purchasePhoneNumbers( + this.client.getEndpoint(), this.client.getApiVersion(), body, context)); + } + + /** + * Purchases phone numbers. + * + * @param body The phone number search purchase request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono purchasePhoneNumbersWithResponseAsync( + PhoneNumberPurchaseRequest body, Context context) { + return service.purchasePhoneNumbers(this.client.getEndpoint(), this.client.getApiVersion(), body, context); + } + + /** + * Purchases phone numbers. + * + * @param body The phone number search purchase request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono purchasePhoneNumbersAsync(PhoneNumberPurchaseRequest body) { + return purchasePhoneNumbersWithResponseAsync(body) + .flatMap( + (PhoneNumbersPurchasePhoneNumbersResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Purchases phone numbers. + * + * @param body The phone number search purchase request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono purchasePhoneNumbersAsync(PhoneNumberPurchaseRequest body, Context context) { + return purchasePhoneNumbersWithResponseAsync(body, context) + .flatMap( + (PhoneNumbersPurchasePhoneNumbersResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Purchases phone numbers. + * + * @param body The phone number search purchase request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PhoneNumberSearchResult purchasePhoneNumbers(PhoneNumberPurchaseRequest body) { + return purchasePhoneNumbersAsync(body).block(); + } + + /** + * Purchases phone numbers. + * + * @param body The phone number search purchase request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a phone number search operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PhoneNumberSearchResult purchasePhoneNumbers(PhoneNumberPurchaseRequest body, Context context) { + return purchasePhoneNumbersAsync(body, context).block(); + } + + /** + * Gets an operation by its id. + * + * @param operationId The id of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an operation by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getOperationWithResponseAsync(String operationId) { + return FluxUtil.withContext( + context -> + service.getOperation( + this.client.getEndpoint(), operationId, this.client.getApiVersion(), context)); + } + + /** + * Gets an operation by its id. + * + * @param operationId The id of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an operation by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getOperationWithResponseAsync(String operationId, Context context) { + return service.getOperation(this.client.getEndpoint(), operationId, this.client.getApiVersion(), context); + } + + /** + * Gets an operation by its id. + * + * @param operationId The id of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an operation by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getOperationAsync(String operationId) { + return getOperationWithResponseAsync(operationId) + .flatMap( + (PhoneNumbersGetOperationResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an operation by its id. + * + * @param operationId The id of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an operation by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getOperationAsync(String operationId, Context context) { + return getOperationWithResponseAsync(operationId, context) + .flatMap( + (PhoneNumbersGetOperationResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets an operation by its id. + * + * @param operationId The id of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an operation by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PhoneNumberOperation getOperation(String operationId) { + return getOperationAsync(operationId).block(); + } + + /** + * Gets an operation by its id. + * + * @param operationId The id of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an operation by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PhoneNumberOperation getOperation(String operationId, Context context) { + return getOperationAsync(operationId, context).block(); + } + + /** + * Cancels an operation by its id. + * + * @param operationId The id of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelOperationWithResponseAsync(String operationId) { + return FluxUtil.withContext( + context -> + service.cancelOperation( + this.client.getEndpoint(), operationId, this.client.getApiVersion(), context)); + } + + /** + * Cancels an operation by its id. + * + * @param operationId The id of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelOperationWithResponseAsync(String operationId, Context context) { + return service.cancelOperation(this.client.getEndpoint(), operationId, this.client.getApiVersion(), context); + } + + /** + * Cancels an operation by its id. + * + * @param operationId The id of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelOperationAsync(String operationId) { + return cancelOperationWithResponseAsync(operationId).flatMap((Response res) -> Mono.empty()); + } + + /** + * Cancels an operation by its id. + * + * @param operationId The id of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelOperationAsync(String operationId, Context context) { + return cancelOperationWithResponseAsync(operationId, context).flatMap((Response res) -> Mono.empty()); + } + + /** + * Cancels an operation by its id. + * + * @param operationId The id of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancelOperation(String operationId) { + cancelOperationAsync(operationId).block(); + } + + /** + * Cancels an operation by its id. + * + * @param operationId The id of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancelOperation(String operationId, Context context) { + cancelOperationAsync(operationId, context).block(); + } + + /** + * Gets the details of the given acquired phone number. + * + * @param phoneNumber The acquired phone number whose details are to be fetched in E.164 format, e.g. +11234567890. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the given acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByNumberWithResponseAsync(String phoneNumber) { + return FluxUtil.withContext( + context -> + service.getByNumber( + this.client.getEndpoint(), phoneNumber, this.client.getApiVersion(), context)); + } + + /** + * Gets the details of the given acquired phone number. + * + * @param phoneNumber The acquired phone number whose details are to be fetched in E.164 format, e.g. +11234567890. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the given acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByNumberWithResponseAsync(String phoneNumber, Context context) { + return service.getByNumber(this.client.getEndpoint(), phoneNumber, this.client.getApiVersion(), context); + } + + /** + * Gets the details of the given acquired phone number. + * + * @param phoneNumber The acquired phone number whose details are to be fetched in E.164 format, e.g. +11234567890. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the given acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByNumberAsync(String phoneNumber) { + return getByNumberWithResponseAsync(phoneNumber) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the details of the given acquired phone number. + * + * @param phoneNumber The acquired phone number whose details are to be fetched in E.164 format, e.g. +11234567890. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the given acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByNumberAsync(String phoneNumber, Context context) { + return getByNumberWithResponseAsync(phoneNumber, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the details of the given acquired phone number. + * + * @param phoneNumber The acquired phone number whose details are to be fetched in E.164 format, e.g. +11234567890. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the given acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AcquiredPhoneNumber getByNumber(String phoneNumber) { + return getByNumberAsync(phoneNumber).block(); + } + + /** + * Gets the details of the given acquired phone number. + * + * @param phoneNumber The acquired phone number whose details are to be fetched in E.164 format, e.g. +11234567890. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the given acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AcquiredPhoneNumber getByNumber(String phoneNumber, Context context) { + return getByNumberAsync(phoneNumber, context).block(); + } + + /** + * Releases an acquired phone number. + * + * @param phoneNumber Phone number to be released, e.g. +11234567890. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono releasePhoneNumberWithResponseAsync(String phoneNumber) { + return FluxUtil.withContext( + context -> + service.releasePhoneNumber( + this.client.getEndpoint(), phoneNumber, this.client.getApiVersion(), context)); + } + + /** + * Releases an acquired phone number. + * + * @param phoneNumber Phone number to be released, e.g. +11234567890. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono releasePhoneNumberWithResponseAsync( + String phoneNumber, Context context) { + return service.releasePhoneNumber(this.client.getEndpoint(), phoneNumber, this.client.getApiVersion(), context); + } + + /** + * Releases an acquired phone number. + * + * @param phoneNumber Phone number to be released, e.g. +11234567890. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono releasePhoneNumberAsync(String phoneNumber) { + return releasePhoneNumberWithResponseAsync(phoneNumber) + .flatMap((PhoneNumbersReleasePhoneNumberResponse res) -> Mono.empty()); + } + + /** + * Releases an acquired phone number. + * + * @param phoneNumber Phone number to be released, e.g. +11234567890. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono releasePhoneNumberAsync(String phoneNumber, Context context) { + return releasePhoneNumberWithResponseAsync(phoneNumber, context) + .flatMap((PhoneNumbersReleasePhoneNumberResponse res) -> Mono.empty()); + } + + /** + * Releases an acquired phone number. + * + * @param phoneNumber Phone number to be released, e.g. +11234567890. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void releasePhoneNumber(String phoneNumber) { + releasePhoneNumberAsync(phoneNumber).block(); + } + + /** + * Releases an acquired phone number. + * + * @param phoneNumber Phone number to be released, e.g. +11234567890. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void releasePhoneNumber(String phoneNumber, Context context) { + releasePhoneNumberAsync(phoneNumber, context).block(); + } + + /** + * Gets the list of all acquired phone numbers. + * + * @param skip An optional parameter for how many entries to skip, for pagination purposes. The default value is 0. + * @param top An optional parameter for how many entries to return, for pagination purposes. The default value is + * 100. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of all acquired phone numbers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listPhoneNumbersSinglePageAsync(Integer skip, Integer top) { + return FluxUtil.withContext( + context -> + service.listPhoneNumbers( + this.client.getEndpoint(), skip, top, this.client.getApiVersion(), context)) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getPhoneNumbers(), + res.getValue().getNextLink(), + null)); + } + + /** + * Gets the list of all acquired phone numbers. + * + * @param skip An optional parameter for how many entries to skip, for pagination purposes. The default value is 0. + * @param top An optional parameter for how many entries to return, for pagination purposes. The default value is + * 100. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of all acquired phone numbers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listPhoneNumbersSinglePageAsync( + Integer skip, Integer top, Context context) { + return service.listPhoneNumbers(this.client.getEndpoint(), skip, top, this.client.getApiVersion(), context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getPhoneNumbers(), + res.getValue().getNextLink(), + null)); + } + + /** + * Gets the list of all acquired phone numbers. + * + * @param skip An optional parameter for how many entries to skip, for pagination purposes. The default value is 0. + * @param top An optional parameter for how many entries to return, for pagination purposes. The default value is + * 100. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of all acquired phone numbers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listPhoneNumbersAsync(Integer skip, Integer top) { + return new PagedFlux<>( + () -> listPhoneNumbersSinglePageAsync(skip, top), + nextLink -> listPhoneNumbersNextSinglePageAsync(nextLink)); + } + + /** + * Gets the list of all acquired phone numbers. + * + * @param skip An optional parameter for how many entries to skip, for pagination purposes. The default value is 0. + * @param top An optional parameter for how many entries to return, for pagination purposes. The default value is + * 100. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of all acquired phone numbers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listPhoneNumbersAsync(Integer skip, Integer top, Context context) { + return new PagedFlux<>( + () -> listPhoneNumbersSinglePageAsync(skip, top, context), + nextLink -> listPhoneNumbersNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the list of all acquired phone numbers. + * + * @param skip An optional parameter for how many entries to skip, for pagination purposes. The default value is 0. + * @param top An optional parameter for how many entries to return, for pagination purposes. The default value is + * 100. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of all acquired phone numbers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPhoneNumbers(Integer skip, Integer top) { + return new PagedIterable<>(listPhoneNumbersAsync(skip, top)); + } + + /** + * Gets the list of all acquired phone numbers. + * + * @param skip An optional parameter for how many entries to skip, for pagination purposes. The default value is 0. + * @param top An optional parameter for how many entries to return, for pagination purposes. The default value is + * 100. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of all acquired phone numbers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPhoneNumbers(Integer skip, Integer top, Context context) { + return new PagedIterable<>(listPhoneNumbersAsync(skip, top, context)); + } + + /** + * Updates the capabilities of a phone number. + * + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded as %2B, e.g. + * +11234567890. + * @param body Capabilities of a phone number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateCapabilitiesWithResponseAsync( + String phoneNumber, PhoneNumberCapabilitiesRequest body) { + return FluxUtil.withContext( + context -> + service.updateCapabilities( + this.client.getEndpoint(), phoneNumber, this.client.getApiVersion(), body, context)); + } + + /** + * Updates the capabilities of a phone number. + * + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded as %2B, e.g. + * +11234567890. + * @param body Capabilities of a phone number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateCapabilitiesWithResponseAsync( + String phoneNumber, PhoneNumberCapabilitiesRequest body, Context context) { + return service.updateCapabilities( + this.client.getEndpoint(), phoneNumber, this.client.getApiVersion(), body, context); + } + + /** + * Updates the capabilities of a phone number. + * + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded as %2B, e.g. + * +11234567890. + * @param body Capabilities of a phone number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateCapabilitiesAsync(String phoneNumber, PhoneNumberCapabilitiesRequest body) { + return updateCapabilitiesWithResponseAsync(phoneNumber, body) + .flatMap( + (PhoneNumbersUpdateCapabilitiesResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates the capabilities of a phone number. + * + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded as %2B, e.g. + * +11234567890. + * @param body Capabilities of a phone number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateCapabilitiesAsync( + String phoneNumber, PhoneNumberCapabilitiesRequest body, Context context) { + return updateCapabilitiesWithResponseAsync(phoneNumber, body, context) + .flatMap( + (PhoneNumbersUpdateCapabilitiesResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates the capabilities of a phone number. + * + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded as %2B, e.g. + * +11234567890. + * @param body Capabilities of a phone number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AcquiredPhoneNumber updateCapabilities(String phoneNumber, PhoneNumberCapabilitiesRequest body) { + return updateCapabilitiesAsync(phoneNumber, body).block(); + } + + /** + * Updates the capabilities of a phone number. + * + * @param phoneNumber The phone number id in E.164 format. The leading plus can be either + or encoded as %2B, e.g. + * +11234567890. + * @param body Capabilities of a phone number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an acquired phone number. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AcquiredPhoneNumber updateCapabilities( + String phoneNumber, PhoneNumberCapabilitiesRequest body, Context context) { + return updateCapabilitiesAsync(phoneNumber, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of acquired phone numbers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listPhoneNumbersNextSinglePageAsync(String nextLink) { + return FluxUtil.withContext(context -> service.listPhoneNumbersNext(nextLink, context)) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getPhoneNumbers(), + res.getValue().getNextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of acquired phone numbers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listPhoneNumbersNextSinglePageAsync( + String nextLink, Context context) { + return service.listPhoneNumbersNext(nextLink, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getPhoneNumbers(), + res.getValue().getNextLink(), + null)); + } +} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AcquiredPhoneNumbers.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/AcquiredPhoneNumbers.java similarity index 80% rename from sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AcquiredPhoneNumbers.java rename to sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/AcquiredPhoneNumbers.java index eaa0871220be..b8ff99c237a6 100644 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/AcquiredPhoneNumbers.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/AcquiredPhoneNumbers.java @@ -2,8 +2,9 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.communication.administration.models; +package com.azure.communication.phonenumbers.implementation.models; +import com.azure.communication.phonenumbers.models.AcquiredPhoneNumber; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -12,13 +13,13 @@ @Fluent public final class AcquiredPhoneNumbers { /* - * Represents a list of phone numbers + * Represents a list of phone numbers. */ - @JsonProperty(value = "phoneNumbers") + @JsonProperty(value = "phoneNumbers", required = true) private List phoneNumbers; /* - * Represents the URL link to the next page + * Represents the URL link to the next page of phone number results. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -44,7 +45,7 @@ public AcquiredPhoneNumbers setPhoneNumbers(List phoneNumbe } /** - * Get the nextLink property: Represents the URL link to the next page. + * Get the nextLink property: Represents the URL link to the next page of phone number results. * * @return the nextLink value. */ @@ -53,7 +54,7 @@ public String getNextLink() { } /** - * Set the nextLink property: Represents the URL link to the next page. + * Set the nextLink property: Represents the URL link to the next page of phone number results. * * @param nextLink the nextLink value to set. * @return the AcquiredPhoneNumbers object itself. diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/CommunicationErrorResponse.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/CommunicationErrorResponse.java new file mode 100644 index 000000000000..2890208f07a8 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/CommunicationErrorResponse.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.communication.phonenumbers.models.CommunicationError; +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CommunicationErrorResponse model. */ +@Fluent +public final class CommunicationErrorResponse { + /* + * The Communication Services error. + */ + @JsonProperty(value = "error", required = true) + private CommunicationError error; + + /** + * Get the error property: The Communication Services error. + * + * @return the error value. + */ + public CommunicationError getError() { + return this.error; + } + + /** + * Set the error property: The Communication Services error. + * + * @param error the error value to set. + * @return the CommunicationErrorResponse object itself. + */ + public CommunicationErrorResponse setError(CommunicationError error) { + this.error = error; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/CommunicationErrorResponseException.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/CommunicationErrorResponseException.java new file mode 100644 index 000000000000..246a19981b61 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/CommunicationErrorResponseException.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; + +/** Exception thrown for an invalid response with CommunicationErrorResponse information. */ +public final class CommunicationErrorResponseException extends HttpResponseException { + /** + * Initializes a new instance of the CommunicationErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public CommunicationErrorResponseException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the CommunicationErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public CommunicationErrorResponseException( + String message, HttpResponse response, CommunicationErrorResponse value) { + super(message, response, value); + } + + @Override + public CommunicationErrorResponse getValue() { + return (CommunicationErrorResponse) super.getValue(); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumberPurchaseRequest.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumberPurchaseRequest.java new file mode 100644 index 000000000000..21a53d735ecb --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumberPurchaseRequest.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PhoneNumberPurchaseRequest model. */ +@Fluent +public final class PhoneNumberPurchaseRequest { + /* + * The search id. + */ + @JsonProperty(value = "searchId") + private String searchId; + + /** + * Get the searchId property: The search id. + * + * @return the searchId value. + */ + public String getSearchId() { + return this.searchId; + } + + /** + * Set the searchId property: The search id. + * + * @param searchId the searchId value to set. + * @return the PhoneNumberPurchaseRequest object itself. + */ + public PhoneNumberPurchaseRequest setSearchId(String searchId) { + this.searchId = searchId; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersGetOperationHeaders.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersGetOperationHeaders.java new file mode 100644 index 000000000000..750735aec94a --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersGetOperationHeaders.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PhoneNumbersGetOperationHeaders model. */ +@Fluent +public final class PhoneNumbersGetOperationHeaders { + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String getLocation() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the PhoneNumbersGetOperationHeaders object itself. + */ + public PhoneNumbersGetOperationHeaders setLocation(String location) { + this.location = location; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersGetOperationResponse.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersGetOperationResponse.java new file mode 100644 index 000000000000..b9a8e6a5dae5 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersGetOperationResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.communication.phonenumbers.models.PhoneNumberOperation; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the getOperation operation. */ +public final class PhoneNumbersGetOperationResponse + extends ResponseBase { + /** + * Creates an instance of PhoneNumbersGetOperationResponse. + * + * @param request the request which resulted in this PhoneNumbersGetOperationResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PhoneNumbersGetOperationResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + PhoneNumberOperation value, + PhoneNumbersGetOperationHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public PhoneNumberOperation getValue() { + return super.getValue(); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersPurchasePhoneNumbersHeaders.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersPurchasePhoneNumbersHeaders.java new file mode 100644 index 000000000000..39b69d28fba6 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersPurchasePhoneNumbersHeaders.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PhoneNumbersPurchasePhoneNumbersHeaders model. */ +@Fluent +public final class PhoneNumbersPurchasePhoneNumbersHeaders { + /* + * The operation-id property. + */ + @JsonProperty(value = "operation-id") + private String operationId; + + /* + * The purchase-id property. + */ + @JsonProperty(value = "purchase-id") + private String purchaseId; + + /* + * The Operation-Location property. + */ + @JsonProperty(value = "Operation-Location") + private String operationLocation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the operationId property: The operation-id property. + * + * @return the operationId value. + */ + public String getOperationId() { + return this.operationId; + } + + /** + * Set the operationId property: The operation-id property. + * + * @param operationId the operationId value to set. + * @return the PhoneNumbersPurchasePhoneNumbersHeaders object itself. + */ + public PhoneNumbersPurchasePhoneNumbersHeaders setOperationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get the purchaseId property: The purchase-id property. + * + * @return the purchaseId value. + */ + public String getPurchaseId() { + return this.purchaseId; + } + + /** + * Set the purchaseId property: The purchase-id property. + * + * @param purchaseId the purchaseId value to set. + * @return the PhoneNumbersPurchasePhoneNumbersHeaders object itself. + */ + public PhoneNumbersPurchasePhoneNumbersHeaders setPurchaseId(String purchaseId) { + this.purchaseId = purchaseId; + return this; + } + + /** + * Get the operationLocation property: The Operation-Location property. + * + * @return the operationLocation value. + */ + public String getOperationLocation() { + return this.operationLocation; + } + + /** + * Set the operationLocation property: The Operation-Location property. + * + * @param operationLocation the operationLocation value to set. + * @return the PhoneNumbersPurchasePhoneNumbersHeaders object itself. + */ + public PhoneNumbersPurchasePhoneNumbersHeaders setOperationLocation(String operationLocation) { + this.operationLocation = operationLocation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String getLocation() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the PhoneNumbersPurchasePhoneNumbersHeaders object itself. + */ + public PhoneNumbersPurchasePhoneNumbersHeaders setLocation(String location) { + this.location = location; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersPurchasePhoneNumbersResponse.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersPurchasePhoneNumbersResponse.java new file mode 100644 index 000000000000..175b8f7b970c --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersPurchasePhoneNumbersResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.communication.phonenumbers.models.PhoneNumberSearchResult; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the purchasePhoneNumbers operation. */ +public final class PhoneNumbersPurchasePhoneNumbersResponse + extends ResponseBase { + /** + * Creates an instance of PhoneNumbersPurchasePhoneNumbersResponse. + * + * @param request the request which resulted in this PhoneNumbersPurchasePhoneNumbersResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PhoneNumbersPurchasePhoneNumbersResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + PhoneNumberSearchResult value, + PhoneNumbersPurchasePhoneNumbersHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public PhoneNumberSearchResult getValue() { + return super.getValue(); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersReleasePhoneNumberHeaders.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersReleasePhoneNumberHeaders.java new file mode 100644 index 000000000000..f12304d94dc9 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersReleasePhoneNumberHeaders.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PhoneNumbersReleasePhoneNumberHeaders model. */ +@Fluent +public final class PhoneNumbersReleasePhoneNumberHeaders { + /* + * The release-id property. + */ + @JsonProperty(value = "release-id") + private String releaseId; + + /* + * The operation-id property. + */ + @JsonProperty(value = "operation-id") + private String operationId; + + /* + * The Operation-Location property. + */ + @JsonProperty(value = "Operation-Location") + private String operationLocation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the releaseId property: The release-id property. + * + * @return the releaseId value. + */ + public String getReleaseId() { + return this.releaseId; + } + + /** + * Set the releaseId property: The release-id property. + * + * @param releaseId the releaseId value to set. + * @return the PhoneNumbersReleasePhoneNumberHeaders object itself. + */ + public PhoneNumbersReleasePhoneNumberHeaders setReleaseId(String releaseId) { + this.releaseId = releaseId; + return this; + } + + /** + * Get the operationId property: The operation-id property. + * + * @return the operationId value. + */ + public String getOperationId() { + return this.operationId; + } + + /** + * Set the operationId property: The operation-id property. + * + * @param operationId the operationId value to set. + * @return the PhoneNumbersReleasePhoneNumberHeaders object itself. + */ + public PhoneNumbersReleasePhoneNumberHeaders setOperationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get the operationLocation property: The Operation-Location property. + * + * @return the operationLocation value. + */ + public String getOperationLocation() { + return this.operationLocation; + } + + /** + * Set the operationLocation property: The Operation-Location property. + * + * @param operationLocation the operationLocation value to set. + * @return the PhoneNumbersReleasePhoneNumberHeaders object itself. + */ + public PhoneNumbersReleasePhoneNumberHeaders setOperationLocation(String operationLocation) { + this.operationLocation = operationLocation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String getLocation() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the PhoneNumbersReleasePhoneNumberHeaders object itself. + */ + public PhoneNumbersReleasePhoneNumberHeaders setLocation(String location) { + this.location = location; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersReleasePhoneNumberResponse.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersReleasePhoneNumberResponse.java new file mode 100644 index 000000000000..2f15c46b9a7a --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersReleasePhoneNumberResponse.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the releasePhoneNumber operation. */ +public final class PhoneNumbersReleasePhoneNumberResponse + extends ResponseBase { + /** + * Creates an instance of PhoneNumbersReleasePhoneNumberResponse. + * + * @param request the request which resulted in this PhoneNumbersReleasePhoneNumberResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PhoneNumbersReleasePhoneNumberResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + PhoneNumbersReleasePhoneNumberHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersSearchAvailablePhoneNumbersHeaders.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersSearchAvailablePhoneNumbersHeaders.java new file mode 100644 index 000000000000..1c0c5d37b9d8 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersSearchAvailablePhoneNumbersHeaders.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PhoneNumbersSearchAvailablePhoneNumbersHeaders model. */ +@Fluent +public final class PhoneNumbersSearchAvailablePhoneNumbersHeaders { + /* + * The operation-id property. + */ + @JsonProperty(value = "operation-id") + private String operationId; + + /* + * The search-id property. + */ + @JsonProperty(value = "search-id") + private String searchId; + + /* + * The Operation-Location property. + */ + @JsonProperty(value = "Operation-Location") + private String operationLocation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the operationId property: The operation-id property. + * + * @return the operationId value. + */ + public String getOperationId() { + return this.operationId; + } + + /** + * Set the operationId property: The operation-id property. + * + * @param operationId the operationId value to set. + * @return the PhoneNumbersSearchAvailablePhoneNumbersHeaders object itself. + */ + public PhoneNumbersSearchAvailablePhoneNumbersHeaders setOperationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get the searchId property: The search-id property. + * + * @return the searchId value. + */ + public String getSearchId() { + return this.searchId; + } + + /** + * Set the searchId property: The search-id property. + * + * @param searchId the searchId value to set. + * @return the PhoneNumbersSearchAvailablePhoneNumbersHeaders object itself. + */ + public PhoneNumbersSearchAvailablePhoneNumbersHeaders setSearchId(String searchId) { + this.searchId = searchId; + return this; + } + + /** + * Get the operationLocation property: The Operation-Location property. + * + * @return the operationLocation value. + */ + public String getOperationLocation() { + return this.operationLocation; + } + + /** + * Set the operationLocation property: The Operation-Location property. + * + * @param operationLocation the operationLocation value to set. + * @return the PhoneNumbersSearchAvailablePhoneNumbersHeaders object itself. + */ + public PhoneNumbersSearchAvailablePhoneNumbersHeaders setOperationLocation(String operationLocation) { + this.operationLocation = operationLocation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String getLocation() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the PhoneNumbersSearchAvailablePhoneNumbersHeaders object itself. + */ + public PhoneNumbersSearchAvailablePhoneNumbersHeaders setLocation(String location) { + this.location = location; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersSearchAvailablePhoneNumbersResponse.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersSearchAvailablePhoneNumbersResponse.java new file mode 100644 index 000000000000..885ad0f71db4 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersSearchAvailablePhoneNumbersResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.communication.phonenumbers.models.PhoneNumberSearchResult; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the searchAvailablePhoneNumbers operation. */ +public final class PhoneNumbersSearchAvailablePhoneNumbersResponse + extends ResponseBase { + /** + * Creates an instance of PhoneNumbersSearchAvailablePhoneNumbersResponse. + * + * @param request the request which resulted in this PhoneNumbersSearchAvailablePhoneNumbersResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PhoneNumbersSearchAvailablePhoneNumbersResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + PhoneNumberSearchResult value, + PhoneNumbersSearchAvailablePhoneNumbersHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public PhoneNumberSearchResult getValue() { + return super.getValue(); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersUpdateCapabilitiesHeaders.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersUpdateCapabilitiesHeaders.java new file mode 100644 index 000000000000..a24924527770 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersUpdateCapabilitiesHeaders.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PhoneNumbersUpdateCapabilitiesHeaders model. */ +@Fluent +public final class PhoneNumbersUpdateCapabilitiesHeaders { + /* + * The capabilities-id property. + */ + @JsonProperty(value = "capabilities-id") + private String capabilitiesId; + + /* + * The operation-id property. + */ + @JsonProperty(value = "operation-id") + private String operationId; + + /* + * The Operation-Location property. + */ + @JsonProperty(value = "Operation-Location") + private String operationLocation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the capabilitiesId property: The capabilities-id property. + * + * @return the capabilitiesId value. + */ + public String getCapabilitiesId() { + return this.capabilitiesId; + } + + /** + * Set the capabilitiesId property: The capabilities-id property. + * + * @param capabilitiesId the capabilitiesId value to set. + * @return the PhoneNumbersUpdateCapabilitiesHeaders object itself. + */ + public PhoneNumbersUpdateCapabilitiesHeaders setCapabilitiesId(String capabilitiesId) { + this.capabilitiesId = capabilitiesId; + return this; + } + + /** + * Get the operationId property: The operation-id property. + * + * @return the operationId value. + */ + public String getOperationId() { + return this.operationId; + } + + /** + * Set the operationId property: The operation-id property. + * + * @param operationId the operationId value to set. + * @return the PhoneNumbersUpdateCapabilitiesHeaders object itself. + */ + public PhoneNumbersUpdateCapabilitiesHeaders setOperationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get the operationLocation property: The Operation-Location property. + * + * @return the operationLocation value. + */ + public String getOperationLocation() { + return this.operationLocation; + } + + /** + * Set the operationLocation property: The Operation-Location property. + * + * @param operationLocation the operationLocation value to set. + * @return the PhoneNumbersUpdateCapabilitiesHeaders object itself. + */ + public PhoneNumbersUpdateCapabilitiesHeaders setOperationLocation(String operationLocation) { + this.operationLocation = operationLocation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String getLocation() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the PhoneNumbersUpdateCapabilitiesHeaders object itself. + */ + public PhoneNumbersUpdateCapabilitiesHeaders setLocation(String location) { + this.location = location; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersUpdateCapabilitiesResponse.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersUpdateCapabilitiesResponse.java new file mode 100644 index 000000000000..e22ad283bc53 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/PhoneNumbersUpdateCapabilitiesResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.implementation.models; + +import com.azure.communication.phonenumbers.models.AcquiredPhoneNumber; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the updateCapabilities operation. */ +public final class PhoneNumbersUpdateCapabilitiesResponse + extends ResponseBase { + /** + * Creates an instance of PhoneNumbersUpdateCapabilitiesResponse. + * + * @param request the request which resulted in this PhoneNumbersUpdateCapabilitiesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PhoneNumbersUpdateCapabilitiesResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + AcquiredPhoneNumber value, + PhoneNumbersUpdateCapabilitiesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public AcquiredPhoneNumber getValue() { + return super.getValue(); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/package-info.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/package-info.java new file mode 100644 index 000000000000..11b2d40a7e97 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for PhoneNumberAdminClient. The phone numbers client uses Azure Communication + * Services to acquire and manage phone numbers. + */ +package com.azure.communication.phonenumbers.implementation.models; diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/package-info.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/package-info.java new file mode 100644 index 000000000000..7f8be6b976c7 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations and inner classes for PhoneNumberAdminClient. The phone numbers client uses + * Azure Communication Services to acquire and manage phone numbers. + */ +package com.azure.communication.phonenumbers.implementation; diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/AcquiredPhoneNumber.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/AcquiredPhoneNumber.java new file mode 100644 index 000000000000..19dd72c41273 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/AcquiredPhoneNumber.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The AcquiredPhoneNumber model. */ +@Fluent +public final class AcquiredPhoneNumber { + /* + * The id of the phone number, e.g. 11234567890. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * String of the E.164 format of the phone number, e.g. +11234567890. + */ + @JsonProperty(value = "phoneNumber", required = true) + private String phoneNumber; + + /* + * The ISO 3166-2 code of the phone number's country, e.g. US. + */ + @JsonProperty(value = "countryCode", required = true) + private String countryCode; + + /* + * The phone number's type, e.g. Geographic, TollFree. + */ + @JsonProperty(value = "phoneNumberType", required = true) + private PhoneNumberType phoneNumberType; + + /* + * Capabilities of a phone number. + */ + @JsonProperty(value = "capabilities", required = true) + private PhoneNumberCapabilities capabilities; + + /* + * The assignment type of the phone number. A phone number can be assigned + * to a person, or to an application. + */ + @JsonProperty(value = "assignmentType", required = true) + private PhoneNumberAssignmentType assignmentType; + + /* + * The date and time that the phone number was purchased. + */ + @JsonProperty(value = "purchaseDate") + private OffsetDateTime purchaseDate; + + /* + * The incurred cost for a single phone number. + */ + @JsonProperty(value = "cost") + private PhoneNumberCost cost; + + /** + * Get the id property: The id of the phone number, e.g. 11234567890. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id of the phone number, e.g. 11234567890. + * + * @param id the id value to set. + * @return the AcquiredPhoneNumber object itself. + */ + public AcquiredPhoneNumber setId(String id) { + this.id = id; + return this; + } + + /** + * Get the phoneNumber property: String of the E.164 format of the phone number, e.g. +11234567890. + * + * @return the phoneNumber value. + */ + public String getPhoneNumber() { + return this.phoneNumber; + } + + /** + * Set the phoneNumber property: String of the E.164 format of the phone number, e.g. +11234567890. + * + * @param phoneNumber the phoneNumber value to set. + * @return the AcquiredPhoneNumber object itself. + */ + public AcquiredPhoneNumber setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Get the countryCode property: The ISO 3166-2 code of the phone number's country, e.g. US. + * + * @return the countryCode value. + */ + public String getCountryCode() { + return this.countryCode; + } + + /** + * Set the countryCode property: The ISO 3166-2 code of the phone number's country, e.g. US. + * + * @param countryCode the countryCode value to set. + * @return the AcquiredPhoneNumber object itself. + */ + public AcquiredPhoneNumber setCountryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get the phoneNumberType property: The phone number's type, e.g. Geographic, TollFree. + * + * @return the phoneNumberType value. + */ + public PhoneNumberType getPhoneNumberType() { + return this.phoneNumberType; + } + + /** + * Set the phoneNumberType property: The phone number's type, e.g. Geographic, TollFree. + * + * @param phoneNumberType the phoneNumberType value to set. + * @return the AcquiredPhoneNumber object itself. + */ + public AcquiredPhoneNumber setPhoneNumberType(PhoneNumberType phoneNumberType) { + this.phoneNumberType = phoneNumberType; + return this; + } + + /** + * Get the capabilities property: Capabilities of a phone number. + * + * @return the capabilities value. + */ + public PhoneNumberCapabilities getCapabilities() { + return this.capabilities; + } + + /** + * Set the capabilities property: Capabilities of a phone number. + * + * @param capabilities the capabilities value to set. + * @return the AcquiredPhoneNumber object itself. + */ + public AcquiredPhoneNumber setCapabilities(PhoneNumberCapabilities capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Get the assignmentType property: The assignment type of the phone number. A phone number can be assigned to a + * person, or to an application. + * + * @return the assignmentType value. + */ + public PhoneNumberAssignmentType getAssignmentType() { + return this.assignmentType; + } + + /** + * Set the assignmentType property: The assignment type of the phone number. A phone number can be assigned to a + * person, or to an application. + * + * @param assignmentType the assignmentType value to set. + * @return the AcquiredPhoneNumber object itself. + */ + public AcquiredPhoneNumber setAssignmentType(PhoneNumberAssignmentType assignmentType) { + this.assignmentType = assignmentType; + return this; + } + + /** + * Get the purchaseDate property: The date and time that the phone number was purchased. + * + * @return the purchaseDate value. + */ + public OffsetDateTime getPurchaseDate() { + return this.purchaseDate; + } + + /** + * Set the purchaseDate property: The date and time that the phone number was purchased. + * + * @param purchaseDate the purchaseDate value to set. + * @return the AcquiredPhoneNumber object itself. + */ + public AcquiredPhoneNumber setPurchaseDate(OffsetDateTime purchaseDate) { + this.purchaseDate = purchaseDate; + return this; + } + + /** + * Get the cost property: The incurred cost for a single phone number. + * + * @return the cost value. + */ + public PhoneNumberCost getCost() { + return this.cost; + } + + /** + * Set the cost property: The incurred cost for a single phone number. + * + * @param cost the cost value to set. + * @return the AcquiredPhoneNumber object itself. + */ + public AcquiredPhoneNumber setCost(PhoneNumberCost cost) { + this.cost = cost; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/BillingFrequency.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/BillingFrequency.java new file mode 100644 index 000000000000..1b4e8a5376c3 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/BillingFrequency.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for BillingFrequency. */ +public final class BillingFrequency extends ExpandableStringEnum { + /** Static value monthly for BillingFrequency. */ + public static final BillingFrequency MONTHLY = fromString("monthly"); + + /** + * Creates or finds a BillingFrequency from its string representation. + * + * @param name a name to look for. + * @return the corresponding BillingFrequency. + */ + @JsonCreator + public static BillingFrequency fromString(String name) { + return fromString(name, BillingFrequency.class); + } + + /** @return known BillingFrequency values. */ + public static Collection values() { + return values(BillingFrequency.class); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/CommunicationError.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/CommunicationError.java new file mode 100644 index 000000000000..307ba25a9b16 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/CommunicationError.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The CommunicationError model. */ +@Fluent +public final class CommunicationError { + /* + * The error code. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /* + * The error message. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /* + * The error target. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /* + * Further details about specific errors that led to this error. + */ + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private List details; + + /* + * The inner error if any. + */ + @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) + private CommunicationError innerError; + + /** + * Get the code property: The error code. + * + * @return the code value. + */ + public String getCode() { + return this.code; + } + + /** + * Set the code property: The error code. + * + * @param code the code value to set. + * @return the CommunicationError object itself. + */ + public CommunicationError setCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: The error message. + * + * @param message the message value to set. + * @return the CommunicationError object itself. + */ + public CommunicationError setMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the target property: The error target. + * + * @return the target value. + */ + public String getTarget() { + return this.target; + } + + /** + * Get the details property: Further details about specific errors that led to this error. + * + * @return the details value. + */ + public List getDetails() { + return this.details; + } + + /** + * Get the innerError property: The inner error if any. + * + * @return the innerError value. + */ + public CommunicationError getInnerError() { + return this.innerError; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberAssignmentType.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberAssignmentType.java new file mode 100644 index 000000000000..8fde6ba42d22 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberAssignmentType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PhoneNumberAssignmentType. */ +public final class PhoneNumberAssignmentType extends ExpandableStringEnum { + /** Static value user for PhoneNumberAssignmentType. */ + public static final PhoneNumberAssignmentType USER = fromString("user"); + + /** Static value application for PhoneNumberAssignmentType. */ + public static final PhoneNumberAssignmentType APPLICATION = fromString("application"); + + /** + * Creates or finds a PhoneNumberAssignmentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PhoneNumberAssignmentType. + */ + @JsonCreator + public static PhoneNumberAssignmentType fromString(String name) { + return fromString(name, PhoneNumberAssignmentType.class); + } + + /** @return known PhoneNumberAssignmentType values. */ + public static Collection values() { + return values(PhoneNumberAssignmentType.class); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCapabilities.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCapabilities.java new file mode 100644 index 000000000000..7bc70aa6b601 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCapabilities.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PhoneNumberCapabilities model. */ +@Fluent +public final class PhoneNumberCapabilities { + /* + * Capability value for calling. + */ + @JsonProperty(value = "calling", required = true) + private PhoneNumberCapabilityValue calling; + + /* + * Capability value for SMS. + */ + @JsonProperty(value = "sms", required = true) + private PhoneNumberCapabilityValue sms; + + /** + * Get the calling property: Capability value for calling. + * + * @return the calling value. + */ + public PhoneNumberCapabilityValue getCalling() { + return this.calling; + } + + /** + * Set the calling property: Capability value for calling. + * + * @param calling the calling value to set. + * @return the PhoneNumberCapabilities object itself. + */ + public PhoneNumberCapabilities setCalling(PhoneNumberCapabilityValue calling) { + this.calling = calling; + return this; + } + + /** + * Get the sms property: Capability value for SMS. + * + * @return the sms value. + */ + public PhoneNumberCapabilityValue getSms() { + return this.sms; + } + + /** + * Set the sms property: Capability value for SMS. + * + * @param sms the sms value to set. + * @return the PhoneNumberCapabilities object itself. + */ + public PhoneNumberCapabilities setSms(PhoneNumberCapabilityValue sms) { + this.sms = sms; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCapabilitiesRequest.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCapabilitiesRequest.java new file mode 100644 index 000000000000..a8609ef55d0c --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCapabilitiesRequest.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PhoneNumberCapabilitiesRequest model. */ +@Fluent +public final class PhoneNumberCapabilitiesRequest { + /* + * Capability value for calling. + */ + @JsonProperty(value = "calling") + private PhoneNumberCapabilityValue calling; + + /* + * Capability value for SMS. + */ + @JsonProperty(value = "sms") + private PhoneNumberCapabilityValue sms; + + /** + * Get the calling property: Capability value for calling. + * + * @return the calling value. + */ + public PhoneNumberCapabilityValue getCalling() { + return this.calling; + } + + /** + * Set the calling property: Capability value for calling. + * + * @param calling the calling value to set. + * @return the PhoneNumberCapabilitiesRequest object itself. + */ + public PhoneNumberCapabilitiesRequest setCalling(PhoneNumberCapabilityValue calling) { + this.calling = calling; + return this; + } + + /** + * Get the sms property: Capability value for SMS. + * + * @return the sms value. + */ + public PhoneNumberCapabilityValue getSms() { + return this.sms; + } + + /** + * Set the sms property: Capability value for SMS. + * + * @param sms the sms value to set. + * @return the PhoneNumberCapabilitiesRequest object itself. + */ + public PhoneNumberCapabilitiesRequest setSms(PhoneNumberCapabilityValue sms) { + this.sms = sms; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCapabilityValue.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCapabilityValue.java new file mode 100644 index 000000000000..09c53acc038b --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCapabilityValue.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PhoneNumberCapabilityValue. */ +public final class PhoneNumberCapabilityValue extends ExpandableStringEnum { + /** Static value none for PhoneNumberCapabilityValue. */ + public static final PhoneNumberCapabilityValue NONE = fromString("none"); + + /** Static value inbound for PhoneNumberCapabilityValue. */ + public static final PhoneNumberCapabilityValue INBOUND = fromString("inbound"); + + /** Static value outbound for PhoneNumberCapabilityValue. */ + public static final PhoneNumberCapabilityValue OUTBOUND = fromString("outbound"); + + /** Static value inbound+outbound for PhoneNumberCapabilityValue. */ + public static final PhoneNumberCapabilityValue INBOUND_OUTBOUND = fromString("inbound+outbound"); + + /** + * Creates or finds a PhoneNumberCapabilityValue from its string representation. + * + * @param name a name to look for. + * @return the corresponding PhoneNumberCapabilityValue. + */ + @JsonCreator + public static PhoneNumberCapabilityValue fromString(String name) { + return fromString(name, PhoneNumberCapabilityValue.class); + } + + /** @return known PhoneNumberCapabilityValue values. */ + public static Collection values() { + return values(PhoneNumberCapabilityValue.class); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCost.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCost.java new file mode 100644 index 000000000000..a66a2f4b552f --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberCost.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PhoneNumberCost model. */ +@Immutable +public final class PhoneNumberCost { + /* + * The cost amount. + */ + @JsonProperty(value = "amount", required = true, access = JsonProperty.Access.WRITE_ONLY) + private double amount; + + /* + * The ISO 4217 currency code for the cost amount, e.g. USD. + */ + @JsonProperty(value = "currencyCode", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String currencyCode; + + /* + * The frequency with which the cost gets billed. + */ + @JsonProperty(value = "billingFrequency", required = true, access = JsonProperty.Access.WRITE_ONLY) + private BillingFrequency billingFrequency; + + /** + * Get the amount property: The cost amount. + * + * @return the amount value. + */ + public double getAmount() { + return this.amount; + } + + /** + * Get the currencyCode property: The ISO 4217 currency code for the cost amount, e.g. USD. + * + * @return the currencyCode value. + */ + public String getCurrencyCode() { + return this.currencyCode; + } + + /** + * Get the billingFrequency property: The frequency with which the cost gets billed. + * + * @return the billingFrequency value. + */ + public BillingFrequency getBillingFrequency() { + return this.billingFrequency; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberOperation.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberOperation.java new file mode 100644 index 000000000000..41c1545a8d86 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberOperation.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The PhoneNumberOperation model. */ +@Immutable +public final class PhoneNumberOperation { + /* + * Status of operation. + */ + @JsonProperty(value = "status", required = true, access = JsonProperty.Access.WRITE_ONLY) + private PhoneNumberOperationStatus status; + + /* + * URL for retrieving the result of the operation, if any. + */ + @JsonProperty(value = "resourceLocation", access = JsonProperty.Access.WRITE_ONLY) + private String resourceLocation; + + /* + * The date that the operation was created. + */ + @JsonProperty(value = "createdDateTime", required = true, access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDateTime; + + /* + * The Communication Services error. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private CommunicationError error; + + /* + * Id of operation. + */ + @JsonProperty(value = "id", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The type of operation, e.g. Search + */ + @JsonProperty(value = "operationType", required = true, access = JsonProperty.Access.WRITE_ONLY) + private PhoneNumberOperationType operationType; + + /* + * The most recent date that the operation was changed. + */ + @JsonProperty(value = "lastActionDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastActionDateTime; + + /** + * Get the status property: Status of operation. + * + * @return the status value. + */ + public PhoneNumberOperationStatus getStatus() { + return this.status; + } + + /** + * Get the resourceLocation property: URL for retrieving the result of the operation, if any. + * + * @return the resourceLocation value. + */ + public String getResourceLocation() { + return this.resourceLocation; + } + + /** + * Get the createdDateTime property: The date that the operation was created. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Get the error property: The Communication Services error. + * + * @return the error value. + */ + public CommunicationError getError() { + return this.error; + } + + /** + * Get the id property: Id of operation. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Get the operationType property: The type of operation, e.g. Search. + * + * @return the operationType value. + */ + public PhoneNumberOperationType getOperationType() { + return this.operationType; + } + + /** + * Get the lastActionDateTime property: The most recent date that the operation was changed. + * + * @return the lastActionDateTime value. + */ + public OffsetDateTime getLastActionDateTime() { + return this.lastActionDateTime; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberOperationStatus.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberOperationStatus.java new file mode 100644 index 000000000000..30c5feac9a03 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberOperationStatus.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PhoneNumberOperationStatus. */ +public final class PhoneNumberOperationStatus extends ExpandableStringEnum { + /** Static value notStarted for PhoneNumberOperationStatus. */ + public static final PhoneNumberOperationStatus NOT_STARTED = fromString("notStarted"); + + /** Static value running for PhoneNumberOperationStatus. */ + public static final PhoneNumberOperationStatus RUNNING = fromString("running"); + + /** Static value succeeded for PhoneNumberOperationStatus. */ + public static final PhoneNumberOperationStatus SUCCEEDED = fromString("succeeded"); + + /** Static value failed for PhoneNumberOperationStatus. */ + public static final PhoneNumberOperationStatus FAILED = fromString("failed"); + + /** + * Creates or finds a PhoneNumberOperationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PhoneNumberOperationStatus. + */ + @JsonCreator + public static PhoneNumberOperationStatus fromString(String name) { + return fromString(name, PhoneNumberOperationStatus.class); + } + + /** @return known PhoneNumberOperationStatus values. */ + public static Collection values() { + return values(PhoneNumberOperationStatus.class); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberOperationType.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberOperationType.java new file mode 100644 index 000000000000..cef1da493ca8 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberOperationType.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PhoneNumberOperationType. */ +public final class PhoneNumberOperationType extends ExpandableStringEnum { + /** Static value purchase for PhoneNumberOperationType. */ + public static final PhoneNumberOperationType PURCHASE = fromString("purchase"); + + /** Static value releasePhoneNumber for PhoneNumberOperationType. */ + public static final PhoneNumberOperationType RELEASE_PHONE_NUMBER = fromString("releasePhoneNumber"); + + /** Static value search for PhoneNumberOperationType. */ + public static final PhoneNumberOperationType SEARCH = fromString("search"); + + /** Static value updatePhoneNumberCapabilities for PhoneNumberOperationType. */ + public static final PhoneNumberOperationType UPDATE_PHONE_NUMBER_CAPABILITIES = + fromString("updatePhoneNumberCapabilities"); + + /** + * Creates or finds a PhoneNumberOperationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PhoneNumberOperationType. + */ + @JsonCreator + public static PhoneNumberOperationType fromString(String name) { + return fromString(name, PhoneNumberOperationType.class); + } + + /** @return known PhoneNumberOperationType values. */ + public static Collection values() { + return values(PhoneNumberOperationType.class); + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberSearchRequest.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberSearchRequest.java new file mode 100644 index 000000000000..c667fb3e9cbf --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberSearchRequest.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PhoneNumberSearchRequest model. */ +@Fluent +public final class PhoneNumberSearchRequest { + /* + * The type of phone numbers to search for, e.g. geographic, or tollFree. + */ + @JsonProperty(value = "phoneNumberType", required = true) + private PhoneNumberType phoneNumberType; + + /* + * The assignment type of the phone numbers to search for. A phone number + * can be assigned to a person, or to an application. + */ + @JsonProperty(value = "assignmentType", required = true) + private PhoneNumberAssignmentType assignmentType; + + /* + * Capabilities of a phone number. + */ + @JsonProperty(value = "capabilities", required = true) + private PhoneNumberCapabilities capabilities; + + /* + * The area code of the desired phone number, e.g. 425. + */ + @JsonProperty(value = "areaCode") + private String areaCode; + + /* + * The quantity of desired phone numbers. The default value is 1. + */ + @JsonProperty(value = "quantity") + private Integer quantity; + + /** + * Get the phoneNumberType property: The type of phone numbers to search for, e.g. geographic, or tollFree. + * + * @return the phoneNumberType value. + */ + public PhoneNumberType getPhoneNumberType() { + return this.phoneNumberType; + } + + /** + * Set the phoneNumberType property: The type of phone numbers to search for, e.g. geographic, or tollFree. + * + * @param phoneNumberType the phoneNumberType value to set. + * @return the PhoneNumberSearchRequest object itself. + */ + public PhoneNumberSearchRequest setPhoneNumberType(PhoneNumberType phoneNumberType) { + this.phoneNumberType = phoneNumberType; + return this; + } + + /** + * Get the assignmentType property: The assignment type of the phone numbers to search for. A phone number can be + * assigned to a person, or to an application. + * + * @return the assignmentType value. + */ + public PhoneNumberAssignmentType getAssignmentType() { + return this.assignmentType; + } + + /** + * Set the assignmentType property: The assignment type of the phone numbers to search for. A phone number can be + * assigned to a person, or to an application. + * + * @param assignmentType the assignmentType value to set. + * @return the PhoneNumberSearchRequest object itself. + */ + public PhoneNumberSearchRequest setAssignmentType(PhoneNumberAssignmentType assignmentType) { + this.assignmentType = assignmentType; + return this; + } + + /** + * Get the capabilities property: Capabilities of a phone number. + * + * @return the capabilities value. + */ + public PhoneNumberCapabilities getCapabilities() { + return this.capabilities; + } + + /** + * Set the capabilities property: Capabilities of a phone number. + * + * @param capabilities the capabilities value to set. + * @return the PhoneNumberSearchRequest object itself. + */ + public PhoneNumberSearchRequest setCapabilities(PhoneNumberCapabilities capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Get the areaCode property: The area code of the desired phone number, e.g. 425. + * + * @return the areaCode value. + */ + public String getAreaCode() { + return this.areaCode; + } + + /** + * Set the areaCode property: The area code of the desired phone number, e.g. 425. + * + * @param areaCode the areaCode value to set. + * @return the PhoneNumberSearchRequest object itself. + */ + public PhoneNumberSearchRequest setAreaCode(String areaCode) { + this.areaCode = areaCode; + return this; + } + + /** + * Get the quantity property: The quantity of desired phone numbers. The default value is 1. + * + * @return the quantity value. + */ + public Integer getQuantity() { + return this.quantity; + } + + /** + * Set the quantity property: The quantity of desired phone numbers. The default value is 1. + * + * @param quantity the quantity value to set. + * @return the PhoneNumberSearchRequest object itself. + */ + public PhoneNumberSearchRequest setQuantity(Integer quantity) { + this.quantity = quantity; + return this; + } +} diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberSearchResult.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberSearchResult.java new file mode 100644 index 000000000000..5214db68b4b6 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberSearchResult.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.phonenumbers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The PhoneNumberSearchResult model. */ +@Immutable +public final class PhoneNumberSearchResult { + /* + * The search id. + */ + @JsonProperty(value = "searchId", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String searchId; + + /* + * The phone numbers that are available. Can be fewer than the desired + * search quantity. + */ + @JsonProperty(value = "phoneNumbers", required = true, access = JsonProperty.Access.WRITE_ONLY) + private List phoneNumbers; + + /* + * The phone number's type, e.g. geographic, or tollFree. + */ + @JsonProperty(value = "phoneNumberType", required = true, access = JsonProperty.Access.WRITE_ONLY) + private PhoneNumberType phoneNumberType; + + /* + * Phone number's assignment type. + */ + @JsonProperty(value = "assignmentType", required = true, access = JsonProperty.Access.WRITE_ONLY) + private PhoneNumberAssignmentType assignmentType; + + /* + * Capabilities of a phone number. + */ + @JsonProperty(value = "capabilities", required = true, access = JsonProperty.Access.WRITE_ONLY) + private PhoneNumberCapabilities capabilities; + + /* + * The incurred cost for a single phone number. + */ + @JsonProperty(value = "cost", required = true, access = JsonProperty.Access.WRITE_ONLY) + private PhoneNumberCost cost; + + /* + * The date that this search result expires and phone numbers are no longer + * on hold. A search result expires in less than 15min, e.g. + * 2020-11-19T16:31:49.048Z. + */ + @JsonProperty(value = "searchExpiresBy", required = true, access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime searchExpiresBy; + + /** + * Get the searchId property: The search id. + * + * @return the searchId value. + */ + public String getSearchId() { + return this.searchId; + } + + /** + * Get the phoneNumbers property: The phone numbers that are available. Can be fewer than the desired search + * quantity. + * + * @return the phoneNumbers value. + */ + public List getPhoneNumbers() { + return this.phoneNumbers; + } + + /** + * Get the phoneNumberType property: The phone number's type, e.g. geographic, or tollFree. + * + * @return the phoneNumberType value. + */ + public PhoneNumberType getPhoneNumberType() { + return this.phoneNumberType; + } + + /** + * Get the assignmentType property: Phone number's assignment type. + * + * @return the assignmentType value. + */ + public PhoneNumberAssignmentType getAssignmentType() { + return this.assignmentType; + } + + /** + * Get the capabilities property: Capabilities of a phone number. + * + * @return the capabilities value. + */ + public PhoneNumberCapabilities getCapabilities() { + return this.capabilities; + } + + /** + * Get the cost property: The incurred cost for a single phone number. + * + * @return the cost value. + */ + public PhoneNumberCost getCost() { + return this.cost; + } + + /** + * Get the searchExpiresBy property: The date that this search result expires and phone numbers are no longer on + * hold. A search result expires in less than 15min, e.g. 2020-11-19T16:31:49.048Z. + * + * @return the searchExpiresBy value. + */ + public OffsetDateTime getSearchExpiresBy() { + return this.searchExpiresBy; + } +} diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberType.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberType.java similarity index 69% rename from sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberType.java rename to sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberType.java index 71f93a5e9d61..5a2746fdf269 100644 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/models/PhoneNumberType.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/PhoneNumberType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.communication.administration.models; +package com.azure.communication.phonenumbers.models; import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,17 +10,11 @@ /** Defines values for PhoneNumberType. */ public final class PhoneNumberType extends ExpandableStringEnum { - /** Static value Unknown for PhoneNumberType. */ - public static final PhoneNumberType UNKNOWN = fromString("Unknown"); + /** Static value geographic for PhoneNumberType. */ + public static final PhoneNumberType GEOGRAPHIC = fromString("geographic"); - /** Static value Geographic for PhoneNumberType. */ - public static final PhoneNumberType GEOGRAPHIC = fromString("Geographic"); - - /** Static value TollFree for PhoneNumberType. */ - public static final PhoneNumberType TOLL_FREE = fromString("TollFree"); - - /** Static value Indirect for PhoneNumberType. */ - public static final PhoneNumberType INDIRECT = fromString("Indirect"); + /** Static value tollFree for PhoneNumberType. */ + public static final PhoneNumberType TOLL_FREE = fromString("tollFree"); /** * Creates or finds a PhoneNumberType from its string representation. diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/package-info.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/package-info.java new file mode 100644 index 000000000000..99bc62ee197a --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing classes for PhoneNumberAdminClient. The phone numbers client uses Azure Communication Services to + * acquire and manage phone numbers. + */ +package com.azure.communication.phonenumbers.models; diff --git a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/package-info.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/package-info.java similarity index 81% rename from sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/package-info.java rename to sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/package-info.java index 37747ec594f2..a589af48cee1 100644 --- a/sdk/communication/azure-communication-administration/src/main/java/com/azure/communication/administration/package-info.java +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/com/azure/communication/phonenumbers/package-info.java @@ -2,4 +2,4 @@ // Licensed under the MIT License. /** Package containing the classes for AzureCommunicationAdministration. Azure Communication Administration Service. */ -package com.azure.communication.administration; +package com.azure.communication.phonenumbers; diff --git a/sdk/communication/azure-communication-phonenumbers/src/main/java/module-info.java b/sdk/communication/azure-communication-phonenumbers/src/main/java/module-info.java new file mode 100644 index 000000000000..2c764caefaeb --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/main/java/module-info.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.communication.phonenumbers { + + requires transitive com.azure.communication.common; + requires transitive com.azure.core; + + // public API surface area + exports com.azure.communication.phonenumbers; + exports com.azure.communication.phonenumbers.models; + + opens com.azure.communication.phonenumbers.implementation.models + to com.fasterxml.jackson.databind, com.azure.core; + opens com.azure.communication.phonenumbers.models + to com.fasterxml.jackson.databind; + +} diff --git a/sdk/communication/azure-communication-administration/src/main/resources/azure-communication-administration.properties b/sdk/communication/azure-communication-phonenumbers/src/main/resources/azure-communication-phonenumbers.properties similarity index 100% rename from sdk/communication/azure-communication-administration/src/main/resources/azure-communication-administration.properties rename to sdk/communication/azure-communication-phonenumbers/src/main/resources/azure-communication-phonenumbers.properties diff --git a/sdk/communication/azure-communication-phonenumbers/src/samples/java/com/azure/communication/phonenumbers/ReadmeSamples.java b/sdk/communication/azure-communication-phonenumbers/src/samples/java/com/azure/communication/phonenumbers/ReadmeSamples.java new file mode 100644 index 000000000000..6680c63a1efe --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/samples/java/com/azure/communication/phonenumbers/ReadmeSamples.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.phonenumbers; + +import com.azure.communication.phonenumbers.models.AcquiredPhoneNumber; +import com.azure.communication.phonenumbers.models.PhoneNumberAssignmentType; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilities; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilitiesRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilityValue; +import com.azure.communication.phonenumbers.models.PhoneNumberOperation; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchResult; +import com.azure.communication.phonenumbers.models.PhoneNumberType; +import com.azure.core.http.HttpClient; +import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollResponse; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReadmeSamples { + + /** + * Sample code for creating a sync Phone Number Client. + * + * @return the Phone Number Client. + */ + public PhoneNumbersClient createPhoneNumberClient() { + // You can find your endpoint and access token from your resource in the Azure Portal + String endpoint = "https://.communication.azure.com"; + String accessKey = "SECRET"; + + // Create an HttpClient builder of your choice and customize it + HttpClient httpClient = new NettyAsyncHttpClientBuilder().build(); + + PhoneNumbersClient phoneNumberClient = new PhoneNumbersClientBuilder() + .endpoint(endpoint) + .accessKey(accessKey) + .httpClient(httpClient) + .buildClient(); + + return phoneNumberClient; + } + + /** + * Sample code for creating a sync Communication Identity Client using AAD authentication. + * + * @return the Phone Number Client. + */ + public PhoneNumbersClient createPhoneNumberClientWithAAD() { + // You can find your endpoint and access key from your resource in the Azure Portal + String endpoint = "https://.communication.azure.com"; + + // Create an HttpClient builder of your choice and customize it + HttpClient httpClient = new NettyAsyncHttpClientBuilder().build(); + + PhoneNumbersClient phoneNumberClient = new PhoneNumbersClientBuilder() + .endpoint(endpoint) + .credential(new DefaultAzureCredentialBuilder().build()) + .httpClient(httpClient) + .buildClient(); + + return phoneNumberClient; + } + + /** + * Sample code for getting an acquired phone number. + * + * @return the acquired phone number. + */ + public AcquiredPhoneNumber getPhoneNumber() { + PhoneNumbersClient phoneNumberClient = createPhoneNumberClient(); + AcquiredPhoneNumber phoneNumber = phoneNumberClient.getPhoneNumber("+18001234567"); + System.out.println("Phone Number Value: " + phoneNumber.getPhoneNumber()); + System.out.println("Phone Number Country Code: " + phoneNumber.getCountryCode()); + return phoneNumber; + } + + /** + * Sample code for listing all acquired phone numbers. + * + * @return all acquired phone number. + */ + public PagedIterable listPhoneNumbers() { + PagedIterable phoneNumbers = createPhoneNumberClient().listPhoneNumbers(Context.NONE); + AcquiredPhoneNumber phoneNumber = phoneNumbers.iterator().next(); + System.out.println("Phone Number Value: " + phoneNumber.getPhoneNumber()); + System.out.println("Phone Number Country Code: " + phoneNumber.getCountryCode()); + return phoneNumbers; + } + + /** + * Search for available phone numbers and purchase phone numbers + */ + public void searchAvailablePhoneNumbersandPurchasePhoneNumbers() { + PhoneNumbersClient phoneNumberClient = createPhoneNumberClient(); + PhoneNumberSearchRequest searchRequest = new PhoneNumberSearchRequest(); + searchRequest + .setAreaCode("800") // Area code is optional for toll free numbers + .setAssignmentType(PhoneNumberAssignmentType.USER) + .setCapabilities(new PhoneNumberCapabilities() + .setCalling(PhoneNumberCapabilityValue.INBOUND) + .setSms(PhoneNumberCapabilityValue.INBOUND_OUTBOUND)) + .setPhoneNumberType(PhoneNumberType.GEOGRAPHIC) + .setQuantity(1); // Quantity is optional, default is 1 + + PhoneNumberSearchResult searchResult = phoneNumberClient + .beginSearchAvailablePhoneNumbers("US", searchRequest, Context.NONE) + .getFinalResult(); + + System.out.println("Searched phone numbers: " + searchResult.getPhoneNumbers()); + System.out.println("Search expires by: " + searchResult.getSearchExpiresBy()); + System.out.println("Phone number costs:" + searchResult.getCost().getAmount()); + + PollResponse purchaseResponse = + phoneNumberClient.beginPurchasePhoneNumbers(searchResult.getSearchId(), Context.NONE).waitForCompletion(); + System.out.println("Purchase phone numbers is complete: " + purchaseResponse.getStatus()); + } + + /** + * Release acquired phone number + */ + public void releasePhoneNumber() { + PhoneNumbersClient phoneNumberClient = createPhoneNumberClient(); + PollResponse releaseResponse = + phoneNumberClient.beginReleasePhoneNumber("+18001234567", Context.NONE).waitForCompletion(); + System.out.println("Release phone number is complete: " + releaseResponse.getStatus()); + } + + /** + * Update phone number capabilities + * + * @return the updated acquired phone number + */ + public AcquiredPhoneNumber updatePhoneNumberCapabilities() { + PhoneNumbersClient phoneNumberClient = createPhoneNumberClient(); + PhoneNumberCapabilitiesRequest capabilitiesRequest = new PhoneNumberCapabilitiesRequest(); + capabilitiesRequest + .setCalling(PhoneNumberCapabilityValue.INBOUND) + .setSms(PhoneNumberCapabilityValue.INBOUND_OUTBOUND); + AcquiredPhoneNumber phoneNumber = phoneNumberClient.beginUpdatePhoneNumberCapabilities("+18001234567", capabilitiesRequest, Context.NONE).getFinalResult(); + + System.out.println("Phone Number Calling capabilities: " + phoneNumber.getCapabilities().getCalling()); //Phone Number Calling capabilities: inbound + System.out.println("Phone Number SMS capabilities: " + phoneNumber.getCapabilities().getSms()); //Phone Number SMS capabilities: inbound+outbound + return phoneNumber; + } +} diff --git a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/CommunicationLoggerPolicy.java b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/CommunicationLoggerPolicy.java similarity index 96% rename from sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/CommunicationLoggerPolicy.java rename to sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/CommunicationLoggerPolicy.java index a292aadc725a..b16bffa989cf 100644 --- a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/CommunicationLoggerPolicy.java +++ b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/CommunicationLoggerPolicy.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - -package com.azure.communication.administration; +package com.azure.communication.phonenumbers; import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClientIntegrationTest.java b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClientIntegrationTest.java new file mode 100644 index 000000000000..2ec216fdea54 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersAsyncClientIntegrationTest.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.communication.phonenumbers; + +import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import reactor.test.StepVerifier; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.time.Duration; + +import com.azure.communication.phonenumbers.models.AcquiredPhoneNumber; +import com.azure.communication.phonenumbers.models.PhoneNumberAssignmentType; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilities; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilitiesRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilityValue; +import com.azure.communication.phonenumbers.models.PhoneNumberOperation; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchResult; +import com.azure.communication.phonenumbers.models.PhoneNumberType; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.Response; +import com.azure.core.test.TestMode; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; + +public class PhoneNumbersAsyncClientIntegrationTest extends PhoneNumbersIntegrationTestBase { + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void getPhoneNumber(HttpClient httpClient) { + String phoneNumber = getTestPhoneNumber(PHONE_NUMBER); + StepVerifier.create( + this.getClientWithConnectionString(httpClient, "getPhoneNumber").getPhoneNumber(phoneNumber) + ) + .assertNext((AcquiredPhoneNumber number) -> { + assertEquals(phoneNumber, number.getPhoneNumber()); + assertEquals(COUNTRY_CODE, number.getCountryCode()); + }) + .verifyComplete(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void getPhoneNumberWithAAD(HttpClient httpClient) { + String phoneNumber = getTestPhoneNumber(PHONE_NUMBER); + StepVerifier.create( + this.getClientWithManagedIdentity(httpClient, "getPhoneNumber").getPhoneNumber(phoneNumber) + ) + .assertNext((AcquiredPhoneNumber number) -> { + assertEquals(phoneNumber, number.getPhoneNumber()); + assertEquals(COUNTRY_CODE, number.getCountryCode()); + }) + .verifyComplete(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void getPhoneNumberWithResponse(HttpClient httpClient) { + String phoneNumber = getTestPhoneNumber(PHONE_NUMBER); + StepVerifier.create( + this.getClientWithConnectionString(httpClient, "getPhoneNumberWithResponse").getPhoneNumberWithResponse(phoneNumber) + ) + .assertNext((Response response) -> { + assertEquals(200, response.getStatusCode()); + assertEquals(phoneNumber, response.getValue().getPhoneNumber()); + assertEquals(COUNTRY_CODE, response.getValue().getCountryCode()); + }) + .verifyComplete(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void listPhoneNumbers(HttpClient httpClient) { + StepVerifier.create( + this.getClientWithConnectionString(httpClient, "listPhoneNumbers").listPhoneNumbers().next() + ) + .assertNext((AcquiredPhoneNumber number) -> { + assertNotNull(number.getPhoneNumber()); + assertEquals(COUNTRY_CODE, number.getCountryCode()); + }) + .verifyComplete(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void beginSearchAvailablePhoneNumbers(HttpClient httpClient) { + StepVerifier.create( + beginSearchAvailablePhoneNumbersHelper(httpClient, "beginSearchAvailablePhoneNumbers").last() + .flatMap((AsyncPollResponse result) -> { + return result.getFinalResult(); + }) + ).assertNext((PhoneNumberSearchResult searchResult) -> { + assertEquals(searchResult.getPhoneNumbers().size(), 1); + assertNotNull(searchResult.getSearchId()); + }) + .verifyComplete(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)") + public void beginPurchaseandReleasePhoneNumbers(HttpClient httpClient) { + StepVerifier.create( + beginSearchAvailablePhoneNumbersHelper(httpClient, "beginSearchAvailablePhoneNumbers").last() + .flatMap((AsyncPollResponse result) -> { + return result.getFinalResult() + .flatMap((PhoneNumberSearchResult searchResult) -> { + String phoneNumber = getTestPhoneNumber(searchResult.getPhoneNumbers().get(0)); + return beginPurchasePhoneNumbersHelper(httpClient, searchResult.getSearchId(), "beginPurchasePhoneNumbers").last() + .flatMap((AsyncPollResponse purchaseResult) -> { + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, purchaseResult.getStatus()); + return beginReleasePhoneNumberHelper(httpClient, phoneNumber, "beginReleasePhoneNumber").last(); + }); + }); + }) + ).assertNext((AsyncPollResponse releaseResult) -> { + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, releaseResult.getStatus()); + + }) + .verifyComplete(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void beginUpdatePhoneNumberCapabilities(HttpClient httpClient) { + String phoneNumber = getTestPhoneNumber(PHONE_NUMBER); + StepVerifier.create( + beginUpdatePhoneNumberCapabilitiesHelper(httpClient, phoneNumber, "beginUpdatePhoneNumberCapabilities").last() + .flatMap((AsyncPollResponse result) -> { + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, result.getStatus()); + return result.getFinalResult(); + }) + ).assertNext((AcquiredPhoneNumber acquiredPhoneNumber) -> { + assertEquals(PhoneNumberCapabilityValue.INBOUND_OUTBOUND, acquiredPhoneNumber.getCapabilities().getSms()); + assertEquals(PhoneNumberCapabilityValue.INBOUND, acquiredPhoneNumber.getCapabilities().getCalling()); + }) + .verifyComplete(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void getPhoneNumberNullNumber(HttpClient httpClient) { + StepVerifier.create( + this.getClientWithConnectionString(httpClient, "getPhoneNumberNullNumber").getPhoneNumber(null) + ) + .verifyError(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void getPhoneNumberWithResponseNullNumber(HttpClient httpClient) { + StepVerifier.create( + this.getClientWithConnectionString(httpClient, "getPhoneNumberWithResponseNullNumber").getPhoneNumberWithResponse(null) + ) + .verifyError(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void beginSearchAvailablePhoneNumbersNullCountryCode(HttpClient httpClient) { + StepVerifier.create( + this.getClientWithConnectionString(httpClient, "beginSearchAvailablePhoneNumbersNullCountryCode") + .beginSearchAvailablePhoneNumbers(null, new PhoneNumberSearchRequest()) + ) + .verifyError(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void beginUpdatePhoneNumberCapabilitiesNullPhoneNumber(HttpClient httpClient) { + StepVerifier.create( + this.getClientWithConnectionString(httpClient, "beginUpdatePhoneNumberCapabilitiesNullPhoneNumber") + .beginUpdatePhoneNumberCapabilities(null, new PhoneNumberCapabilitiesRequest()) + ) + .verifyError(); + } + + private PollerFlux beginSearchAvailablePhoneNumbersHelper(HttpClient httpClient, String testName) { + PhoneNumberSearchRequest phoneNumberSearchRequest = new PhoneNumberSearchRequest(); + PhoneNumberCapabilities capabilities = new PhoneNumberCapabilities(); + capabilities.setCalling(PhoneNumberCapabilityValue.INBOUND); + capabilities.setSms(PhoneNumberCapabilityValue.INBOUND_OUTBOUND); + phoneNumberSearchRequest + .setAreaCode(AREA_CODE) + .setAssignmentType(PhoneNumberAssignmentType.APPLICATION) + .setPhoneNumberType(PhoneNumberType.TOLL_FREE) + .setCapabilities(capabilities) + .setQuantity(1); + + return this.getClientWithConnectionString(httpClient, testName) + .beginSearchAvailablePhoneNumbers(COUNTRY_CODE, phoneNumberSearchRequest).setPollInterval(Duration.ofSeconds(1)); + } + + private PollerFlux beginPurchasePhoneNumbersHelper(HttpClient httpClient, String searchId, String testName) { + return this.getClientWithConnectionString(httpClient, testName) + .beginPurchasePhoneNumbers(searchId).setPollInterval(Duration.ofSeconds(1)); + } + + private PollerFlux beginReleasePhoneNumberHelper(HttpClient httpClient, String phoneNumber, String testName) { + if (getTestMode() == TestMode.PLAYBACK) { + phoneNumber = "+REDACTED"; + } + return this.getClientWithConnectionString(httpClient, testName) + .beginReleasePhoneNumber(phoneNumber).setPollInterval(Duration.ofSeconds(1)); + } + + private PollerFlux beginUpdatePhoneNumberCapabilitiesHelper(HttpClient httpClient, String phoneNumber, String testName) { + PhoneNumberCapabilitiesRequest capabilitiesUpdateRequest = new PhoneNumberCapabilitiesRequest(); + capabilitiesUpdateRequest.setCalling(PhoneNumberCapabilityValue.INBOUND); + capabilitiesUpdateRequest.setSms(PhoneNumberCapabilityValue.INBOUND_OUTBOUND); + return this.getClientWithConnectionString(httpClient, testName) + .beginUpdatePhoneNumberCapabilities(phoneNumber, capabilitiesUpdateRequest).setPollInterval(Duration.ofSeconds(1)); + } + + private PhoneNumbersAsyncClient getClientWithConnectionString(HttpClient httpClient, String testName) { + PhoneNumbersClientBuilder builder = super.getClientBuilderWithConnectionString(httpClient); + return addLoggingPolicy(builder, testName).buildAsyncClient(); + } + + private PhoneNumbersAsyncClient getClientWithManagedIdentity(HttpClient httpClient, String testName) { + PhoneNumbersClientBuilder builder = super.getClientBuilderUsingManagedIdentity(httpClient); + return addLoggingPolicy(builder, testName).buildAsyncClient(); + } + + private String getTestPhoneNumber(String phoneNumber) { + if (getTestMode() == TestMode.PLAYBACK) { + phoneNumber = "+REDACTED"; + } + return phoneNumber; + } +} diff --git a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberClientBuilderTest.java b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersClientBuilderTest.java similarity index 92% rename from sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberClientBuilderTest.java rename to sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersClientBuilderTest.java index c841f61423a1..4fe6c113c51f 100644 --- a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberClientBuilderTest.java +++ b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersClientBuilderTest.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.communication.administration; +package com.azure.communication.phonenumbers; -import com.azure.communication.administration.implementation.PhoneNumberAdminClientImpl; +import com.azure.communication.phonenumbers.implementation.PhoneNumberAdminClientImpl; import com.azure.communication.common.implementation.HmacAuthenticationPolicy; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; @@ -28,21 +28,21 @@ import static org.mockito.Mockito.*; @Execution(value = ExecutionMode.SAME_THREAD) -public class PhoneNumberClientBuilderTest { +public class PhoneNumbersClientBuilderTest { private static final String ENDPOINT = "https://mycommunication.eastus.dev.communications.azure.net/"; private static final String ACCESSKEY = "QWNjZXNzS2V5"; private static final Map PROPERTIES = - CoreUtils.getProperties("azure-communication-administration.properties"); + CoreUtils.getProperties("azure-communication-phonenumbers.properties"); private static final String SDK_NAME = "name"; private static final String SDK_VERSION = "version"; private HttpClient httpClient; - private PhoneNumberClientBuilder clientBuilder; + private PhoneNumbersClientBuilder clientBuilder; @BeforeEach void setUp() { this.httpClient = mock(HttpClient.class); - this.clientBuilder = Mockito.spy(new PhoneNumberClientBuilder()); + this.clientBuilder = Mockito.spy(new PhoneNumbersClientBuilder()); } @AfterEach @@ -55,7 +55,7 @@ public void buildClientWithHttpClientWithCredential() { ClientBuilderSpyHelper spyHelper = new ClientBuilderSpyHelper(this.clientBuilder); // Build client with required settings - PhoneNumberClient phoneNumberClient = + PhoneNumbersClient phoneNumberClient = this.setupBuilderWithHttpClientWithCredential(this.clientBuilder).buildClient(); // Validate client created with expected settings @@ -69,7 +69,7 @@ public void buildClientWithCustomPipeline() { HttpPipeline httpPipeline = mock(HttpPipeline.class); // Build client with custom pipeline - PhoneNumberClient phoneNumberClient = + PhoneNumbersClient phoneNumberClient = this.setupBuilderCustomPipeline(httpPipeline).buildClient(); // Validate client created with expected settings @@ -83,7 +83,7 @@ public void buildClientWithLogOptions() { HttpLogOptions logOptions = mock(HttpLogOptions.class); // Build client with required settings and mock log options - PhoneNumberClient phoneNumberClient = this.setupBuilderWithHttpClientWithCredential(this.clientBuilder) + PhoneNumbersClient phoneNumberClient = this.setupBuilderWithHttpClientWithCredential(this.clientBuilder) .httpLogOptions(logOptions) .buildClient(); @@ -98,7 +98,7 @@ public void buildClientWithConfiguration() { Configuration configuration = mock(Configuration.class); // Build client with required settings and mock configuration - PhoneNumberClient phoneNumberClient = this.setupBuilderWithHttpClientWithCredential(this.clientBuilder) + PhoneNumbersClient phoneNumberClient = this.setupBuilderWithHttpClientWithCredential(this.clientBuilder) .configuration(configuration) .buildClient(); @@ -114,7 +114,7 @@ public void buildClientWithOneAdditionalPolicy() { additionalPolicies.add(mock(HttpPipelinePolicy.class)); // Build client with required settings and mock policies - PhoneNumberClient phoneNumberClient = + PhoneNumbersClient phoneNumberClient = this.setupBuilderWithPolicies(this.clientBuilder, additionalPolicies) .buildClient(); @@ -132,7 +132,7 @@ public void buildClientWithMultipleAdditionalPolicies() { additionalPolicies.add(mock(HttpPipelinePolicy.class)); // Build client with required settings and mock policies - PhoneNumberClient phoneNumberClient = + PhoneNumbersClient phoneNumberClient = this.setupBuilderWithPolicies(this.clientBuilder, additionalPolicies) .buildClient(); @@ -167,7 +167,7 @@ public void buildAsyncClientWithHttpClientWithCredential() { ClientBuilderSpyHelper spyHelper = new ClientBuilderSpyHelper(this.clientBuilder); // Build client with required settings - PhoneNumberAsyncClient phoneNumberAsyncClient = + PhoneNumbersAsyncClient phoneNumberAsyncClient = this.setupBuilderWithHttpClientWithCredential(this.clientBuilder).buildAsyncClient(); // Validate client created with expected settings @@ -181,7 +181,7 @@ public void buildAsyncClientWithCustomPipeline() { HttpPipeline httpPipeline = mock(HttpPipeline.class); // Build client with custom pipeline - PhoneNumberAsyncClient phoneNumberAsyncClient = + PhoneNumbersAsyncClient phoneNumberAsyncClient = this.setupBuilderCustomPipeline(httpPipeline).buildAsyncClient(); // Validate client created with expected settings @@ -195,7 +195,7 @@ public void buildAsyncClientWithLogOptions() { HttpLogOptions logOptions = mock(HttpLogOptions.class); // Build client with required settings and mock log options - PhoneNumberAsyncClient phoneNumberAsyncClient = + PhoneNumbersAsyncClient phoneNumberAsyncClient = this.setupBuilderWithHttpClientWithCredential(this.clientBuilder) .httpLogOptions(logOptions) .buildAsyncClient(); @@ -211,7 +211,7 @@ public void buildAsyncClientWithConfiguration() { Configuration configuration = mock(Configuration.class); // Build client with required settings and mock configuration - PhoneNumberAsyncClient phoneNumberAsyncClient = + PhoneNumbersAsyncClient phoneNumberAsyncClient = this.setupBuilderWithHttpClientWithCredential(this.clientBuilder) .configuration(configuration) .buildAsyncClient(); @@ -228,7 +228,7 @@ public void buildAsyncClientWithOneAdditionalPolicy() { additionalPolicies.add(mock(HttpPipelinePolicy.class)); // Build client with required settings and mock policies - PhoneNumberAsyncClient phoneNumberAsyncClient = + PhoneNumbersAsyncClient phoneNumberAsyncClient = this.setupBuilderWithPolicies(this.clientBuilder, additionalPolicies) .buildAsyncClient(); @@ -246,7 +246,7 @@ public void buildAsyncClientWithMultipleAdditionalPolicies() { additionalPolicies.add(mock(HttpPipelinePolicy.class)); // Build client with required settings and mock policies - PhoneNumberAsyncClient phoneNumberAsyncClient = + PhoneNumbersAsyncClient phoneNumberAsyncClient = this.setupBuilderWithPolicies(this.clientBuilder, additionalPolicies) .buildAsyncClient(); @@ -298,15 +298,15 @@ public void addPolicyNull() { }); } - private PhoneNumberClientBuilder setupBuilderWithHttpClientWithCredential(PhoneNumberClientBuilder clientBuilder) { + private PhoneNumbersClientBuilder setupBuilderWithHttpClientWithCredential(PhoneNumbersClientBuilder clientBuilder) { return clientBuilder .endpoint(ENDPOINT) .httpClient(this.httpClient) .accessKey(ACCESSKEY); } - private PhoneNumberClientBuilder setupBuilderWithPolicies( - PhoneNumberClientBuilder clientBuilder, List policies) { + private PhoneNumbersClientBuilder setupBuilderWithPolicies( + PhoneNumbersClientBuilder clientBuilder, List policies) { clientBuilder = this.setupBuilderWithHttpClientWithCredential(clientBuilder); for (HttpPipelinePolicy policy : policies) { clientBuilder.addPolicy(policy); @@ -315,7 +315,7 @@ private PhoneNumberClientBuilder setupBuilderWithPolicies( return clientBuilder; } - private PhoneNumberClientBuilder setupBuilderCustomPipeline(HttpPipeline pipeline) { + private PhoneNumbersClientBuilder setupBuilderCustomPipeline(HttpPipeline pipeline) { return clientBuilder .endpoint(ENDPOINT) .pipeline(pipeline); @@ -400,7 +400,7 @@ private void validateAdditionalPolicies(ClientBuilderSpyHelper spyHelper, List authenticationPolicyRef = new AtomicReference<>(); final AtomicReference userAgentPolicyRef = new AtomicReference<>(); @@ -416,7 +416,7 @@ private class ClientBuilderSpyHelper { final ArgumentCaptor uaPolicyConfigArg = ArgumentCaptor.forClass(Configuration.class); final ArgumentCaptor httpLogOptionsArg = ArgumentCaptor.forClass(HttpLogOptions.class); - ClientBuilderSpyHelper(PhoneNumberClientBuilder clientBuilder) { + ClientBuilderSpyHelper(PhoneNumbersClientBuilder clientBuilder) { this.clientBuilder = clientBuilder; this.initializeSpies(); } diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersClientIntegrationTest.java b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersClientIntegrationTest.java new file mode 100644 index 000000000000..4ea9b666586a --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersClientIntegrationTest.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.communication.phonenumbers; + +import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.time.Duration; + +import com.azure.communication.phonenumbers.models.AcquiredPhoneNumber; +import com.azure.communication.phonenumbers.models.PhoneNumberAssignmentType; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilities; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilitiesRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberCapabilityValue; +import com.azure.communication.phonenumbers.models.PhoneNumberOperation; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchRequest; +import com.azure.communication.phonenumbers.models.PhoneNumberSearchResult; +import com.azure.communication.phonenumbers.models.PhoneNumberType; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.test.TestMode; +import com.azure.core.util.Context; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.SyncPoller; + +public class PhoneNumbersClientIntegrationTest extends PhoneNumbersIntegrationTestBase { + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void getPhoneNumber(HttpClient httpClient) { + String phoneNumber = getTestPhoneNumber(PHONE_NUMBER); + AcquiredPhoneNumber number = this.getClientWithConnectionString(httpClient, "getPhoneNumber").getPhoneNumber(phoneNumber); + assertEquals(phoneNumber, number.getPhoneNumber()); + assertEquals(COUNTRY_CODE, number.getCountryCode()); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void getPhoneNumberWithAAD(HttpClient httpClient) { + String phoneNumber = getTestPhoneNumber(PHONE_NUMBER); + AcquiredPhoneNumber number = this.getClientWithManagedIdentity(httpClient, "getPhoneNumber").getPhoneNumber(phoneNumber); + assertEquals(phoneNumber, number.getPhoneNumber()); + assertEquals(COUNTRY_CODE, number.getCountryCode()); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void getPhoneNumberWithResponse(HttpClient httpClient) { + String phoneNumber = getTestPhoneNumber(PHONE_NUMBER); + Response response = this.getClientWithConnectionString(httpClient, "getPhoneNumberWithResponseSync") + .getPhoneNumberWithResponse(phoneNumber, Context.NONE); + AcquiredPhoneNumber number = response.getValue(); + assertEquals(200, response.getStatusCode()); + assertEquals(phoneNumber, number.getPhoneNumber()); + assertEquals(COUNTRY_CODE, number.getCountryCode()); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void listPhoneNumbers(HttpClient httpClient) { + PagedIterable numbers = this.getClientWithConnectionString(httpClient, "listPhoneNumbersSync").listPhoneNumbers(Context.NONE); + AcquiredPhoneNumber number = numbers.iterator().next(); + assertNotNull(number.getPhoneNumber()); + assertEquals(COUNTRY_CODE, number.getCountryCode()); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void beginSearchAvailablePhoneNumbers(HttpClient httpClient) { + PhoneNumberSearchResult searchResult = beginSearchAvailablePhoneNumbersHelper(httpClient, "beginSearchAvailablePhoneNumbers").getFinalResult(); + assertEquals(searchResult.getPhoneNumbers().size(), 1); + assertNotNull(searchResult.getSearchId()); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)") + public void beginPurchaseandReleasePhoneNumbers(HttpClient httpClient) { + PhoneNumberSearchResult searchResult = beginSearchAvailablePhoneNumbersHelper(httpClient, "beginPurchaseandReleasePhoneNumbers_beginSearchAvailablePhoneNumbersSync").getFinalResult(); + String phoneNumber = getTestPhoneNumber(searchResult.getPhoneNumbers().get(0)); + PollResponse purchaseOperationResponse = beginPurchasePhoneNumbersHelper(httpClient, searchResult.getSearchId(), "beginPurchasePhoneNumbersSync").waitForCompletion(); + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, purchaseOperationResponse.getStatus()); + PollResponse releaseOperationResponse = beginReleasePhoneNumberHelper(httpClient, phoneNumber, "beginReleasePhoneNumberSunc").waitForCompletion(); + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, releaseOperationResponse.getStatus()); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void beginUpdatePhoneNumberCapabilities(HttpClient httpClient) { + String phoneNumber = getTestPhoneNumber(PHONE_NUMBER); + AcquiredPhoneNumber acquiredPhoneNumber = beginUpdatePhoneNumberCapabilitiesHelper(httpClient, phoneNumber, "beginUpdatePhoneNumberCapabilitiesSync").getFinalResult(); + assertEquals(PhoneNumberCapabilityValue.INBOUND_OUTBOUND, acquiredPhoneNumber.getCapabilities().getSms()); + assertEquals(PhoneNumberCapabilityValue.INBOUND, acquiredPhoneNumber.getCapabilities().getCalling()); + } + + private SyncPoller beginSearchAvailablePhoneNumbersHelper(HttpClient httpClient, String testName) { + PhoneNumberSearchRequest phoneNumberSearchRequest = new PhoneNumberSearchRequest(); + PhoneNumberCapabilities capabilities = new PhoneNumberCapabilities(); + capabilities.setCalling(PhoneNumberCapabilityValue.INBOUND); + capabilities.setSms(PhoneNumberCapabilityValue.INBOUND_OUTBOUND); + phoneNumberSearchRequest + .setAreaCode(AREA_CODE) + .setAssignmentType(PhoneNumberAssignmentType.APPLICATION) + .setPhoneNumberType(PhoneNumberType.TOLL_FREE) + .setCapabilities(capabilities) + .setQuantity(1); + return getClientWithConnectionString(httpClient, testName).beginSearchAvailablePhoneNumbers(COUNTRY_CODE, phoneNumberSearchRequest, Context.NONE); + } + + private SyncPoller beginPurchasePhoneNumbersHelper(HttpClient httpClient, String searchId, String testName) { + return this.getClientWithConnectionString(httpClient, testName) + .beginPurchasePhoneNumbers(searchId, Context.NONE).setPollInterval(Duration.ofSeconds(1)); + } + + private SyncPoller beginReleasePhoneNumberHelper(HttpClient httpClient, String phoneNumber, String testName) { + if (getTestMode() == TestMode.PLAYBACK) { + phoneNumber = "+REDACTED"; + } + return this.getClientWithConnectionString(httpClient, testName) + .beginReleasePhoneNumber(phoneNumber, Context.NONE).setPollInterval(Duration.ofSeconds(1)); + } + + private SyncPoller beginUpdatePhoneNumberCapabilitiesHelper(HttpClient httpClient, String phoneNumber, String testName) { + PhoneNumberCapabilitiesRequest capabilitiesUpdateRequest = new PhoneNumberCapabilitiesRequest(); + capabilitiesUpdateRequest.setCalling(PhoneNumberCapabilityValue.INBOUND); + capabilitiesUpdateRequest.setSms(PhoneNumberCapabilityValue.INBOUND_OUTBOUND); + return this.getClientWithConnectionString(httpClient, testName) + .beginUpdatePhoneNumberCapabilities(phoneNumber, capabilitiesUpdateRequest, Context.NONE).setPollInterval(Duration.ofSeconds(1)); + } + + private PhoneNumbersClient getClientWithConnectionString(HttpClient httpClient, String testName) { + PhoneNumbersClientBuilder builder = super.getClientBuilderWithConnectionString(httpClient); + return addLoggingPolicy(builder, testName).buildClient(); + } + + private PhoneNumbersClient getClientWithManagedIdentity(HttpClient httpClient, String testName) { + PhoneNumbersClientBuilder builder = super.getClientBuilderUsingManagedIdentity(httpClient); + return addLoggingPolicy(builder, testName).buildClient(); + } + + private String getTestPhoneNumber(String phoneNumber) { + if (getTestMode() == TestMode.PLAYBACK) { + phoneNumber = "+REDACTED"; + } + return phoneNumber; + } +} diff --git a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberIntegrationTestBase.java b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersIntegrationTestBase.java similarity index 70% rename from sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberIntegrationTestBase.java rename to sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersIntegrationTestBase.java index f2a50181414f..e0f49cb8dbc9 100644 --- a/sdk/communication/azure-communication-administration/src/test/java/com/azure/communication/administration/PhoneNumberIntegrationTestBase.java +++ b/sdk/communication/azure-communication-phonenumbers/src/test/java/com/azure/communication/phonenumbers/PhoneNumbersIntegrationTestBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.communication.administration; +package com.azure.communication.phonenumbers; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -23,46 +23,35 @@ import reactor.core.publisher.Mono; -public class PhoneNumberIntegrationTestBase extends TestBase { +public class PhoneNumbersIntegrationTestBase extends TestBase { private static final String ENV_ACCESS_KEY = Configuration.getGlobalConfiguration().get("COMMUNICATION_SERVICE_ACCESS_KEY", "QWNjZXNzS2V5"); private static final String ENV_ENDPOINT = Configuration.getGlobalConfiguration().get("COMMUNICATION_SERVICE_ENDPOINT", "https://REDACTED.communication.azure.com"); private static final String CONNECTION_STRING = Configuration.getGlobalConfiguration() .get("COMMUNICATION_LIVETEST_CONNECTION_STRING", "endpoint=https://REDACTED.communication.azure.com/;accesskey=QWNjZXNzS2V5"); - - protected static final String PHONE_NUMBER = - Configuration.getGlobalConfiguration().get("COMMUNICATION_PHONE_NUMBER", "+11234567891"); protected static final String COUNTRY_CODE = Configuration.getGlobalConfiguration().get("COUNTRY_CODE", "US"); protected static final String AREA_CODE = - Configuration.getGlobalConfiguration().get("AREA_CODE", "619"); - protected static final String LOCALE = - Configuration.getGlobalConfiguration().get("LOCALE", "en-us"); - protected static final String LOCATION_OPTION_STATE = - Configuration.getGlobalConfiguration().get("LOCATION_OPTION_STATE", "CA"); - protected static final String LOCATION_OPTION_CITY = - Configuration.getGlobalConfiguration().get("LOCATION_OPTION_CITY", "NOAM-US-CA-SD"); - protected static final String RESERVATION_OPTIONS_DESCRIPTION = - Configuration.getGlobalConfiguration().get("RESERVATION_OPTIONS_DESCRIPTION", "testReservation20200014"); - protected static final String RESERVATION_OPTIONS_NAME = - Configuration.getGlobalConfiguration().get("RESERVATION_OPTIONS_NAME", "testReservation20200014"); - - private static final StringJoiner JSON_PROPERTIES_TO_REDACT - = new StringJoiner("\":\"|\"", "\"", "\":\"") - .add("phonePlanGroupId") - .add("phonePlanId"); - - private static final Pattern JSON_PROPERTY_VALUE_REDACTION_PATTERN - = Pattern.compile(String.format("(?:%s)(.*?)(?:\",|\"})", JSON_PROPERTIES_TO_REDACT.toString()), - Pattern.CASE_INSENSITIVE); - - protected PhoneNumberClientBuilder getClientBuilder(HttpClient httpClient) { + Configuration.getGlobalConfiguration().get("AREA_CODE", "833"); + + protected static final String PHONE_NUMBER = + Configuration.getGlobalConfiguration().get("COMMUNICATION_PHONE_NUMBER", "+11234567891"); + + private static final StringJoiner JSON_PROPERTIES_TO_REDACT = + new StringJoiner("\":\"|\"", "\"", "\":\"") + .add("id") + .add("phoneNumber"); + + private static final Pattern JSON_PROPERTY_VALUE_REDACTION_PATTERN = + Pattern.compile(String.format("(?:%s)(.*?)(?:\",|\"})", JSON_PROPERTIES_TO_REDACT.toString()), Pattern.CASE_INSENSITIVE); + + protected PhoneNumbersClientBuilder getClientBuilder(HttpClient httpClient) { if (getTestMode() == TestMode.PLAYBACK) { httpClient = interceptorManager.getPlaybackClient(); } - PhoneNumberClientBuilder builder = new PhoneNumberClientBuilder(); + PhoneNumbersClientBuilder builder = new PhoneNumbersClientBuilder(); builder .httpClient(httpClient) .endpoint(ENV_ENDPOINT) @@ -77,13 +66,12 @@ protected PhoneNumberClientBuilder getClientBuilder(HttpClient httpClient) { return builder; } - protected PhoneNumberClientBuilder getClientBuilderWithConnectionString(HttpClient httpClient) { - + protected PhoneNumbersClientBuilder getClientBuilderWithConnectionString(HttpClient httpClient) { if (getTestMode() == TestMode.PLAYBACK) { httpClient = interceptorManager.getPlaybackClient(); } - PhoneNumberClientBuilder builder = new PhoneNumberClientBuilder(); + PhoneNumbersClientBuilder builder = new PhoneNumbersClientBuilder(); builder .httpClient(httpClient) .connectionString(CONNECTION_STRING); @@ -97,8 +85,8 @@ protected PhoneNumberClientBuilder getClientBuilderWithConnectionString(HttpClie return builder; } - protected PhoneNumberClientBuilder getClientBuilderUsingManagedIdentity(HttpClient httpClient) { - PhoneNumberClientBuilder builder = new PhoneNumberClientBuilder(); + protected PhoneNumbersClientBuilder getClientBuilderUsingManagedIdentity(HttpClient httpClient) { + PhoneNumbersClientBuilder builder = new PhoneNumbersClientBuilder(); builder .endpoint(new CommunicationConnectionString(CONNECTION_STRING).getEndpoint()) .httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient); @@ -110,12 +98,24 @@ protected PhoneNumberClientBuilder getClientBuilderUsingManagedIdentity(HttpClie } if (getTestMode() == TestMode.RECORD) { - builder.addPolicy(interceptorManager.getRecordPolicy()); + List> redactors = new ArrayList<>(); + redactors.add(data -> redact(data, JSON_PROPERTY_VALUE_REDACTION_PATTERN.matcher(data), "REDACTED")); + builder.addPolicy(interceptorManager.getRecordPolicy(redactors)); } return builder; } + protected PhoneNumbersClientBuilder addLoggingPolicy(PhoneNumbersClientBuilder builder, String testName) { + return builder.addPolicy(new CommunicationLoggerPolicy(testName)); + } + static class FakeCredentials implements TokenCredential { + @Override + public Mono getToken(TokenRequestContext tokenRequestContext) { + return Mono.just(new AccessToken("someFakeToken", OffsetDateTime.MAX)); + } + } + private String redact(String content, Matcher matcher, String replacement) { while (matcher.find()) { String captureGroup = matcher.group(1); @@ -126,14 +126,4 @@ private String redact(String content, Matcher matcher, String replacement) { return content; } - - protected PhoneNumberClientBuilder addLoggingPolicy(PhoneNumberClientBuilder builder, String testName) { - return builder.addPolicy(new CommunicationLoggerPolicy(testName)); - } - static class FakeCredentials implements TokenCredential { - @Override - public Mono getToken(TokenRequestContext tokenRequestContext) { - return Mono.just(new AccessToken("someFakeToken", OffsetDateTime.MAX)); - } - } } diff --git a/sdk/communication/azure-communication-administration/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/sdk/communication/azure-communication-phonenumbers/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker similarity index 100% rename from sdk/communication/azure-communication-administration/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker rename to sdk/communication/azure-communication-phonenumbers/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginPurchaseandReleasePhoneNumbers.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginPurchaseandReleasePhoneNumbers.json new file mode 100644 index 000000000000..d56c08eea99a --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginPurchaseandReleasePhoneNumbers.json @@ -0,0 +1,627 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Processing-Time" : "1545ms", + "MS-CV" : "Snf4MO9cHEWkFUfm+4Ly4A.0", + "operation-id" : "search_9dcfff9e-0826-46ba-af4e-6e364a4d64d9", + "retry-after" : "0", + "search-id" : "9dcfff9e-0826-46ba-af4e-6e364a4d64d9", + "X-Azure-Ref" : "0AqslYAAAAABaJq8zOh5ZRqAh67E3EeO3WVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Content-Length" : "0", + "StatusCode" : "202", + "Operation-Location" : "/phoneNumbers/operations/search_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Date" : "Thu, 11 Feb 2021 22:09:07 GMT", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "632ms", + "MS-CV" : "dLZ9/hPq10WslpTryP+kkQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0B6slYAAAAACD3KNc2gpHSLXZZVxMELljWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:11 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "400ms", + "MS-CV" : "9mT8kthrQEiWRWz/bDrPjw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0CaslYAAAAABNYwdoJEyrQphU/mlAqfKwWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:13 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "710ms", + "MS-CV" : "4i8SGz4AKkG8O+wv3AI7VQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0D6slYAAAAABOVQytOjqARbV8Syrd1+viWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:19 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "475ms", + "MS-CV" : "MQjWulmwb0SAW2DpfrApZw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0EKslYAAAAABsLWKy64d0Q7mmZCq82J0/WVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"searchId\":\"9dcfff9e-0826-46ba-af4e-6e364a4d64d9\",\"phoneNumbers\":[\"+REDACTED\"],\"phoneNumberType\":\"TollFree\",\"assignmentType\":\"Application\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"cost\":{\"amount\":0.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"},\"searchExpiresBy\":\"2021-02-11T22:25:13.5400685+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:20 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/:purchase?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Processing-Time" : "1033ms", + "MS-CV" : "OHCEEDWsz0ipzdkCaP/Jig.0", + "operation-id" : "purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9", + "purchase-id" : "9dcfff9e-0826-46ba-af4e-6e364a4d64d9", + "retry-after" : "0", + "X-Azure-Ref" : "0EaslYAAAAACI1Eye1tXJTqRUAvOpm8nUWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Content-Length" : "0", + "StatusCode" : "202", + "Operation-Location" : "/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Date" : "Thu, 11 Feb 2021 22:09:21 GMT", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "462ms", + "MS-CV" : "UCVJMgRZPkmQe6UMBaY8ng.0", + "retry-after" : "0", + "X-Azure-Ref" : "0EqslYAAAAADRMCYNaPBsRrUxYK6+k3z4WVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:22 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "554ms", + "MS-CV" : "KzZKbi4Pk0uqb+ISaETtRA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0E6slYAAAAAAj4c6ilxJEQLjwD3oCnZXOWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:23 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "529ms", + "MS-CV" : "ODlqmnc6gk6HI+0kUR38/g.0", + "retry-after" : "0", + "X-Azure-Ref" : "0IKslYAAAAAAljmRssHtjSawRpv+PxhnaWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:36 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "421ms", + "MS-CV" : "B+p02viCAkKKS22oJ0O+dw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0JKslYAAAAAC5ZNAODfzOQaYuPjLOxOgaWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:40 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "666ms", + "MS-CV" : "z1TP7ntDo0COEzztrR0cHA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0J6slYAAAAADKEBPsTL47R5sMm6KHUZPgWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:43 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "1475ms", + "MS-CV" : "LGXVi7qVBUab3qGoYrO68g.0", + "retry-after" : "0", + "X-Azure-Ref" : "0KqslYAAAAADqeP06q6SnTJWFw3Pi+dEZWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:47 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/purchase_9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "402ms", + "MS-CV" : "4PnlzbzaEUm7xsiwEaySKA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0MKslYAAAAADGf7p0gHAvTqLmC82ApQHoWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:07.280174+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Purchase\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:51 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/9dcfff9e-0826-46ba-af4e-6e364a4d64d9?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "release-id" : "7daef158-fe12-48f3-adcf-ae63349e5dbd", + "X-Processing-Time" : "681ms", + "MS-CV" : "JZFpBAl8B0uhlD3OmM47Sg.0", + "operation-id" : "release_7daef158-fe12-48f3-adcf-ae63349e5dbd", + "retry-after" : "0", + "X-Azure-Ref" : "0NaslYAAAAADhRpIx1uqWTJByEc3+Qq0hWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "204", + "Operation-Location" : "/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Date" : "Thu, 11 Feb 2021 22:09:57 GMT", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "284ms", + "MS-CV" : "DfTdxsc+QU2hDEQ1rI3nUQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0N6slYAAAAAB+73TOSmgHR5Mp7F9S0WJ4WVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:09:59 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "264ms", + "MS-CV" : "rfPYVuWcckSdFdbxO86sYQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0OKslYAAAAAB/IATQ2FtTQ6sE5JXLZbPWWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:00 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "272ms", + "MS-CV" : "dE01gU2CWUqvxhFxavGwWQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0OqslYAAAAABxS82bXDSUTZEshS7sUbCmWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:02 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "266ms", + "MS-CV" : "mW78CTP39UewVmYTX0Mm7w.0", + "retry-after" : "0", + "X-Azure-Ref" : "0O6slYAAAAACYYJ9v23YnR4pNUfd4+eNmWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:02 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "304ms", + "MS-CV" : "CuRjilFduUyleSiZE/aq2A.0", + "retry-after" : "0", + "X-Azure-Ref" : "0PKslYAAAAADukoF2eWwUSqR4WgyjqHlpWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:04 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "267ms", + "MS-CV" : "LeLpHedDKUGJSJKX+vassg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0PqslYAAAAADRd3XQFJ6aTpLHo//+GJkWWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:05 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "258ms", + "MS-CV" : "3G50u5szYkKY+Sgn5hRBwQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0P6slYAAAAAC4GbND5vRHQJCPGz77Q1auWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:07 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "557ms", + "MS-CV" : "8FBzdBGyq02pfuI4uEiPsQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0QKslYAAAAAAUihbgQyMnQryKcwnqjjlKWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:09 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "278ms", + "MS-CV" : "i4yJl+6Q+0qJvkfDD7wjCg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0QqslYAAAAABIx/EzujlZQ7hAKvicgTVnWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:10 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "256ms", + "MS-CV" : "ezx3Pvs9uk2QsHBbGEGZpQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0Q6slYAAAAAD681+D5zx6TZw7Y3L1TtnWWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:11 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "1391ms", + "MS-CV" : "eXCIYJcCJE6RcgOmyWBmTA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0RKslYAAAAADLSiU3WDf9Sbo3qtpGVWWxWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:14 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "274ms", + "MS-CV" : "oc/SaQOlZk2FmuhumRJi7A.0", + "retry-after" : "0", + "X-Azure-Ref" : "0R6slYAAAAACQ4uKeQzBCQ5nBl5jp8QhpWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:15 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "283ms", + "MS-CV" : "Ru6w6ycQO0260LkFx1UkQw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0SKslYAAAAAAVj0OYybI8Rb7hUlP8sopIWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:16 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "259ms", + "MS-CV" : "xRPlOSQenUaoY/a3AyFqcg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0SqslYAAAAAA1QIP2uwUDQZRsa2Cu4LkMWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:18 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "260ms", + "MS-CV" : "agQ7vmjoNUWZsdBMa1CDFw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0S6slYAAAAACKSJgdLXE4TKIsjWYx0qZKWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:19 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "305ms", + "MS-CV" : "17CS355Qg02doECttokEfg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0TKslYAAAAABQqCzgI+3GR7jy8Db+1yQtWVZSMzBFREdFMDQxMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:20 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/release_7daef158-fe12-48f3-adcf-ae63349e5dbd?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "262ms", + "MS-CV" : "COmpd8JnCEO4A2m9DdG4Jw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0TqslYAAAAADmpjxFHuPPR43xx4UzfTFaWVZSMzBFREdFMDQxOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:09:57.7859205+00:00\",\"id\":\"REDACTED\",\"operationType\":\"ReleasePhoneNumber\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:10:21 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbers.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbers.json new file mode 100644 index 000000000000..1a82581132b7 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbers.json @@ -0,0 +1,85 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Processing-Time" : "3939ms", + "MS-CV" : "wnFxFrForketwVGvKpBv9A.0", + "operation-id" : "search_2c977e89-c4c3-4946-b226-c152e1a54d75", + "retry-after" : "0", + "search-id" : "2c977e89-c4c3-4946-b226-c152e1a54d75", + "X-Azure-Ref" : "0NaolYAAAAAAMuPw3mHF7QooGn/LBmQklWVZSMzBFREdFMDMxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Content-Length" : "0", + "StatusCode" : "202", + "Operation-Location" : "/phoneNumbers/operations/search_2c977e89-c4c3-4946-b226-c152e1a54d75?api-version=2021-03-07", + "Date" : "Thu, 11 Feb 2021 22:05:45 GMT", + "Location" : "/availablePhoneNumbers/searchResults/2c977e89-c4c3-4946-b226-c152e1a54d75?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_2c977e89-c4c3-4946-b226-c152e1a54d75?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "955ms", + "MS-CV" : "WZL/ffX2o0qSU8uhVJ/ZWg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0YKolYAAAAADijpFARA/lT7o09gJdwORRWVZSMzBFREdFMDMxNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:05:45.0467307+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:06:24 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/2c977e89-c4c3-4946-b226-c152e1a54d75?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/search_2c977e89-c4c3-4946-b226-c152e1a54d75?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "1456ms", + "MS-CV" : "i57a58dqJUGx3PNJl07jpA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0YqolYAAAAABv7qspOxf8Tqo3wTw1mSJDWVZSMzBFREdFMDMxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:05:45.0467307+00:00\",\"id\":\"REDACTED\",\"operationType\":\"Search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:06:26 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/availablePhoneNumbers/searchResults/2c977e89-c4c3-4946-b226-c152e1a54d75?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/availablePhoneNumbers/searchResults/2c977e89-c4c3-4946-b226-c152e1a54d75?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "1447ms", + "MS-CV" : "y6f3rdheV0KRek1gNiadrg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0baolYAAAAADiaUQWWhXIRZ0vkXzZZPDTWVZSMzBFREdFMDMxNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"searchId\":\"2c977e89-c4c3-4946-b226-c152e1a54d75\",\"phoneNumbers\":[\"+REDACTED\"],\"phoneNumberType\":\"TollFree\",\"assignmentType\":\"Application\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"cost\":{\"amount\":0.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"Monthly\"},\"searchExpiresBy\":\"2021-02-11T22:21:55.6463004+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:06:38 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/cancelReservationWithResponseNullReservationId.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbersNullCountryCode.json similarity index 100% rename from sdk/communication/azure-communication-administration/src/test/resources/session-records/cancelReservationWithResponseNullReservationId.json rename to sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginSearchAvailablePhoneNumbersNullCountryCode.json diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginUpdatePhoneNumberCapabilities.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginUpdatePhoneNumberCapabilities.json new file mode 100644 index 000000000000..8cfb012f0dc5 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginUpdatePhoneNumberCapabilities.json @@ -0,0 +1,247 @@ +{ + "networkCallRecords" : [ { + "Method" : "PATCH", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/+REDACTED/capabilities?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/merge-patch+json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "capabilities-id" : "c974e32d-9234-4dad-b066-3cc58b93c11a", + "operation-id" : "capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 11 Feb 2021 22:13:50 GMT", + "X-Processing-Time" : "1519ms", + "MS-CV" : "ZbTIZvyVhU62R7K5M5lzCQ.0", + "X-Azure-Ref" : "0HawlYAAAAADGWCb8mkrqRJuMIlG/XPpUWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Operation-Location" : "/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Body" : "{\"capabilitiesUpdateId\":\"c974e32d-9234-4dad-b066-3cc58b93c11a\"}", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "592ms", + "MS-CV" : "QKaP/I4XxUy5hIZqRJOkkA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0H6wlYAAAAACxhaSa8uguQa16yJCarnzfWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:51 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "403ms", + "MS-CV" : "9Yf9OGxwfkeSmWbb/O1nDA.0", + "retry-after" : "0", + "X-Azure-Ref" : "0IawlYAAAAADG22i0AJeATJdXQ9Tzg8pLWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"NotStarted\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:53 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "524ms", + "MS-CV" : "7uydKGrPiEGqZT8Q2FPRSQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0IqwlYAAAAACcNZxMRb59Rpg6g7bmK28/WVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:55 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "404ms", + "MS-CV" : "eRIk7skN6E+yoaFPSMieSg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0JKwlYAAAAABMT7rlRq80Q5gq7yQcbWjNWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:56 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "419ms", + "MS-CV" : "Pm0BRZnswkqAvohCTfJkcQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0JawlYAAAAABI8CFEM8YQT6lZhqUXyPRVWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:57 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "643ms", + "MS-CV" : "lu3RSnxB4EOeBBNkMOSGBw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0J6wlYAAAAAC8I5Stp32nRacWZmBQSgOqWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:13:59 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "416ms", + "MS-CV" : "bMx39srWo0iIC3VM/yi0oQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0KawlYAAAAADC24rCb7arQIELQ6XVJLkkWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:14:01 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "457ms", + "MS-CV" : "rhie9rMaXkSUmgYJT3/+8A.0", + "retry-after" : "0", + "X-Azure-Ref" : "0KqwlYAAAAABzLnoMIb1uRr476n7FNG2zWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:14:02 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "583ms", + "MS-CV" : "VG1Vr2rLfUu1S8unpo/Wiw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0K6wlYAAAAABMWKzVQ9g0RaLha+DPzEOHWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Running\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:14:04 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/operations/capabilities_c974e32d-9234-4dad-b066-3cc58b93c11a?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "405ms", + "MS-CV" : "/m3VZIQXk02o0R8jmjdTyw.0", + "retry-after" : "0", + "X-Azure-Ref" : "0LawlYAAAAADXltbEq9VCS4u+3znTuyBMWVZSMzBFREdFMDMwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"status\":\"Succeeded\",\"resourceLocation\":null,\"createdDateTime\":\"2021-02-11T22:13:50.8167258+00:00\",\"id\":\"REDACTED\",\"operationType\":\"UpdatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "Date" : "Thu, 11 Feb 2021 22:14:05 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Location" : "/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Request-Context" : "appId=" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "2213ms", + "MS-CV" : "38ilz5YlEkmqQzhzZv/pmg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0LqwlYAAAAAD5WSzhjdujTLf3Cy/HNfF7WVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\"}", + "Date" : "Thu, 11 Feb 2021 22:14:07 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/cancelReservationWithResponseNullSearchId.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginUpdatePhoneNumberCapabilitiesNullPhoneNumber.json similarity index 100% rename from sdk/communication/azure-communication-administration/src/test/resources/session-records/cancelReservationWithResponseNullSearchId.json rename to sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/beginUpdatePhoneNumberCapabilitiesNullPhoneNumber.json diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumber.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumber.json new file mode 100644 index 000000000000..33d1e7b1707b --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumber.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "787ms", + "MS-CV" : "pXMEoFEBvEOfJnbgcmO06A.0", + "retry-after" : "0", + "X-Azure-Ref" : "00CkjYAAAAAD5W8ewZj2aR5OQQCmDuuhgWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"callbackUri\":null,\"applicationId\":null}", + "Date" : "Wed, 10 Feb 2021 00:33:20 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberWithResponseNullPhoneNumber.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumberNullNumber.json similarity index 100% rename from sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberWithResponseNullPhoneNumber.json rename to sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumberNullNumber.json diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumberWithAAD.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumberWithAAD.json new file mode 100644 index 000000000000..427b72266928 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumberWithAAD.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "910ms", + "MS-CV" : "e7GKUQTTFkO36SJ5b6Ekug.0", + "retry-after" : "0", + "X-Azure-Ref" : "0JzQkYAAAAAAPBlGa0k/xSqL6UZBVGGUXWVZSMzBFREdFMDMyMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"callbackUri\":null,\"applicationId\":null}", + "Date" : "Wed, 10 Feb 2021 19:29:43 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumberWithResponse.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumberWithResponse.json new file mode 100644 index 000000000000..1d5dee3ca2ac --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumberWithResponse.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers/+REDACTED?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "520ms", + "MS-CV" : "4lmk8XZlH0m0hJMmw7TcUg.0", + "retry-after" : "0", + "X-Azure-Ref" : "0/SkjYAAAAABxp6rucnzVRIr2saSQyuohWVZSMzBFREdFMDQxNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"callbackUri\":null,\"applicationId\":null}", + "Date" : "Wed, 10 Feb 2021 00:34:06 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberWithResponseNullPstnConfig.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumberWithResponseNullNumber.json similarity index 100% rename from sdk/communication/azure-communication-administration/src/test/resources/session-records/configureNumberWithResponseNullPstnConfig.json rename to sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/getPhoneNumberWithResponseNullNumber.json diff --git a/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/listPhoneNumbers.json b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/listPhoneNumbers.json new file mode 100644 index 000000000000..48aaef94150a --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/src/test/resources/session-records/listPhoneNumbers.json @@ -0,0 +1,23 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.communication.azure.com/phoneNumbers?api-version=2021-03-07", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-phonenumbers/1.0.0-beta.5 (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Processing-Time" : "939ms", + "MS-CV" : "HV8033/4fkmG2xfJDoqrHQ.0", + "retry-after" : "0", + "X-Azure-Ref" : "0LyojYAAAAACQrZDuFxaTT5dYEkXKolhDWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "StatusCode" : "200", + "Body" : "{\"phoneNumbers\":[{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"Geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"User\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"outbound\"},\"assignmentType\":\"Application\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"Application\",\"callbackUri\":null,\"applicationId\":null},{\"id\":\"REDACTED\",\"phoneNumber\":\"+REDACTED\",\"countryCode\":\"US\",\"phoneNumberType\":\"TollFree\",\"capabilities\":{\"calling\":\"inbound+outbound\",\"sms\":\"none\"},\"assignmentType\":\"Application\",\"callbackUri\":null,\"applicationId\":null}]}", + "Date" : "Wed, 10 Feb 2021 00:34:56 GMT", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-phonenumbers/swagger/README.md b/sdk/communication/azure-communication-phonenumbers/swagger/README.md new file mode 100644 index 000000000000..278c32547be1 --- /dev/null +++ b/sdk/communication/azure-communication-phonenumbers/swagger/README.md @@ -0,0 +1,97 @@ +# Azure Communication Phone Numbers library for Java + +> see https://aka.ms/autorest +## Getting Started + +To build the SDK for Communication Phone Numbers library, simply Install AutoRest and in this folder, run: + +### Setup +```ps +Fork and clone https://github.com/Azure/autorest.java +git checkout v4 +git submodule update --init --recursive +mvn package -Dlocal +npm install +npm install -g autorest +``` + +### Generation +```ps +cd +autorest README.md --java --v4 --use=@autorest/java@4.0.2 +``` + +### Code generation settings +``` yaml +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/e23190a5bc64cd8526d08b6c2c1d616939bc88b3/specification/communication/data-plane/Microsoft.CommunicationServicesPhoneNumbers/stable/2021-03-07/phonenumbers.json +override-client-name: PhoneNumberAdminClient +custom-types: AcquiredPhoneNumber,BillingFrequency,CommunicationError,PhoneNumberOperation,PhoneNumberOperationStatus,PhoneNumberOperationStatusCodes,PhoneNumberOperationType,PhoneNumberUpdateRequest,PhoneNumberAssignmentType,PhoneNumberCapabilities,PhoneNumberCapabilitiesRequest,PhoneNumberCapabilityValue,PhoneNumberCost,PhoneNumberSearchRequest,PhoneNumberSearchResult,PhoneNumberType +custom-types-subpackage: models +models-subpackage: implementation.models +java: true +output-folder: ..\ +license-header: MICROSOFT_MIT_SMALL +namespace: com.azure.communication.phonenumbers +generate-client-as-impl: true +sync-methods: all +context-client-method-parameter: true +``` + +### Add readonly attribute to AcquiredPhoneNumber properties +```yaml +directive: + - from: swagger-document + where: $.definitions.AcquiredPhoneNumber + transform: > + $["properties"]["id"].readOnly = true; + $["properties"]["phoneNumber"].readOnly = true; + $["properties"]["phoneNumberType"].readOnly = true; + $["properties"]["countryCode"].readOnly = true; + $["properties"]["capabilities"].readOnly = true; + $["properties"]["assignmentType"].readOnly = true; + $["properties"]["purchaseDate"].readOnly = true; + $["properties"]["callbackUri"].readOnly = true; + $["properties"]["applicationId"].readOnly = true; + $["properties"]["cost"].readOnly = true; +``` + +### Add readonly attribute to PhoneNumberCost properties +```yaml +directive: + - from: swagger-document + where: $.definitions.PhoneNumberCost + transform: > + $["properties"]["amount"].readOnly = true; + $["properties"]["currencyCode"].readOnly = true; + $["properties"]["billingFrequency"].readOnly = true; +``` + +### Add readonly attribute to PhoneNumberOperation properties +```yaml $(java) +directive: + - from: swagger-document + where: $.definitions.PhoneNumberOperation + transform: > + $["properties"]["status"].readOnly = true; + $["properties"]["resourceLocation"].readOnly = true; + $["properties"]["createdDateTime"].readOnly = true; + $["properties"]["error"].readOnly = true; + $["properties"]["id"].readOnly = true; + $["properties"]["operationType"].readOnly = true; + $["properties"]["lastActionDateTime"].readOnly = true; +``` + +### Add readonly attribute to PhoneNumberSearchResult properties +```yaml +directive: + - from: swagger-document + where: $.definitions.PhoneNumberSearchResult + transform: > + $["properties"]["searchId"].readOnly = true; + $["properties"]["phoneNumbers"].readOnly = true; + $["properties"]["cost"].readOnly = true; + $["properties"]["searchExpiresBy"].readOnly = true; + $["properties"]["phoneNumberType"].readOnly = true; + $["properties"]["assignmentType"].readOnly = true; + $["properties"]["capabilities"].readOnly = true; +``` diff --git a/sdk/communication/ci.yml b/sdk/communication/ci.yml index 612504fd2cde..20a6cdb2de0a 100644 --- a/sdk/communication/ci.yml +++ b/sdk/communication/ci.yml @@ -41,3 +41,7 @@ extends: - name: azure-communication-identity groupId: com.azure safeName: azurecommunicationidentity + - name: azure-communication-phonenumbers + groupId: com.azure + safeName: azurecommunicationphonenumbers + diff --git a/sdk/communication/pom.xml b/sdk/communication/pom.xml index 46ab552bf297..3f944cc81696 100644 --- a/sdk/communication/pom.xml +++ b/sdk/communication/pom.xml @@ -18,6 +18,8 @@ azure-communication-sms azure-communication-chat azure-communication-administration + azure-communication-phonenumbers + @@ -46,6 +48,11 @@ azure-communication-identity 1.0.0-beta.5 + + com.azure + azure-communication-phonenumbers + 1.0.0-beta.5 + @@ -59,6 +66,7 @@ com/azure/communication/chat/*.class com/azure/communication/sms/*.class com/azure/communication/administration/*.class + com/azure/communication/phonenumbers/*.class @@ -87,6 +95,7 @@ azure-communication-identity azure-communication-sms azure-communication-chat + azure-communication-phonenumbers azure-communication-administration diff --git a/sdk/communication/tests.yml b/sdk/communication/tests.yml index 4788750c6a4a..e3a5b71a94a7 100644 --- a/sdk/communication/tests.yml +++ b/sdk/communication/tests.yml @@ -16,6 +16,9 @@ stages: - name: azure-communication-identity groupId: com.azure safeName: azurecommunicationidentity + - name: azure-communication-phonenumbers + groupId: com.azure + safeName: azurecommunicationphonenumbers ServiceDirectory: communication PostSteps: - task: Maven@3