diff --git a/sdk/maps/maps-route-rest/samples-dev/directions.ts b/sdk/maps/maps-route-rest/samples-dev/directions.ts index 5100a8d271e7..2aadd58e7650 100644 --- a/sdk/maps/maps-route-rest/samples-dev/directions.ts +++ b/sdk/maps/maps-route-rest/samples-dev/directions.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. /** - * @summary Demonstrates the use of a MapsRouteClient to calculate routes. + * @summary Demonstrates the use of a MapsRoute to calculate routes. */ import { AzureKeyCredential } from "@azure/core-auth"; @@ -37,7 +37,7 @@ async function main() { /** Azure Active Directory (Azure AD) authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = createMapsRouteClient(credential, mapsClientId); + // const client = MapsRoute(credential, mapsClientId); /** * Should provide at least two coordinates, origin and destination to the query. @@ -56,11 +56,11 @@ async function main() { /** * Could also provide additional conditions to the query. */ - vehicleWidthInMeters: 2, - vehicleHeightInMeters: 2, + vehicleWidth: 2, + vehicleHeight: 2, vehicleLoadType: "USHazmatClass1", travelMode: "truck", - isCommercialVehicle: true, + vehicleCommercial: true, }, }); diff --git a/sdk/maps/maps-route-rest/samples-dev/lro.ts b/sdk/maps/maps-route-rest/samples-dev/lro.ts index 14328880f894..b2097f8af5d9 100644 --- a/sdk/maps/maps-route-rest/samples-dev/lro.ts +++ b/sdk/maps/maps-route-rest/samples-dev/lro.ts @@ -31,7 +31,7 @@ async function main() { /** Or use Azure AD authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = new MapsRouteClient(credential, mapsClientId); + // const client = new MapsRoute(credential, mapsClientId); const request = createRouteDirectionsBatchRequest([ { diff --git a/sdk/maps/maps-route-rest/samples-dev/matrix.ts b/sdk/maps/maps-route-rest/samples-dev/matrix.ts index 7b250cdc2a6b..92a2145ab5af 100644 --- a/sdk/maps/maps-route-rest/samples-dev/matrix.ts +++ b/sdk/maps/maps-route-rest/samples-dev/matrix.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. /** - * @summary Demonstrates the use of a MapsRouteClient to retrieve a setting value. + * @summary Demonstrates the use of a MapsRoute to retrieve a setting value. */ import { AzureKeyCredential } from "@azure/core-auth"; @@ -32,7 +32,7 @@ async function main() { /** Azure Active Directory (Azure AD) authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = createMapsRouteClient(credential, mapsClientId); + // const client = MapsRoute(credential, mapsClientId); /** * Calculate route matrix in synchronous way. @@ -40,11 +40,11 @@ async function main() { */ const routeMatrixResult = await client.path("/route/matrix/sync/{format}", "json").post({ queryParameters: { - vehicleWidthInMeters: 2, - vehicleHeightInMeters: 2, + vehicleWidth: 2, + vehicleHeight: 2, vehicleLoadType: "USHazmatClass1", travelMode: "truck", - isCommercialVehicle: true, + vehicleCommercial: true, }, body: { origins: { diff --git a/sdk/maps/maps-route-rest/samples-dev/range.ts b/sdk/maps/maps-route-rest/samples-dev/range.ts index 61ffa05b9906..db30cbe9dddb 100644 --- a/sdk/maps/maps-route-rest/samples-dev/range.ts +++ b/sdk/maps/maps-route-rest/samples-dev/range.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. /** - * @summary Demonstrates the use of a MapsRouteClient to retrieve a route range. + * @summary Demonstrates the use of a MapsRoute to retrieve a route range. */ import { AzureKeyCredential } from "@azure/core-auth"; @@ -32,7 +32,7 @@ async function main() { /** Azure Active Directory (Azure AD) authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = createMapsRouteClient(credential, mapsClientId); + // const client = MapsRoute(credential, mapsClientId); const routeRangeResult = await client .path("/route/range/{format}", "json") diff --git a/sdk/maps/maps-route-rest/samples-dev/resumeLro.ts b/sdk/maps/maps-route-rest/samples-dev/resumeLro.ts index ac66a1ad164d..8590d54b4325 100644 --- a/sdk/maps/maps-route-rest/samples-dev/resumeLro.ts +++ b/sdk/maps/maps-route-rest/samples-dev/resumeLro.ts @@ -34,7 +34,7 @@ async function main() { /** Or use Azure AD authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = new MapsRouteClient(credential, mapsClientId); + // const client = new MapsRoute(credential, mapsClientId); const request = createRouteDirectionsBatchRequest([ { diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/README.md b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/README.md index efee55486416..82b92cf4687a 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/README.md +++ b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/README.md @@ -12,13 +12,13 @@ urlFragment: maps-route-javascript-beta These sample programs show how to use the JavaScript client libraries for Azure Maps Route in some common scenarios. -| **File Name** | **Description** | -| --------------------------- | ---------------------------------------------------------------------- | -| [directions.js][directions] | Demonstrates the use of a MapsRouteClient to calculate routes. | -| [lro.js][lro] | Demonstrates how to manipulate a long running request. | -| [matrix.js][matrix] | Demonstrates the use of a MapsRouteClient to retrieve a setting value. | -| [range.js][range] | Demonstrates the use of a MapsRouteClient to retrieve a route range. | -| [resumeLro.js][resumelro] | Demonstrates how to resume a long running request. | +| **File Name** | **Description** | +| --------------------------- | ---------------------------------------------------------------- | +| [directions.js][directions] | Demonstrates the use of a MapsRoute to calculate routes. | +| [lro.js][lro] | Demonstrates how to manipulate a long running request. | +| [matrix.js][matrix] | Demonstrates the use of a MapsRoute to retrieve a setting value. | +| [range.js][range] | Demonstrates the use of a MapsRoute to retrieve a route range. | +| [resumeLro.js][resumelro] | Demonstrates how to resume a long running request. | ## Prerequisites diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/directions.js b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/directions.js index 6be0125bf480..81fb0feee170 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/directions.js +++ b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/directions.js @@ -2,7 +2,7 @@ // Licensed under the MIT License. /** - * @summary Demonstrates the use of a MapsRouteClient to calculate routes. + * @summary Demonstrates the use of a MapsRoute to calculate routes. */ const { AzureKeyCredential } = require("@azure/core-auth"); @@ -36,7 +36,7 @@ async function main() { /** Azure Active Directory (Azure AD) authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = createMapsRouteClient(credential, mapsClientId); + // const client = MapsRoute(credential, mapsClientId); /** * Should provide at least two coordinates, origin and destination to the query. @@ -55,11 +55,11 @@ async function main() { /** * Could also provide additional conditions to the query. */ - vehicleWidthInMeters: 2, - vehicleHeightInMeters: 2, + vehicleWidth: 2, + vehicleHeight: 2, vehicleLoadType: "USHazmatClass1", travelMode: "truck", - isCommercialVehicle: true, + vehicleCommercial: true, }, }); diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/lro.js b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/lro.js index 36ae3f8c93c4..d56cdacbd379 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/lro.js +++ b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/lro.js @@ -29,7 +29,7 @@ async function main() { /** Or use Azure AD authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = new MapsRouteClient(credential, mapsClientId); + // const client = new MapsRoute(credential, mapsClientId); const request = createRouteDirectionsBatchRequest([ { diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/matrix.js b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/matrix.js index f4fa8852880b..2c6bba7f4250 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/matrix.js +++ b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/matrix.js @@ -2,7 +2,7 @@ // Licensed under the MIT License. /** - * @summary Demonstrates the use of a MapsRouteClient to retrieve a setting value. + * @summary Demonstrates the use of a MapsRoute to retrieve a setting value. */ const { AzureKeyCredential } = require("@azure/core-auth"); @@ -32,7 +32,7 @@ async function main() { /** Azure Active Directory (Azure AD) authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = createMapsRouteClient(credential, mapsClientId); + // const client = MapsRoute(credential, mapsClientId); /** * Calculate route matrix in synchronous way. @@ -40,11 +40,11 @@ async function main() { */ const routeMatrixResult = await client.path("/route/matrix/sync/{format}", "json").post({ queryParameters: { - vehicleWidthInMeters: 2, - vehicleHeightInMeters: 2, + vehicleWidth: 2, + vehicleHeight: 2, vehicleLoadType: "USHazmatClass1", travelMode: "truck", - isCommercialVehicle: true, + vehicleCommercial: true, }, body: { origins: { diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/range.js b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/range.js index 307bb78fcde5..45a0a48ec311 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/range.js +++ b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/range.js @@ -2,7 +2,7 @@ // Licensed under the MIT License. /** - * @summary Demonstrates the use of a MapsRouteClient to retrieve a route range. + * @summary Demonstrates the use of a MapsRoute to retrieve a route range. */ const { AzureKeyCredential } = require("@azure/core-auth"); @@ -32,7 +32,7 @@ async function main() { /** Azure Active Directory (Azure AD) authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = createMapsRouteClient(credential, mapsClientId); + // const client = MapsRoute(credential, mapsClientId); const routeRangeResult = await client .path("/route/range/{format}", "json") diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/resumeLro.js b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/resumeLro.js index 7df14d72b28a..94b8bb2dd0dc 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/javascript/resumeLro.js +++ b/sdk/maps/maps-route-rest/samples/v1-beta/javascript/resumeLro.js @@ -32,7 +32,7 @@ async function main() { /** Or use Azure AD authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = new MapsRouteClient(credential, mapsClientId); + // const client = new MapsRoute(credential, mapsClientId); const request = createRouteDirectionsBatchRequest([ { diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/README.md b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/README.md index d7f4988bd75f..5cd39e8d62da 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/README.md +++ b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/README.md @@ -12,13 +12,13 @@ urlFragment: maps-route-typescript-beta These sample programs show how to use the TypeScript client libraries for Azure Maps Route in some common scenarios. -| **File Name** | **Description** | -| --------------------------- | ---------------------------------------------------------------------- | -| [directions.ts][directions] | Demonstrates the use of a MapsRouteClient to calculate routes. | -| [lro.ts][lro] | Demonstrates how to manipulate a long running request. | -| [matrix.ts][matrix] | Demonstrates the use of a MapsRouteClient to retrieve a setting value. | -| [range.ts][range] | Demonstrates the use of a MapsRouteClient to retrieve a route range. | -| [resumeLro.ts][resumelro] | Demonstrates how to resume a long running request. | +| **File Name** | **Description** | +| --------------------------- | ---------------------------------------------------------------- | +| [directions.ts][directions] | Demonstrates the use of a MapsRoute to calculate routes. | +| [lro.ts][lro] | Demonstrates how to manipulate a long running request. | +| [matrix.ts][matrix] | Demonstrates the use of a MapsRoute to retrieve a setting value. | +| [range.ts][range] | Demonstrates the use of a MapsRoute to retrieve a route range. | +| [resumeLro.ts][resumelro] | Demonstrates how to resume a long running request. | ## Prerequisites diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/directions.ts b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/directions.ts index 5100a8d271e7..2aadd58e7650 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/directions.ts +++ b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/directions.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. /** - * @summary Demonstrates the use of a MapsRouteClient to calculate routes. + * @summary Demonstrates the use of a MapsRoute to calculate routes. */ import { AzureKeyCredential } from "@azure/core-auth"; @@ -37,7 +37,7 @@ async function main() { /** Azure Active Directory (Azure AD) authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = createMapsRouteClient(credential, mapsClientId); + // const client = MapsRoute(credential, mapsClientId); /** * Should provide at least two coordinates, origin and destination to the query. @@ -56,11 +56,11 @@ async function main() { /** * Could also provide additional conditions to the query. */ - vehicleWidthInMeters: 2, - vehicleHeightInMeters: 2, + vehicleWidth: 2, + vehicleHeight: 2, vehicleLoadType: "USHazmatClass1", travelMode: "truck", - isCommercialVehicle: true, + vehicleCommercial: true, }, }); diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/lro.ts b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/lro.ts index 14328880f894..b2097f8af5d9 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/lro.ts +++ b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/lro.ts @@ -31,7 +31,7 @@ async function main() { /** Or use Azure AD authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = new MapsRouteClient(credential, mapsClientId); + // const client = new MapsRoute(credential, mapsClientId); const request = createRouteDirectionsBatchRequest([ { diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/matrix.ts b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/matrix.ts index 7b250cdc2a6b..92a2145ab5af 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/matrix.ts +++ b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/matrix.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. /** - * @summary Demonstrates the use of a MapsRouteClient to retrieve a setting value. + * @summary Demonstrates the use of a MapsRoute to retrieve a setting value. */ import { AzureKeyCredential } from "@azure/core-auth"; @@ -32,7 +32,7 @@ async function main() { /** Azure Active Directory (Azure AD) authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = createMapsRouteClient(credential, mapsClientId); + // const client = MapsRoute(credential, mapsClientId); /** * Calculate route matrix in synchronous way. @@ -40,11 +40,11 @@ async function main() { */ const routeMatrixResult = await client.path("/route/matrix/sync/{format}", "json").post({ queryParameters: { - vehicleWidthInMeters: 2, - vehicleHeightInMeters: 2, + vehicleWidth: 2, + vehicleHeight: 2, vehicleLoadType: "USHazmatClass1", travelMode: "truck", - isCommercialVehicle: true, + vehicleCommercial: true, }, body: { origins: { diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/range.ts b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/range.ts index 61ffa05b9906..db30cbe9dddb 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/range.ts +++ b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/range.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. /** - * @summary Demonstrates the use of a MapsRouteClient to retrieve a route range. + * @summary Demonstrates the use of a MapsRoute to retrieve a route range. */ import { AzureKeyCredential } from "@azure/core-auth"; @@ -32,7 +32,7 @@ async function main() { /** Azure Active Directory (Azure AD) authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = createMapsRouteClient(credential, mapsClientId); + // const client = MapsRoute(credential, mapsClientId); const routeRangeResult = await client .path("/route/range/{format}", "json") diff --git a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/resumeLro.ts b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/resumeLro.ts index ac66a1ad164d..8590d54b4325 100644 --- a/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/resumeLro.ts +++ b/sdk/maps/maps-route-rest/samples/v1-beta/typescript/src/resumeLro.ts @@ -34,7 +34,7 @@ async function main() { /** Or use Azure AD authentication */ // const credential = new DefaultAzureCredential(); // const mapsClientId = process.env.MAPS_CLIENT_ID || ""; - // const client = new MapsRouteClient(credential, mapsClientId); + // const client = new MapsRoute(credential, mapsClientId); const request = createRouteDirectionsBatchRequest([ { diff --git a/sdk/maps/maps-route-rest/src/mapsRoute.ts b/sdk/maps/maps-route-rest/src/mapsRoute.ts index d954ec191a8d..e3e4bebea2d5 100644 --- a/sdk/maps/maps-route-rest/src/mapsRoute.ts +++ b/sdk/maps/maps-route-rest/src/mapsRoute.ts @@ -13,11 +13,11 @@ import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline"; * * @example * ```ts - * import { createMapsRouteClient } from "@azure-rest/maps-route"; + * import MapsRoute from "@azure-rest/maps-route"; * import { AzureKeyCredential } from "@azure/core-auth"; * * const credential = new AzureKeyCredential(""); - * const client = createMapsRouteClient(credential); + * const client = MapsRoute(credential); *``` * * @param credential - An AzureKeyCredential instance used to authenticate requests to the service @@ -28,15 +28,15 @@ export default function MapsRoute( options?: ClientOptions ): MapsRouteClient; /** - * Creates an instance of MapsRouteClient from an Azure Identity `TokenCredential`. + * Creates an instance of MapsRoute from an Azure Identity `TokenCredential`. * * @example * ```ts - * import { MapsRouteClient } from "@azure/maps-route"; + * import MapsRoute from "@azure/maps-route"; * import { DefaultAzureCredential } from "@azure/identity"; * * const credential = new DefaultAzureCredential(); - * const client = createMapsRouteClient(credential, ""); + * const client = MapsRoute(credential, ""); *``` * * @param credential - An TokenCredential instance used to authenticate requests to the service