// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.maps.search.implementation;

import com.azure.core.annotation.BodyParam;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
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.exception.HttpResponseException;
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 com.azure.core.util.polling.DefaultPollingStrategy;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.CollectionFormat;
import com.azure.core.util.serializer.JacksonAdapter;
import com.azure.core.util.serializer.TypeReference;
import com.azure.maps.search.implementation.models.BatchRequest;
import com.azure.maps.search.implementation.models.ErrorResponseException;
import com.azure.maps.search.implementation.models.JsonFormat;
import com.azure.maps.search.implementation.models.PolygonResult;
import com.azure.maps.search.implementation.models.ResponseFormat;
import com.azure.maps.search.implementation.models.ReverseSearchAddressBatchResult;
import com.azure.maps.search.implementation.models.SearchAddressBatchResult;
import com.azure.maps.search.implementation.models.SearchAlongRouteRequest;
import com.azure.maps.search.implementation.models.SearchInsideGeometryRequest;
import com.azure.maps.search.implementation.models.SearchesFuzzySearchBatchResponse;
import com.azure.maps.search.implementation.models.SearchesGetFuzzySearchBatchResponse;
import com.azure.maps.search.implementation.models.SearchesGetReverseSearchAddressBatchResponse;
import com.azure.maps.search.implementation.models.SearchesGetSearchAddressBatchResponse;
import com.azure.maps.search.implementation.models.SearchesReverseSearchAddressBatchResponse;
import com.azure.maps.search.implementation.models.SearchesSearchAddressBatchResponse;
import com.azure.maps.search.models.ElectricVehicleConnector;
import com.azure.maps.search.models.GeographicEntityType;
import com.azure.maps.search.models.LocalizedMapView;
import com.azure.maps.search.models.OperatingHoursRange;
import com.azure.maps.search.models.PointOfInterestCategoryTreeResult;
import com.azure.maps.search.models.PointOfInterestExtendedPostalCodes;
import com.azure.maps.search.models.ReverseSearchAddressResult;
import com.azure.maps.search.models.ReverseSearchCrossStreetAddressResult;
import com.azure.maps.search.models.RoadUseType;
import com.azure.maps.search.models.SearchAddressResult;
import com.azure.maps.search.models.SearchIndexes;
import java.time.Duration;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in Searches. */
public final class SearchesImpl {
    /** The proxy service used to perform REST calls. */
    private final SearchesService service;

    /** The service client containing this operation class. */
    private final SearchClientImpl client;

