diff --git a/sdk/maps/azure-maps-dataset/CHANGELOG.md b/sdk/maps/azure-maps-dataset/CHANGELOG.md new file mode 100644 index 0000000000000..15d2cdaee5e02 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/CHANGELOG.md @@ -0,0 +1,13 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +- Azure AzureMapsDatasetService client library for Java. This package contains Microsoft Azure AzureMapsDatasetService client library. + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes diff --git a/sdk/maps/azure-maps-dataset/README.md b/sdk/maps/azure-maps-dataset/README.md new file mode 100644 index 0000000000000..e03dc85c80914 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/README.md @@ -0,0 +1,63 @@ +# Azure AzureMapsDatasetService client library for Java + +Azure AzureMapsDatasetService client library for Java. + +This package contains Microsoft Azure AzureMapsDatasetService client library. + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] +- [Product documentation][product_documentation] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure:azure-maps-dataset;current}) +```xml + + com.azure + azure-maps-dataset + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Authentication + +[Azure Identity][azure_identity] package provides the default implementation for authenticating the client. + +## Key concepts + +## Examples + +```java com.azure.maps.dataset.readme +``` + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request + + +[product_documentation]: https://azure.microsoft.com/services/ +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity diff --git a/sdk/maps/azure-maps-dataset/pom.xml b/sdk/maps/azure-maps-dataset/pom.xml new file mode 100644 index 0000000000000..01fdd1b2798d5 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/pom.xml @@ -0,0 +1,73 @@ + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-maps-dataset + 1.0.0-beta.1 + jar + + Microsoft Azure SDK for AzureMapsDatasetService Management + This package contains Microsoft Azure AzureMapsDatasetService client library. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + + + + com.azure + azure-core + 1.25.0 + + + com.azure + azure-core-http-netty + 1.11.7 + + + org.junit.jupiter + junit-jupiter-engine + 5.8.2 + test + + + com.azure + azure-core-test + 1.7.8 + test + + + com.azure + azure-identity + 1.4.4 + test + + + diff --git a/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceAsyncClient.java b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceAsyncClient.java new file mode 100644 index 0000000000000..5822bbbf40c4b --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceAsyncClient.java @@ -0,0 +1,473 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.PollerFlux; +import com.azure.maps.dataset.implementation.DatasetsImpl; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the asynchronous AzureMapsDatasetServiceClient type. */ +@ServiceClient(builder = AzureMapsDatasetServiceClientBuilder.class, isAsync = true) +public final class AzureMapsDatasetServiceAsyncClient { + @Generated private final DatasetsImpl serviceClient; + + /** + * Initializes an instance of Datasets client. + * + * @param serviceClient the service client implementation. + */ + @Generated + AzureMapsDatasetServiceAsyncClient(DatasetsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to create a dataset from data that was uploaded to the Azure Maps Data Service and + * converted using the Azure Maps Conversion Service. + * + *

You can use this API in a scenario like uploading a DWG zip package for a building, converting the zip package + * using the Azure Maps Conversion Service, and creating a dataset from the converted zip package. The created + * dataset can be used to create tilesets using the Azure Maps Tileset Service and can be queried via the Azure Maps + * WFS Service. + * + *

### Submit Create Request + * + *

To create your dataset, you will use a `POST` request where the `conversionId` query parameter is an ID that + * represents the converted DWG zip package, the `datasetId` parameter will be the ID of a previously created + * dataset to append with the current dataset and, optionally, the `description` query parameter will contain a + * description (if description is not provided a default description will be given). + * + *