    /**
     * Initializes an instance of SearchesImpl.
     *
     * @param client the instance of the service client containing this operation class.
     */
    SearchesImpl(SearchClientImpl client) {
        this.service = RestProxy.create(SearchesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
        this.client = client;
    }

    /**
     * The interface defining all the services for SearchClientSearches to be used by the proxy service to perform REST
     * calls.
     */
    @Host("{$host}")
    @ServiceInterface(name = "SearchClientSearches")
    private interface SearchesService {
        @Get("/search/polygon/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<PolygonResult>> listPolygons(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @QueryParam("geometries") String geometryIds,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/fuzzy/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<SearchAddressResult>> fuzzySearch(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String query,
                @QueryParam("typeahead") Boolean isTypeAhead,
                @QueryParam("limit") Integer top,
                @QueryParam("ofs") Integer skip,
                @QueryParam("categorySet") String categoryFilter,
                @QueryParam("countrySet") String countryFilter,
                @QueryParam("lat") Double lat,
                @QueryParam("lon") Double lon,
                @QueryParam("radius") Integer radiusInMeters,
                @QueryParam("topLeft") String topLeft,
                @QueryParam("btmRight") String btmRight,
                @QueryParam("language") String language,
                @QueryParam("extendedPostalCodesFor") String extendedPostalCodesFor,
                @QueryParam("minFuzzyLevel") Integer minFuzzyLevel,
                @QueryParam("maxFuzzyLevel") Integer maxFuzzyLevel,
                @QueryParam("idxSet") String indexFilter,
                @QueryParam("brandSet") String brandFilter,
                @QueryParam("connectorSet") String electricVehicleConnectorFilter,
                @QueryParam("entityType") GeographicEntityType entityType,
                @QueryParam("view") LocalizedMapView localizedMapView,
                @QueryParam("openingHours") OperatingHoursRange operatingHours,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/poi/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<SearchAddressResult>> searchPointOfInterest(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String query,
                @QueryParam("typeahead") Boolean isTypeAhead,
                @QueryParam("limit") Integer top,
                @QueryParam("ofs") Integer skip,
                @QueryParam("categorySet") String categoryFilter,
                @QueryParam("countrySet") String countryFilter,
                @QueryParam("lat") Double lat,
                @QueryParam("lon") Double lon,
                @QueryParam("radius") Integer radiusInMeters,
                @QueryParam("topLeft") String topLeft,
                @QueryParam("btmRight") String btmRight,
                @QueryParam("language") String language,
                @QueryParam("extendedPostalCodesFor") String extendedPostalCodesFor,
                @QueryParam("brandSet") String brandFilter,
                @QueryParam("connectorSet") String electricVehicleConnectorFilter,
                @QueryParam("view") LocalizedMapView localizedMapView,
                @QueryParam("openingHours") OperatingHoursRange operatingHours,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/nearby/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<SearchAddressResult>> searchNearbyPointOfInterest(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("lat") double lat,
                @QueryParam("lon") double lon,
                @QueryParam("limit") Integer top,
                @QueryParam("ofs") Integer skip,
                @QueryParam("categorySet") String categoryFilter,
                @QueryParam("countrySet") String countryFilter,
                @QueryParam("radius") Integer radiusInMeters,
                @QueryParam("language") String language,
                @QueryParam("extendedPostalCodesFor") String extendedPostalCodesFor,
                @QueryParam("brandSet") String brandFilter,
                @QueryParam("connectorSet") String electricVehicleConnectorFilter,
                @QueryParam("view") LocalizedMapView localizedMapView,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/poi/category/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<SearchAddressResult>> searchPointOfInterestCategory(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String query,
                @QueryParam("typeahead") Boolean isTypeAhead,
                @QueryParam("limit") Integer top,
                @QueryParam("ofs") Integer skip,
                @QueryParam("categorySet") String categoryFilter,
                @QueryParam("countrySet") String countryFilter,
                @QueryParam("lat") Double lat,
                @QueryParam("lon") Double lon,
                @QueryParam("radius") Integer radiusInMeters,
                @QueryParam("topLeft") String topLeft,
                @QueryParam("btmRight") String btmRight,
                @QueryParam("language") String language,
                @QueryParam("extendedPostalCodesFor") String extendedPostalCodesFor,
                @QueryParam("brandSet") String brandFilter,
                @QueryParam("connectorSet") String electricVehicleConnectorFilter,
                @QueryParam("view") LocalizedMapView localizedMapView,
                @QueryParam("openingHours") OperatingHoursRange operatingHours,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/poi/category/tree/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<PointOfInterestCategoryTreeResult>> getPointOfInterestCategoryTree(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @QueryParam("language") String language,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/address/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<SearchAddressResult>> searchAddress(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String query,
                @QueryParam("typeahead") Boolean isTypeAhead,
                @QueryParam("limit") Integer top,
                @QueryParam("ofs") Integer skip,
                @QueryParam("countrySet") String countryFilter,
                @QueryParam("lat") Double lat,
                @QueryParam("lon") Double lon,
                @QueryParam("radius") Integer radiusInMeters,
                @QueryParam("topLeft") String topLeft,
                @QueryParam("btmRight") String btmRight,
                @QueryParam("language") String language,
                @QueryParam("extendedPostalCodesFor") String extendedPostalCodesFor,
                @QueryParam("entityType") GeographicEntityType entityType,
                @QueryParam("view") LocalizedMapView localizedMapView,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/address/reverse/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<ReverseSearchAddressResult>> reverseSearchAddress(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String query,
                @QueryParam("language") String language,
                @QueryParam("returnSpeedLimit") Boolean includeSpeedLimit,
                @QueryParam("heading") Integer heading,
                @QueryParam("radius") Integer radiusInMeters,
                @QueryParam("number") String streetNumber,
                @QueryParam("returnRoadUse") Boolean includeRoadUse,
                @QueryParam("roadUse") String roadUse,
                @QueryParam("allowFreeformNewline") Boolean allowFreeformNewline,
                @QueryParam("returnMatchType") Boolean includeMatchType,
                @QueryParam("entityType") GeographicEntityType entityType,
                @QueryParam("view") LocalizedMapView localizedMapView,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/address/reverse/crossStreet/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<ReverseSearchCrossStreetAddressResult>> reverseSearchCrossStreetAddress(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String query,
                @QueryParam("limit") Integer top,
                @QueryParam("heading") Integer heading,
                @QueryParam("radius") Integer radiusInMeters,
                @QueryParam("language") String language,
                @QueryParam("view") LocalizedMapView localizedMapView,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/address/structured/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<SearchAddressResult>> searchStructuredAddress(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("language") String language,
                @QueryParam("countryCode") String countryCode,
                @QueryParam("limit") Integer top,
                @QueryParam("ofs") Integer skip,
                @QueryParam("streetNumber") String streetNumber,
                @QueryParam("streetName") String streetName,
                @QueryParam("crossStreet") String crossStreet,
                @QueryParam("municipality") String municipality,
                @QueryParam("municipalitySubdivision") String municipalitySubdivision,
                @QueryParam("countryTertiarySubdivision") String countryTertiarySubdivision,
                @QueryParam("countrySecondarySubdivision") String countrySecondarySubdivision,
                @QueryParam("countrySubdivision") String countrySubdivision,
                @QueryParam("postalCode") String postalCode,
                @QueryParam("extendedPostalCodesFor") String extendedPostalCodesFor,
                @QueryParam("entityType") GeographicEntityType entityType,
                @QueryParam("view") LocalizedMapView localizedMapView,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/search/geometry/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<SearchAddressResult>> searchInsideGeometry(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String query,
                @QueryParam("limit") Integer top,
                @QueryParam("language") String language,
                @QueryParam("categorySet") String categoryFilter,
                @QueryParam("extendedPostalCodesFor") String extendedPostalCodesFor,
                @QueryParam("idxSet") String indexFilter,
                @QueryParam("view") LocalizedMapView localizedMapView,
                @QueryParam("openingHours") OperatingHoursRange operatingHours,
                @BodyParam("application/json") SearchInsideGeometryRequest geometry,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/search/alongRoute/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<SearchAddressResult>> searchAlongRoute(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String query,
                @QueryParam("maxDetourTime") int maxDetourTime,
                @QueryParam("limit") Integer top,
                @QueryParam("brandSet") String brandFilter,
                @QueryParam("categorySet") String categoryFilter,
                @QueryParam("connectorSet") String electricVehicleConnectorFilter,
                @QueryParam("view") LocalizedMapView localizedMapView,
                @QueryParam("openingHours") OperatingHoursRange operatingHours,
                @BodyParam("application/json") SearchAlongRouteRequest route,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/search/fuzzy/batch/sync/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(
                value = ErrorResponseException.class,
                code = {408})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<SearchAddressBatchResult>> fuzzySearchBatchSync(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @BodyParam("application/json") BatchRequest batchRequest,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/search/fuzzy/batch/{format}")
        @ExpectedResponses({200, 202})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<SearchesFuzzySearchBatchResponse> fuzzySearchBatch(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @BodyParam("application/json") BatchRequest batchRequest,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/fuzzy/batch/{format}")
        @ExpectedResponses({200, 202})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<SearchesGetFuzzySearchBatchResponse> getFuzzySearchBatch(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") String batchId,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/search/address/batch/sync/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(
                value = ErrorResponseException.class,
                code = {408})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<SearchAddressBatchResult>> searchAddressBatchSync(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @BodyParam("application/json") BatchRequest batchRequest,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/search/address/batch/{format}")
        @ExpectedResponses({200, 202})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<SearchesSearchAddressBatchResponse> searchAddressBatch(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @BodyParam("application/json") BatchRequest batchRequest,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/address/batch/{format}")
        @ExpectedResponses({200, 202})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<SearchesGetSearchAddressBatchResponse> getSearchAddressBatch(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") String batchId,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/search/address/reverse/batch/sync/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(
                value = ErrorResponseException.class,
                code = {408})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<ReverseSearchAddressBatchResult>> reverseSearchAddressBatchSync(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @BodyParam("application/json") BatchRequest batchRequest,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/search/address/reverse/batch/{format}")
        @ExpectedResponses({200, 202})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<SearchesReverseSearchAddressBatchResponse> reverseSearchAddressBatch(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @BodyParam("application/json") BatchRequest batchRequest,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/search/address/reverse/batch/{format}")
        @ExpectedResponses({200, 202})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<SearchesGetReverseSearchAddressBatchResponse> getReverseSearchAddressBatch(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") String batchId,
                @HeaderParam("Accept") String accept,
                Context context);
    }

    /**
     * **Get Polygon**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Get Polygon service allows you to request the geometry data such as a city or country outline for a set of
     * entities, previously retrieved from an Online Search request in GeoJSON format. The geometry ID is returned in
     * the sourceGeometry object under "geometry" and "id" in either a Search Address or Search Fuzzy call.
     *
     * <p>Please note that any geometry ID retrieved from an Online Search endpoint has a limited lifetime. The client
     * should not store geometry IDs in persistent storage for later referral, as the stability of these identifiers is
     * not guaranteed for a long period of time. It is expected that a request to the Polygon method is made within a
     * few minutes of the request to the Online Search method that provided the ID. The service allows for batch
     * requests up to 20 identifiers.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param geometryIds Comma separated list of geometry UUIDs, previously retrieved from an Online Search 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 this object is returned from a successful Search Polygon call along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<PolygonResult>> listPolygonsWithResponseAsync(JsonFormat format, List<String> geometryIds) {
        final String accept = "application/json";
        String geometryIdsConverted =
                geometryIds.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(","));
        return FluxUtil.withContext(
                context ->
                        service.listPolygons(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                geometryIdsConverted,
                                accept,
                                context));
    }

    /**
     * **Get Polygon**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Get Polygon service allows you to request the geometry data such as a city or country outline for a set of
     * entities, previously retrieved from an Online Search request in GeoJSON format. The geometry ID is returned in
     * the sourceGeometry object under "geometry" and "id" in either a Search Address or Search Fuzzy call.
     *
     * <p>Please note that any geometry ID retrieved from an Online Search endpoint has a limited lifetime. The client
     * should not store geometry IDs in persistent storage for later referral, as the stability of these identifiers is
     * not guaranteed for a long period of time. It is expected that a request to the Polygon method is made within a
     * few minutes of the request to the Online Search method that provided the ID. The service allows for batch
     * requests up to 20 identifiers.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param geometryIds Comma separated list of geometry UUIDs, previously retrieved from an Online Search 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 this object is returned from a successful Search Polygon call along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<PolygonResult>> listPolygonsWithResponseAsync(
            JsonFormat format, List<String> geometryIds, Context context) {
        final String accept = "application/json";
        String geometryIdsConverted =
                geometryIds.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(","));
        return service.listPolygons(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                geometryIdsConverted,
                accept,
                context);
    }

    /**
     * **Get Polygon**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Get Polygon service allows you to request the geometry data such as a city or country outline for a set of
     * entities, previously retrieved from an Online Search request in GeoJSON format. The geometry ID is returned in
     * the sourceGeometry object under "geometry" and "id" in either a Search Address or Search Fuzzy call.
     *
     * <p>Please note that any geometry ID retrieved from an Online Search endpoint has a limited lifetime. The client
     * should not store geometry IDs in persistent storage for later referral, as the stability of these identifiers is
     * not guaranteed for a long period of time. It is expected that a request to the Polygon method is made within a
     * few minutes of the request to the Online Search method that provided the ID. The service allows for batch
     * requests up to 20 identifiers.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param geometryIds Comma separated list of geometry UUIDs, previously retrieved from an Online Search 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 this object is returned from a successful Search Polygon call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<PolygonResult> listPolygonsAsync(JsonFormat format, List<String> geometryIds) {
        return listPolygonsWithResponseAsync(format, geometryIds).flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Get Polygon**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Get Polygon service allows you to request the geometry data such as a city or country outline for a set of
     * entities, previously retrieved from an Online Search request in GeoJSON format. The geometry ID is returned in
     * the sourceGeometry object under "geometry" and "id" in either a Search Address or Search Fuzzy call.
     *
     * <p>Please note that any geometry ID retrieved from an Online Search endpoint has a limited lifetime. The client
     * should not store geometry IDs in persistent storage for later referral, as the stability of these identifiers is
     * not guaranteed for a long period of time. It is expected that a request to the Polygon method is made within a
     * few minutes of the request to the Online Search method that provided the ID. The service allows for batch
     * requests up to 20 identifiers.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param geometryIds Comma separated list of geometry UUIDs, previously retrieved from an Online Search 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 this object is returned from a successful Search Polygon call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<PolygonResult> listPolygonsAsync(JsonFormat format, List<String> geometryIds, Context context) {
        return listPolygonsWithResponseAsync(format, geometryIds, context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Get Polygon**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Get Polygon service allows you to request the geometry data such as a city or country outline for a set of
     * entities, previously retrieved from an Online Search request in GeoJSON format. The geometry ID is returned in
     * the sourceGeometry object under "geometry" and "id" in either a Search Address or Search Fuzzy call.
     *
     * <p>Please note that any geometry ID retrieved from an Online Search endpoint has a limited lifetime. The client
     * should not store geometry IDs in persistent storage for later referral, as the stability of these identifiers is
     * not guaranteed for a long period of time. It is expected that a request to the Polygon method is made within a
     * few minutes of the request to the Online Search method that provided the ID. The service allows for batch
     * requests up to 20 identifiers.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param geometryIds Comma separated list of geometry UUIDs, previously retrieved from an Online Search 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 this object is returned from a successful Search Polygon call along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<PolygonResult> listPolygonsWithResponse(
            JsonFormat format, List<String> geometryIds, Context context) {
        return listPolygonsWithResponseAsync(format, geometryIds, context).block();
    }

    /**
     * **Get Polygon**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Get Polygon service allows you to request the geometry data such as a city or country outline for a set of
     * entities, previously retrieved from an Online Search request in GeoJSON format. The geometry ID is returned in
     * the sourceGeometry object under "geometry" and "id" in either a Search Address or Search Fuzzy call.
     *
     * <p>Please note that any geometry ID retrieved from an Online Search endpoint has a limited lifetime. The client
     * should not store geometry IDs in persistent storage for later referral, as the stability of these identifiers is
     * not guaranteed for a long period of time. It is expected that a request to the Polygon method is made within a
     * few minutes of the request to the Online Search method that provided the ID. The service allows for batch
     * requests up to 20 identifiers.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param geometryIds Comma separated list of geometry UUIDs, previously retrieved from an Online Search 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 this object is returned from a successful Search Polygon call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public PolygonResult listPolygons(JsonFormat format, List<String> geometryIds) {
        return listPolygonsWithResponse(format, geometryIds, Context.NONE).getValue();
    }

    /**
     * **Free Form Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The basic default API is Free Form Search which handles the most fuzzy of inputs handling any combination of
     * address or POI tokens. This search API is the canonical 'single line search'. The Free Form Search API is a
     * seamless combination of POI search and geocoding. The API can also be weighted with a contextual position
     * (lat./lon. pair), or fully constrained by a coordinate and radius, or it can be executed more generally without
     * any geo biasing anchor point.&lt;br&gt;&lt;br&gt;We strongly advise you to use the 'countrySet' parameter to
     * specify only the countries for which your application needs coverage, as the default behavior will be to search
     * the entire world, potentially returning unnecessary results.&lt;br&gt;&lt;br&gt; E.g.: `countrySet`=US,FR
     * &lt;br&gt;&lt;br&gt;Please see [Search
     * Coverage](https://docs.microsoft.com/azure/location-based-services/geocoding-coverage) for a complete list of all
     * the supported countries.&lt;br&gt;&lt;br&gt;Most Search queries default to `maxFuzzyLevel`=2 to gain performance
     * and also reduce unusual results. This new default can be overridden as needed per request by passing in the query
     * param `maxFuzzyLevel`=3 or 4.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query string (e.g., "seattle", "pizza"). Can _also_ be specified as a comma separated
     *     string composed by latitude followed by longitude (e.g., "47.641268, -122.125679"). Must be properly URL
     *     encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param minFuzzyLevel Minimum fuzziness level to be used. Default: 1, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param maxFuzzyLevel Maximum fuzziness level to be used. Default: 2, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> fuzzySearchWithResponseAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            Integer minFuzzyLevel,
            Integer maxFuzzyLevel,
            List<SearchIndexes> indexFilter,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        final String accept = "application/json";
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String countryFilterConverted =
                (countryFilter == null)
                        ? null
                        : countryFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String indexFilterConverted =
                (indexFilter == null)
                        ? null
                        : indexFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String brandFilterConverted =
                (brandFilter == null)
                        ? null
                        : brandFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String electricVehicleConnectorFilterConverted =
                (electricVehicleConnectorFilter == null)
                        ? null
                        : electricVehicleConnectorFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return FluxUtil.withContext(
                context ->
                        service.fuzzySearch(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                query,
                                isTypeAhead,
                                top,
                                skip,
                                categoryFilterConverted,
                                countryFilterConverted,
                                lat,
                                lon,
                                radiusInMeters,
                                topLeft,
                                btmRight,
                                language,
                                extendedPostalCodesForConverted,
                                minFuzzyLevel,
                                maxFuzzyLevel,
                                indexFilterConverted,
                                brandFilterConverted,
                                electricVehicleConnectorFilterConverted,
                                entityType,
                                localizedMapView,
                                operatingHours,
                                accept,
                                context));
    }

    /**
     * **Free Form Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The basic default API is Free Form Search which handles the most fuzzy of inputs handling any combination of
     * address or POI tokens. This search API is the canonical 'single line search'. The Free Form Search API is a
     * seamless combination of POI search and geocoding. The API can also be weighted with a contextual position
     * (lat./lon. pair), or fully constrained by a coordinate and radius, or it can be executed more generally without
     * any geo biasing anchor point.&lt;br&gt;&lt;br&gt;We strongly advise you to use the 'countrySet' parameter to
     * specify only the countries for which your application needs coverage, as the default behavior will be to search
     * the entire world, potentially returning unnecessary results.&lt;br&gt;&lt;br&gt; E.g.: `countrySet`=US,FR
     * &lt;br&gt;&lt;br&gt;Please see [Search
     * Coverage](https://docs.microsoft.com/azure/location-based-services/geocoding-coverage) for a complete list of all
     * the supported countries.&lt;br&gt;&lt;br&gt;Most Search queries default to `maxFuzzyLevel`=2 to gain performance
     * and also reduce unusual results. This new default can be overridden as needed per request by passing in the query
     * param `maxFuzzyLevel`=3 or 4.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query string (e.g., "seattle", "pizza"). Can _also_ be specified as a comma separated
     *     string composed by latitude followed by longitude (e.g., "47.641268, -122.125679"). Must be properly URL
     *     encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param minFuzzyLevel Minimum fuzziness level to be used. Default: 1, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param maxFuzzyLevel Maximum fuzziness level to be used. Default: 2, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> fuzzySearchWithResponseAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            Integer minFuzzyLevel,
            Integer maxFuzzyLevel,
            List<SearchIndexes> indexFilter,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        final String accept = "application/json";
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String countryFilterConverted =
                (countryFilter == null)
                        ? null
                        : countryFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String indexFilterConverted =
                (indexFilter == null)
                        ? null
                        : indexFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String brandFilterConverted =
                (brandFilter == null)
                        ? null
                        : brandFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String electricVehicleConnectorFilterConverted =
                (electricVehicleConnectorFilter == null)
                        ? null
                        : electricVehicleConnectorFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return service.fuzzySearch(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                query,
                isTypeAhead,
                top,
                skip,
                categoryFilterConverted,
                countryFilterConverted,
                lat,
                lon,
                radiusInMeters,
                topLeft,
                btmRight,
                language,
                extendedPostalCodesForConverted,
                minFuzzyLevel,
                maxFuzzyLevel,
                indexFilterConverted,
                brandFilterConverted,
                electricVehicleConnectorFilterConverted,
                entityType,
                localizedMapView,
                operatingHours,
                accept,
                context);
    }

    /**
     * **Free Form Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The basic default API is Free Form Search which handles the most fuzzy of inputs handling any combination of
     * address or POI tokens. This search API is the canonical 'single line search'. The Free Form Search API is a
     * seamless combination of POI search and geocoding. The API can also be weighted with a contextual position
     * (lat./lon. pair), or fully constrained by a coordinate and radius, or it can be executed more generally without
     * any geo biasing anchor point.&lt;br&gt;&lt;br&gt;We strongly advise you to use the 'countrySet' parameter to
     * specify only the countries for which your application needs coverage, as the default behavior will be to search
     * the entire world, potentially returning unnecessary results.&lt;br&gt;&lt;br&gt; E.g.: `countrySet`=US,FR
     * &lt;br&gt;&lt;br&gt;Please see [Search
     * Coverage](https://docs.microsoft.com/azure/location-based-services/geocoding-coverage) for a complete list of all
     * the supported countries.&lt;br&gt;&lt;br&gt;Most Search queries default to `maxFuzzyLevel`=2 to gain performance
     * and also reduce unusual results. This new default can be overridden as needed per request by passing in the query
     * param `maxFuzzyLevel`=3 or 4.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query string (e.g., "seattle", "pizza"). Can _also_ be specified as a comma separated
     *     string composed by latitude followed by longitude (e.g., "47.641268, -122.125679"). Must be properly URL
     *     encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param minFuzzyLevel Minimum fuzziness level to be used. Default: 1, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param maxFuzzyLevel Maximum fuzziness level to be used. Default: 2, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> fuzzySearchAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            Integer minFuzzyLevel,
            Integer maxFuzzyLevel,
            List<SearchIndexes> indexFilter,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        return fuzzySearchWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        minFuzzyLevel,
                        maxFuzzyLevel,
                        indexFilter,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        entityType,
                        localizedMapView,
                        operatingHours)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Free Form Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The basic default API is Free Form Search which handles the most fuzzy of inputs handling any combination of
     * address or POI tokens. This search API is the canonical 'single line search'. The Free Form Search API is a
     * seamless combination of POI search and geocoding. The API can also be weighted with a contextual position
     * (lat./lon. pair), or fully constrained by a coordinate and radius, or it can be executed more generally without
     * any geo biasing anchor point.&lt;br&gt;&lt;br&gt;We strongly advise you to use the 'countrySet' parameter to
     * specify only the countries for which your application needs coverage, as the default behavior will be to search
     * the entire world, potentially returning unnecessary results.&lt;br&gt;&lt;br&gt; E.g.: `countrySet`=US,FR
     * &lt;br&gt;&lt;br&gt;Please see [Search
     * Coverage](https://docs.microsoft.com/azure/location-based-services/geocoding-coverage) for a complete list of all
     * the supported countries.&lt;br&gt;&lt;br&gt;Most Search queries default to `maxFuzzyLevel`=2 to gain performance
     * and also reduce unusual results. This new default can be overridden as needed per request by passing in the query
     * param `maxFuzzyLevel`=3 or 4.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query string (e.g., "seattle", "pizza"). Can _also_ be specified as a comma separated
     *     string composed by latitude followed by longitude (e.g., "47.641268, -122.125679"). Must be properly URL
     *     encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param minFuzzyLevel Minimum fuzziness level to be used. Default: 1, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param maxFuzzyLevel Maximum fuzziness level to be used. Default: 2, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> fuzzySearchAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            Integer minFuzzyLevel,
            Integer maxFuzzyLevel,
            List<SearchIndexes> indexFilter,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        return fuzzySearchWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        minFuzzyLevel,
                        maxFuzzyLevel,
                        indexFilter,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        entityType,
                        localizedMapView,
                        operatingHours,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Free Form Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The basic default API is Free Form Search which handles the most fuzzy of inputs handling any combination of
     * address or POI tokens. This search API is the canonical 'single line search'. The Free Form Search API is a
     * seamless combination of POI search and geocoding. The API can also be weighted with a contextual position
     * (lat./lon. pair), or fully constrained by a coordinate and radius, or it can be executed more generally without
     * any geo biasing anchor point.&lt;br&gt;&lt;br&gt;We strongly advise you to use the 'countrySet' parameter to
     * specify only the countries for which your application needs coverage, as the default behavior will be to search
     * the entire world, potentially returning unnecessary results.&lt;br&gt;&lt;br&gt; E.g.: `countrySet`=US,FR
     * &lt;br&gt;&lt;br&gt;Please see [Search
     * Coverage](https://docs.microsoft.com/azure/location-based-services/geocoding-coverage) for a complete list of all
     * the supported countries.&lt;br&gt;&lt;br&gt;Most Search queries default to `maxFuzzyLevel`=2 to gain performance
     * and also reduce unusual results. This new default can be overridden as needed per request by passing in the query
     * param `maxFuzzyLevel`=3 or 4.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query string (e.g., "seattle", "pizza"). Can _also_ be specified as a comma separated
     *     string composed by latitude followed by longitude (e.g., "47.641268, -122.125679"). Must be properly URL
     *     encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param minFuzzyLevel Minimum fuzziness level to be used. Default: 1, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param maxFuzzyLevel Maximum fuzziness level to be used. Default: 2, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<SearchAddressResult> fuzzySearchWithResponse(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            Integer minFuzzyLevel,
            Integer maxFuzzyLevel,
            List<SearchIndexes> indexFilter,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        return fuzzySearchWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        minFuzzyLevel,
                        maxFuzzyLevel,
                        indexFilter,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        entityType,
                        localizedMapView,
                        operatingHours,
                        context)
                .block();
    }

    /**
     * **Free Form Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The basic default API is Free Form Search which handles the most fuzzy of inputs handling any combination of
     * address or POI tokens. This search API is the canonical 'single line search'. The Free Form Search API is a
     * seamless combination of POI search and geocoding. The API can also be weighted with a contextual position
     * (lat./lon. pair), or fully constrained by a coordinate and radius, or it can be executed more generally without
     * any geo biasing anchor point.&lt;br&gt;&lt;br&gt;We strongly advise you to use the 'countrySet' parameter to
     * specify only the countries for which your application needs coverage, as the default behavior will be to search
     * the entire world, potentially returning unnecessary results.&lt;br&gt;&lt;br&gt; E.g.: `countrySet`=US,FR
     * &lt;br&gt;&lt;br&gt;Please see [Search
     * Coverage](https://docs.microsoft.com/azure/location-based-services/geocoding-coverage) for a complete list of all
     * the supported countries.&lt;br&gt;&lt;br&gt;Most Search queries default to `maxFuzzyLevel`=2 to gain performance
     * and also reduce unusual results. This new default can be overridden as needed per request by passing in the query
     * param `maxFuzzyLevel`=3 or 4.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query string (e.g., "seattle", "pizza"). Can _also_ be specified as a comma separated
     *     string composed by latitude followed by longitude (e.g., "47.641268, -122.125679"). Must be properly URL
     *     encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param minFuzzyLevel Minimum fuzziness level to be used. Default: 1, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param maxFuzzyLevel Maximum fuzziness level to be used. Default: 2, minimum: 1 and maximum: 4
     *     <p>* Level 1 has no spell checking.
     *     <p>* Level 2 uses normal n-gram spell checking. For example, query "restrant" can be matched to "restaurant."
     *     <p>* Level 3 uses sound-like spell checking, and shingle spell checking. Sound-like spell checking is for
     *     "rstrnt" to "restaurant" matching. Shingle spell checking is for "mountainview" to "mountain view" matching.
     *     <p>* Level 4 doesn’t add any more spell checking functions.
     *     <p>The search engine will start looking for a match on the level defined by minFuzzyLevel, and will stop
     *     searching at the level specified by maxFuzzyLevel.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public SearchAddressResult fuzzySearch(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            Integer minFuzzyLevel,
            Integer maxFuzzyLevel,
            List<SearchIndexes> indexFilter,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        return fuzzySearchWithResponse(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        minFuzzyLevel,
                        maxFuzzyLevel,
                        indexFilter,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        entityType,
                        localizedMapView,
                        operatingHours,
                        Context.NONE)
                .getValue();
    }

    /**
     * **Get POI by Name**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Search allows you to request POI results by name. Search supports additional query
     * parameters such as language and filtering results by area of interest driven by country or bounding box. Endpoint
     * will return only POI results matching the query string. Response includes POI details such as address, coordinate
     * location and category.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**POI** = Points of Interest
     *     <p>Value should be **POI** or **None** to disable extended postal codes.
     *     <p>By default extended postal codes are included.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchPointOfInterestWithResponseAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<PointOfInterestExtendedPostalCodes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        final String accept = "application/json";
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String countryFilterConverted =
                (countryFilter == null)
                        ? null
                        : countryFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String brandFilterConverted =
                (brandFilter == null)
                        ? null
                        : brandFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String electricVehicleConnectorFilterConverted =
                (electricVehicleConnectorFilter == null)
                        ? null
                        : electricVehicleConnectorFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return FluxUtil.withContext(
                context ->
                        service.searchPointOfInterest(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                query,
                                isTypeAhead,
                                top,
                                skip,
                                categoryFilterConverted,
                                countryFilterConverted,
                                lat,
                                lon,
                                radiusInMeters,
                                topLeft,
                                btmRight,
                                language,
                                extendedPostalCodesForConverted,
                                brandFilterConverted,
                                electricVehicleConnectorFilterConverted,
                                localizedMapView,
                                operatingHours,
                                accept,
                                context));
    }

    /**
     * **Get POI by Name**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Search allows you to request POI results by name. Search supports additional query
     * parameters such as language and filtering results by area of interest driven by country or bounding box. Endpoint
     * will return only POI results matching the query string. Response includes POI details such as address, coordinate
     * location and category.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**POI** = Points of Interest
     *     <p>Value should be **POI** or **None** to disable extended postal codes.
     *     <p>By default extended postal codes are included.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchPointOfInterestWithResponseAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<PointOfInterestExtendedPostalCodes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        final String accept = "application/json";
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String countryFilterConverted =
                (countryFilter == null)
                        ? null
                        : countryFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String brandFilterConverted =
                (brandFilter == null)
                        ? null
                        : brandFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String electricVehicleConnectorFilterConverted =
                (electricVehicleConnectorFilter == null)
                        ? null
                        : electricVehicleConnectorFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return service.searchPointOfInterest(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                query,
                isTypeAhead,
                top,
                skip,
                categoryFilterConverted,
                countryFilterConverted,
                lat,
                lon,
                radiusInMeters,
                topLeft,
                btmRight,
                language,
                extendedPostalCodesForConverted,
                brandFilterConverted,
                electricVehicleConnectorFilterConverted,
                localizedMapView,
                operatingHours,
                accept,
                context);
    }

    /**
     * **Get POI by Name**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Search allows you to request POI results by name. Search supports additional query
     * parameters such as language and filtering results by area of interest driven by country or bounding box. Endpoint
     * will return only POI results matching the query string. Response includes POI details such as address, coordinate
     * location and category.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**POI** = Points of Interest
     *     <p>Value should be **POI** or **None** to disable extended postal codes.
     *     <p>By default extended postal codes are included.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchPointOfInterestAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<PointOfInterestExtendedPostalCodes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        return searchPointOfInterestWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Get POI by Name**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Search allows you to request POI results by name. Search supports additional query
     * parameters such as language and filtering results by area of interest driven by country or bounding box. Endpoint
     * will return only POI results matching the query string. Response includes POI details such as address, coordinate
     * location and category.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**POI** = Points of Interest
     *     <p>Value should be **POI** or **None** to disable extended postal codes.
     *     <p>By default extended postal codes are included.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchPointOfInterestAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<PointOfInterestExtendedPostalCodes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        return searchPointOfInterestWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Get POI by Name**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Search allows you to request POI results by name. Search supports additional query
     * parameters such as language and filtering results by area of interest driven by country or bounding box. Endpoint
     * will return only POI results matching the query string. Response includes POI details such as address, coordinate
     * location and category.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**POI** = Points of Interest
     *     <p>Value should be **POI** or **None** to disable extended postal codes.
     *     <p>By default extended postal codes are included.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<SearchAddressResult> searchPointOfInterestWithResponse(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<PointOfInterestExtendedPostalCodes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        return searchPointOfInterestWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours,
                        context)
                .block();
    }

    /**
     * **Get POI by Name**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Search allows you to request POI results by name. Search supports additional query
     * parameters such as language and filtering results by area of interest driven by country or bounding box. Endpoint
     * will return only POI results matching the query string. Response includes POI details such as address, coordinate
     * location and category.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**POI** = Points of Interest
     *     <p>Value should be **POI** or **None** to disable extended postal codes.
     *     <p>By default extended postal codes are included.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public SearchAddressResult searchPointOfInterest(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<PointOfInterestExtendedPostalCodes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        return searchPointOfInterestWithResponse(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours,
                        Context.NONE)
                .getValue();
    }

    /**
     * **Nearby Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>If you have a use case for only retrieving POI results around a specific location, the nearby search method
     * may be the right choice. This endpoint will only return POI results, and does not take in a search query
     * parameter.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area, Min value is
     *     1, Max Value is 50000.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchNearbyPointOfInterestWithResponseAsync(
            ResponseFormat format,
            double lat,
            double lon,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Integer radiusInMeters,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView) {
        final String accept = "application/json";
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String countryFilterConverted =
                (countryFilter == null)
                        ? null
                        : countryFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String brandFilterConverted =
                (brandFilter == null)
                        ? null
                        : brandFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String electricVehicleConnectorFilterConverted =
                (electricVehicleConnectorFilter == null)
                        ? null
                        : electricVehicleConnectorFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return FluxUtil.withContext(
                context ->
                        service.searchNearbyPointOfInterest(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                lat,
                                lon,
                                top,
                                skip,
                                categoryFilterConverted,
                                countryFilterConverted,
                                radiusInMeters,
                                language,
                                extendedPostalCodesForConverted,
                                brandFilterConverted,
                                electricVehicleConnectorFilterConverted,
                                localizedMapView,
                                accept,
                                context));
    }

    /**
     * **Nearby Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>If you have a use case for only retrieving POI results around a specific location, the nearby search method
     * may be the right choice. This endpoint will only return POI results, and does not take in a search query
     * parameter.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area, Min value is
     *     1, Max Value is 50000.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchNearbyPointOfInterestWithResponseAsync(
            ResponseFormat format,
            double lat,
            double lon,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Integer radiusInMeters,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            Context context) {
        final String accept = "application/json";
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String countryFilterConverted =
                (countryFilter == null)
                        ? null
                        : countryFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String brandFilterConverted =
                (brandFilter == null)
                        ? null
                        : brandFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String electricVehicleConnectorFilterConverted =
                (electricVehicleConnectorFilter == null)
                        ? null
                        : electricVehicleConnectorFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return service.searchNearbyPointOfInterest(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                lat,
                lon,
                top,
                skip,
                categoryFilterConverted,
                countryFilterConverted,
                radiusInMeters,
                language,
                extendedPostalCodesForConverted,
                brandFilterConverted,
                electricVehicleConnectorFilterConverted,
                localizedMapView,
                accept,
                context);
    }

    /**
     * **Nearby Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>If you have a use case for only retrieving POI results around a specific location, the nearby search method
     * may be the right choice. This endpoint will only return POI results, and does not take in a search query
     * parameter.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area, Min value is
     *     1, Max Value is 50000.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchNearbyPointOfInterestAsync(
            ResponseFormat format,
            double lat,
            double lon,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Integer radiusInMeters,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView) {
        return searchNearbyPointOfInterestWithResponseAsync(
                        format,
                        lat,
                        lon,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        radiusInMeters,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Nearby Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>If you have a use case for only retrieving POI results around a specific location, the nearby search method
     * may be the right choice. This endpoint will only return POI results, and does not take in a search query
     * parameter.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area, Min value is
     *     1, Max Value is 50000.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchNearbyPointOfInterestAsync(
            ResponseFormat format,
            double lat,
            double lon,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Integer radiusInMeters,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            Context context) {
        return searchNearbyPointOfInterestWithResponseAsync(
                        format,
                        lat,
                        lon,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        radiusInMeters,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Nearby Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>If you have a use case for only retrieving POI results around a specific location, the nearby search method
     * may be the right choice. This endpoint will only return POI results, and does not take in a search query
     * parameter.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area, Min value is
     *     1, Max Value is 50000.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<SearchAddressResult> searchNearbyPointOfInterestWithResponse(
            ResponseFormat format,
            double lat,
            double lon,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Integer radiusInMeters,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            Context context) {
        return searchNearbyPointOfInterestWithResponseAsync(
                        format,
                        lat,
                        lon,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        radiusInMeters,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        context)
                .block();
    }

    /**
     * **Nearby Search**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>If you have a use case for only retrieving POI results around a specific location, the nearby search method
     * may be the right choice. This endpoint will only return POI results, and does not take in a search query
     * parameter.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area, Min value is
     *     1, Max Value is 50000.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public SearchAddressResult searchNearbyPointOfInterest(
            ResponseFormat format,
            double lat,
            double lon,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Integer radiusInMeters,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView) {
        return searchNearbyPointOfInterestWithResponse(
                        format,
                        lat,
                        lon,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        radiusInMeters,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        Context.NONE)
                .getValue();
    }

    /**
     * **Get POI by Category**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Category Search allows you to request POI results from given category. Search allows
     * to query POIs from one category at a time. Endpoint will only return POI results which are categorized as
     * specified. Response includes POI details such as address, coordinate location and classification.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI category to search for (e.g., "AIRPORT", "RESTAURANT"), must be properly URL encoded.
     *     Supported main categories can be requested by calling [Get Search POI Category Tree
     *     API](https://aka.ms/AzureMapsPOICategoryTree). List of available categories can also be found
     *     [here](https://docs.microsoft.com/azure/azure-maps/supported-search-categories). We recommend to use POI
     *     Search Category Tree API to request the supported categories.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchPointOfInterestCategoryWithResponseAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        final String accept = "application/json";
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String countryFilterConverted =
                (countryFilter == null)
                        ? null
                        : countryFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String brandFilterConverted =
                (brandFilter == null)
                        ? null
                        : brandFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String electricVehicleConnectorFilterConverted =
                (electricVehicleConnectorFilter == null)
                        ? null
                        : electricVehicleConnectorFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return FluxUtil.withContext(
                context ->
                        service.searchPointOfInterestCategory(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                query,
                                isTypeAhead,
                                top,
                                skip,
                                categoryFilterConverted,
                                countryFilterConverted,
                                lat,
                                lon,
                                radiusInMeters,
                                topLeft,
                                btmRight,
                                language,
                                extendedPostalCodesForConverted,
                                brandFilterConverted,
                                electricVehicleConnectorFilterConverted,
                                localizedMapView,
                                operatingHours,
                                accept,
                                context));
    }

    /**
     * **Get POI by Category**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Category Search allows you to request POI results from given category. Search allows
     * to query POIs from one category at a time. Endpoint will only return POI results which are categorized as
     * specified. Response includes POI details such as address, coordinate location and classification.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI category to search for (e.g., "AIRPORT", "RESTAURANT"), must be properly URL encoded.
     *     Supported main categories can be requested by calling [Get Search POI Category Tree
     *     API](https://aka.ms/AzureMapsPOICategoryTree). List of available categories can also be found
     *     [here](https://docs.microsoft.com/azure/azure-maps/supported-search-categories). We recommend to use POI
     *     Search Category Tree API to request the supported categories.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchPointOfInterestCategoryWithResponseAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        final String accept = "application/json";
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String countryFilterConverted =
                (countryFilter == null)
                        ? null
                        : countryFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String brandFilterConverted =
                (brandFilter == null)
                        ? null
                        : brandFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String electricVehicleConnectorFilterConverted =
                (electricVehicleConnectorFilter == null)
                        ? null
                        : electricVehicleConnectorFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return service.searchPointOfInterestCategory(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                query,
                isTypeAhead,
                top,
                skip,
                categoryFilterConverted,
                countryFilterConverted,
                lat,
                lon,
                radiusInMeters,
                topLeft,
                btmRight,
                language,
                extendedPostalCodesForConverted,
                brandFilterConverted,
                electricVehicleConnectorFilterConverted,
                localizedMapView,
                operatingHours,
                accept,
                context);
    }

    /**
     * **Get POI by Category**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Category Search allows you to request POI results from given category. Search allows
     * to query POIs from one category at a time. Endpoint will only return POI results which are categorized as
     * specified. Response includes POI details such as address, coordinate location and classification.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI category to search for (e.g., "AIRPORT", "RESTAURANT"), must be properly URL encoded.
     *     Supported main categories can be requested by calling [Get Search POI Category Tree
     *     API](https://aka.ms/AzureMapsPOICategoryTree). List of available categories can also be found
     *     [here](https://docs.microsoft.com/azure/azure-maps/supported-search-categories). We recommend to use POI
     *     Search Category Tree API to request the supported categories.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchPointOfInterestCategoryAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        return searchPointOfInterestCategoryWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Get POI by Category**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Category Search allows you to request POI results from given category. Search allows
     * to query POIs from one category at a time. Endpoint will only return POI results which are categorized as
     * specified. Response includes POI details such as address, coordinate location and classification.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI category to search for (e.g., "AIRPORT", "RESTAURANT"), must be properly URL encoded.
     *     Supported main categories can be requested by calling [Get Search POI Category Tree
     *     API](https://aka.ms/AzureMapsPOICategoryTree). List of available categories can also be found
     *     [here](https://docs.microsoft.com/azure/azure-maps/supported-search-categories). We recommend to use POI
     *     Search Category Tree API to request the supported categories.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchPointOfInterestCategoryAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        return searchPointOfInterestCategoryWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Get POI by Category**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Category Search allows you to request POI results from given category. Search allows
     * to query POIs from one category at a time. Endpoint will only return POI results which are categorized as
     * specified. Response includes POI details such as address, coordinate location and classification.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI category to search for (e.g., "AIRPORT", "RESTAURANT"), must be properly URL encoded.
     *     Supported main categories can be requested by calling [Get Search POI Category Tree
     *     API](https://aka.ms/AzureMapsPOICategoryTree). List of available categories can also be found
     *     [here](https://docs.microsoft.com/azure/azure-maps/supported-search-categories). We recommend to use POI
     *     Search Category Tree API to request the supported categories.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<SearchAddressResult> searchPointOfInterestCategoryWithResponse(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        return searchPointOfInterestCategoryWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours,
                        context)
                .block();
    }

    /**
     * **Get POI by Category**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Points of Interest (POI) Category Search allows you to request POI results from given category. Search allows
     * to query POIs from one category at a time. Endpoint will only return POI results which are categorized as
     * specified. Response includes POI details such as address, coordinate location and classification.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI category to search for (e.g., "AIRPORT", "RESTAURANT"), must be properly URL encoded.
     *     Supported main categories can be requested by calling [Get Search POI Category Tree
     *     API](https://aka.ms/AzureMapsPOICategoryTree). List of available categories can also be found
     *     [here](https://docs.microsoft.com/azure/azure-maps/supported-search-categories). We recommend to use POI
     *     Search Category Tree API to request the supported categories.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public SearchAddressResult searchPointOfInterestCategory(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<Integer> categoryFilter,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            List<String> brandFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        return searchPointOfInterestCategoryWithResponse(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        categoryFilter,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        brandFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours,
                        Context.NONE)
                .getValue();
    }

    /**
     * **Get POI Category Tree**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>POI Category API provides a full list of supported Points of Interest (POI) categories and subcategories
     * together with their translations and synonyms. The returned content can be used to provide more meaningful
     * results through other Search Service APIs, like [Get Search
     * POI](https://docs.microsoft.com/rest/api/maps/search/getsearchpoi).
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, except NGT and NGT-Latn. Language tag is case insensitive. When data in specified language is not
     *     available for a specific field, default language is used (English).
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @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 this object is returned from a successful POI Category Tree call along with {@link Response} on
     *     successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<PointOfInterestCategoryTreeResult>> getPointOfInterestCategoryTreeWithResponseAsync(
            JsonFormat format, String language) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.getPointOfInterestCategoryTree(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                language,
                                accept,
                                context));
    }

    /**
     * **Get POI Category Tree**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>POI Category API provides a full list of supported Points of Interest (POI) categories and subcategories
     * together with their translations and synonyms. The returned content can be used to provide more meaningful
     * results through other Search Service APIs, like [Get Search
     * POI](https://docs.microsoft.com/rest/api/maps/search/getsearchpoi).
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, except NGT and NGT-Latn. Language tag is case insensitive. When data in specified language is not
     *     available for a specific field, default language is used (English).
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @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 this object is returned from a successful POI Category Tree call along with {@link Response} on
     *     successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<PointOfInterestCategoryTreeResult>> getPointOfInterestCategoryTreeWithResponseAsync(
            JsonFormat format, String language, Context context) {
        final String accept = "application/json";
        return service.getPointOfInterestCategoryTree(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                language,
                accept,
                context);
    }

    /**
     * **Get POI Category Tree**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>POI Category API provides a full list of supported Points of Interest (POI) categories and subcategories
     * together with their translations and synonyms. The returned content can be used to provide more meaningful
     * results through other Search Service APIs, like [Get Search
     * POI](https://docs.microsoft.com/rest/api/maps/search/getsearchpoi).
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, except NGT and NGT-Latn. Language tag is case insensitive. When data in specified language is not
     *     available for a specific field, default language is used (English).
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @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 this object is returned from a successful POI Category Tree call on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<PointOfInterestCategoryTreeResult> getPointOfInterestCategoryTreeAsync(
            JsonFormat format, String language) {
        return getPointOfInterestCategoryTreeWithResponseAsync(format, language)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Get POI Category Tree**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>POI Category API provides a full list of supported Points of Interest (POI) categories and subcategories
     * together with their translations and synonyms. The returned content can be used to provide more meaningful
     * results through other Search Service APIs, like [Get Search
     * POI](https://docs.microsoft.com/rest/api/maps/search/getsearchpoi).
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, except NGT and NGT-Latn. Language tag is case insensitive. When data in specified language is not
     *     available for a specific field, default language is used (English).
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @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 this object is returned from a successful POI Category Tree call on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<PointOfInterestCategoryTreeResult> getPointOfInterestCategoryTreeAsync(
            JsonFormat format, String language, Context context) {
        return getPointOfInterestCategoryTreeWithResponseAsync(format, language, context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Get POI Category Tree**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>POI Category API provides a full list of supported Points of Interest (POI) categories and subcategories
     * together with their translations and synonyms. The returned content can be used to provide more meaningful
     * results through other Search Service APIs, like [Get Search
     * POI](https://docs.microsoft.com/rest/api/maps/search/getsearchpoi).
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, except NGT and NGT-Latn. Language tag is case insensitive. When data in specified language is not
     *     available for a specific field, default language is used (English).
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @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 this object is returned from a successful POI Category Tree call along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<PointOfInterestCategoryTreeResult> getPointOfInterestCategoryTreeWithResponse(
            JsonFormat format, String language, Context context) {
        return getPointOfInterestCategoryTreeWithResponseAsync(format, language, context).block();
    }

    /**
     * **Get POI Category Tree**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>POI Category API provides a full list of supported Points of Interest (POI) categories and subcategories
     * together with their translations and synonyms. The returned content can be used to provide more meaningful
     * results through other Search Service APIs, like [Get Search
     * POI](https://docs.microsoft.com/rest/api/maps/search/getsearchpoi).
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, except NGT and NGT-Latn. Language tag is case insensitive. When data in specified language is not
     *     available for a specific field, default language is used (English).
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @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 this object is returned from a successful POI Category Tree call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public PointOfInterestCategoryTreeResult getPointOfInterestCategoryTree(JsonFormat format, String language) {
        return getPointOfInterestCategoryTreeWithResponse(format, language, Context.NONE).getValue();
    }

    /**
     * **Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>In many cases, the complete search service might be too much, for instance if you are only interested in
     * traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by
     * hitting the geocode endpoint with just the address or partial address in question. The geocoding search index
     * will be queried for everything above the street level data. No POIs will be returned. Note that the geocoder is
     * very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or
     * street or intersections as well as higher level geographies such as city centers, counties, states etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The address to search for (e.g., "1 Microsoft way, Redmond, WA"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchAddressWithResponseAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView) {
        final String accept = "application/json";
        String countryFilterConverted =
                (countryFilter == null)
                        ? null
                        : countryFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return FluxUtil.withContext(
                context ->
                        service.searchAddress(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                query,
                                isTypeAhead,
                                top,
                                skip,
                                countryFilterConverted,
                                lat,
                                lon,
                                radiusInMeters,
                                topLeft,
                                btmRight,
                                language,
                                extendedPostalCodesForConverted,
                                entityType,
                                localizedMapView,
                                accept,
                                context));
    }

    /**
     * **Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>In many cases, the complete search service might be too much, for instance if you are only interested in
     * traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by
     * hitting the geocode endpoint with just the address or partial address in question. The geocoding search index
     * will be queried for everything above the street level data. No POIs will be returned. Note that the geocoder is
     * very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or
     * street or intersections as well as higher level geographies such as city centers, counties, states etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The address to search for (e.g., "1 Microsoft way, Redmond, WA"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchAddressWithResponseAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            Context context) {
        final String accept = "application/json";
        String countryFilterConverted =
                (countryFilter == null)
                        ? null
                        : countryFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return service.searchAddress(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                query,
                isTypeAhead,
                top,
                skip,
                countryFilterConverted,
                lat,
                lon,
                radiusInMeters,
                topLeft,
                btmRight,
                language,
                extendedPostalCodesForConverted,
                entityType,
                localizedMapView,
                accept,
                context);
    }

    /**
     * **Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>In many cases, the complete search service might be too much, for instance if you are only interested in
     * traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by
     * hitting the geocode endpoint with just the address or partial address in question. The geocoding search index
     * will be queried for everything above the street level data. No POIs will be returned. Note that the geocoder is
     * very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or
     * street or intersections as well as higher level geographies such as city centers, counties, states etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The address to search for (e.g., "1 Microsoft way, Redmond, WA"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchAddressAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView) {
        return searchAddressWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        entityType,
                        localizedMapView)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>In many cases, the complete search service might be too much, for instance if you are only interested in
     * traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by
     * hitting the geocode endpoint with just the address or partial address in question. The geocoding search index
     * will be queried for everything above the street level data. No POIs will be returned. Note that the geocoder is
     * very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or
     * street or intersections as well as higher level geographies such as city centers, counties, states etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The address to search for (e.g., "1 Microsoft way, Redmond, WA"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchAddressAsync(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            Context context) {
        return searchAddressWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        entityType,
                        localizedMapView,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>In many cases, the complete search service might be too much, for instance if you are only interested in
     * traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by
     * hitting the geocode endpoint with just the address or partial address in question. The geocoding search index
     * will be queried for everything above the street level data. No POIs will be returned. Note that the geocoder is
     * very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or
     * street or intersections as well as higher level geographies such as city centers, counties, states etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The address to search for (e.g., "1 Microsoft way, Redmond, WA"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<SearchAddressResult> searchAddressWithResponse(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            Context context) {
        return searchAddressWithResponseAsync(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        entityType,
                        localizedMapView,
                        context)
                .block();
    }

    /**
     * **Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>In many cases, the complete search service might be too much, for instance if you are only interested in
     * traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by
     * hitting the geocode endpoint with just the address or partial address in question. The geocoding search index
     * will be queried for everything above the street level data. No POIs will be returned. Note that the geocoder is
     * very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or
     * street or intersections as well as higher level geographies such as city centers, counties, states etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The address to search for (e.g., "1 Microsoft way, Redmond, WA"), must be properly URL encoded.
     * @param isTypeAhead Boolean. If the typeahead flag is set, the query will be interpreted as a partial input and
     *     the search will enter predictive mode.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param countryFilter Comma separated string of country codes, e.g. FR,ES. This will limit the search to the
     *     specified countries.
     * @param lat Latitude where results should be biased. E.g. 37.337.
     * @param lon Longitude where results should be biased. E.g. -121.89.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param topLeft Top left position of the bounding box. E.g. 37.553,-122.453.
     * @param btmRight Bottom right position of the bounding box. E.g. 37.553,-122.453.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public SearchAddressResult searchAddress(
            ResponseFormat format,
            String query,
            Boolean isTypeAhead,
            Integer top,
            Integer skip,
            List<String> countryFilter,
            Double lat,
            Double lon,
            Integer radiusInMeters,
            String topLeft,
            String btmRight,
            String language,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView) {
        return searchAddressWithResponse(
                        format,
                        query,
                        isTypeAhead,
                        top,
                        skip,
                        countryFilter,
                        lat,
                        lon,
                        radiusInMeters,
                        topLeft,
                        btmRight,
                        language,
                        extendedPostalCodesFor,
                        entityType,
                        localizedMapView,
                        Context.NONE)
                .getValue();
    }

    /**
     * **Reverse Geocode to an Address**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable street address. Most often this is needed in tracking applications where you receive a GPS feed
     * from the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * address information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param includeSpeedLimit Boolean. To enable return of the posted speed limit.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param streetNumber Street number as a string. If a number is sent in along with the request, the response may
     *     include the side of the street (Left/Right) and also an offset position for that number.
     * @param includeRoadUse Boolean. To enable return of the road use array for reverse geocodes at street level.
     * @param roadUse To restrict reverse geocodes to a certain type of road use. The road use array for reverse
     *     geocodes can be one or more of LimitedAccess, Arterial, Terminal, Ramp, Rotary, LocalStreet.
     * @param allowFreeformNewline Format of newlines in the formatted address.
     *     <p>If true, the address will contain newlines. If false, newlines will be converted to commas.
     * @param includeMatchType Include information on the type of match the geocoder achieved in the response.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse call along with {@link Response} on
     *     successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<ReverseSearchAddressResult>> reverseSearchAddressWithResponseAsync(
            ResponseFormat format,
            List<Double> query,
            String language,
            Boolean includeSpeedLimit,
            Integer heading,
            Integer radiusInMeters,
            String streetNumber,
            Boolean includeRoadUse,
            List<RoadUseType> roadUse,
            Boolean allowFreeformNewline,
            Boolean includeMatchType,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView) {
        final String accept = "application/json";
        String queryConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(query, CollectionFormat.CSV);
        String roadUseConverted =
                (roadUse == null)
                        ? null
                        : roadUse.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(","));
        return FluxUtil.withContext(
                context ->
                        service.reverseSearchAddress(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                queryConverted,
                                language,
                                includeSpeedLimit,
                                heading,
                                radiusInMeters,
                                streetNumber,
                                includeRoadUse,
                                roadUseConverted,
                                allowFreeformNewline,
                                includeMatchType,
                                entityType,
                                localizedMapView,
                                accept,
                                context));
    }

    /**
     * **Reverse Geocode to an Address**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable street address. Most often this is needed in tracking applications where you receive a GPS feed
     * from the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * address information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param includeSpeedLimit Boolean. To enable return of the posted speed limit.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param streetNumber Street number as a string. If a number is sent in along with the request, the response may
     *     include the side of the street (Left/Right) and also an offset position for that number.
     * @param includeRoadUse Boolean. To enable return of the road use array for reverse geocodes at street level.
     * @param roadUse To restrict reverse geocodes to a certain type of road use. The road use array for reverse
     *     geocodes can be one or more of LimitedAccess, Arterial, Terminal, Ramp, Rotary, LocalStreet.
     * @param allowFreeformNewline Format of newlines in the formatted address.
     *     <p>If true, the address will contain newlines. If false, newlines will be converted to commas.
     * @param includeMatchType Include information on the type of match the geocoder achieved in the response.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse call along with {@link Response} on
     *     successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<ReverseSearchAddressResult>> reverseSearchAddressWithResponseAsync(
            ResponseFormat format,
            List<Double> query,
            String language,
            Boolean includeSpeedLimit,
            Integer heading,
            Integer radiusInMeters,
            String streetNumber,
            Boolean includeRoadUse,
            List<RoadUseType> roadUse,
            Boolean allowFreeformNewline,
            Boolean includeMatchType,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            Context context) {
        final String accept = "application/json";
        String queryConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(query, CollectionFormat.CSV);
        String roadUseConverted =
                (roadUse == null)
                        ? null
                        : roadUse.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(","));
        return service.reverseSearchAddress(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                queryConverted,
                language,
                includeSpeedLimit,
                heading,
                radiusInMeters,
                streetNumber,
                includeRoadUse,
                roadUseConverted,
                allowFreeformNewline,
                includeMatchType,
                entityType,
                localizedMapView,
                accept,
                context);
    }

    /**
     * **Reverse Geocode to an Address**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable street address. Most often this is needed in tracking applications where you receive a GPS feed
     * from the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * address information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param includeSpeedLimit Boolean. To enable return of the posted speed limit.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param streetNumber Street number as a string. If a number is sent in along with the request, the response may
     *     include the side of the street (Left/Right) and also an offset position for that number.
     * @param includeRoadUse Boolean. To enable return of the road use array for reverse geocodes at street level.
     * @param roadUse To restrict reverse geocodes to a certain type of road use. The road use array for reverse
     *     geocodes can be one or more of LimitedAccess, Arterial, Terminal, Ramp, Rotary, LocalStreet.
     * @param allowFreeformNewline Format of newlines in the formatted address.
     *     <p>If true, the address will contain newlines. If false, newlines will be converted to commas.
     * @param includeMatchType Include information on the type of match the geocoder achieved in the response.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse call on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<ReverseSearchAddressResult> reverseSearchAddressAsync(
            ResponseFormat format,
            List<Double> query,
            String language,
            Boolean includeSpeedLimit,
            Integer heading,
            Integer radiusInMeters,
            String streetNumber,
            Boolean includeRoadUse,
            List<RoadUseType> roadUse,
            Boolean allowFreeformNewline,
            Boolean includeMatchType,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView) {
        return reverseSearchAddressWithResponseAsync(
                        format,
                        query,
                        language,
                        includeSpeedLimit,
                        heading,
                        radiusInMeters,
                        streetNumber,
                        includeRoadUse,
                        roadUse,
                        allowFreeformNewline,
                        includeMatchType,
                        entityType,
                        localizedMapView)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Reverse Geocode to an Address**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable street address. Most often this is needed in tracking applications where you receive a GPS feed
     * from the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * address information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param includeSpeedLimit Boolean. To enable return of the posted speed limit.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param streetNumber Street number as a string. If a number is sent in along with the request, the response may
     *     include the side of the street (Left/Right) and also an offset position for that number.
     * @param includeRoadUse Boolean. To enable return of the road use array for reverse geocodes at street level.
     * @param roadUse To restrict reverse geocodes to a certain type of road use. The road use array for reverse
     *     geocodes can be one or more of LimitedAccess, Arterial, Terminal, Ramp, Rotary, LocalStreet.
     * @param allowFreeformNewline Format of newlines in the formatted address.
     *     <p>If true, the address will contain newlines. If false, newlines will be converted to commas.
     * @param includeMatchType Include information on the type of match the geocoder achieved in the response.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse call on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<ReverseSearchAddressResult> reverseSearchAddressAsync(
            ResponseFormat format,
            List<Double> query,
            String language,
            Boolean includeSpeedLimit,
            Integer heading,
            Integer radiusInMeters,
            String streetNumber,
            Boolean includeRoadUse,
            List<RoadUseType> roadUse,
            Boolean allowFreeformNewline,
            Boolean includeMatchType,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            Context context) {
        return reverseSearchAddressWithResponseAsync(
                        format,
                        query,
                        language,
                        includeSpeedLimit,
                        heading,
                        radiusInMeters,
                        streetNumber,
                        includeRoadUse,
                        roadUse,
                        allowFreeformNewline,
                        includeMatchType,
                        entityType,
                        localizedMapView,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Reverse Geocode to an Address**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable street address. Most often this is needed in tracking applications where you receive a GPS feed
     * from the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * address information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param includeSpeedLimit Boolean. To enable return of the posted speed limit.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param streetNumber Street number as a string. If a number is sent in along with the request, the response may
     *     include the side of the street (Left/Right) and also an offset position for that number.
     * @param includeRoadUse Boolean. To enable return of the road use array for reverse geocodes at street level.
     * @param roadUse To restrict reverse geocodes to a certain type of road use. The road use array for reverse
     *     geocodes can be one or more of LimitedAccess, Arterial, Terminal, Ramp, Rotary, LocalStreet.
     * @param allowFreeformNewline Format of newlines in the formatted address.
     *     <p>If true, the address will contain newlines. If false, newlines will be converted to commas.
     * @param includeMatchType Include information on the type of match the geocoder achieved in the response.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse call along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<ReverseSearchAddressResult> reverseSearchAddressWithResponse(
            ResponseFormat format,
            List<Double> query,
            String language,
            Boolean includeSpeedLimit,
            Integer heading,
            Integer radiusInMeters,
            String streetNumber,
            Boolean includeRoadUse,
            List<RoadUseType> roadUse,
            Boolean allowFreeformNewline,
            Boolean includeMatchType,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            Context context) {
        return reverseSearchAddressWithResponseAsync(
                        format,
                        query,
                        language,
                        includeSpeedLimit,
                        heading,
                        radiusInMeters,
                        streetNumber,
                        includeRoadUse,
                        roadUse,
                        allowFreeformNewline,
                        includeMatchType,
                        entityType,
                        localizedMapView,
                        context)
                .block();
    }

    /**
     * **Reverse Geocode to an Address**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable street address. Most often this is needed in tracking applications where you receive a GPS feed
     * from the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * address information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param includeSpeedLimit Boolean. To enable return of the posted speed limit.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param streetNumber Street number as a string. If a number is sent in along with the request, the response may
     *     include the side of the street (Left/Right) and also an offset position for that number.
     * @param includeRoadUse Boolean. To enable return of the road use array for reverse geocodes at street level.
     * @param roadUse To restrict reverse geocodes to a certain type of road use. The road use array for reverse
     *     geocodes can be one or more of LimitedAccess, Arterial, Terminal, Ramp, Rotary, LocalStreet.
     * @param allowFreeformNewline Format of newlines in the formatted address.
     *     <p>If true, the address will contain newlines. If false, newlines will be converted to commas.
     * @param includeMatchType Include information on the type of match the geocoder achieved in the response.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public ReverseSearchAddressResult reverseSearchAddress(
            ResponseFormat format,
            List<Double> query,
            String language,
            Boolean includeSpeedLimit,
            Integer heading,
            Integer radiusInMeters,
            String streetNumber,
            Boolean includeRoadUse,
            List<RoadUseType> roadUse,
            Boolean allowFreeformNewline,
            Boolean includeMatchType,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView) {
        return reverseSearchAddressWithResponse(
                        format,
                        query,
                        language,
                        includeSpeedLimit,
                        heading,
                        radiusInMeters,
                        streetNumber,
                        includeRoadUse,
                        roadUse,
                        allowFreeformNewline,
                        includeMatchType,
                        entityType,
                        localizedMapView,
                        Context.NONE)
                .getValue();
    }

    /**
     * **Reverse Geocode to a Cross Street**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable cross street. Most often this is needed in tracking applications where you receive a GPS feed from
     * the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * cross street information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse CrossStreet call along with {@link
     *     Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<ReverseSearchCrossStreetAddressResult>> reverseSearchCrossStreetAddressWithResponseAsync(
            ResponseFormat format,
            List<Double> query,
            Integer top,
            Integer heading,
            Integer radiusInMeters,
            String language,
            LocalizedMapView localizedMapView) {
        final String accept = "application/json";
        String queryConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(query, CollectionFormat.CSV);
        return FluxUtil.withContext(
                context ->
                        service.reverseSearchCrossStreetAddress(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                queryConverted,
                                top,
                                heading,
                                radiusInMeters,
                                language,
                                localizedMapView,
                                accept,
                                context));
    }

    /**
     * **Reverse Geocode to a Cross Street**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable cross street. Most often this is needed in tracking applications where you receive a GPS feed from
     * the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * cross street information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse CrossStreet call along with {@link
     *     Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<ReverseSearchCrossStreetAddressResult>> reverseSearchCrossStreetAddressWithResponseAsync(
            ResponseFormat format,
            List<Double> query,
            Integer top,
            Integer heading,
            Integer radiusInMeters,
            String language,
            LocalizedMapView localizedMapView,
            Context context) {
        final String accept = "application/json";
        String queryConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(query, CollectionFormat.CSV);
        return service.reverseSearchCrossStreetAddress(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                queryConverted,
                top,
                heading,
                radiusInMeters,
                language,
                localizedMapView,
                accept,
                context);
    }

    /**
     * **Reverse Geocode to a Cross Street**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable cross street. Most often this is needed in tracking applications where you receive a GPS feed from
     * the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * cross street information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse CrossStreet call on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<ReverseSearchCrossStreetAddressResult> reverseSearchCrossStreetAddressAsync(
            ResponseFormat format,
            List<Double> query,
            Integer top,
            Integer heading,
            Integer radiusInMeters,
            String language,
            LocalizedMapView localizedMapView) {
        return reverseSearchCrossStreetAddressWithResponseAsync(
                        format, query, top, heading, radiusInMeters, language, localizedMapView)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Reverse Geocode to a Cross Street**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable cross street. Most often this is needed in tracking applications where you receive a GPS feed from
     * the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * cross street information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse CrossStreet call on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<ReverseSearchCrossStreetAddressResult> reverseSearchCrossStreetAddressAsync(
            ResponseFormat format,
            List<Double> query,
            Integer top,
            Integer heading,
            Integer radiusInMeters,
            String language,
            LocalizedMapView localizedMapView,
            Context context) {
        return reverseSearchCrossStreetAddressWithResponseAsync(
                        format, query, top, heading, radiusInMeters, language, localizedMapView, context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Reverse Geocode to a Cross Street**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable cross street. Most often this is needed in tracking applications where you receive a GPS feed from
     * the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * cross street information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse CrossStreet call along with {@link
     *     Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<ReverseSearchCrossStreetAddressResult> reverseSearchCrossStreetAddressWithResponse(
            ResponseFormat format,
            List<Double> query,
            Integer top,
            Integer heading,
            Integer radiusInMeters,
            String language,
            LocalizedMapView localizedMapView,
            Context context) {
        return reverseSearchCrossStreetAddressWithResponseAsync(
                        format, query, top, heading, radiusInMeters, language, localizedMapView, context)
                .block();
    }

    /**
     * **Reverse Geocode to a Cross Street**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>There may be times when you need to translate a coordinate (example: 37.786505, -122.3862) into a human
     * understandable cross street. Most often this is needed in tracking applications where you receive a GPS feed from
     * the device or asset and wish to know what address where the coordinate is located. This endpoint will return
     * cross street information for a given coordinate.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The applicable query specified as a comma separated string composed by latitude followed by
     *     longitude e.g. "47.641268,-122.125679".
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param heading The directional heading of the vehicle in degrees, for travel along a segment of roadway. 0 is
     *     North, 90 is East and so on, values range from -360 to 360. The precision can include upto one decimal place.
     * @param radiusInMeters The radius in meters to for the results to be constrained to the defined area.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search Address Reverse CrossStreet call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public ReverseSearchCrossStreetAddressResult reverseSearchCrossStreetAddress(
            ResponseFormat format,
            List<Double> query,
            Integer top,
            Integer heading,
            Integer radiusInMeters,
            String language,
            LocalizedMapView localizedMapView) {
        return reverseSearchCrossStreetAddressWithResponse(
                        format, query, top, heading, radiusInMeters, language, localizedMapView, Context.NONE)
                .getValue();
    }

    /**
     * **Structured Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Azure Address Geocoding can also be accessed for structured address look up exclusively. The geocoding search
     * index will be queried for everything above the street level data. No POIs will be returned. Note that the
     * geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street
     * addresses or street or intersections as well as higher level geographies such as city centers, counties, states
     * etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param countryCode The 2 or 3 letter [ISO3166-1](https://www.iso.org/iso-3166-country-codes.html) country code
     *     portion of an address. E.g. US.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param streetNumber The street number portion of an address.
     * @param streetName The street name portion of an address.
     * @param crossStreet The cross street name for the structured address.
     * @param municipality The municipality portion of an address.
     * @param municipalitySubdivision The municipality subdivision (sub/super city) for the structured address.
     * @param countryTertiarySubdivision The named area for the structured address.
     * @param countrySecondarySubdivision The county for the structured address.
     * @param countrySubdivision The country subdivision portion of an address.
     * @param postalCode The postal code portion of an address.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchStructuredAddressWithResponseAsync(
            ResponseFormat format,
            String countryCode,
            String language,
            Integer top,
            Integer skip,
            String streetNumber,
            String streetName,
            String crossStreet,
            String municipality,
            String municipalitySubdivision,
            String countryTertiarySubdivision,
            String countrySecondarySubdivision,
            String countrySubdivision,
            String postalCode,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView) {
        final String accept = "application/json";
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return FluxUtil.withContext(
                context ->
                        service.searchStructuredAddress(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                language,
                                countryCode,
                                top,
                                skip,
                                streetNumber,
                                streetName,
                                crossStreet,
                                municipality,
                                municipalitySubdivision,
                                countryTertiarySubdivision,
                                countrySecondarySubdivision,
                                countrySubdivision,
                                postalCode,
                                extendedPostalCodesForConverted,
                                entityType,
                                localizedMapView,
                                accept,
                                context));
    }

    /**
     * **Structured Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Azure Address Geocoding can also be accessed for structured address look up exclusively. The geocoding search
     * index will be queried for everything above the street level data. No POIs will be returned. Note that the
     * geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street
     * addresses or street or intersections as well as higher level geographies such as city centers, counties, states
     * etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param countryCode The 2 or 3 letter [ISO3166-1](https://www.iso.org/iso-3166-country-codes.html) country code
     *     portion of an address. E.g. US.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param streetNumber The street number portion of an address.
     * @param streetName The street name portion of an address.
     * @param crossStreet The cross street name for the structured address.
     * @param municipality The municipality portion of an address.
     * @param municipalitySubdivision The municipality subdivision (sub/super city) for the structured address.
     * @param countryTertiarySubdivision The named area for the structured address.
     * @param countrySecondarySubdivision The county for the structured address.
     * @param countrySubdivision The country subdivision portion of an address.
     * @param postalCode The postal code portion of an address.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchStructuredAddressWithResponseAsync(
            ResponseFormat format,
            String countryCode,
            String language,
            Integer top,
            Integer skip,
            String streetNumber,
            String streetName,
            String crossStreet,
            String municipality,
            String municipalitySubdivision,
            String countryTertiarySubdivision,
            String countrySecondarySubdivision,
            String countrySubdivision,
            String postalCode,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            Context context) {
        final String accept = "application/json";
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return service.searchStructuredAddress(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                language,
                countryCode,
                top,
                skip,
                streetNumber,
                streetName,
                crossStreet,
                municipality,
                municipalitySubdivision,
                countryTertiarySubdivision,
                countrySecondarySubdivision,
                countrySubdivision,
                postalCode,
                extendedPostalCodesForConverted,
                entityType,
                localizedMapView,
                accept,
                context);
    }

    /**
     * **Structured Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Azure Address Geocoding can also be accessed for structured address look up exclusively. The geocoding search
     * index will be queried for everything above the street level data. No POIs will be returned. Note that the
     * geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street
     * addresses or street or intersections as well as higher level geographies such as city centers, counties, states
     * etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param countryCode The 2 or 3 letter [ISO3166-1](https://www.iso.org/iso-3166-country-codes.html) country code
     *     portion of an address. E.g. US.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param streetNumber The street number portion of an address.
     * @param streetName The street name portion of an address.
     * @param crossStreet The cross street name for the structured address.
     * @param municipality The municipality portion of an address.
     * @param municipalitySubdivision The municipality subdivision (sub/super city) for the structured address.
     * @param countryTertiarySubdivision The named area for the structured address.
     * @param countrySecondarySubdivision The county for the structured address.
     * @param countrySubdivision The country subdivision portion of an address.
     * @param postalCode The postal code portion of an address.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchStructuredAddressAsync(
            ResponseFormat format,
            String countryCode,
            String language,
            Integer top,
            Integer skip,
            String streetNumber,
            String streetName,
            String crossStreet,
            String municipality,
            String municipalitySubdivision,
            String countryTertiarySubdivision,
            String countrySecondarySubdivision,
            String countrySubdivision,
            String postalCode,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView) {
        return searchStructuredAddressWithResponseAsync(
                        format,
                        countryCode,
                        language,
                        top,
                        skip,
                        streetNumber,
                        streetName,
                        crossStreet,
                        municipality,
                        municipalitySubdivision,
                        countryTertiarySubdivision,
                        countrySecondarySubdivision,
                        countrySubdivision,
                        postalCode,
                        extendedPostalCodesFor,
                        entityType,
                        localizedMapView)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Structured Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Azure Address Geocoding can also be accessed for structured address look up exclusively. The geocoding search
     * index will be queried for everything above the street level data. No POIs will be returned. Note that the
     * geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street
     * addresses or street or intersections as well as higher level geographies such as city centers, counties, states
     * etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param countryCode The 2 or 3 letter [ISO3166-1](https://www.iso.org/iso-3166-country-codes.html) country code
     *     portion of an address. E.g. US.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param streetNumber The street number portion of an address.
     * @param streetName The street name portion of an address.
     * @param crossStreet The cross street name for the structured address.
     * @param municipality The municipality portion of an address.
     * @param municipalitySubdivision The municipality subdivision (sub/super city) for the structured address.
     * @param countryTertiarySubdivision The named area for the structured address.
     * @param countrySecondarySubdivision The county for the structured address.
     * @param countrySubdivision The country subdivision portion of an address.
     * @param postalCode The postal code portion of an address.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchStructuredAddressAsync(
            ResponseFormat format,
            String countryCode,
            String language,
            Integer top,
            Integer skip,
            String streetNumber,
            String streetName,
            String crossStreet,
            String municipality,
            String municipalitySubdivision,
            String countryTertiarySubdivision,
            String countrySecondarySubdivision,
            String countrySubdivision,
            String postalCode,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            Context context) {
        return searchStructuredAddressWithResponseAsync(
                        format,
                        countryCode,
                        language,
                        top,
                        skip,
                        streetNumber,
                        streetName,
                        crossStreet,
                        municipality,
                        municipalitySubdivision,
                        countryTertiarySubdivision,
                        countrySecondarySubdivision,
                        countrySubdivision,
                        postalCode,
                        extendedPostalCodesFor,
                        entityType,
                        localizedMapView,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Structured Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Azure Address Geocoding can also be accessed for structured address look up exclusively. The geocoding search
     * index will be queried for everything above the street level data. No POIs will be returned. Note that the
     * geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street
     * addresses or street or intersections as well as higher level geographies such as city centers, counties, states
     * etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param countryCode The 2 or 3 letter [ISO3166-1](https://www.iso.org/iso-3166-country-codes.html) country code
     *     portion of an address. E.g. US.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param streetNumber The street number portion of an address.
     * @param streetName The street name portion of an address.
     * @param crossStreet The cross street name for the structured address.
     * @param municipality The municipality portion of an address.
     * @param municipalitySubdivision The municipality subdivision (sub/super city) for the structured address.
     * @param countryTertiarySubdivision The named area for the structured address.
     * @param countrySecondarySubdivision The county for the structured address.
     * @param countrySubdivision The country subdivision portion of an address.
     * @param postalCode The postal code portion of an address.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<SearchAddressResult> searchStructuredAddressWithResponse(
            ResponseFormat format,
            String countryCode,
            String language,
            Integer top,
            Integer skip,
            String streetNumber,
            String streetName,
            String crossStreet,
            String municipality,
            String municipalitySubdivision,
            String countryTertiarySubdivision,
            String countrySecondarySubdivision,
            String countrySubdivision,
            String postalCode,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView,
            Context context) {
        return searchStructuredAddressWithResponseAsync(
                        format,
                        countryCode,
                        language,
                        top,
                        skip,
                        streetNumber,
                        streetName,
                        crossStreet,
                        municipality,
                        municipalitySubdivision,
                        countryTertiarySubdivision,
                        countrySecondarySubdivision,
                        countrySubdivision,
                        postalCode,
                        extendedPostalCodesFor,
                        entityType,
                        localizedMapView,
                        context)
                .block();
    }

    /**
     * **Structured Address Geocoding**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>Azure Address Geocoding can also be accessed for structured address look up exclusively. The geocoding search
     * index will be queried for everything above the street level data. No POIs will be returned. Note that the
     * geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street
     * addresses or street or intersections as well as higher level geographies such as city centers, counties, states
     * etc.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param countryCode The 2 or 3 letter [ISO3166-1](https://www.iso.org/iso-3166-country-codes.html) country code
     *     portion of an address. E.g. US.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param skip Starting offset of the returned results within the full result set. Default: 0, minimum: 0 and
     *     maximum: 1900.
     * @param streetNumber The street number portion of an address.
     * @param streetName The street name portion of an address.
     * @param crossStreet The cross street name for the structured address.
     * @param municipality The municipality portion of an address.
     * @param municipalitySubdivision The municipality subdivision (sub/super city) for the structured address.
     * @param countryTertiarySubdivision The named area for the structured address.
     * @param countrySecondarySubdivision The county for the structured address.
     * @param countrySubdivision The country subdivision portion of an address.
     * @param postalCode The postal code portion of an address.
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param entityType Specifies the level of filtering performed on geographies. Narrows the search for specified
     *     geography entity types, e.g. return only municipality. The resulting response will contain the geography ID
     *     as well as the entity type matched. If you provide more than one entity as a comma separated list, endpoint
     *     will return the 'smallest entity available'. Returned Geometry ID can be used to get the geometry of that
     *     geography via [Get Search Polygon](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon) API. The
     *     following parameters are ignored when entityType is set:
     *     <p>* heading * number * returnRoadUse * returnSpeedLimit * roadUse * returnMatchType.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @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 this object is returned from a successful Search calls.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public SearchAddressResult searchStructuredAddress(
            ResponseFormat format,
            String countryCode,
            String language,
            Integer top,
            Integer skip,
            String streetNumber,
            String streetName,
            String crossStreet,
            String municipality,
            String municipalitySubdivision,
            String countryTertiarySubdivision,
            String countrySecondarySubdivision,
            String countrySubdivision,
            String postalCode,
            List<SearchIndexes> extendedPostalCodesFor,
            GeographicEntityType entityType,
            LocalizedMapView localizedMapView) {
        return searchStructuredAddressWithResponse(
                        format,
                        countryCode,
                        language,
                        top,
                        skip,
                        streetNumber,
                        streetName,
                        crossStreet,
                        municipality,
                        municipalitySubdivision,
                        countryTertiarySubdivision,
                        countrySecondarySubdivision,
                        countrySubdivision,
                        postalCode,
                        extendedPostalCodesFor,
                        entityType,
                        localizedMapView,
                        Context.NONE)
                .getValue();
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Geometry endpoint allows you to perform a free form search inside a single geometry or many of
     * them. The search results that fall inside the geometry/geometries will be returned.&lt;br&gt;&lt;br&gt;To send
     * the geometry you will use a `POST` request where the request body will contain the `geometry` object represented
     * as a `GeoJSON` type and the `Content-Type` header will be set to `application/json`. The geographical features to
     * be searched can be modeled as Polygon and/or Circle geometries represented using any one of the following
     * `GeoJSON` types:&lt;ul&gt;&lt;li&gt;**GeoJSON FeatureCollection** &lt;br&gt;The `geometry` can be represented as
     * a `GeoJSON FeatureCollection` object. This is the recommended option if the geometry contains both Polygons and
     * Circles. The `FeatureCollection` can contain a max of 50 `GeoJSON Feature` objects. Each `Feature` object should
     * represent either a Polygon or a Circle with the following conditions:&lt;ul
     * style="list-style-type:none"&gt;&lt;li&gt;A `Feature` object for the Polygon geometry can have a max of 50
     * coordinates and it's properties must be empty.&lt;/li&gt;&lt;li&gt;A `Feature` object for the Circle geometry is
     * composed of a _center_ represented using a `GeoJSON Point` type and a _radius_ value (in meters) which must be
     * specified in the object's properties along with the _subType_ property whose value should be
     * 'Circle'.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt; Please see the Examples section below for a sample `FeatureCollection`
     * representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON GeometryCollection**&lt;br&gt;The `geometry`
     * can be represented as a `GeoJSON GeometryCollection` object. This is the recommended option if the geometry
     * contains a list of Polygons only. The `GeometryCollection` can contain a max of 50 `GeoJSON Polygon` objects.
     * Each `Polygon` object can have a max of 50 coordinates. Please see the Examples section below for a sample
     * `GeometryCollection` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON Polygon**&lt;br&gt;The
     * `geometry` can be represented as a `GeoJSON Polygon` object. This is the recommended option if the geometry
     * contains a single Polygon. The `Polygon` object can have a max of 50 coordinates. Please see the Examples section
     * below for a sample `Polygon` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;.&lt;br&gt;&lt;br&gt;.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param geometry This represents the geometry for one or more geographical features (parks, state boundary etc.)
     *     to search in and should be a GeoJSON compliant type. Please refer to [RFC
     *     7946](https://tools.ietf.org/html/rfc7946) for details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchInsideGeometryWithResponseAsync(
            ResponseFormat format,
            String query,
            SearchInsideGeometryRequest geometry,
            Integer top,
            String language,
            List<Integer> categoryFilter,
            List<SearchIndexes> extendedPostalCodesFor,
            List<SearchIndexes> indexFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        final String accept = "application/json";
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String indexFilterConverted =
                (indexFilter == null)
                        ? null
                        : indexFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return FluxUtil.withContext(
                context ->
                        service.searchInsideGeometry(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                query,
                                top,
                                language,
                                categoryFilterConverted,
                                extendedPostalCodesForConverted,
                                indexFilterConverted,
                                localizedMapView,
                                operatingHours,
                                geometry,
                                accept,
                                context));
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Geometry endpoint allows you to perform a free form search inside a single geometry or many of
     * them. The search results that fall inside the geometry/geometries will be returned.&lt;br&gt;&lt;br&gt;To send
     * the geometry you will use a `POST` request where the request body will contain the `geometry` object represented
     * as a `GeoJSON` type and the `Content-Type` header will be set to `application/json`. The geographical features to
     * be searched can be modeled as Polygon and/or Circle geometries represented using any one of the following
     * `GeoJSON` types:&lt;ul&gt;&lt;li&gt;**GeoJSON FeatureCollection** &lt;br&gt;The `geometry` can be represented as
     * a `GeoJSON FeatureCollection` object. This is the recommended option if the geometry contains both Polygons and
     * Circles. The `FeatureCollection` can contain a max of 50 `GeoJSON Feature` objects. Each `Feature` object should
     * represent either a Polygon or a Circle with the following conditions:&lt;ul
     * style="list-style-type:none"&gt;&lt;li&gt;A `Feature` object for the Polygon geometry can have a max of 50
     * coordinates and it's properties must be empty.&lt;/li&gt;&lt;li&gt;A `Feature` object for the Circle geometry is
     * composed of a _center_ represented using a `GeoJSON Point` type and a _radius_ value (in meters) which must be
     * specified in the object's properties along with the _subType_ property whose value should be
     * 'Circle'.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt; Please see the Examples section below for a sample `FeatureCollection`
     * representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON GeometryCollection**&lt;br&gt;The `geometry`
     * can be represented as a `GeoJSON GeometryCollection` object. This is the recommended option if the geometry
     * contains a list of Polygons only. The `GeometryCollection` can contain a max of 50 `GeoJSON Polygon` objects.
     * Each `Polygon` object can have a max of 50 coordinates. Please see the Examples section below for a sample
     * `GeometryCollection` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON Polygon**&lt;br&gt;The
     * `geometry` can be represented as a `GeoJSON Polygon` object. This is the recommended option if the geometry
     * contains a single Polygon. The `Polygon` object can have a max of 50 coordinates. Please see the Examples section
     * below for a sample `Polygon` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;.&lt;br&gt;&lt;br&gt;.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param geometry This represents the geometry for one or more geographical features (parks, state boundary etc.)
     *     to search in and should be a GeoJSON compliant type. Please refer to [RFC
     *     7946](https://tools.ietf.org/html/rfc7946) for details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchInsideGeometryWithResponseAsync(
            ResponseFormat format,
            String query,
            SearchInsideGeometryRequest geometry,
            Integer top,
            String language,
            List<Integer> categoryFilter,
            List<SearchIndexes> extendedPostalCodesFor,
            List<SearchIndexes> indexFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        final String accept = "application/json";
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String extendedPostalCodesForConverted =
                (extendedPostalCodesFor == null)
                        ? null
                        : extendedPostalCodesFor.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String indexFilterConverted =
                (indexFilter == null)
                        ? null
                        : indexFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return service.searchInsideGeometry(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                query,
                top,
                language,
                categoryFilterConverted,
                extendedPostalCodesForConverted,
                indexFilterConverted,
                localizedMapView,
                operatingHours,
                geometry,
                accept,
                context);
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Geometry endpoint allows you to perform a free form search inside a single geometry or many of
     * them. The search results that fall inside the geometry/geometries will be returned.&lt;br&gt;&lt;br&gt;To send
     * the geometry you will use a `POST` request where the request body will contain the `geometry` object represented
     * as a `GeoJSON` type and the `Content-Type` header will be set to `application/json`. The geographical features to
     * be searched can be modeled as Polygon and/or Circle geometries represented using any one of the following
     * `GeoJSON` types:&lt;ul&gt;&lt;li&gt;**GeoJSON FeatureCollection** &lt;br&gt;The `geometry` can be represented as
     * a `GeoJSON FeatureCollection` object. This is the recommended option if the geometry contains both Polygons and
     * Circles. The `FeatureCollection` can contain a max of 50 `GeoJSON Feature` objects. Each `Feature` object should
     * represent either a Polygon or a Circle with the following conditions:&lt;ul
     * style="list-style-type:none"&gt;&lt;li&gt;A `Feature` object for the Polygon geometry can have a max of 50
     * coordinates and it's properties must be empty.&lt;/li&gt;&lt;li&gt;A `Feature` object for the Circle geometry is
     * composed of a _center_ represented using a `GeoJSON Point` type and a _radius_ value (in meters) which must be
     * specified in the object's properties along with the _subType_ property whose value should be
     * 'Circle'.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt; Please see the Examples section below for a sample `FeatureCollection`
     * representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON GeometryCollection**&lt;br&gt;The `geometry`
     * can be represented as a `GeoJSON GeometryCollection` object. This is the recommended option if the geometry
     * contains a list of Polygons only. The `GeometryCollection` can contain a max of 50 `GeoJSON Polygon` objects.
     * Each `Polygon` object can have a max of 50 coordinates. Please see the Examples section below for a sample
     * `GeometryCollection` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON Polygon**&lt;br&gt;The
     * `geometry` can be represented as a `GeoJSON Polygon` object. This is the recommended option if the geometry
     * contains a single Polygon. The `Polygon` object can have a max of 50 coordinates. Please see the Examples section
     * below for a sample `Polygon` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;.&lt;br&gt;&lt;br&gt;.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param geometry This represents the geometry for one or more geographical features (parks, state boundary etc.)
     *     to search in and should be a GeoJSON compliant type. Please refer to [RFC
     *     7946](https://tools.ietf.org/html/rfc7946) for details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchInsideGeometryAsync(
            ResponseFormat format,
            String query,
            SearchInsideGeometryRequest geometry,
            Integer top,
            String language,
            List<Integer> categoryFilter,
            List<SearchIndexes> extendedPostalCodesFor,
            List<SearchIndexes> indexFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        return searchInsideGeometryWithResponseAsync(
                        format,
                        query,
                        geometry,
                        top,
                        language,
                        categoryFilter,
                        extendedPostalCodesFor,
                        indexFilter,
                        localizedMapView,
                        operatingHours)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Geometry endpoint allows you to perform a free form search inside a single geometry or many of
     * them. The search results that fall inside the geometry/geometries will be returned.&lt;br&gt;&lt;br&gt;To send
     * the geometry you will use a `POST` request where the request body will contain the `geometry` object represented
     * as a `GeoJSON` type and the `Content-Type` header will be set to `application/json`. The geographical features to
     * be searched can be modeled as Polygon and/or Circle geometries represented using any one of the following
     * `GeoJSON` types:&lt;ul&gt;&lt;li&gt;**GeoJSON FeatureCollection** &lt;br&gt;The `geometry` can be represented as
     * a `GeoJSON FeatureCollection` object. This is the recommended option if the geometry contains both Polygons and
     * Circles. The `FeatureCollection` can contain a max of 50 `GeoJSON Feature` objects. Each `Feature` object should
     * represent either a Polygon or a Circle with the following conditions:&lt;ul
     * style="list-style-type:none"&gt;&lt;li&gt;A `Feature` object for the Polygon geometry can have a max of 50
     * coordinates and it's properties must be empty.&lt;/li&gt;&lt;li&gt;A `Feature` object for the Circle geometry is
     * composed of a _center_ represented using a `GeoJSON Point` type and a _radius_ value (in meters) which must be
     * specified in the object's properties along with the _subType_ property whose value should be
     * 'Circle'.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt; Please see the Examples section below for a sample `FeatureCollection`
     * representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON GeometryCollection**&lt;br&gt;The `geometry`
     * can be represented as a `GeoJSON GeometryCollection` object. This is the recommended option if the geometry
     * contains a list of Polygons only. The `GeometryCollection` can contain a max of 50 `GeoJSON Polygon` objects.
     * Each `Polygon` object can have a max of 50 coordinates. Please see the Examples section below for a sample
     * `GeometryCollection` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON Polygon**&lt;br&gt;The
     * `geometry` can be represented as a `GeoJSON Polygon` object. This is the recommended option if the geometry
     * contains a single Polygon. The `Polygon` object can have a max of 50 coordinates. Please see the Examples section
     * below for a sample `Polygon` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;.&lt;br&gt;&lt;br&gt;.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param geometry This represents the geometry for one or more geographical features (parks, state boundary etc.)
     *     to search in and should be a GeoJSON compliant type. Please refer to [RFC
     *     7946](https://tools.ietf.org/html/rfc7946) for details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchInsideGeometryAsync(
            ResponseFormat format,
            String query,
            SearchInsideGeometryRequest geometry,
            Integer top,
            String language,
            List<Integer> categoryFilter,
            List<SearchIndexes> extendedPostalCodesFor,
            List<SearchIndexes> indexFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        return searchInsideGeometryWithResponseAsync(
                        format,
                        query,
                        geometry,
                        top,
                        language,
                        categoryFilter,
                        extendedPostalCodesFor,
                        indexFilter,
                        localizedMapView,
                        operatingHours,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Geometry endpoint allows you to perform a free form search inside a single geometry or many of
     * them. The search results that fall inside the geometry/geometries will be returned.&lt;br&gt;&lt;br&gt;To send
     * the geometry you will use a `POST` request where the request body will contain the `geometry` object represented
     * as a `GeoJSON` type and the `Content-Type` header will be set to `application/json`. The geographical features to
     * be searched can be modeled as Polygon and/or Circle geometries represented using any one of the following
     * `GeoJSON` types:&lt;ul&gt;&lt;li&gt;**GeoJSON FeatureCollection** &lt;br&gt;The `geometry` can be represented as
     * a `GeoJSON FeatureCollection` object. This is the recommended option if the geometry contains both Polygons and
     * Circles. The `FeatureCollection` can contain a max of 50 `GeoJSON Feature` objects. Each `Feature` object should
     * represent either a Polygon or a Circle with the following conditions:&lt;ul
     * style="list-style-type:none"&gt;&lt;li&gt;A `Feature` object for the Polygon geometry can have a max of 50
     * coordinates and it's properties must be empty.&lt;/li&gt;&lt;li&gt;A `Feature` object for the Circle geometry is
     * composed of a _center_ represented using a `GeoJSON Point` type and a _radius_ value (in meters) which must be
     * specified in the object's properties along with the _subType_ property whose value should be
     * 'Circle'.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt; Please see the Examples section below for a sample `FeatureCollection`
     * representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON GeometryCollection**&lt;br&gt;The `geometry`
     * can be represented as a `GeoJSON GeometryCollection` object. This is the recommended option if the geometry
     * contains a list of Polygons only. The `GeometryCollection` can contain a max of 50 `GeoJSON Polygon` objects.
     * Each `Polygon` object can have a max of 50 coordinates. Please see the Examples section below for a sample
     * `GeometryCollection` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON Polygon**&lt;br&gt;The
     * `geometry` can be represented as a `GeoJSON Polygon` object. This is the recommended option if the geometry
     * contains a single Polygon. The `Polygon` object can have a max of 50 coordinates. Please see the Examples section
     * below for a sample `Polygon` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;.&lt;br&gt;&lt;br&gt;.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param geometry This represents the geometry for one or more geographical features (parks, state boundary etc.)
     *     to search in and should be a GeoJSON compliant type. Please refer to [RFC
     *     7946](https://tools.ietf.org/html/rfc7946) for details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<SearchAddressResult> searchInsideGeometryWithResponse(
            ResponseFormat format,
            String query,
            SearchInsideGeometryRequest geometry,
            Integer top,
            String language,
            List<Integer> categoryFilter,
            List<SearchIndexes> extendedPostalCodesFor,
            List<SearchIndexes> indexFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        return searchInsideGeometryWithResponseAsync(
                        format,
                        query,
                        geometry,
                        top,
                        language,
                        categoryFilter,
                        extendedPostalCodesFor,
                        indexFilter,
                        localizedMapView,
                        operatingHours,
                        context)
                .block();
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Geometry endpoint allows you to perform a free form search inside a single geometry or many of
     * them. The search results that fall inside the geometry/geometries will be returned.&lt;br&gt;&lt;br&gt;To send
     * the geometry you will use a `POST` request where the request body will contain the `geometry` object represented
     * as a `GeoJSON` type and the `Content-Type` header will be set to `application/json`. The geographical features to
     * be searched can be modeled as Polygon and/or Circle geometries represented using any one of the following
     * `GeoJSON` types:&lt;ul&gt;&lt;li&gt;**GeoJSON FeatureCollection** &lt;br&gt;The `geometry` can be represented as
     * a `GeoJSON FeatureCollection` object. This is the recommended option if the geometry contains both Polygons and
     * Circles. The `FeatureCollection` can contain a max of 50 `GeoJSON Feature` objects. Each `Feature` object should
     * represent either a Polygon or a Circle with the following conditions:&lt;ul
     * style="list-style-type:none"&gt;&lt;li&gt;A `Feature` object for the Polygon geometry can have a max of 50
     * coordinates and it's properties must be empty.&lt;/li&gt;&lt;li&gt;A `Feature` object for the Circle geometry is
     * composed of a _center_ represented using a `GeoJSON Point` type and a _radius_ value (in meters) which must be
     * specified in the object's properties along with the _subType_ property whose value should be
     * 'Circle'.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt; Please see the Examples section below for a sample `FeatureCollection`
     * representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON GeometryCollection**&lt;br&gt;The `geometry`
     * can be represented as a `GeoJSON GeometryCollection` object. This is the recommended option if the geometry
     * contains a list of Polygons only. The `GeometryCollection` can contain a max of 50 `GeoJSON Polygon` objects.
     * Each `Polygon` object can have a max of 50 coordinates. Please see the Examples section below for a sample
     * `GeometryCollection` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;**GeoJSON Polygon**&lt;br&gt;The
     * `geometry` can be represented as a `GeoJSON Polygon` object. This is the recommended option if the geometry
     * contains a single Polygon. The `Polygon` object can have a max of 50 coordinates. Please see the Examples section
     * below for a sample `Polygon` representation.&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;.&lt;br&gt;&lt;br&gt;.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param geometry This represents the geometry for one or more geographical features (parks, state boundary etc.)
     *     to search in and should be a GeoJSON compliant type. Please refer to [RFC
     *     7946](https://tools.ietf.org/html/rfc7946) for details.
     * @param top Maximum number of responses that will be returned. Default: 10, minimum: 1 and maximum: 100.
     * @param language Language in which search results should be returned. Should be one of supported IETF language
     *     tags, case insensitive. When data in specified language is not available for a specific field, default
     *     language is used.
     *     <p>Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for
     *     details.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param extendedPostalCodesFor Indexes for which extended postal codes should be included in the results.
     *     <p>Available indexes are:
     *     <p>**Addr** = Address ranges
     *     <p>**Geo** = Geographies
     *     <p>**PAD** = Point Addresses
     *     <p>**POI** = Points of Interest
     *     <p>**Str** = Streets
     *     <p>**XStr** = Cross Streets (intersections)
     *     <p>Value should be a comma separated list of index types (in any order) or **None** for no indexes.
     *     <p>By default extended postal codes are included for all indexes except Geo. Extended postal code lists for
     *     geographies can be quite long so they have to be explicitly requested when needed.
     *     <p>Usage examples:
     *     <p>extendedPostalCodesFor=POI
     *     <p>extendedPostalCodesFor=PAD,Addr,POI
     *     <p>extendedPostalCodesFor=None
     *     <p>Extended postal code is returned as an **extendedPostalCode** property of an address. Availability is
     *     region-dependent.
     * @param indexFilter A comma separated list of indexes which should be utilized for the search. Item order does not
     *     matter. Available indexes are: Addr = Address range interpolation, Geo = Geographies, PAD = Point Addresses,
     *     POI = Points of interest, Str = Streets, Xstr = Cross Streets (intersections).
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public SearchAddressResult searchInsideGeometry(
            ResponseFormat format,
            String query,
            SearchInsideGeometryRequest geometry,
            Integer top,
            String language,
            List<Integer> categoryFilter,
            List<SearchIndexes> extendedPostalCodesFor,
            List<SearchIndexes> indexFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        return searchInsideGeometryWithResponse(
                        format,
                        query,
                        geometry,
                        top,
                        language,
                        categoryFilter,
                        extendedPostalCodesFor,
                        indexFilter,
                        localizedMapView,
                        operatingHours,
                        Context.NONE)
                .getValue();
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Along Route endpoint allows you to perform a fuzzy search for POIs along a specified route. This
     * search is constrained by specifying the `maxDetourTime` limiting measure.&lt;br&gt;&lt;br&gt;To send the
     * route-points you will use a `POST` request where the request body will contain the `route` object represented as
     * a `GeoJSON LineString` type and the `Content-Type` header will be set to `application/json`. Each route-point in
     * `route` is represented as a `GeoJSON Position` type i.e. an array where the _longitude_ value is followed by the
     * _latitude_ value and the _altitude_ value is ignored. The `route` should contain at least 2
     * route-points.&lt;br&gt;&lt;br&gt;It is possible that original route will be altered, some of it's points may be
     * skipped. If the route that passes through the found point is faster than the original one, the `detourTime` value
     * in the response is negative.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param maxDetourTime Maximum detour time of the point of interest in seconds. Max value is 3600 seconds.
     * @param route This represents the route to search along and should be a valid `GeoJSON LineString` type. Please
     *     refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details.
     * @param top Maximum number of responses that will be returned. Default value is 10. Max value is 20.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchAlongRouteWithResponseAsync(
            ResponseFormat format,
            String query,
            int maxDetourTime,
            SearchAlongRouteRequest route,
            Integer top,
            List<String> brandFilter,
            List<Integer> categoryFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        final String accept = "application/json";
        String brandFilterConverted =
                (brandFilter == null)
                        ? null
                        : brandFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String electricVehicleConnectorFilterConverted =
                (electricVehicleConnectorFilter == null)
                        ? null
                        : electricVehicleConnectorFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return FluxUtil.withContext(
                context ->
                        service.searchAlongRoute(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                query,
                                maxDetourTime,
                                top,
                                brandFilterConverted,
                                categoryFilterConverted,
                                electricVehicleConnectorFilterConverted,
                                localizedMapView,
                                operatingHours,
                                route,
                                accept,
                                context));
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Along Route endpoint allows you to perform a fuzzy search for POIs along a specified route. This
     * search is constrained by specifying the `maxDetourTime` limiting measure.&lt;br&gt;&lt;br&gt;To send the
     * route-points you will use a `POST` request where the request body will contain the `route` object represented as
     * a `GeoJSON LineString` type and the `Content-Type` header will be set to `application/json`. Each route-point in
     * `route` is represented as a `GeoJSON Position` type i.e. an array where the _longitude_ value is followed by the
     * _latitude_ value and the _altitude_ value is ignored. The `route` should contain at least 2
     * route-points.&lt;br&gt;&lt;br&gt;It is possible that original route will be altered, some of it's points may be
     * skipped. If the route that passes through the found point is faster than the original one, the `detourTime` value
     * in the response is negative.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param maxDetourTime Maximum detour time of the point of interest in seconds. Max value is 3600 seconds.
     * @param route This represents the route to search along and should be a valid `GeoJSON LineString` type. Please
     *     refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details.
     * @param top Maximum number of responses that will be returned. Default value is 10. Max value is 20.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressResult>> searchAlongRouteWithResponseAsync(
            ResponseFormat format,
            String query,
            int maxDetourTime,
            SearchAlongRouteRequest route,
            Integer top,
            List<String> brandFilter,
            List<Integer> categoryFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        final String accept = "application/json";
        String brandFilterConverted =
                (brandFilter == null)
                        ? null
                        : brandFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        String categoryFilterConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(categoryFilter, CollectionFormat.CSV);
        String electricVehicleConnectorFilterConverted =
                (electricVehicleConnectorFilter == null)
                        ? null
                        : electricVehicleConnectorFilter.stream()
                                .map(value -> Objects.toString(value, ""))
                                .collect(Collectors.joining(","));
        return service.searchAlongRoute(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                query,
                maxDetourTime,
                top,
                brandFilterConverted,
                categoryFilterConverted,
                electricVehicleConnectorFilterConverted,
                localizedMapView,
                operatingHours,
                route,
                accept,
                context);
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Along Route endpoint allows you to perform a fuzzy search for POIs along a specified route. This
     * search is constrained by specifying the `maxDetourTime` limiting measure.&lt;br&gt;&lt;br&gt;To send the
     * route-points you will use a `POST` request where the request body will contain the `route` object represented as
     * a `GeoJSON LineString` type and the `Content-Type` header will be set to `application/json`. Each route-point in
     * `route` is represented as a `GeoJSON Position` type i.e. an array where the _longitude_ value is followed by the
     * _latitude_ value and the _altitude_ value is ignored. The `route` should contain at least 2
     * route-points.&lt;br&gt;&lt;br&gt;It is possible that original route will be altered, some of it's points may be
     * skipped. If the route that passes through the found point is faster than the original one, the `detourTime` value
     * in the response is negative.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param maxDetourTime Maximum detour time of the point of interest in seconds. Max value is 3600 seconds.
     * @param route This represents the route to search along and should be a valid `GeoJSON LineString` type. Please
     *     refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details.
     * @param top Maximum number of responses that will be returned. Default value is 10. Max value is 20.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchAlongRouteAsync(
            ResponseFormat format,
            String query,
            int maxDetourTime,
            SearchAlongRouteRequest route,
            Integer top,
            List<String> brandFilter,
            List<Integer> categoryFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        return searchAlongRouteWithResponseAsync(
                        format,
                        query,
                        maxDetourTime,
                        route,
                        top,
                        brandFilter,
                        categoryFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Along Route endpoint allows you to perform a fuzzy search for POIs along a specified route. This
     * search is constrained by specifying the `maxDetourTime` limiting measure.&lt;br&gt;&lt;br&gt;To send the
     * route-points you will use a `POST` request where the request body will contain the `route` object represented as
     * a `GeoJSON LineString` type and the `Content-Type` header will be set to `application/json`. Each route-point in
     * `route` is represented as a `GeoJSON Position` type i.e. an array where the _longitude_ value is followed by the
     * _latitude_ value and the _altitude_ value is ignored. The `route` should contain at least 2
     * route-points.&lt;br&gt;&lt;br&gt;It is possible that original route will be altered, some of it's points may be
     * skipped. If the route that passes through the found point is faster than the original one, the `detourTime` value
     * in the response is negative.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param maxDetourTime Maximum detour time of the point of interest in seconds. Max value is 3600 seconds.
     * @param route This represents the route to search along and should be a valid `GeoJSON LineString` type. Please
     *     refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details.
     * @param top Maximum number of responses that will be returned. Default value is 10. Max value is 20.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressResult> searchAlongRouteAsync(
            ResponseFormat format,
            String query,
            int maxDetourTime,
            SearchAlongRouteRequest route,
            Integer top,
            List<String> brandFilter,
            List<Integer> categoryFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        return searchAlongRouteWithResponseAsync(
                        format,
                        query,
                        maxDetourTime,
                        route,
                        top,
                        brandFilter,
                        categoryFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Along Route endpoint allows you to perform a fuzzy search for POIs along a specified route. This
     * search is constrained by specifying the `maxDetourTime` limiting measure.&lt;br&gt;&lt;br&gt;To send the
     * route-points you will use a `POST` request where the request body will contain the `route` object represented as
     * a `GeoJSON LineString` type and the `Content-Type` header will be set to `application/json`. Each route-point in
     * `route` is represented as a `GeoJSON Position` type i.e. an array where the _longitude_ value is followed by the
     * _latitude_ value and the _altitude_ value is ignored. The `route` should contain at least 2
     * route-points.&lt;br&gt;&lt;br&gt;It is possible that original route will be altered, some of it's points may be
     * skipped. If the route that passes through the found point is faster than the original one, the `detourTime` value
     * in the response is negative.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param maxDetourTime Maximum detour time of the point of interest in seconds. Max value is 3600 seconds.
     * @param route This represents the route to search along and should be a valid `GeoJSON LineString` type. Please
     *     refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details.
     * @param top Maximum number of responses that will be returned. Default value is 10. Max value is 20.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<SearchAddressResult> searchAlongRouteWithResponse(
            ResponseFormat format,
            String query,
            int maxDetourTime,
            SearchAlongRouteRequest route,
            Integer top,
            List<String> brandFilter,
            List<Integer> categoryFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours,
            Context context) {
        return searchAlongRouteWithResponseAsync(
                        format,
                        query,
                        maxDetourTime,
                        route,
                        top,
                        brandFilter,
                        categoryFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours,
                        context)
                .block();
    }

    /**
     * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Along Route endpoint allows you to perform a fuzzy search for POIs along a specified route. This
     * search is constrained by specifying the `maxDetourTime` limiting measure.&lt;br&gt;&lt;br&gt;To send the
     * route-points you will use a `POST` request where the request body will contain the `route` object represented as
     * a `GeoJSON LineString` type and the `Content-Type` header will be set to `application/json`. Each route-point in
     * `route` is represented as a `GeoJSON Position` type i.e. an array where the _longitude_ value is followed by the
     * _latitude_ value and the _altitude_ value is ignored. The `route` should contain at least 2
     * route-points.&lt;br&gt;&lt;br&gt;It is possible that original route will be altered, some of it's points may be
     * skipped. If the route that passes through the found point is faster than the original one, the `detourTime` value
     * in the response is negative.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The POI name to search for (e.g., "statue of liberty", "starbucks", "pizza"). Must be properly URL
     *     encoded.
     * @param maxDetourTime Maximum detour time of the point of interest in seconds. Max value is 3600 seconds.
     * @param route This represents the route to search along and should be a valid `GeoJSON LineString` type. Please
     *     refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details.
     * @param top Maximum number of responses that will be returned. Default value is 10. Max value is 20.
     * @param brandFilter A comma-separated list of brand names which could be used to restrict the result to specific
     *     brands. Item order does not matter. When multiple brands are provided, only results that belong to (at least)
     *     one of the provided list will be returned. Brands that contain a "," in their name should be put into quotes.
     *     <p>Usage examples:
     *     <p>brandSet=Foo
     *     <p>brandSet=Foo,Bar
     *     <p>brandSet="A,B,C Comma",Bar.
     * @param categoryFilter A comma-separated list of category set IDs which could be used to restrict the result to
     *     specific Points of Interest categories. ID order does not matter. When multiple category identifiers are
     *     provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
     *     The list of supported categories can be discovered using  [POI Categories
     *     API](https://aka.ms/AzureMapsPOICategoryTree). Usage examples:
     *     <p>* **categorySet=7315** (Search Points of Interest from category Restaurant)
     *     <p>* **categorySet=7315025,7315017** (Search Points of Interest of category either Italian or French
     *     Restaurant).
     * @param electricVehicleConnectorFilter A comma-separated list of connector types which could be used to restrict
     *     the result to Electric Vehicle Station supporting specific connector types. Item order does not matter. When
     *     multiple connector types are provided, only results that belong to (at least) one of the provided list will
     *     be returned.
     *     <p>Available connector types are: * `StandardHouseholdCountrySpecific` - These are the standard household
     *     connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.
     *     See also: [Plug &amp; socket types - World
     *     Standards](https://www.worldstandards.eu/electricity/plugs-and-sockets). * `IEC62196Type1` - Type 1 connector
     *     as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after
     *     the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single
     *     phase infrastructure. * `IEC62196Type1CCS` - Type 1 based combo connector as defined in the IEC 62196-3
     *     standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two
     *     additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type2CableAttached` - Type 2
     *     connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging
     *     point. * `IEC62196Type2Outlet` - Type 2 connector as defined in the IEC 62196-2 standard. Provided as a
     *     socket set into the charging point. * `IEC62196Type2CCS` - Type 2 based combo connector as defined in the IEC
     *     62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard –
     *     with two additional direct current (DC) contacts to allow DC fast charging. * `IEC62196Type3` - Type 3
     *     connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly
     *     used in combination with up to 240V single phase or up to 420V three phase infrastructure. * `Chademo` -
     *     CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial
     *     partners. Because of this is is also known as the TEPCO's connector. It supports fast DC charging. *
     *     `IEC60309AC1PhaseBlue` - Industrial Blue connector is a connector defined in the IEC 60309 standard. It is
     *     sometime referred to as by some combination of the standard, the color and the fact that is a single phase
     *     connector. The connector usually has the "P+N+E, 6h" configuration. * `IEC60309DCWhite` - Industrial White
     *     connector is a DC connector defined in the IEC 60309 standard. * `Tesla` - The Tesla connector is the
     *     regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla's proprietary connector,
     *     sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2)
     *     in Europe.
     *     <p>Usage examples:
     *     <p>connectorSet=IEC62196Type2CableAttached connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached.
     * @param localizedMapView The View parameter (also called the "user region" parameter) allows you to show the
     *     correct maps for a certain country/region for geopolitically disputed regions. Different countries/regions
     *     have different views of such regions, and the View parameter allows your application to comply with the view
     *     required by the country/region your application will be serving. By default, the View parameter is set to
     *     “Unified” even if you haven’t defined it in the request. It is your responsibility to determine the location
     *     of your users, and then set the View parameter correctly for that location. Alternatively, you have the
     *     option to set ‘View=Auto’, which will return the map data based on the IP address of the request. The View
     *     parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping,
     *     of the country/region where maps, images and other data and third party content that you are authorized to
     *     access via Azure Maps is made available. Example: view=IN.
     *     <p>Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the
     *     available Views.
     * @param operatingHours Hours of operation for a POI (Points of Interest). The availability of hours of operation
     *     will vary based on the data available. If not passed, then no opening hours information will be returned.
     *     Supported value: nextSevenDays.
     * @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 this object is returned from a successful Search calls.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public SearchAddressResult searchAlongRoute(
            ResponseFormat format,
            String query,
            int maxDetourTime,
            SearchAlongRouteRequest route,
            Integer top,
            List<String> brandFilter,
            List<Integer> categoryFilter,
            List<ElectricVehicleConnector> electricVehicleConnectorFilter,
            LocalizedMapView localizedMapView,
            OperatingHoursRange operatingHours) {
        return searchAlongRouteWithResponse(
                        format,
                        query,
                        maxDetourTime,
                        route,
                        top,
                        brandFilter,
                        categoryFilter,
                        electricVehicleConnectorFilter,
                        localizedMapView,
                        operatingHours,
                        Context.NONE)
                .getValue();
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call along with {@link Response}
     *     on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressBatchResult>> fuzzySearchBatchSyncWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.fuzzySearchBatchSync(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                batchRequest,
                                accept,
                                context));
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @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 ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call along with {@link Response}
     *     on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressBatchResult>> fuzzySearchBatchSyncWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        final String accept = "application/json";
        return service.fuzzySearchBatchSync(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                batchRequest,
                accept,
                context);
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressBatchResult> fuzzySearchBatchSyncAsync(JsonFormat format, BatchRequest batchRequest) {
        return fuzzySearchBatchSyncWithResponseAsync(format, batchRequest)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @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 ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressBatchResult> fuzzySearchBatchSyncAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return fuzzySearchBatchSyncWithResponseAsync(format, batchRequest, context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @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 ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<SearchAddressBatchResult> fuzzySearchBatchSyncWithResponse(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return fuzzySearchBatchSyncWithResponseAsync(format, batchRequest, context).block();
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public SearchAddressBatchResult fuzzySearchBatchSync(JsonFormat format, BatchRequest batchRequest) {
        return fuzzySearchBatchSyncWithResponse(format, batchRequest, Context.NONE).getValue();
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesFuzzySearchBatchResponse> fuzzySearchBatchWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.fuzzySearchBatch(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                batchRequest,
                                accept,
                                context));
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesFuzzySearchBatchResponse> fuzzySearchBatchWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        final String accept = "application/json";
        return service.fuzzySearchBatch(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                batchRequest,
                accept,
                context);
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<SearchAddressBatchResult, SearchAddressBatchResult> beginFuzzySearchBatchAsync(
            JsonFormat format, BatchRequest batchRequest) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.fuzzySearchBatchWithResponseAsync(format, batchRequest),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, Context.NONE),
                TypeReference.createInstance(SearchAddressBatchResult.class),
                TypeReference.createInstance(SearchAddressBatchResult.class));
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<SearchAddressBatchResult, SearchAddressBatchResult> beginFuzzySearchBatchAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.fuzzySearchBatchWithResponseAsync(format, batchRequest, context),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, context),
                TypeReference.createInstance(SearchAddressBatchResult.class),
                TypeReference.createInstance(SearchAddressBatchResult.class));
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<SearchAddressBatchResult, SearchAddressBatchResult> beginFuzzySearchBatch(
            JsonFormat format, BatchRequest batchRequest) {
        return this.beginFuzzySearchBatchAsync(format, batchRequest).getSyncPoller();
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of search fuzzy queries/requests to process. The list can contain a max of 10,000
     *     queries and must contain at least 1 query.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<SearchAddressBatchResult, SearchAddressBatchResult> beginFuzzySearchBatch(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return this.beginFuzzySearchBatchAsync(format, batchRequest, context).getSyncPoller();
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesGetFuzzySearchBatchResponse> getFuzzySearchBatchWithResponseAsync(String batchId) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.getFuzzySearchBatch(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                batchId,
                                accept,
                                context));
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesGetFuzzySearchBatchResponse> getFuzzySearchBatchWithResponseAsync(
            String batchId, Context context) {
        final String accept = "application/json";
        return service.getFuzzySearchBatch(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                batchId,
                accept,
                context);
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<SearchAddressBatchResult, SearchAddressBatchResult> beginGetFuzzySearchBatchAsync(
            String batchId) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.getFuzzySearchBatchWithResponseAsync(batchId),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, Context.NONE),
                TypeReference.createInstance(SearchAddressBatchResult.class),
                TypeReference.createInstance(SearchAddressBatchResult.class));
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<SearchAddressBatchResult, SearchAddressBatchResult> beginGetFuzzySearchBatchAsync(
            String batchId, Context context) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.getFuzzySearchBatchWithResponseAsync(batchId, context),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, context),
                TypeReference.createInstance(SearchAddressBatchResult.class),
                TypeReference.createInstance(SearchAddressBatchResult.class));
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<SearchAddressBatchResult, SearchAddressBatchResult> beginGetFuzzySearchBatch(String batchId) {
        return this.beginGetFuzzySearchBatchAsync(batchId).getSyncPoller();
    }

    /**
     * **Search Fuzzy Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Fuzzy
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) using just a single API call. You can call
     * Search Address Fuzzy Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/fuzzy/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search fuzzy_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search fuzzy_ queries:
     *
     * <p>```json { "batchItems": [ {"query":
     * "?query=atm&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000&amp;limit=5"}, {"query": "?query=Statue Of
     * Liberty&amp;limit=2"}, {"query": "?query=Starbucks&amp;lat=47.639769&amp;lon=-122.128362&amp;radius=5000"},
     * {"query": "?query=Space Needle"}, {"query": "?query=pizza&amp;limit=10"} ] } ```
     *
     * <p>A _search fuzzy_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search fuzzy_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#uri-parameters). The string values in
     * the _search fuzzy_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it should
     * also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/fuzzy/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy#SearchAddressResponse) -
     * If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "atm" }, "results": [ { "type": "POI", "poi": { "name": "ATM at Wells Fargo"
     * }, "address": { "country": "United States Of America", "freeformAddress": "3240 157th Ave NE, Redmond, WA 98052"
     * } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "statue of liberty" }, "results": [ { "type":
     * "POI", "poi": { "name": "Statue of Liberty" }, "address": { "country": "United States Of America",
     * "freeformAddress": "New York, NY 10004" } } ] } }, { "statusCode": 400, "response": { "error": { "code": "400
     * BadRequest", "message": "Bad request: one or more parameters were incorrectly specified or are mutually
     * exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<SearchAddressBatchResult, SearchAddressBatchResult> beginGetFuzzySearchBatch(
            String batchId, Context context) {
        return this.beginGetFuzzySearchBatchAsync(batchId, context).getSyncPoller();
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call along with {@link Response}
     *     on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressBatchResult>> searchAddressBatchSyncWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.searchAddressBatchSync(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                batchRequest,
                                accept,
                                context));
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @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 ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call along with {@link Response}
     *     on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<SearchAddressBatchResult>> searchAddressBatchSyncWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        final String accept = "application/json";
        return service.searchAddressBatchSync(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                batchRequest,
                accept,
                context);
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressBatchResult> searchAddressBatchSyncAsync(JsonFormat format, BatchRequest batchRequest) {
        return searchAddressBatchSyncWithResponseAsync(format, batchRequest)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @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 ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchAddressBatchResult> searchAddressBatchSyncAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return searchAddressBatchSyncWithResponseAsync(format, batchRequest, context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @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 ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<SearchAddressBatchResult> searchAddressBatchSyncWithResponse(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return searchAddressBatchSyncWithResponseAsync(format, batchRequest, context).block();
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public SearchAddressBatchResult searchAddressBatchSync(JsonFormat format, BatchRequest batchRequest) {
        return searchAddressBatchSyncWithResponse(format, batchRequest, Context.NONE).getValue();
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesSearchAddressBatchResponse> searchAddressBatchWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.searchAddressBatch(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                batchRequest,
                                accept,
                                context));
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesSearchAddressBatchResponse> searchAddressBatchWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        final String accept = "application/json";
        return service.searchAddressBatch(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                batchRequest,
                accept,
                context);
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<SearchAddressBatchResult, SearchAddressBatchResult> beginSearchAddressBatchAsync(
            JsonFormat format, BatchRequest batchRequest) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.searchAddressBatchWithResponseAsync(format, batchRequest),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, Context.NONE),
                TypeReference.createInstance(SearchAddressBatchResult.class),
                TypeReference.createInstance(SearchAddressBatchResult.class));
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<SearchAddressBatchResult, SearchAddressBatchResult> beginSearchAddressBatchAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.searchAddressBatchWithResponseAsync(format, batchRequest, context),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, context),
                TypeReference.createInstance(SearchAddressBatchResult.class),
                TypeReference.createInstance(SearchAddressBatchResult.class));
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<SearchAddressBatchResult, SearchAddressBatchResult> beginSearchAddressBatch(
            JsonFormat format, BatchRequest batchRequest) {
        return this.beginSearchAddressBatchAsync(format, batchRequest).getSyncPoller();
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of address geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<SearchAddressBatchResult, SearchAddressBatchResult> beginSearchAddressBatch(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return this.beginSearchAddressBatchAsync(format, batchRequest, context).getSyncPoller();
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesGetSearchAddressBatchResponse> getSearchAddressBatchWithResponseAsync(String batchId) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.getSearchAddressBatch(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                batchId,
                                accept,
                                context));
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesGetSearchAddressBatchResponse> getSearchAddressBatchWithResponseAsync(
            String batchId, Context context) {
        final String accept = "application/json";
        return service.getSearchAddressBatch(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                batchId,
                accept,
                context);
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<SearchAddressBatchResult, SearchAddressBatchResult> beginGetSearchAddressBatchAsync(
            String batchId) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.getSearchAddressBatchWithResponseAsync(batchId),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, Context.NONE),
                TypeReference.createInstance(SearchAddressBatchResult.class),
                TypeReference.createInstance(SearchAddressBatchResult.class));
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<SearchAddressBatchResult, SearchAddressBatchResult> beginGetSearchAddressBatchAsync(
            String batchId, Context context) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.getSearchAddressBatchWithResponseAsync(batchId, context),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, context),
                TypeReference.createInstance(SearchAddressBatchResult.class),
                TypeReference.createInstance(SearchAddressBatchResult.class));
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<SearchAddressBatchResult, SearchAddressBatchResult> beginGetSearchAddressBatch(String batchId) {
        return this.beginGetSearchAddressBatchAsync(batchId).getSyncPoller();
    }

    /**
     * **Search Address Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress) using just a single API call. You can call
     * Search Address Batch API to run either asynchronously (async) or synchronously (sync). The async API allows
     * caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous Batch Request
     * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will
     * respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later.
     * The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The
     * number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address_ queries you will use a `POST` request where the
     * request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to
     * `application/json`. Here's a sample request body containing 5 _search address_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=400 Broad St, Seattle, WA 98109&amp;limit=3"}, {"query":
     * "?query=One, Microsoft Way, Redmond, WA 98052&amp;limit=3"}, {"query": "?query=350 5th Ave, New York, NY
     * 10118&amp;limit=1"}, {"query": "?query=Pike Pl, Seattle, WA
     * 98101&amp;lat=47.610970&amp;lon=-122.342469&amp;radius=1000"}, {"query": "?query=Champ de Mars, 5 Avenue Anatole
     * France, 75007 Paris, France&amp;limit=1"} ] } ```
     *
     * <p>A _search address_ query in a batch is just a partial URL _without_ the protocol, base URL, path, api-version
     * and subscription-key. It can accept any of the supported _search address_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#uri-parameters). The string values
     * in the _search address_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
     * should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddress#SearchAddressResponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "query": "one microsoft way redmond wa 98052" }, "results": [ { "position": { "lat":
     * 47.63989, "lon": -122.12509 } } ] } }, { "statusCode": 200, "response": { "summary": { "query": "pike pl seattle
     * wa 98101" }, "results": [ { "position": { "lat": 47.60963, "lon": -122.34215 } } ] } }, { "statusCode": 400,
     * "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more parameters were
     * incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Batch
     *     service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<SearchAddressBatchResult, SearchAddressBatchResult> beginGetSearchAddressBatch(
            String batchId, Context context) {
        return this.beginGetSearchAddressBatchAsync(batchId, context).getSyncPoller();
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Reverse Batch service call along with {@link
     *     Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<ReverseSearchAddressBatchResult>> reverseSearchAddressBatchSyncWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.reverseSearchAddressBatchSync(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                batchRequest,
                                accept,
                                context));
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @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 ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Reverse Batch service call along with {@link
     *     Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<ReverseSearchAddressBatchResult>> reverseSearchAddressBatchSyncWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        final String accept = "application/json";
        return service.reverseSearchAddressBatchSync(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                batchRequest,
                accept,
                context);
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Reverse Batch service call on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<ReverseSearchAddressBatchResult> reverseSearchAddressBatchSyncAsync(
            JsonFormat format, BatchRequest batchRequest) {
        return reverseSearchAddressBatchSyncWithResponseAsync(format, batchRequest)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @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 ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Reverse Batch service call on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<ReverseSearchAddressBatchResult> reverseSearchAddressBatchSyncAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return reverseSearchAddressBatchSyncWithResponseAsync(format, batchRequest, context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @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 ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Reverse Batch service call along with {@link
     *     Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<ReverseSearchAddressBatchResult> reverseSearchAddressBatchSyncWithResponse(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return reverseSearchAddressBatchSyncWithResponseAsync(format, batchRequest, context).block();
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Reverse Batch service call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public ReverseSearchAddressBatchResult reverseSearchAddressBatchSync(JsonFormat format, BatchRequest batchRequest) {
        return reverseSearchAddressBatchSyncWithResponse(format, batchRequest, Context.NONE).getValue();
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Reverse Batch service call on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesReverseSearchAddressBatchResponse> reverseSearchAddressBatchWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.reverseSearchAddressBatch(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                batchRequest,
                                accept,
                                context));
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Reverse Batch service call on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesReverseSearchAddressBatchResponse> reverseSearchAddressBatchWithResponseAsync(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        final String accept = "application/json";
        return service.reverseSearchAddressBatch(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                batchRequest,
                accept,
                context);
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Reverse
     *     Batch service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<ReverseSearchAddressBatchResult, ReverseSearchAddressBatchResult>
            beginReverseSearchAddressBatchAsync(JsonFormat format, BatchRequest batchRequest) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.reverseSearchAddressBatchWithResponseAsync(format, batchRequest),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, Context.NONE),
                TypeReference.createInstance(ReverseSearchAddressBatchResult.class),
                TypeReference.createInstance(ReverseSearchAddressBatchResult.class));
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Reverse
     *     Batch service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<ReverseSearchAddressBatchResult, ReverseSearchAddressBatchResult>
            beginReverseSearchAddressBatchAsync(JsonFormat format, BatchRequest batchRequest, Context context) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.reverseSearchAddressBatchWithResponseAsync(format, batchRequest, context),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, context),
                TypeReference.createInstance(ReverseSearchAddressBatchResult.class),
                TypeReference.createInstance(ReverseSearchAddressBatchResult.class));
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Reverse
     *     Batch service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<ReverseSearchAddressBatchResult, ReverseSearchAddressBatchResult> beginReverseSearchAddressBatch(
            JsonFormat format, BatchRequest batchRequest) {
        return this.beginReverseSearchAddressBatchAsync(format, batchRequest).getSyncPoller();
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param format Desired format of the response. Only `json` format is supported.
     * @param batchRequest The list of reverse geocoding queries/requests to process. The list can contain a max of
     *     10,000 queries and must contain at least 1 query.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Reverse
     *     Batch service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<ReverseSearchAddressBatchResult, ReverseSearchAddressBatchResult> beginReverseSearchAddressBatch(
            JsonFormat format, BatchRequest batchRequest, Context context) {
        return this.beginReverseSearchAddressBatchAsync(format, batchRequest, context).getSyncPoller();
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Reverse Batch service call on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesGetReverseSearchAddressBatchResponse> getReverseSearchAddressBatchWithResponseAsync(
            String batchId) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.getReverseSearchAddressBatch(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                batchId,
                                accept,
                                context));
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Search Address Reverse Batch service call on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<SearchesGetReverseSearchAddressBatchResponse> getReverseSearchAddressBatchWithResponseAsync(
            String batchId, Context context) {
        final String accept = "application/json";
        return service.getReverseSearchAddressBatch(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                batchId,
                accept,
                context);
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Reverse
     *     Batch service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<ReverseSearchAddressBatchResult, ReverseSearchAddressBatchResult>
            beginGetReverseSearchAddressBatchAsync(String batchId) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.getReverseSearchAddressBatchWithResponseAsync(batchId),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, Context.NONE),
                TypeReference.createInstance(ReverseSearchAddressBatchResult.class),
                TypeReference.createInstance(ReverseSearchAddressBatchResult.class));
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of this object is returned from a successful Search Address Reverse
     *     Batch service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<ReverseSearchAddressBatchResult, ReverseSearchAddressBatchResult>
            beginGetReverseSearchAddressBatchAsync(String batchId, Context context) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.getReverseSearchAddressBatchWithResponseAsync(batchId, context),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, null, context),
                TypeReference.createInstance(ReverseSearchAddressBatchResult.class),
                TypeReference.createInstance(ReverseSearchAddressBatchResult.class));
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Reverse
     *     Batch service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<ReverseSearchAddressBatchResult, ReverseSearchAddressBatchResult>
            beginGetReverseSearchAddressBatch(String batchId) {
        return this.beginGetReverseSearchAddressBatchAsync(batchId).getSyncPoller();
    }

    /**
     * **Search Address Reverse Batch API**
     *
     * <p>**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>The Search Address Batch API sends batches of queries to [Search Address Reverse
     * API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse) using just a single API call. You
     * can call Search Address Reverse Batch API to run either asynchronously (async) or synchronously (sync). The async
     * API allows caller to batch up to **10,000** queries and sync API up to **100** queries. ### Submit Synchronous
     * Batch Request The Synchronous API is recommended for lightweight batch requests. When the service receives a
     * request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve
     * the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer
     * than 60 seconds. The number of batch items is limited to **100** for this API. ``` POST
     * https://atlas.microsoft.com/search/address/reverse/batch/sync/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` ### Submit Asynchronous Batch Request The Asynchronous API is appropriate for processing big volumes of
     * relatively complex search requests - It allows the retrieval of results in a separate call (multiple downloads
     * are possible). - The asynchronous API is optimized for reliability and is not expected to run into a timeout. -
     * The number of batch items is limited to **10,000** for this API.
     *
     * <p>When you make a request by using async request, by default the service returns a 202 response code along a
     * redirect URL in the Location field of the response header. This URL should be checked periodically until the
     * response data or error information is available. The asynchronous responses are stored for **14** days. The
     * redirect URL returns a 404 response if used after the expiration period.
     *
     * <p>Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
     * operations: 1. Client sends a Search Address Batch `POST` request to Azure Maps 2. The server will respond with
     * one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
     * download the results of the batch request. This status URI looks like following:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to download the batch results.
     *
     * <p>### POST Body for Batch Request To send the _search address reverse_ queries you will use a `POST` request
     * where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be
     * set to `application/json`. Here's a sample request body containing 5 _search address reverse_ queries:
     *
     * <p>```json { "batchItems": [ {"query": "?query=48.858561,2.294911"}, {"query":
     * "?query=47.639765,-122.127896&amp;radius=5000&amp;limit=2"}, {"query": "?query=47.621028,-122.348170"}, {"query":
     * "?query=43.722990,10.396695"}, {"query": "?query=40.750958,-73.982336"} ] } ```
     *
     * <p>A _search address reverse_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
     * api-version and subscription-key. It can accept any of the supported _search address reverse_ [URI
     * parameters](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#uri-parameters). The string
     * values in the _search address reverse_ query must be properly escaped (e.g. " character should be escaped with \\
     * ) and it should also be properly URL-encoded.
     *
     * <p>The async API allows caller to batch up to **10,000** queries and sync API up to **100** queries, and the
     * batch should contain at least **1** query.
     *
     * <p>### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
     * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
     * `POST` batch request and looks like the following:
     *
     * <p>```
     * https://atlas.microsoft.com/search/address/reverse/batch/{batch-id}?api-version=1.0&amp;subscription-key={subscription-key}
     * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
     * using the _download URL_. 2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### Batch Response Model The returned data content is similar for async and sync requests. When downloading
     * the results of an async batch request, if the batch has finished processing, the response body contains the batch
     * response. This batch response contains a `summary` component that indicates the `totalRequests` that were part of
     * the original batch request and `successfulRequests`i.e. queries which were executed successfully. The batch
     * response also includes a `batchItems` array which contains a response for each and every query in the batch
     * request. The `batchItems` will contain the results in the exact same order the original queries were sent in the
     * batch request. Each item in `batchItems` contains `statusCode` and `response` fields. Each `response` in
     * `batchItems` is of one of the following types:
     *
     * <p>-
     * [`SearchAddressReverseResponse`](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse#searchaddressreverseresponse)
     * - If the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 2 _successful_ and 1 _failed_ result:
     *
     * <p>```json { "summary": { "successfulRequests": 2, "totalRequests": 3 }, "batchItems": [ { "statusCode": 200,
     * "response": { "summary": { "queryTime": 11 }, "addresses": [ { "address": { "country": "France",
     * "freeformAddress": "Avenue Anatole France, 75007 Paris" }, "position": "48.858490,2.294820" } ] } }, {
     * "statusCode": 200, "response": { "summary": { "queryTime": 1 }, "addresses": [ { "address": { "country": "United
     * States of America", "freeformAddress": "157th Pl NE, Redmond WA 98052" }, "position": "47.640470,-122.129430" } ]
     * } }, { "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
     * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of this object is returned from a successful Search Address Reverse
     *     Batch service call.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<ReverseSearchAddressBatchResult, ReverseSearchAddressBatchResult>
            beginGetReverseSearchAddressBatch(String batchId, Context context) {
        return this.beginGetReverseSearchAddressBatchAsync(batchId, context).getSyncPoller();
    }
}