The Create API is a [long-running request](https://aka.ms/am-creator-lrt-v2). + * + *

Query Parameters + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
conversionIdStringYesThe unique ID used to create the dataset. The `conversionId` must have been obtained from a successful call to the Conversion Service [Convert API](https://docs.microsoft.com/en-us/rest/api/maps/v2/conversion/convert) and may be provided with multiple query parameters with same name (if more than one is provided).
datasetIdStringNoThe ID for the dataset to append with. The dataset must originate from a previous dataset creation call that matches the datasetId
descriptionStringNoThe description to be given to the dataset.
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for a Long-Running Operations API along with {@link Response} on successful completion + * of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponse(RequestOptions requestOptions) { + return this.serviceClient.createWithResponseAsync(requestOptions); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to create a dataset from data that was uploaded to the Azure Maps Data Service and + * converted using the Azure Maps Conversion Service. + * + *

You can use this API in a scenario like uploading a DWG zip package for a building, converting the zip package + * using the Azure Maps Conversion Service, and creating a dataset from the converted zip package. The created + * dataset can be used to create tilesets using the Azure Maps Tileset Service and can be queried via the Azure Maps + * WFS Service. + * + *

### Submit Create Request + * + *

To create your dataset, you will use a `POST` request where the `conversionId` query parameter is an ID that + * represents the converted DWG zip package, the `datasetId` parameter will be the ID of a previously created + * dataset to append with the current dataset and, optionally, the `description` query parameter will contain a + * description (if description is not provided a default description will be given). + * + *

The Create API is a [long-running request](https://aka.ms/am-creator-lrt-v2). + * + *

Query Parameters + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
conversionIdStringYesThe unique ID used to create the dataset. The `conversionId` must have been obtained from a successful call to the Conversion Service [Convert API](https://docs.microsoft.com/en-us/rest/api/maps/v2/conversion/convert) and may be provided with multiple query parameters with same name (if more than one is provided).
datasetIdStringNoThe ID for the dataset to append with. The dataset must originate from a previous dataset creation call that matches the datasetId
descriptionStringNoThe description to be given to the dataset.
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the {@link PollerFlux} for polling of the response model for a Long-Running Operations API. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCreate(RequestOptions requestOptions) { + return this.serviceClient.beginCreateAsync(requestOptions); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a list of all previously successfully created datasets. + * + *

### Submit List Request + * + *

To list all your datasets, you will issue a `GET` request with no additional parameters. + * + *

### List Data Response + * + *

The List API returns the complete list of all datasets in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): + * + *

> conversionIds - The list of `conversionId` (null if none were provided). > appendDatasetId - The + * `datasetId` that was used for an append operation (null if none was used). >featureCounts - The counts for + * each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of 3 dataset resources: + * + *

```json { "datasets": [ { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": + * "f6495f62-94f8-0ec2-c252-45626f82fcb2", "description": "Some description or comment for the dataset.", + * "datasetSources": { "conversionIds": [ "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", + * "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, + * "verticalPenetration": 6, "opening": 48, "areaElement": 108 } }, { "timestamp": "2020-01-01T22:57:53.123Z", + * "datasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", "description": "Create from upload + * '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.", "datasetSources": { "conversionIds": [ + * "0c1288fa-2058-4a1b-b68d-13a5f5af7d7c" ], "appendDatasetId": "46d1edb6-d29e-4786-9589-dbd4efd7a977" }, + * "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, + * "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, "areaElement": 108 } } ] } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     datasets: [
+     *         {
+     *             created: String
+     *             datasetId: String
+     *             ontology: String
+     *             description: String
+     *             datasetSources: {
+     *                 conversionIds: [
+     *                     String
+     *                 ]
+     *                 appendDatasetId: String
+     *             }
+     *             featureCounts: Object
+     *         }
+     *     ]
+     *     nextLink: String
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for the Dataset List API as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux list(RequestOptions requestOptions) { + return this.serviceClient.listAsync(requestOptions); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a previously successfully created dataset. + * + *

### Submit Get Details Request + * + *

To get the details for a previously created dataset, you will issue a `GET` request with the `datasetId` in + * the path. + * + *

### Get Details Response + * + *

The Get Details API returns the details for a dataset in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): > conversionIds - The list of `conversionId` (null if + * none were provided). > appendDatasetId - The `datasetId` that was used for an append operation (null if none + * was used). >featureCounts - The counts for each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of a dataset resource: + * + *

```json { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": "f6495f62-94f8-0ec2-c252-45626f82fcb2", + * "description": "Some description or comment for the dataset.", "datasetSources": { "conversionIds": [ + * "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, + * "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, + * "areaElement": 108 } } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     created: String
+     *     datasetId: String
+     *     ontology: String
+     *     description: String
+     *     datasetSources: {
+     *         conversionIds: [
+     *             String
+     *         ]
+     *         appendDatasetId: String
+     *     }
+     *     featureCounts: Object
+     * }
+     * }
+ * + * @param datasetId The identifier for the dataset to query from. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return detail information for the dataset along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String datasetId, RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(datasetId, requestOptions); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

You can also use this API to delete old/unused datasets to create space for new Creator content. + * + *

### Submit Delete Request + * + *

To delete your content you will issue a `DELETE` request where the path will contain the `datasetId` of the + * dataset to delete. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + * @param datasetId The identifier for the dataset to query from. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponse(String datasetId, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseAsync(datasetId, requestOptions); + } + + /** + * This API allows the caller to view the current progress of a dataset operation and the path is obtained from a + * call to the Create API. + * + *

### Submit Operations Request + * + *

To view the current progress of a dataset operation, you will use a `GET` request where the `operationId` + * given the path is the ID that represents the operation. + * + *

### Operation Response + * + *

While in progress, a `200-OK` http status code will be returned with no extra headers. If the operation + * succeeds, a `200-OK` http status code with Resource-Location header will be returned. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param operationId The ID to query the status for the dataset create/import request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for a Long-Running Operations API along with {@link Response} on successful completion + * of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationWithResponse(String operationId, RequestOptions requestOptions) { + return this.serviceClient.getOperationWithResponseAsync(operationId, requestOptions); + } +} diff --git a/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceClient.java b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceClient.java new file mode 100644 index 0000000000000..6e527bc5cbfc0 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceClient.java @@ -0,0 +1,392 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.maps.dataset.implementation.DatasetsImpl; + +/** Initializes a new instance of the synchronous AzureMapsDatasetServiceClient type. */ +@ServiceClient(builder = AzureMapsDatasetServiceClientBuilder.class) +public final class AzureMapsDatasetServiceClient { + @Generated private final DatasetsImpl serviceClient; + + /** + * Initializes an instance of Datasets client. + * + * @param serviceClient the service client implementation. + */ + @Generated + AzureMapsDatasetServiceClient(DatasetsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to create a dataset from data that was uploaded to the Azure Maps Data Service and + * converted using the Azure Maps Conversion Service. + * + *

You can use this API in a scenario like uploading a DWG zip package for a building, converting the zip package + * using the Azure Maps Conversion Service, and creating a dataset from the converted zip package. The created + * dataset can be used to create tilesets using the Azure Maps Tileset Service and can be queried via the Azure Maps + * WFS Service. + * + *

### Submit Create Request + * + *

To create your dataset, you will use a `POST` request where the `conversionId` query parameter is an ID that + * represents the converted DWG zip package, the `datasetId` parameter will be the ID of a previously created + * dataset to append with the current dataset and, optionally, the `description` query parameter will contain a + * description (if description is not provided a default description will be given). + * + *

The Create API is a [long-running request](https://aka.ms/am-creator-lrt-v2). + * + *

Query Parameters + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
conversionIdStringYesThe unique ID used to create the dataset. The `conversionId` must have been obtained from a successful call to the Conversion Service [Convert API](https://docs.microsoft.com/en-us/rest/api/maps/v2/conversion/convert) and may be provided with multiple query parameters with same name (if more than one is provided).
datasetIdStringNoThe ID for the dataset to append with. The dataset must originate from a previous dataset creation call that matches the datasetId
descriptionStringNoThe description to be given to the dataset.
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the {@link SyncPoller} for polling of the response model for a Long-Running Operations API. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCreate(RequestOptions requestOptions) { + return this.serviceClient.beginCreate(requestOptions); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a list of all previously successfully created datasets. + * + *

### Submit List Request + * + *

To list all your datasets, you will issue a `GET` request with no additional parameters. + * + *

### List Data Response + * + *

The List API returns the complete list of all datasets in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): + * + *

> conversionIds - The list of `conversionId` (null if none were provided). > appendDatasetId - The + * `datasetId` that was used for an append operation (null if none was used). >featureCounts - The counts for + * each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of 3 dataset resources: + * + *

```json { "datasets": [ { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": + * "f6495f62-94f8-0ec2-c252-45626f82fcb2", "description": "Some description or comment for the dataset.", + * "datasetSources": { "conversionIds": [ "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", + * "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, + * "verticalPenetration": 6, "opening": 48, "areaElement": 108 } }, { "timestamp": "2020-01-01T22:57:53.123Z", + * "datasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", "description": "Create from upload + * '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.", "datasetSources": { "conversionIds": [ + * "0c1288fa-2058-4a1b-b68d-13a5f5af7d7c" ], "appendDatasetId": "46d1edb6-d29e-4786-9589-dbd4efd7a977" }, + * "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, + * "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, "areaElement": 108 } } ] } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     datasets: [
+     *         {
+     *             created: String
+     *             datasetId: String
+     *             ontology: String
+     *             description: String
+     *             datasetSources: {
+     *                 conversionIds: [
+     *                     String
+     *                 ]
+     *                 appendDatasetId: String
+     *             }
+     *             featureCounts: Object
+     *         }
+     *     ]
+     *     nextLink: String
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for the Dataset List API as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + return this.serviceClient.list(requestOptions); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a previously successfully created dataset. + * + *

### Submit Get Details Request + * + *

To get the details for a previously created dataset, you will issue a `GET` request with the `datasetId` in + * the path. + * + *

### Get Details Response + * + *

The Get Details API returns the details for a dataset in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): > conversionIds - The list of `conversionId` (null if + * none were provided). > appendDatasetId - The `datasetId` that was used for an append operation (null if none + * was used). >featureCounts - The counts for each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of a dataset resource: + * + *

```json { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": "f6495f62-94f8-0ec2-c252-45626f82fcb2", + * "description": "Some description or comment for the dataset.", "datasetSources": { "conversionIds": [ + * "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, + * "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, + * "areaElement": 108 } } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     created: String
+     *     datasetId: String
+     *     ontology: String
+     *     description: String
+     *     datasetSources: {
+     *         conversionIds: [
+     *             String
+     *         ]
+     *         appendDatasetId: String
+     *     }
+     *     featureCounts: Object
+     * }
+     * }
+ * + * @param datasetId The identifier for the dataset to query from. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return detail information for the dataset along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String datasetId, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(datasetId, requestOptions); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

You can also use this API to delete old/unused datasets to create space for new Creator content. + * + *

### Submit Delete Request + * + *

To delete your content you will issue a `DELETE` request where the path will contain the `datasetId` of the + * dataset to delete. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + * @param datasetId The identifier for the dataset to query from. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String datasetId, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponse(datasetId, requestOptions); + } + + /** + * This API allows the caller to view the current progress of a dataset operation and the path is obtained from a + * call to the Create API. + * + *

### Submit Operations Request + * + *

To view the current progress of a dataset operation, you will use a `GET` request where the `operationId` + * given the path is the ID that represents the operation. + * + *

### Operation Response + * + *

While in progress, a `200-OK` http status code will be returned with no extra headers. If the operation + * succeeds, a `200-OK` http status code with Resource-Location header will be returned. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param operationId The ID to query the status for the dataset create/import request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for a Long-Running Operations API along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOperationWithResponse(String operationId, RequestOptions requestOptions) { + return this.serviceClient.getOperationWithResponse(operationId, requestOptions); + } +} diff --git a/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceClientBuilder.java b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceClientBuilder.java new file mode 100644 index 0000000000000..782f94ce51495 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceClientBuilder.java @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.maps.dataset.implementation.AzureMapsDatasetServiceClientImpl; +import com.azure.maps.dataset.models.Geography; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** A builder for creating a new instance of the AzureMapsDatasetServiceClient type. */ +@ServiceClientBuilder(serviceClients = {AzureMapsDatasetServiceClient.class, AzureMapsDatasetServiceAsyncClient.class}) +public final class AzureMapsDatasetServiceClientBuilder { + @Generated private static final String SDK_NAME = "name"; + + @Generated private static final String SDK_VERSION = "version"; + + @Generated private static final String[] DEFAULT_SCOPES = new String[] {"https://atlas.microsoft.com/.default"}; + + @Generated private final Map properties = CoreUtils.getProperties("azure-maps-dataset.properties"); + + /** Create an instance of the AzureMapsDatasetServiceClientBuilder. */ + @Generated + public AzureMapsDatasetServiceClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * Specifies which account is intended for usage in conjunction with the + * Azure AD security model. It represents a unique ID for the Azure Maps + * account and can be retrieved from the Azure Maps management plane + * Account API. To use Azure AD security in Azure Maps see the following + * [articles](https://aka.ms/amauthdetails) for guidance. + */ + @Generated private String clientId; + + /** + * Sets Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents + * a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To + * use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. + * + * @param clientId the clientId value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /* + * This parameter specifies where the Azure Maps Creator resource is + * located. Valid values are us and eu. + */ + @Generated private Geography geography; + + /** + * Sets This parameter specifies where the Azure Maps Creator resource is located. Valid values are us and eu. + * + * @param geography the geography value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder geography(Geography geography) { + this.geography = geography; + return this; + } + + /* + * Service version + */ + @Generated private AzureMapsDatasetServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder serviceVersion(AzureMapsDatasetServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + @Generated private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The HTTP client used to send the request. + */ + @Generated private HttpClient httpClient; + + /** + * Sets The HTTP client used to send the request. + * + * @param httpClient the httpClient value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The configuration store that is used during construction of the service + * client. + */ + @Generated private Configuration configuration; + + /** + * Sets The configuration store that is used during construction of the service client. + * + * @param configuration the configuration value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The Azure Key Credential used for authentication. + */ + @Generated private AzureKeyCredential azureKeyCredential; + + /** + * Sets The Azure Key Credential used for authentication. + * + * @param azureKeyCredential the azureKeyCredential value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder credential(AzureKeyCredential azureKeyCredential) { + this.azureKeyCredential = azureKeyCredential; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated private TokenCredential tokenCredential; + + /** + * Sets The TokenCredential used for authentication. + * + * @param tokenCredential the tokenCredential value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated private HttpLogOptions httpLogOptions; + + /** + * Sets The logging configuration for HTTP requests and responses. + * + * @param httpLogOptions the httpLogOptions value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if + * applicable. + */ + @Generated private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /* + * The list of Http pipeline policies to add. + */ + @Generated private final List pipelinePolicies; + + /* + * The client options such as application ID and custom headers to set on a + * request. + */ + @Generated private ClientOptions clientOptions; + + /** + * Sets The client options such as application ID and custom headers to set on a request. + * + * @param clientOptions the clientOptions value. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /** + * Adds a custom Http pipeline policy. + * + * @param customPolicy The custom Http pipeline policy to add. + * @return the AzureMapsDatasetServiceClientBuilder. + */ + @Generated + public AzureMapsDatasetServiceClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + pipelinePolicies.add(customPolicy); + return this; + } + + /** + * Builds an instance of AzureMapsDatasetServiceClientImpl with the provided parameters. + * + * @return an instance of AzureMapsDatasetServiceClientImpl. + */ + @Generated + private AzureMapsDatasetServiceClientImpl buildInnerClient() { + if (geography == null) { + this.geography = Geography.US; + } + if (serviceVersion == null) { + this.serviceVersion = AzureMapsDatasetServiceVersion.getLatest(); + } + if (pipeline == null) { + this.pipeline = createHttpPipeline(); + } + AzureMapsDatasetServiceClientImpl client = + new AzureMapsDatasetServiceClientImpl( + pipeline, JacksonAdapter.createDefaultSerializerAdapter(), clientId, geography, serviceVersion); + return client; + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration = + (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + if (httpLogOptions == null) { + httpLogOptions = new HttpLogOptions(); + } + if (clientOptions == null) { + clientOptions = new ClientOptions(); + } + List policies = new ArrayList<>(); + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(clientOptions, httpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + HttpHeaders headers = new HttpHeaders(); + clientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue())); + if (headers.getSize() > 0) { + policies.add(new AddHeadersPolicy(headers)); + } + policies.addAll( + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); + policies.add(new CookiePolicy()); + if (azureKeyCredential != null) { + policies.add(new AzureKeyCredentialPolicy("subscription-key", azureKeyCredential)); + } + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + policies.addAll( + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = + new HttpPipelineBuilder() + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(clientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of AzureMapsDatasetServiceAsyncClient async client. + * + * @return an instance of AzureMapsDatasetServiceAsyncClient. + */ + @Generated + public AzureMapsDatasetServiceAsyncClient buildAsyncClient() { + return new AzureMapsDatasetServiceAsyncClient(buildInnerClient().getDatasets()); + } + + /** + * Builds an instance of AzureMapsDatasetServiceClient sync client. + * + * @return an instance of AzureMapsDatasetServiceClient. + */ + @Generated + public AzureMapsDatasetServiceClient buildClient() { + return new AzureMapsDatasetServiceClient(buildInnerClient().getDatasets()); + } +} diff --git a/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceVersion.java b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceVersion.java new file mode 100644 index 0000000000000..ed8839a4a7b67 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/AzureMapsDatasetServiceVersion.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset; + +import com.azure.core.util.ServiceVersion; + +/** Service version of AzureMapsDatasetServiceClient. */ +public enum AzureMapsDatasetServiceVersion implements ServiceVersion { + /** Enum value 2.0. */ + V2_0("2.0"); + + private final String version; + + AzureMapsDatasetServiceVersion(String version) { + this.version = version; + } + + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link AzureMapsDatasetServiceVersion}. + */ + public static AzureMapsDatasetServiceVersion getLatest() { + return V2_0; + } +} diff --git a/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/implementation/AzureMapsDatasetServiceClientImpl.java b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/implementation/AzureMapsDatasetServiceClientImpl.java new file mode 100644 index 0000000000000..394735cd127f3 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/implementation/AzureMapsDatasetServiceClientImpl.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.maps.dataset.AzureMapsDatasetServiceVersion; +import com.azure.maps.dataset.models.Geography; + +/** Initializes a new instance of the AzureMapsDatasetServiceClient type. */ +public final class AzureMapsDatasetServiceClientImpl { + /** + * Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a + * unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To + * use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. + */ + private final String clientId; + + /** + * Gets Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents + * a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To + * use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. + * + * @return the clientId value. + */ + public String getClientId() { + return this.clientId; + } + + /** This parameter specifies where the Azure Maps Creator resource is located. Valid values are us and eu. */ + private final Geography geography; + + /** + * Gets This parameter specifies where the Azure Maps Creator resource is located. Valid values are us and eu. + * + * @return the geography value. + */ + public Geography getGeography() { + return this.geography; + } + + /** Service version. */ + private final AzureMapsDatasetServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public AzureMapsDatasetServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The DatasetsImpl object to access its operations. */ + private final DatasetsImpl datasets; + + /** + * Gets the DatasetsImpl object to access its operations. + * + * @return the DatasetsImpl object. + */ + public DatasetsImpl getDatasets() { + return this.datasets; + } + + /** + * Initializes an instance of AzureMapsDatasetServiceClient client. + * + * @param clientId Specifies which account is intended for usage in conjunction with the Azure AD security model. It + * represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane + * Account API. To use Azure AD security in Azure Maps see the following + * [articles](https://aka.ms/amauthdetails) for guidance. + * @param geography This parameter specifies where the Azure Maps Creator resource is located. Valid values are us + * and eu. + * @param serviceVersion Service version. + */ + public AzureMapsDatasetServiceClientImpl( + String clientId, Geography geography, AzureMapsDatasetServiceVersion serviceVersion) { + this( + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(), + JacksonAdapter.createDefaultSerializerAdapter(), + clientId, + geography, + serviceVersion); + } + + /** + * Initializes an instance of AzureMapsDatasetServiceClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param clientId Specifies which account is intended for usage in conjunction with the Azure AD security model. It + * represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane + * Account API. To use Azure AD security in Azure Maps see the following + * [articles](https://aka.ms/amauthdetails) for guidance. + * @param geography This parameter specifies where the Azure Maps Creator resource is located. Valid values are us + * and eu. + * @param serviceVersion Service version. + */ + public AzureMapsDatasetServiceClientImpl( + HttpPipeline httpPipeline, + String clientId, + Geography geography, + AzureMapsDatasetServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), clientId, geography, serviceVersion); + } + + /** + * Initializes an instance of AzureMapsDatasetServiceClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param clientId Specifies which account is intended for usage in conjunction with the Azure AD security model. It + * represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane + * Account API. To use Azure AD security in Azure Maps see the following + * [articles](https://aka.ms/amauthdetails) for guidance. + * @param geography This parameter specifies where the Azure Maps Creator resource is located. Valid values are us + * and eu. + * @param serviceVersion Service version. + */ + public AzureMapsDatasetServiceClientImpl( + HttpPipeline httpPipeline, + SerializerAdapter serializerAdapter, + String clientId, + Geography geography, + AzureMapsDatasetServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.clientId = clientId; + this.geography = geography; + this.serviceVersion = serviceVersion; + this.datasets = new DatasetsImpl(this); + } +} diff --git a/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/implementation/DatasetsImpl.java b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/implementation/DatasetsImpl.java new file mode 100644 index 0000000000000..c64771d6dfd71 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/implementation/DatasetsImpl.java @@ -0,0 +1,1747 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset.implementation; + +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.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.exception.HttpResponseException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +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.TypeReference; +import java.time.Duration; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Datasets. */ +public final class DatasetsImpl { + /** The proxy service used to perform REST calls. */ + private final DatasetsService service; + + /** The service client containing this operation class. */ + private final AzureMapsDatasetServiceClientImpl client; + + /** + * Initializes an instance of DatasetsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DatasetsImpl(AzureMapsDatasetServiceClientImpl client) { + this.service = RestProxy.create(DatasetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMapsDatasetServiceDatasets to be used by the proxy service to + * perform REST calls. + */ + @Host("https://{geography}.atlas.microsoft.com") + @ServiceInterface(name = "AzureMapsDatasetServ") + private interface DatasetsService { + @Post("/datasets") + @ExpectedResponses({200, 202}) + Mono> create( + @HostParam("geography") String geography, + @QueryParam("api-version") String apiVersion, + RequestOptions requestOptions, + Context context); + + @Get("/datasets") + @ExpectedResponses({200}) + Mono> list( + @HostParam("geography") String geography, + @QueryParam("api-version") String apiVersion, + RequestOptions requestOptions, + Context context); + + @Get("/datasets/{datasetId}") + @ExpectedResponses({200}) + Mono> get( + @HostParam("geography") String geography, + @PathParam("datasetId") String datasetId, + @QueryParam("api-version") String apiVersion, + RequestOptions requestOptions, + Context context); + + @Delete("/datasets/{datasetId}") + @ExpectedResponses({204}) + Mono> delete( + @HostParam("geography") String geography, + @QueryParam("api-version") String apiVersion, + @PathParam("datasetId") String datasetId, + RequestOptions requestOptions, + Context context); + + @Get("/datasets/operations/{operationId}") + @ExpectedResponses({200}) + Mono> getOperation( + @HostParam("geography") String geography, + @QueryParam("api-version") String apiVersion, + @PathParam("operationId") String operationId, + RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({200}) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("geography") String geography, + RequestOptions requestOptions, + Context context); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to create a dataset from data that was uploaded to the Azure Maps Data Service and + * converted using the Azure Maps Conversion Service. + * + *

You can use this API in a scenario like uploading a DWG zip package for a building, converting the zip package + * using the Azure Maps Conversion Service, and creating a dataset from the converted zip package. The created + * dataset can be used to create tilesets using the Azure Maps Tileset Service and can be queried via the Azure Maps + * WFS Service. + * + *

### Submit Create Request + * + *

To create your dataset, you will use a `POST` request where the `conversionId` query parameter is an ID that + * represents the converted DWG zip package, the `datasetId` parameter will be the ID of a previously created + * dataset to append with the current dataset and, optionally, the `description` query parameter will contain a + * description (if description is not provided a default description will be given). + * + *

The Create API is a [long-running request](https://aka.ms/am-creator-lrt-v2). + * + *

Query Parameters + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
conversionIdStringYesThe unique ID used to create the dataset. The `conversionId` must have been obtained from a successful call to the Conversion Service [Convert API](https://docs.microsoft.com/en-us/rest/api/maps/v2/conversion/convert) and may be provided with multiple query parameters with same name (if more than one is provided).
datasetIdStringNoThe ID for the dataset to append with. The dataset must originate from a previous dataset creation call that matches the datasetId
descriptionStringNoThe description to be given to the dataset.
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for a Long-Running Operations API along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponseAsync(RequestOptions requestOptions) { + return FluxUtil.withContext( + context -> + service.create( + this.client.getGeography(), + this.client.getServiceVersion().getVersion(), + requestOptions, + context)); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to create a dataset from data that was uploaded to the Azure Maps Data Service and + * converted using the Azure Maps Conversion Service. + * + *

You can use this API in a scenario like uploading a DWG zip package for a building, converting the zip package + * using the Azure Maps Conversion Service, and creating a dataset from the converted zip package. The created + * dataset can be used to create tilesets using the Azure Maps Tileset Service and can be queried via the Azure Maps + * WFS Service. + * + *

### Submit Create Request + * + *

To create your dataset, you will use a `POST` request where the `conversionId` query parameter is an ID that + * represents the converted DWG zip package, the `datasetId` parameter will be the ID of a previously created + * dataset to append with the current dataset and, optionally, the `description` query parameter will contain a + * description (if description is not provided a default description will be given). + * + *

The Create API is a [long-running request](https://aka.ms/am-creator-lrt-v2). + * + *

Query Parameters + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
conversionIdStringYesThe unique ID used to create the dataset. The `conversionId` must have been obtained from a successful call to the Conversion Service [Convert API](https://docs.microsoft.com/en-us/rest/api/maps/v2/conversion/convert) and may be provided with multiple query parameters with same name (if more than one is provided).
datasetIdStringNoThe ID for the dataset to append with. The dataset must originate from a previous dataset creation call that matches the datasetId
descriptionStringNoThe description to be given to the dataset.
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param context The context to associate with this operation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for a Long-Running Operations API along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponseAsync(RequestOptions requestOptions, Context context) { + return service.create( + this.client.getGeography(), this.client.getServiceVersion().getVersion(), requestOptions, context); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to create a dataset from data that was uploaded to the Azure Maps Data Service and + * converted using the Azure Maps Conversion Service. + * + *

You can use this API in a scenario like uploading a DWG zip package for a building, converting the zip package + * using the Azure Maps Conversion Service, and creating a dataset from the converted zip package. The created + * dataset can be used to create tilesets using the Azure Maps Tileset Service and can be queried via the Azure Maps + * WFS Service. + * + *

### Submit Create Request + * + *

To create your dataset, you will use a `POST` request where the `conversionId` query parameter is an ID that + * represents the converted DWG zip package, the `datasetId` parameter will be the ID of a previously created + * dataset to append with the current dataset and, optionally, the `description` query parameter will contain a + * description (if description is not provided a default description will be given). + * + *

The Create API is a [long-running request](https://aka.ms/am-creator-lrt-v2). + * + *

Query Parameters + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
conversionIdStringYesThe unique ID used to create the dataset. The `conversionId` must have been obtained from a successful call to the Conversion Service [Convert API](https://docs.microsoft.com/en-us/rest/api/maps/v2/conversion/convert) and may be provided with multiple query parameters with same name (if more than one is provided).
datasetIdStringNoThe ID for the dataset to append with. The dataset must originate from a previous dataset creation call that matches the datasetId
descriptionStringNoThe description to be given to the dataset.
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the {@link PollerFlux} for polling of the response model for a Long-Running Operations API. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCreateAsync(RequestOptions requestOptions) { + return PollerFlux.create( + Duration.ofSeconds(1), + () -> this.createWithResponseAsync(requestOptions), + new DefaultPollingStrategy<>(this.client.getHttpPipeline()), + new TypeReferenceBinaryData(), + new TypeReferenceBinaryData()); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to create a dataset from data that was uploaded to the Azure Maps Data Service and + * converted using the Azure Maps Conversion Service. + * + *

You can use this API in a scenario like uploading a DWG zip package for a building, converting the zip package + * using the Azure Maps Conversion Service, and creating a dataset from the converted zip package. The created + * dataset can be used to create tilesets using the Azure Maps Tileset Service and can be queried via the Azure Maps + * WFS Service. + * + *

### Submit Create Request + * + *

To create your dataset, you will use a `POST` request where the `conversionId` query parameter is an ID that + * represents the converted DWG zip package, the `datasetId` parameter will be the ID of a previously created + * dataset to append with the current dataset and, optionally, the `description` query parameter will contain a + * description (if description is not provided a default description will be given). + * + *

The Create API is a [long-running request](https://aka.ms/am-creator-lrt-v2). + * + *

Query Parameters + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
conversionIdStringYesThe unique ID used to create the dataset. The `conversionId` must have been obtained from a successful call to the Conversion Service [Convert API](https://docs.microsoft.com/en-us/rest/api/maps/v2/conversion/convert) and may be provided with multiple query parameters with same name (if more than one is provided).
datasetIdStringNoThe ID for the dataset to append with. The dataset must originate from a previous dataset creation call that matches the datasetId
descriptionStringNoThe description to be given to the dataset.
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param context The context to associate with this operation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the {@link PollerFlux} for polling of the response model for a Long-Running Operations API. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCreateAsync(RequestOptions requestOptions, Context context) { + return PollerFlux.create( + Duration.ofSeconds(1), + () -> this.createWithResponseAsync(requestOptions, context), + new DefaultPollingStrategy<>(this.client.getHttpPipeline()), + new TypeReferenceBinaryData(), + new TypeReferenceBinaryData()); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to create a dataset from data that was uploaded to the Azure Maps Data Service and + * converted using the Azure Maps Conversion Service. + * + *

You can use this API in a scenario like uploading a DWG zip package for a building, converting the zip package + * using the Azure Maps Conversion Service, and creating a dataset from the converted zip package. The created + * dataset can be used to create tilesets using the Azure Maps Tileset Service and can be queried via the Azure Maps + * WFS Service. + * + *

### Submit Create Request + * + *

To create your dataset, you will use a `POST` request where the `conversionId` query parameter is an ID that + * represents the converted DWG zip package, the `datasetId` parameter will be the ID of a previously created + * dataset to append with the current dataset and, optionally, the `description` query parameter will contain a + * description (if description is not provided a default description will be given). + * + *

The Create API is a [long-running request](https://aka.ms/am-creator-lrt-v2). + * + *

Query Parameters + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
conversionIdStringYesThe unique ID used to create the dataset. The `conversionId` must have been obtained from a successful call to the Conversion Service [Convert API](https://docs.microsoft.com/en-us/rest/api/maps/v2/conversion/convert) and may be provided with multiple query parameters with same name (if more than one is provided).
datasetIdStringNoThe ID for the dataset to append with. The dataset must originate from a previous dataset creation call that matches the datasetId
descriptionStringNoThe description to be given to the dataset.
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the {@link SyncPoller} for polling of the response model for a Long-Running Operations API. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCreate(RequestOptions requestOptions) { + return this.beginCreateAsync(requestOptions).getSyncPoller(); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a list of all previously successfully created datasets. + * + *

### Submit List Request + * + *

To list all your datasets, you will issue a `GET` request with no additional parameters. + * + *

### List Data Response + * + *

The List API returns the complete list of all datasets in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): + * + *

> conversionIds - The list of `conversionId` (null if none were provided). > appendDatasetId - The + * `datasetId` that was used for an append operation (null if none was used). >featureCounts - The counts for + * each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of 3 dataset resources: + * + *

```json { "datasets": [ { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": + * "f6495f62-94f8-0ec2-c252-45626f82fcb2", "description": "Some description or comment for the dataset.", + * "datasetSources": { "conversionIds": [ "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", + * "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, + * "verticalPenetration": 6, "opening": 48, "areaElement": 108 } }, { "timestamp": "2020-01-01T22:57:53.123Z", + * "datasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", "description": "Create from upload + * '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.", "datasetSources": { "conversionIds": [ + * "0c1288fa-2058-4a1b-b68d-13a5f5af7d7c" ], "appendDatasetId": "46d1edb6-d29e-4786-9589-dbd4efd7a977" }, + * "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, + * "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, "areaElement": 108 } } ] } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     datasets: [
+     *         {
+     *             created: String
+     *             datasetId: String
+     *             ontology: String
+     *             description: String
+     *             datasetSources: {
+     *                 conversionIds: [
+     *                     String
+     *                 ]
+     *                 appendDatasetId: String
+     *             }
+     *             featureCounts: Object
+     *         }
+     *     ]
+     *     nextLink: String
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for the Dataset List API along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(RequestOptions requestOptions) { + return FluxUtil.withContext( + context -> + service.list( + this.client.getGeography(), + this.client.getServiceVersion().getVersion(), + requestOptions, + context)) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "datasets"), + getNextLink(res.getValue(), "nextLink"), + null)); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a list of all previously successfully created datasets. + * + *

### Submit List Request + * + *

To list all your datasets, you will issue a `GET` request with no additional parameters. + * + *

### List Data Response + * + *

The List API returns the complete list of all datasets in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): + * + *

> conversionIds - The list of `conversionId` (null if none were provided). > appendDatasetId - The + * `datasetId` that was used for an append operation (null if none was used). >featureCounts - The counts for + * each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of 3 dataset resources: + * + *

```json { "datasets": [ { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": + * "f6495f62-94f8-0ec2-c252-45626f82fcb2", "description": "Some description or comment for the dataset.", + * "datasetSources": { "conversionIds": [ "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", + * "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, + * "verticalPenetration": 6, "opening": 48, "areaElement": 108 } }, { "timestamp": "2020-01-01T22:57:53.123Z", + * "datasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", "description": "Create from upload + * '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.", "datasetSources": { "conversionIds": [ + * "0c1288fa-2058-4a1b-b68d-13a5f5af7d7c" ], "appendDatasetId": "46d1edb6-d29e-4786-9589-dbd4efd7a977" }, + * "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, + * "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, "areaElement": 108 } } ] } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     datasets: [
+     *         {
+     *             created: String
+     *             datasetId: String
+     *             ontology: String
+     *             description: String
+     *             datasetSources: {
+     *                 conversionIds: [
+     *                     String
+     *                 ]
+     *                 appendDatasetId: String
+     *             }
+     *             featureCounts: Object
+     *         }
+     *     ]
+     *     nextLink: String
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param context The context to associate with this operation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for the Dataset List API along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(RequestOptions requestOptions, Context context) { + return service.list( + this.client.getGeography(), + this.client.getServiceVersion().getVersion(), + requestOptions, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "datasets"), + getNextLink(res.getValue(), "nextLink"), + null)); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a list of all previously successfully created datasets. + * + *

### Submit List Request + * + *

To list all your datasets, you will issue a `GET` request with no additional parameters. + * + *

### List Data Response + * + *

The List API returns the complete list of all datasets in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): + * + *

> conversionIds - The list of `conversionId` (null if none were provided). > appendDatasetId - The + * `datasetId` that was used for an append operation (null if none was used). >featureCounts - The counts for + * each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of 3 dataset resources: + * + *

```json { "datasets": [ { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": + * "f6495f62-94f8-0ec2-c252-45626f82fcb2", "description": "Some description or comment for the dataset.", + * "datasetSources": { "conversionIds": [ "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", + * "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, + * "verticalPenetration": 6, "opening": 48, "areaElement": 108 } }, { "timestamp": "2020-01-01T22:57:53.123Z", + * "datasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", "description": "Create from upload + * '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.", "datasetSources": { "conversionIds": [ + * "0c1288fa-2058-4a1b-b68d-13a5f5af7d7c" ], "appendDatasetId": "46d1edb6-d29e-4786-9589-dbd4efd7a977" }, + * "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, + * "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, "areaElement": 108 } } ] } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     datasets: [
+     *         {
+     *             created: String
+     *             datasetId: String
+     *             ontology: String
+     *             description: String
+     *             datasetSources: {
+     *                 conversionIds: [
+     *                     String
+     *                 ]
+     *                 appendDatasetId: String
+     *             }
+     *             featureCounts: Object
+     *         }
+     *     ]
+     *     nextLink: String
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for the Dataset List API as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(RequestOptions requestOptions) { + return new PagedFlux<>( + () -> listSinglePageAsync(requestOptions), nextLink -> listNextSinglePageAsync(nextLink, null)); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a list of all previously successfully created datasets. + * + *

### Submit List Request + * + *

To list all your datasets, you will issue a `GET` request with no additional parameters. + * + *

### List Data Response + * + *

The List API returns the complete list of all datasets in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): + * + *

> conversionIds - The list of `conversionId` (null if none were provided). > appendDatasetId - The + * `datasetId` that was used for an append operation (null if none was used). >featureCounts - The counts for + * each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of 3 dataset resources: + * + *

```json { "datasets": [ { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": + * "f6495f62-94f8-0ec2-c252-45626f82fcb2", "description": "Some description or comment for the dataset.", + * "datasetSources": { "conversionIds": [ "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", + * "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, + * "verticalPenetration": 6, "opening": 48, "areaElement": 108 } }, { "timestamp": "2020-01-01T22:57:53.123Z", + * "datasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", "description": "Create from upload + * '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.", "datasetSources": { "conversionIds": [ + * "0c1288fa-2058-4a1b-b68d-13a5f5af7d7c" ], "appendDatasetId": "46d1edb6-d29e-4786-9589-dbd4efd7a977" }, + * "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, + * "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, "areaElement": 108 } } ] } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     datasets: [
+     *         {
+     *             created: String
+     *             datasetId: String
+     *             ontology: String
+     *             description: String
+     *             datasetSources: {
+     *                 conversionIds: [
+     *                     String
+     *                 ]
+     *                 appendDatasetId: String
+     *             }
+     *             featureCounts: Object
+     *         }
+     *     ]
+     *     nextLink: String
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param context The context to associate with this operation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for the Dataset List API as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(RequestOptions requestOptions, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(requestOptions, context), + nextLink -> listNextSinglePageAsync(nextLink, null, context)); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a list of all previously successfully created datasets. + * + *

### Submit List Request + * + *

To list all your datasets, you will issue a `GET` request with no additional parameters. + * + *

### List Data Response + * + *

The List API returns the complete list of all datasets in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): + * + *

> conversionIds - The list of `conversionId` (null if none were provided). > appendDatasetId - The + * `datasetId` that was used for an append operation (null if none was used). >featureCounts - The counts for + * each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of 3 dataset resources: + * + *

```json { "datasets": [ { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": + * "f6495f62-94f8-0ec2-c252-45626f82fcb2", "description": "Some description or comment for the dataset.", + * "datasetSources": { "conversionIds": [ "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", + * "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, + * "verticalPenetration": 6, "opening": 48, "areaElement": 108 } }, { "timestamp": "2020-01-01T22:57:53.123Z", + * "datasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", "description": "Create from upload + * '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.", "datasetSources": { "conversionIds": [ + * "0c1288fa-2058-4a1b-b68d-13a5f5af7d7c" ], "appendDatasetId": "46d1edb6-d29e-4786-9589-dbd4efd7a977" }, + * "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, "category": 10, "facility": 1, "level": 3, + * "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, "areaElement": 108 } } ] } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     datasets: [
+     *         {
+     *             created: String
+     *             datasetId: String
+     *             ontology: String
+     *             description: String
+     *             datasetSources: {
+     *                 conversionIds: [
+     *                     String
+     *                 ]
+     *                 appendDatasetId: String
+     *             }
+     *             featureCounts: Object
+     *         }
+     *     ]
+     *     nextLink: String
+     * }
+     * }
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for the Dataset List API as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + return new PagedIterable<>(listAsync(requestOptions)); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a previously successfully created dataset. + * + *

### Submit Get Details Request + * + *

To get the details for a previously created dataset, you will issue a `GET` request with the `datasetId` in + * the path. + * + *

### Get Details Response + * + *

The Get Details API returns the details for a dataset in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): > conversionIds - The list of `conversionId` (null if + * none were provided). > appendDatasetId - The `datasetId` that was used for an append operation (null if none + * was used). >featureCounts - The counts for each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of a dataset resource: + * + *

```json { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": "f6495f62-94f8-0ec2-c252-45626f82fcb2", + * "description": "Some description or comment for the dataset.", "datasetSources": { "conversionIds": [ + * "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, + * "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, + * "areaElement": 108 } } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     created: String
+     *     datasetId: String
+     *     ontology: String
+     *     description: String
+     *     datasetSources: {
+     *         conversionIds: [
+     *             String
+     *         ]
+     *         appendDatasetId: String
+     *     }
+     *     featureCounts: Object
+     * }
+     * }
+ * + * @param datasetId The identifier for the dataset to query from. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return detail information for the dataset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String datasetId, RequestOptions requestOptions) { + return FluxUtil.withContext( + context -> + service.get( + this.client.getGeography(), + datasetId, + this.client.getServiceVersion().getVersion(), + requestOptions, + context)); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a previously successfully created dataset. + * + *

### Submit Get Details Request + * + *

To get the details for a previously created dataset, you will issue a `GET` request with the `datasetId` in + * the path. + * + *

### Get Details Response + * + *

The Get Details API returns the details for a dataset in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): > conversionIds - The list of `conversionId` (null if + * none were provided). > appendDatasetId - The `datasetId` that was used for an append operation (null if none + * was used). >featureCounts - The counts for each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of a dataset resource: + * + *

```json { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": "f6495f62-94f8-0ec2-c252-45626f82fcb2", + * "description": "Some description or comment for the dataset.", "datasetSources": { "conversionIds": [ + * "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, + * "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, + * "areaElement": 108 } } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     created: String
+     *     datasetId: String
+     *     ontology: String
+     *     description: String
+     *     datasetSources: {
+     *         conversionIds: [
+     *             String
+     *         ]
+     *         appendDatasetId: String
+     *     }
+     *     featureCounts: Object
+     * }
+     * }
+ * + * @param datasetId The identifier for the dataset to query from. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param context The context to associate with this operation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return detail information for the dataset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String datasetId, RequestOptions requestOptions, Context context) { + return service.get( + this.client.getGeography(), + datasetId, + this.client.getServiceVersion().getVersion(), + requestOptions, + context); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

This API allows the caller to fetch a previously successfully created dataset. + * + *

### Submit Get Details Request + * + *

To get the details for a previously created dataset, you will issue a `GET` request with the `datasetId` in + * the path. + * + *

### Get Details Response + * + *

The Get Details API returns the details for a dataset in `json` format. The response contains the following + * fields (if they are not null or empty): > created - The timestamp the dataset was created. > datasetId - + * The id for the dataset. > description - The description for the dataset. > datasetSources - The source data + * that was used when the create request was issued. > ontology - The source + * [ontology](https://docs.microsoft.com/en-us/azure/azure-maps/creator-facility-ontology) that was used in the + * conversion service for the input data.<br/> + * + *

The `datasetSources` describes the source data that was used when the create request was issued and contains + * the following elements (if they are not null or empty): > conversionIds - The list of `conversionId` (null if + * none were provided). > appendDatasetId - The `datasetId` that was used for an append operation (null if none + * was used). >featureCounts - The counts for each feature type in the dataset.<br/> + * + *

Here's a sample response returning the `timestamp`, `datasetId`, `description`, `datasetSources`, and + * `ontology` of a dataset resource: + * + *

```json { "timestamp": "2020-01-01T22:50:48.123Z", "datasetId": "f6495f62-94f8-0ec2-c252-45626f82fcb2", + * "description": "Some description or comment for the dataset.", "datasetSources": { "conversionIds": [ + * "15d21452-c9bb-27b6-5e79-743ca5c3205d" ], }, "ontology": "facility-2.0", "featureCounts": { "directoryInfo": 2, + * "category": 10, "facility": 1, "level": 3, "unit": 183, "zone": 3, "verticalPenetration": 6, "opening": 48, + * "areaElement": 108 } } ```. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     created: String
+     *     datasetId: String
+     *     ontology: String
+     *     description: String
+     *     datasetSources: {
+     *         conversionIds: [
+     *             String
+     *         ]
+     *         appendDatasetId: String
+     *     }
+     *     featureCounts: Object
+     * }
+     * }
+ * + * @param datasetId The identifier for the dataset to query from. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return detail information for the dataset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String datasetId, RequestOptions requestOptions) { + return getWithResponseAsync(datasetId, requestOptions).block(); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

You can also use this API to delete old/unused datasets to create space for new Creator content. + * + *

### Submit Delete Request + * + *

To delete your content you will issue a `DELETE` request where the path will contain the `datasetId` of the + * dataset to delete. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + * @param datasetId The identifier for the dataset to query from. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String datasetId, RequestOptions requestOptions) { + return FluxUtil.withContext( + context -> + service.delete( + this.client.getGeography(), + this.client.getServiceVersion().getVersion(), + datasetId, + requestOptions, + context)); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

You can also use this API to delete old/unused datasets to create space for new Creator content. + * + *

### Submit Delete Request + * + *

To delete your content you will issue a `DELETE` request where the path will contain the `datasetId` of the + * dataset to delete. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + * @param datasetId The identifier for the dataset to query from. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param context The context to associate with this operation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String datasetId, RequestOptions requestOptions, Context context) { + return service.delete( + this.client.getGeography(), + this.client.getServiceVersion().getVersion(), + datasetId, + requestOptions, + context); + } + + /** + * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier). + * + *

Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API + * and SDK. [This](https://docs.microsoft.com/azure/azure-maps/creator-indoor-maps) article introduces concepts and + * tools that apply to Azure Maps Creator. + * + *

You can also use this API to delete old/unused datasets to create space for new Creator content. + * + *

### Submit Delete Request + * + *

To delete your content you will issue a `DELETE` request where the path will contain the `datasetId` of the + * dataset to delete. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + * @param datasetId The identifier for the dataset to query from. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String datasetId, RequestOptions requestOptions) { + return deleteWithResponseAsync(datasetId, requestOptions).block(); + } + + /** + * This API allows the caller to view the current progress of a dataset operation and the path is obtained from a + * call to the Create API. + * + *

### Submit Operations Request + * + *

To view the current progress of a dataset operation, you will use a `GET` request where the `operationId` + * given the path is the ID that represents the operation. + * + *

### Operation Response + * + *

While in progress, a `200-OK` http status code will be returned with no extra headers. If the operation + * succeeds, a `200-OK` http status code with Resource-Location header will be returned. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param operationId The ID to query the status for the dataset create/import request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for a Long-Running Operations API along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationWithResponseAsync(String operationId, RequestOptions requestOptions) { + return FluxUtil.withContext( + context -> + service.getOperation( + this.client.getGeography(), + this.client.getServiceVersion().getVersion(), + operationId, + requestOptions, + context)); + } + + /** + * This API allows the caller to view the current progress of a dataset operation and the path is obtained from a + * call to the Create API. + * + *

### Submit Operations Request + * + *

To view the current progress of a dataset operation, you will use a `GET` request where the `operationId` + * given the path is the ID that represents the operation. + * + *

### Operation Response + * + *

While in progress, a `200-OK` http status code will be returned with no extra headers. If the operation + * succeeds, a `200-OK` http status code with Resource-Location header will be returned. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param operationId The ID to query the status for the dataset create/import request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param context The context to associate with this operation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for a Long-Running Operations API along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationWithResponseAsync( + String operationId, RequestOptions requestOptions, Context context) { + return service.getOperation( + this.client.getGeography(), + this.client.getServiceVersion().getVersion(), + operationId, + requestOptions, + context); + } + + /** + * This API allows the caller to view the current progress of a dataset operation and the path is obtained from a + * call to the Create API. + * + *

### Submit Operations Request + * + *

To view the current progress of a dataset operation, you will use a `GET` request where the `operationId` + * given the path is the ID that represents the operation. + * + *

### Operation Response + * + *

While in progress, a `200-OK` http status code will be returned with no extra headers. If the operation + * succeeds, a `200-OK` http status code with Resource-Location header will be returned. + * + *

Query Parameters + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
api-versionStringYesApi Version
+ * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     operationId: String
+     *     status: String(NotStarted/Running/Failed/Succeeded)
+     *     created: String
+     *     error: {
+     *         code: String
+     *         message: String
+     *         target: String
+     *         details: [
+     *             (recursive schema, see above)
+     *         ]
+     *         additionalInfo: [
+     *             {
+     *                 type: String
+     *                 info: Object
+     *             }
+     *         ]
+     *     }
+     *     warning: (recursive schema, see warning above)
+     * }
+     * }
+ * + * @param operationId The ID to query the status for the dataset create/import request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for a Long-Running Operations API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOperationWithResponse(String operationId, RequestOptions requestOptions) { + return getOperationWithResponseAsync(operationId, requestOptions).block(); + } + + /** + * Get the next page of items. + * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     datasets: [
+     *         {
+     *             created: String
+     *             datasetId: String
+     *             ontology: String
+     *             description: String
+     *             datasetSources: {
+     *                 conversionIds: [
+     *                     String
+     *                 ]
+     *                 appendDatasetId: String
+     *             }
+     *             featureCounts: Object
+     *         }
+     *     ]
+     *     nextLink: String
+     * }
+     * }
+ * + * @param nextLink The nextLink parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for the Dataset List API along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + return FluxUtil.withContext( + context -> service.listNext(nextLink, this.client.getGeography(), requestOptions, context)) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "datasets"), + getNextLink(res.getValue(), "nextLink"), + null)); + } + + /** + * Get the next page of items. + * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-client-idStringNoSpecifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ * + *

Response Body Schema + * + *

{@code
+     * {
+     *     datasets: [
+     *         {
+     *             created: String
+     *             datasetId: String
+     *             ontology: String
+     *             description: String
+     *             datasetSources: {
+     *                 conversionIds: [
+     *                     String
+     *                 ]
+     *                 appendDatasetId: String
+     *             }
+     *             featureCounts: Object
+     *         }
+     *     ]
+     *     nextLink: String
+     * }
+     * }
+ * + * @param nextLink The nextLink parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @param context The context to associate with this operation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @return the response model for the Dataset List API along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync( + String nextLink, RequestOptions requestOptions, Context context) { + return service.listNext(nextLink, this.client.getGeography(), requestOptions, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "datasets"), + getNextLink(res.getValue(), "nextLink"), + null)); + } + + private static final class TypeReferenceBinaryData extends TypeReference { + // empty + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/package-info.java b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/package-info.java new file mode 100644 index 0000000000000..2af093457e26d --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/main/java/com/azure/maps/dataset/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for AzureMapsDatasetService. APIs for managing datasets from uploaded data in Azure + * Maps. + */ +package com.azure.maps.dataset; diff --git a/sdk/maps/azure-maps-dataset/src/main/java/module-info.java b/sdk/maps/azure-maps-dataset/src/main/java/module-info.java new file mode 100644 index 0000000000000..6736403a81bdc --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/main/java/module-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.maps.dataset { + requires transitive com.azure.core; + + exports com.azure.maps.dataset; +} diff --git a/sdk/maps/azure-maps-dataset/src/main/resources/azure-maps-dataset.properties b/sdk/maps/azure-maps-dataset/src/main/resources/azure-maps-dataset.properties new file mode 100644 index 0000000000000..ca812989b4f27 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/main/resources/azure-maps-dataset.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/ReadmeSamples.java b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/ReadmeSamples.java new file mode 100644 index 0000000000000..c8cc30d1a8077 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/ReadmeSamples.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset; + +public final class ReadmeSamples { + public void readmeSamples() { + // BEGIN: com.azure.maps.dataset.readme + // END: com.azure.maps.dataset.readme + } +} diff --git a/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/CreateDatasetFromAConvertedCADFileProvidedByConversionId.java b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/CreateDatasetFromAConvertedCADFileProvidedByConversionId.java new file mode 100644 index 0000000000000..fd8a4d0950d5e --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/CreateDatasetFromAConvertedCADFileProvidedByConversionId.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.maps.dataset.AzureMapsDatasetServiceClient; +import com.azure.maps.dataset.AzureMapsDatasetServiceClientBuilder; + +public class CreateDatasetFromAConvertedCADFileProvidedByConversionId { + public static void main(String[] args) { + AzureMapsDatasetServiceClient client = + new AzureMapsDatasetServiceClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .geography("us") + .buildClient(); + RequestOptions requestOptions = new RequestOptions(); + requestOptions.addQueryParam("conversionId", "[conversionId]"); + SyncPoller response = client.beginCreate(requestOptions); + } +} diff --git a/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/DeletePreviouslyCreatedDataset.java b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/DeletePreviouslyCreatedDataset.java new file mode 100644 index 0000000000000..92218ad481fcf --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/DeletePreviouslyCreatedDataset.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.maps.dataset.AzureMapsDatasetServiceClient; +import com.azure.maps.dataset.AzureMapsDatasetServiceClientBuilder; + +public class DeletePreviouslyCreatedDataset { + public static void main(String[] args) { + AzureMapsDatasetServiceClient client = + new AzureMapsDatasetServiceClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .geography("us") + .buildClient(); + RequestOptions requestOptions = new RequestOptions(); + Response response = client.deleteWithResponse("[datasetId]", requestOptions); + } +} diff --git a/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/GetDetailsForAPreviouslyCreatedDataset.java b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/GetDetailsForAPreviouslyCreatedDataset.java new file mode 100644 index 0000000000000..30730e20b10d8 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/GetDetailsForAPreviouslyCreatedDataset.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.maps.dataset.AzureMapsDatasetServiceClient; +import com.azure.maps.dataset.AzureMapsDatasetServiceClientBuilder; + +public class GetDetailsForAPreviouslyCreatedDataset { + public static void main(String[] args) { + AzureMapsDatasetServiceClient client = + new AzureMapsDatasetServiceClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .geography("us") + .buildClient(); + RequestOptions requestOptions = new RequestOptions(); + Response response = client.getWithResponse("[datasetId]", requestOptions); + } +} diff --git a/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/GetTheStatusOfAnOperationWhichHasFinishedSuccessfully.java b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/GetTheStatusOfAnOperationWhichHasFinishedSuccessfully.java new file mode 100644 index 0000000000000..952c90a1e0a5d --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/GetTheStatusOfAnOperationWhichHasFinishedSuccessfully.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.maps.dataset.AzureMapsDatasetServiceClient; +import com.azure.maps.dataset.AzureMapsDatasetServiceClientBuilder; + +public class GetTheStatusOfAnOperationWhichHasFinishedSuccessfully { + public static void main(String[] args) { + AzureMapsDatasetServiceClient client = + new AzureMapsDatasetServiceClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .geography("us") + .buildClient(); + RequestOptions requestOptions = new RequestOptions(); + Response response = + client.getOperationWithResponse("8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", requestOptions); + } +} diff --git a/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/GetTheStatusOfAnOperationWhichIsStillRunning.java b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/GetTheStatusOfAnOperationWhichIsStillRunning.java new file mode 100644 index 0000000000000..aef48eb775977 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/GetTheStatusOfAnOperationWhichIsStillRunning.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.maps.dataset.AzureMapsDatasetServiceClient; +import com.azure.maps.dataset.AzureMapsDatasetServiceClientBuilder; + +public class GetTheStatusOfAnOperationWhichIsStillRunning { + public static void main(String[] args) { + AzureMapsDatasetServiceClient client = + new AzureMapsDatasetServiceClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .geography("us") + .buildClient(); + RequestOptions requestOptions = new RequestOptions(); + Response response = + client.getOperationWithResponse("8b1288fa-1958-4a2b-b68e-13a7i5af7d7c", requestOptions); + } +} diff --git a/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/ListAllThePreviouslyCreatedDatasets.java b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/ListAllThePreviouslyCreatedDatasets.java new file mode 100644 index 0000000000000..9a0d2c3627022 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/samples/java/com/azure/maps/dataset/generated/ListAllThePreviouslyCreatedDatasets.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.maps.dataset.AzureMapsDatasetServiceClient; +import com.azure.maps.dataset.AzureMapsDatasetServiceClientBuilder; + +public class ListAllThePreviouslyCreatedDatasets { + public static void main(String[] args) { + AzureMapsDatasetServiceClient client = + new AzureMapsDatasetServiceClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .geography("us") + .buildClient(); + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = client.list(requestOptions); + } +} diff --git a/sdk/maps/azure-maps-dataset/src/test/java/com/azure/maps/dataset/ClientTests.java b/sdk/maps/azure-maps-dataset/src/test/java/com/azure/maps/dataset/ClientTests.java new file mode 100644 index 0000000000000..eaa54fa0e7456 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/src/test/java/com/azure/maps/dataset/ClientTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.dataset; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestBase; +import com.azure.core.test.TestMode; +import com.azure.core.test.annotation.DoNotRecord; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.maps.dataset.models.Geography; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ClientTests extends TestBase { + private AzureMapsDatasetServiceClient azureMapsDatasetServiceClient; + + @BeforeEach + public void setup() { + AzureMapsDatasetServiceClientBuilder azureMapsDatasetServiceClientbuilder = + new AzureMapsDatasetServiceClientBuilder() + .geography(Configuration.getGlobalConfiguration().get("GEOGRAPHY", Geography.US)) + .httpClient(HttpClient.createDefault()) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + azureMapsDatasetServiceClientbuilder + .httpClient(interceptorManager.getPlaybackClient()) + .credential(request -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX))); + } else if (getTestMode() == TestMode.RECORD) { + azureMapsDatasetServiceClientbuilder + .addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + azureMapsDatasetServiceClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + azureMapsDatasetServiceClient = azureMapsDatasetServiceClientbuilder.buildClient(); + } + + @Test + @DoNotRecord(skipInPlayback = true) + public void testClient() { + // use the builder to create client + } +} diff --git a/sdk/maps/azure-maps-dataset/swagger/README_SPEC.md b/sdk/maps/azure-maps-dataset/swagger/README_SPEC.md new file mode 100644 index 0000000000000..60ce08ca6ef20 --- /dev/null +++ b/sdk/maps/azure-maps-dataset/swagger/README_SPEC.md @@ -0,0 +1,25 @@ +## Generate autorest code + +```yaml +input-files: +- /home/vsts/work/1/s/azure-rest-api-specs/specification/maps/data-plane/Creator/preview/2.0/dataset.json +output-folder: ../ +java: true +regenerate-pom: false +partial-update: true +generate-sync-async-clients: true +generate-client-as-impl: true +generate-client-interfaces: false +generate-builder-per-client: true +add-context-parameter: true +artifact-id: azure-maps-dataset +low-level-client: true +sync-methods: all +generate-samples: true +license-header: MICROSOFT_MIT_SMALL +namespace: com.azure.maps.dataset +context-client-method-parameter: true +azure-arm: false +service-versions: +- '2.0' +```