From ef7f505e1e155b409a6c07a240c5a402b912543d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 29 Oct 2021 14:56:54 +0000 Subject: [PATCH] CodeGen from PR 16577 in Azure/azure-rest-api-specs Merge ed77e3bf7cc3595912fc26f5b2864bd93174e6fb into a861859a287afbbf58930535e75894b0f488e3b3 --- sdk/maps/arm-maps/README.md | 8 +- sdk/maps/arm-maps/package.json | 2 +- sdk/maps/arm-maps/rollup.config.js | 10 +- .../arm-maps/src/azureMapsManagementClient.ts | 7 +- .../src/azureMapsManagementClientContext.ts | 21 +- .../arm-maps/src/models/accountsMappers.ts | 7 + .../arm-maps/src/models/creatorsMappers.ts | 5 + sdk/maps/arm-maps/src/models/index.ts | 639 +++++++++++++----- sdk/maps/arm-maps/src/models/mappers.ts | 357 +++++++++- sdk/maps/arm-maps/src/models/parameters.ts | 5 +- sdk/maps/arm-maps/src/operations/accounts.ts | 507 +++++++------- sdk/maps/arm-maps/src/operations/creators.ts | 267 +++----- sdk/maps/arm-maps/src/operations/maps.ts | 157 ++++- 13 files changed, 1261 insertions(+), 731 deletions(-) diff --git a/sdk/maps/arm-maps/README.md b/sdk/maps/arm-maps/README.md index 446851722704..3a54916f8572 100644 --- a/sdk/maps/arm-maps/README.md +++ b/sdk/maps/arm-maps/README.md @@ -1,11 +1,11 @@ ## Azure AzureMapsManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMapsManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AzureMapsManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-maps @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and get accounts as an example written in JavaScript. ##### Sample code @@ -87,7 +85,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmMaps.AzureMapsManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; diff --git a/sdk/maps/arm-maps/package.json b/sdk/maps/arm-maps/package.json index 1982f30ab992..86cc69c0fabe 100644 --- a/sdk/maps/arm-maps/package.json +++ b/sdk/maps/arm-maps/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/maps/arm-maps", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/maps/arm-maps", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/maps/arm-maps/rollup.config.js b/sdk/maps/arm-maps/rollup.config.js index d90d6eb3dd94..81dee1f0400d 100644 --- a/sdk/maps/arm-maps/rollup.config.js +++ b/sdk/maps/arm-maps/rollup.config.js @@ -7,7 +7,10 @@ import sourcemaps from "rollup-plugin-sourcemaps"; */ const config = { input: "./esm/azureMapsManagementClient.js", - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-maps.js", format: "umd", @@ -25,7 +28,10 @@ const config = { * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, - plugins: [nodeResolve({ mainFields: ["module", "main"] }), sourcemaps()] + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] }; export default config; diff --git a/sdk/maps/arm-maps/src/azureMapsManagementClient.ts b/sdk/maps/arm-maps/src/azureMapsManagementClient.ts index b0bdead1332f..60fdd6a8d39c 100644 --- a/sdk/maps/arm-maps/src/azureMapsManagementClient.ts +++ b/sdk/maps/arm-maps/src/azureMapsManagementClient.ts @@ -14,6 +14,7 @@ import * as Mappers from "./models/mappers"; import * as operations from "./operations"; import { AzureMapsManagementClientContext } from "./azureMapsManagementClientContext"; + class AzureMapsManagementClient extends AzureMapsManagementClientContext { // Operation groups accounts: operations.Accounts; @@ -31,11 +32,7 @@ class AzureMapsManagementClient extends AzureMapsManagementClientContext { * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor( - credentials: msRest.ServiceClientCredentials | TokenCredential, - subscriptionId: string, - options?: Models.AzureMapsManagementClientOptions - ) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMapsManagementClientOptions) { super(credentials, subscriptionId, options); this.accounts = new operations.Accounts(this); this.maps = new operations.Maps(this); diff --git a/sdk/maps/arm-maps/src/azureMapsManagementClientContext.ts b/sdk/maps/arm-maps/src/azureMapsManagementClientContext.ts index 8c4e4d5ac6b2..f0db2ea0b486 100644 --- a/sdk/maps/arm-maps/src/azureMapsManagementClientContext.ts +++ b/sdk/maps/arm-maps/src/azureMapsManagementClientContext.ts @@ -9,8 +9,8 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-maps"; const packageVersion = "2.1.1"; @@ -31,16 +31,12 @@ export class AzureMapsManagementClientContext extends msRestAzure.AzureServiceCl * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor( - credentials: msRest.ServiceClientCredentials | TokenCredential, - subscriptionId: string, - options?: Models.AzureMapsManagementClientOptions - ) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureMapsManagementClientOptions) { if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); + throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId == undefined) { - throw new Error("'subscriptionId' cannot be null."); + throw new Error('\'subscriptionId\' cannot be null.'); } if (!options) { @@ -53,8 +49,8 @@ export class AzureMapsManagementClientContext extends msRestAzure.AzureServiceCl super(credentials, options); - this.apiVersion = "2021-02-01"; - this.acceptLanguage = "en-US"; + this.apiVersion = '2021-12-01-preview'; + this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; this.requestContentType = "application/json; charset=utf-8"; @@ -64,10 +60,7 @@ export class AzureMapsManagementClientContext extends msRestAzure.AzureServiceCl if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if ( - options.longRunningOperationRetryTimeout !== null && - options.longRunningOperationRetryTimeout !== undefined - ) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/maps/arm-maps/src/models/accountsMappers.ts b/sdk/maps/arm-maps/src/models/accountsMappers.ts index 3fe2d6b37e1c..d9fa934b5e56 100644 --- a/sdk/maps/arm-maps/src/models/accountsMappers.ts +++ b/sdk/maps/arm-maps/src/models/accountsMappers.ts @@ -7,17 +7,24 @@ */ export { + AccountSasParameters, AzureEntityResource, BaseResource, + CorsRule, + CorsRules, Creator, CreatorProperties, ErrorAdditionalInfo, ErrorDetail, ErrorResponse, + LinkedResource, + ManagedServiceIdentity, + ManagedServiceIdentityUserAssignedIdentitiesValue, MapsAccount, MapsAccountKeys, MapsAccountProperties, MapsAccounts, + MapsAccountSasToken, MapsAccountUpdateParameters, MapsKeySpecification, ProxyResource, diff --git a/sdk/maps/arm-maps/src/models/creatorsMappers.ts b/sdk/maps/arm-maps/src/models/creatorsMappers.ts index 9c48734d5e7d..8d5f2c549711 100644 --- a/sdk/maps/arm-maps/src/models/creatorsMappers.ts +++ b/sdk/maps/arm-maps/src/models/creatorsMappers.ts @@ -9,6 +9,8 @@ export { AzureEntityResource, BaseResource, + CorsRule, + CorsRules, Creator, CreatorList, CreatorProperties, @@ -16,6 +18,9 @@ export { ErrorAdditionalInfo, ErrorDetail, ErrorResponse, + LinkedResource, + ManagedServiceIdentity, + ManagedServiceIdentityUserAssignedIdentitiesValue, MapsAccount, MapsAccountProperties, ProxyResource, diff --git a/sdk/maps/arm-maps/src/models/index.ts b/sdk/maps/arm-maps/src/models/index.ts index a47bee234da0..e94804c4b003 100644 --- a/sdk/maps/arm-maps/src/models/index.ts +++ b/sdk/maps/arm-maps/src/models/index.ts @@ -26,6 +26,38 @@ export interface CreatorProperties { storageUnits: number; } +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + /** * An Azure resource which represents Maps Creator product and provides ability to manage private * location data. @@ -35,6 +67,11 @@ export interface Creator extends BaseResource { * The Creator resource properties. */ properties: CreatorProperties; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -54,35 +91,84 @@ export interface Sku { } /** - * Metadata pertaining to creation and last modification of the resource. + * An interface representing ManagedServiceIdentityUserAssignedIdentitiesValue. */ -export interface SystemData { +export interface ManagedServiceIdentityUserAssignedIdentitiesValue { /** - * The identity that created the resource. + * The principal id of user assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - createdBy?: string; + readonly principalId?: string; /** - * The type of identity that created the resource. Possible values include: 'User', - * 'Application', 'ManagedIdentity', 'Key' + * The client id of user assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - createdByType?: CreatedByType; + readonly clientId?: string; +} + +/** + * Identity for the resource. + */ +export interface ManagedServiceIdentity { /** - * The timestamp of resource creation (UTC). + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - createdAt?: Date; + readonly principalId?: string; /** - * The identity that last modified the resource. + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - lastModifiedBy?: string; + readonly tenantId?: string; /** - * The type of identity that last modified the resource. Possible values include: 'User', - * 'Application', 'ManagedIdentity', 'Key' + * The identity type. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' */ - lastModifiedByType?: CreatedByType; + type?: ResourceIdentityType; /** - * The timestamp of resource last modification (UTC) + * The list of user identities associated with the resource. The user identity dictionary key + * references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - lastModifiedAt?: Date; + userAssignedIdentities?: { [propertyName: string]: ManagedServiceIdentityUserAssignedIdentitiesValue }; +} + +/** + * Linked resource is reference to a resource deployed in an Azure subscription, add the linked + * resource `uniqueName` value as an optional parameter for operations on Azure Maps Geospatial + * REST APIs. + */ +export interface LinkedResource { + /** + * A provided name which uniquely identifies the linked resource. + */ + uniqueName: string; + /** + * ARM resource id in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}'. + */ + id: string; +} + +/** + * Specifies a CORS rule for the Map Account. + */ +export interface CorsRule { + /** + * Required if CorsRule element is present. A list of origin domains that will be allowed via + * CORS, or "*" to allow all domains + */ + allowedOrigins: string[]; +} + +/** + * Sets the CORS rules. You can include up to five CorsRule elements in the request. + */ +export interface CorsRules { + /** + * The list of CORS rules. You can include up to five CorsRule elements in the request. + */ + corsRules?: CorsRule[]; } /** @@ -100,10 +186,21 @@ export interface MapsAccountProperties { */ disableLocalAuth?: boolean; /** - * the state of the provisioning. + * The provisioning state of the Map account resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; + /** + * Sets the resources to be used for Managed Identities based operations for the Map account + * resource. + */ + linkedResources?: LinkedResource[]; + /** + * Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the + * request. If no CorsRule elements are included in the request body, all CORS rules will be + * deleted, and CORS will be disabled for the Blob service. + */ + cors?: CorsRules; } /** @@ -123,6 +220,10 @@ export interface MapsAccount extends BaseResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly systemData?: SystemData; + /** + * Sets the identity property for maps account. + */ + identity?: ManagedServiceIdentity; /** * The map account properties. */ @@ -148,6 +249,10 @@ export interface MapsAccountUpdateParameters { * The SKU of this account. */ sku?: Sku; + /** + * Sets the identity property for maps account. + */ + identity?: ManagedServiceIdentity; /** * A unique identifier for the maps account * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -159,10 +264,21 @@ export interface MapsAccountUpdateParameters { */ disableLocalAuth?: boolean; /** - * the state of the provisioning. + * The provisioning state of the Map account resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; + /** + * Sets the resources to be used for Managed Identities based operations for the Map account + * resource. + */ + linkedResources?: LinkedResource[]; + /** + * Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the + * request. If no CorsRule elements are included in the request body, all CORS rules will be + * deleted, and CORS will be disabled for the Blob service. + */ + cors?: CorsRules; } /** @@ -225,6 +341,57 @@ export interface MapsAccountKeys { readonly secondaryKeyLastUpdated?: string; } +/** + * Parameters used to create an account Shared Access Signature (SAS) token. The REST API access + * control is provided by Azure Maps Role Based Access (RBAC) identity and access. + */ +export interface AccountSasParameters { + /** + * The Map account key to use for signing. Possible values include: 'primaryKey', 'secondaryKey' + */ + signingKey: SigningKey; + /** + * The principal Id also known as the object Id of a User Assigned Managed Identity currently + * assigned to the Map Account. To assign a Managed Identity of the account, use operation Create + * or Update an assign a User Assigned Identity resource Id. + */ + principalId: string; + /** + * Optional, allows control of which region locations are permitted access to Azure Maps REST + * APIs with the SAS token. Example: "eastus", "westus2". Omitting this parameter will allow all + * region locations to be accessible. + */ + regions?: string[]; + /** + * Required parameter which represents the desired maximum request per second to allowed for the + * given SAS token. This does not guarantee perfect accuracy in measurements but provides + * application safe guards of abuse with eventual enforcement. Default value: 500. + */ + maxRatePerSecond: number; + /** + * The date time offset of when the token validity begins. For example + * "2017-05-24T10:42:03.1567373Z". + */ + start: string; + /** + * The date time offset of when the token validity expires. For example + * "2017-05-24T10:42:03.1567373Z" + */ + expiry: string; +} + +/** + * A new Sas token which can be used to access the Maps REST APIs and is controlled by the + * specified Managed identity permissions on Azure (IAM) Role Based Access Control. + */ +export interface MapsAccountSasToken { + /** + * The shared access signature access token. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountSasToken?: string; +} + /** * Operation display payload */ @@ -259,6 +426,22 @@ export interface Dimension { * Display name of dimension. */ displayName?: string; + /** + * Internal name of the dimension. + */ + internalName?: string; + /** + * Internal metric name of the dimension. + */ + internalMetricName?: string; + /** + * Source Mdm Namespace of the dimension. + */ + sourceMdmNamespace?: string; + /** + * Flag to indicate exporting to Azure Monitor. + */ + toBeExportedToShoebox?: boolean; } /** @@ -301,6 +484,14 @@ export interface MetricSpecification { * Account Resource Id. */ resourceIdDimensionNameOverride?: string; + /** + * Source metrics account. + */ + sourceMdmAccount?: string; + /** + * Internal metric name. + */ + internalMetricName?: string; } /** @@ -368,7 +559,8 @@ export interface Resource extends BaseResource { * and a location * @summary Proxy Resource */ -export interface ProxyResource extends Resource {} +export interface ProxyResource extends Resource { +} /** * The resource model definition for an Azure Resource Manager resource with an etag. @@ -503,13 +695,21 @@ export interface CreatorList extends Array { nextLink?: string; } +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + /** * Defines values for Name. * Possible values include: 'S0', 'S1', 'G2' * @readonly * @enum {string} */ -export type Name = "S0" | "S1" | "G2"; +export type Name = 'S0' | 'S1' | 'G2'; /** * Defines values for Kind. @@ -517,15 +717,16 @@ export type Name = "S0" | "S1" | "G2"; * @readonly * @enum {string} */ -export type Kind = "Gen1" | "Gen2"; +export type Kind = 'Gen1' | 'Gen2'; /** - * Defines values for CreatedByType. - * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * Defines values for ResourceIdentityType. + * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' * @readonly * @enum {string} */ -export type CreatedByType = "User" | "Application" | "ManagedIdentity" | "Key"; +export type ResourceIdentityType = 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' | 'None'; /** * Defines values for KeyType. @@ -533,7 +734,15 @@ export type CreatedByType = "User" | "Application" | "ManagedIdentity" | "Key"; * @readonly * @enum {string} */ -export type KeyType = "primary" | "secondary"; +export type KeyType = 'primary' | 'secondary'; + +/** + * Defines values for SigningKey. + * Possible values include: 'primaryKey', 'secondaryKey' + * @readonly + * @enum {string} + */ +export type SigningKey = 'primaryKey' | 'secondaryKey'; /** * Contains response data for the createOrUpdate operation. @@ -543,16 +752,16 @@ export type AccountsCreateOrUpdateResponse = MapsAccount & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsAccount; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsAccount; + }; }; /** @@ -563,16 +772,16 @@ export type AccountsUpdateResponse = MapsAccount & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsAccount; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsAccount; + }; }; /** @@ -583,16 +792,16 @@ export type AccountsGetResponse = MapsAccount & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsAccount; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsAccount; + }; }; /** @@ -603,16 +812,16 @@ export type AccountsListByResourceGroupResponse = MapsAccounts & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsAccounts; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsAccounts; + }; }; /** @@ -623,16 +832,36 @@ export type AccountsListBySubscriptionResponse = MapsAccounts & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsAccounts; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsAccounts; + }; +}; + +/** + * Contains response data for the listSas operation. + */ +export type AccountsListSasResponse = MapsAccountSasToken & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsAccountSasToken; + }; }; /** @@ -643,16 +872,16 @@ export type AccountsListKeysResponse = MapsAccountKeys & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsAccountKeys; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsAccountKeys; + }; }; /** @@ -663,16 +892,16 @@ export type AccountsRegenerateKeysResponse = MapsAccountKeys & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsAccountKeys; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsAccountKeys; + }; }; /** @@ -683,16 +912,16 @@ export type AccountsListByResourceGroupNextResponse = MapsAccounts & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsAccounts; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsAccounts; + }; }; /** @@ -703,16 +932,16 @@ export type AccountsListBySubscriptionNextResponse = MapsAccounts & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsAccounts; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsAccounts; + }; }; /** @@ -723,16 +952,36 @@ export type MapsListOperationsResponse = MapsOperations & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsOperations; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsOperations; + }; +}; + +/** + * Contains response data for the listSubscriptionOperations operation. + */ +export type MapsListSubscriptionOperationsResponse = MapsOperations & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsOperations; + }; }; /** @@ -743,16 +992,36 @@ export type MapsListOperationsNextResponse = MapsOperations & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MapsOperations; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsOperations; + }; +}; + +/** + * Contains response data for the listSubscriptionOperationsNext operation. + */ +export type MapsListSubscriptionOperationsNextResponse = MapsOperations & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MapsOperations; + }; }; /** @@ -763,16 +1032,16 @@ export type CreatorsListByAccountResponse = CreatorList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CreatorList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CreatorList; + }; }; /** @@ -783,16 +1052,16 @@ export type CreatorsCreateOrUpdateResponse = Creator & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Creator; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Creator; + }; }; /** @@ -803,16 +1072,16 @@ export type CreatorsUpdateResponse = Creator & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Creator; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Creator; + }; }; /** @@ -823,16 +1092,16 @@ export type CreatorsGetResponse = Creator & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Creator; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Creator; + }; }; /** @@ -843,14 +1112,14 @@ export type CreatorsListByAccountNextResponse = CreatorList & { * The underlying HTTP response. */ _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CreatorList; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CreatorList; + }; }; diff --git a/sdk/maps/arm-maps/src/models/mappers.ts b/sdk/maps/arm-maps/src/models/mappers.ts index 6f3b2a3f270a..51a8451fc569 100644 --- a/sdk/maps/arm-maps/src/models/mappers.ts +++ b/sdk/maps/arm-maps/src/models/mappers.ts @@ -40,6 +40,52 @@ export const CreatorProperties: msRest.CompositeMapper = { } }; +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + export const Creator: msRest.CompositeMapper = { serializedName: "Creator", type: { @@ -53,6 +99,14 @@ export const Creator: msRest.CompositeMapper = { name: "Composite", className: "CreatorProperties" } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -82,46 +136,143 @@ export const Sku: msRest.CompositeMapper = { } }; -export const SystemData: msRest.CompositeMapper = { - serializedName: "systemData", +export const ManagedServiceIdentityUserAssignedIdentitiesValue: msRest.CompositeMapper = { + serializedName: "ManagedServiceIdentity_userAssignedIdentitiesValue", type: { name: "Composite", - className: "SystemData", + className: "ManagedServiceIdentityUserAssignedIdentitiesValue", modelProperties: { - createdBy: { - serializedName: "createdBy", + principalId: { + readOnly: true, + serializedName: "principalId", type: { name: "String" } }, - createdByType: { - serializedName: "createdByType", + clientId: { + readOnly: true, + serializedName: "clientId", type: { name: "String" } - }, - createdAt: { - serializedName: "createdAt", + } + } + } +}; + +export const ManagedServiceIdentity: msRest.CompositeMapper = { + serializedName: "ManagedServiceIdentity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", type: { - name: "DateTime" + name: "String" } }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + tenantId: { + readOnly: true, + serializedName: "tenantId", type: { name: "String" } }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ] + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "ManagedServiceIdentityUserAssignedIdentitiesValue" + } + } + } + } + } + } +}; + +export const LinkedResource: msRest.CompositeMapper = { + serializedName: "LinkedResource", + type: { + name: "Composite", + className: "LinkedResource", + modelProperties: { + uniqueName: { + required: true, + serializedName: "uniqueName", type: { name: "String" } }, - lastModifiedAt: { - serializedName: "lastModifiedAt", + id: { + required: true, + serializedName: "id", type: { - name: "DateTime" + name: "String" + } + } + } + } +}; + +export const CorsRule: msRest.CompositeMapper = { + serializedName: "CorsRule", + type: { + name: "Composite", + className: "CorsRule", + modelProperties: { + allowedOrigins: { + required: true, + serializedName: "allowedOrigins", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CorsRules: msRest.CompositeMapper = { + serializedName: "CorsRules", + type: { + name: "Composite", + className: "CorsRules", + modelProperties: { + corsRules: { + serializedName: "corsRules", + constraints: { + MaxItems: 5 + }, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CorsRule" + } + } } } } @@ -154,6 +305,25 @@ export const MapsAccountProperties: msRest.CompositeMapper = { type: { name: "String" } + }, + linkedResources: { + serializedName: "linkedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LinkedResource" + } + } + } + }, + cors: { + serializedName: "cors", + type: { + name: "Composite", + className: "CorsRules" + } } } } @@ -175,7 +345,7 @@ export const MapsAccount: msRest.CompositeMapper = { }, kind: { serializedName: "kind", - defaultValue: "Gen1", + defaultValue: 'Gen1', type: { name: "String" } @@ -188,6 +358,13 @@ export const MapsAccount: msRest.CompositeMapper = { className: "SystemData" } }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, properties: { serializedName: "properties", type: { @@ -218,7 +395,7 @@ export const MapsAccountUpdateParameters: msRest.CompositeMapper = { }, kind: { serializedName: "kind", - defaultValue: "Gen1", + defaultValue: 'Gen1', type: { name: "String" } @@ -230,6 +407,13 @@ export const MapsAccountUpdateParameters: msRest.CompositeMapper = { className: "Sku" } }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, uniqueId: { readOnly: true, serializedName: "properties.uniqueId", @@ -250,6 +434,25 @@ export const MapsAccountUpdateParameters: msRest.CompositeMapper = { type: { name: "String" } + }, + linkedResources: { + serializedName: "properties.linkedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LinkedResource" + } + } + } + }, + cors: { + serializedName: "properties.cors", + type: { + name: "Composite", + className: "CorsRules" + } } } } @@ -349,6 +552,84 @@ export const MapsAccountKeys: msRest.CompositeMapper = { } }; +export const AccountSasParameters: msRest.CompositeMapper = { + serializedName: "AccountSasParameters", + type: { + name: "Composite", + className: "AccountSasParameters", + modelProperties: { + signingKey: { + required: true, + serializedName: "signingKey", + type: { + name: "String" + } + }, + principalId: { + required: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + regions: { + serializedName: "regions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + maxRatePerSecond: { + required: true, + serializedName: "maxRatePerSecond", + defaultValue: 500, + constraints: { + InclusiveMaximum: 500, + ExclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + start: { + required: true, + serializedName: "start", + type: { + name: "String" + } + }, + expiry: { + required: true, + serializedName: "expiry", + type: { + name: "String" + } + } + } + } +}; + +export const MapsAccountSasToken: msRest.CompositeMapper = { + serializedName: "MapsAccountSasToken", + type: { + name: "Composite", + className: "MapsAccountSasToken", + modelProperties: { + accountSasToken: { + readOnly: true, + serializedName: "accountSasToken", + type: { + name: "String" + } + } + } + } +}; + export const OperationDisplay: msRest.CompositeMapper = { serializedName: "OperationDisplay", type: { @@ -400,6 +681,30 @@ export const Dimension: msRest.CompositeMapper = { type: { name: "String" } + }, + internalName: { + serializedName: "internalName", + type: { + name: "String" + } + }, + internalMetricName: { + serializedName: "internalMetricName", + type: { + name: "String" + } + }, + sourceMdmNamespace: { + serializedName: "sourceMdmNamespace", + type: { + name: "String" + } + }, + toBeExportedToShoebox: { + serializedName: "toBeExportedToShoebox", + type: { + name: "Boolean" + } } } } @@ -470,6 +775,18 @@ export const MetricSpecification: msRest.CompositeMapper = { type: { name: "String" } + }, + sourceMdmAccount: { + serializedName: "sourceMdmAccount", + type: { + name: "String" + } + }, + internalMetricName: { + serializedName: "internalMetricName", + type: { + name: "String" + } } } } diff --git a/sdk/maps/arm-maps/src/models/parameters.ts b/sdk/maps/arm-maps/src/models/parameters.ts index 1273acb0a7cd..af47bd648f5c 100644 --- a/sdk/maps/arm-maps/src/models/parameters.ts +++ b/sdk/maps/arm-maps/src/models/parameters.ts @@ -13,7 +13,7 @@ export const acceptLanguage: msRest.OperationParameter = { parameterPath: "acceptLanguage", mapper: { serializedName: "accept-language", - defaultValue: "en-US", + defaultValue: 'en-US', type: { name: "String" } @@ -70,8 +70,7 @@ export const resourceGroupName: msRest.OperationURLParameter = { serializedName: "resourceGroupName", constraints: { MaxLength: 90, - MinLength: 1, - Pattern: /^[-\w\._\(\)]+$/ + MinLength: 1 }, type: { name: "String" diff --git a/sdk/maps/arm-maps/src/operations/accounts.ts b/sdk/maps/arm-maps/src/operations/accounts.ts index cc61e9898657..2411bac9aecd 100644 --- a/sdk/maps/arm-maps/src/operations/accounts.ts +++ b/sdk/maps/arm-maps/src/operations/accounts.ts @@ -34,24 +34,14 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate( - resourceGroupName: string, - accountName: string, - mapsAccount: Models.MapsAccount, - options?: msRest.RequestOptionsBase - ): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, mapsAccount: Models.MapsAccount, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param mapsAccount The new or updated parameters for the Maps Account. * @param callback The callback */ - createOrUpdate( - resourceGroupName: string, - accountName: string, - mapsAccount: Models.MapsAccount, - callback: msRest.ServiceCallback - ): void; + createOrUpdate(resourceGroupName: string, accountName: string, mapsAccount: Models.MapsAccount, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. @@ -59,20 +49,8 @@ export class Accounts { * @param options The optional parameters * @param callback The callback */ - createOrUpdate( - resourceGroupName: string, - accountName: string, - mapsAccount: Models.MapsAccount, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - createOrUpdate( - resourceGroupName: string, - accountName: string, - mapsAccount: Models.MapsAccount, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + createOrUpdate(resourceGroupName: string, accountName: string, mapsAccount: Models.MapsAccount, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, mapsAccount: Models.MapsAccount, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -81,8 +59,7 @@ export class Accounts { options }, createOrUpdateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -94,24 +71,14 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - update( - resourceGroupName: string, - accountName: string, - mapsAccountUpdateParameters: Models.MapsAccountUpdateParameters, - options?: msRest.RequestOptionsBase - ): Promise; + update(resourceGroupName: string, accountName: string, mapsAccountUpdateParameters: Models.MapsAccountUpdateParameters, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param mapsAccountUpdateParameters The updated parameters for the Maps Account. * @param callback The callback */ - update( - resourceGroupName: string, - accountName: string, - mapsAccountUpdateParameters: Models.MapsAccountUpdateParameters, - callback: msRest.ServiceCallback - ): void; + update(resourceGroupName: string, accountName: string, mapsAccountUpdateParameters: Models.MapsAccountUpdateParameters, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. @@ -119,20 +86,8 @@ export class Accounts { * @param options The optional parameters * @param callback The callback */ - update( - resourceGroupName: string, - accountName: string, - mapsAccountUpdateParameters: Models.MapsAccountUpdateParameters, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - update( - resourceGroupName: string, - accountName: string, - mapsAccountUpdateParameters: Models.MapsAccountUpdateParameters, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + update(resourceGroupName: string, accountName: string, mapsAccountUpdateParameters: Models.MapsAccountUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, mapsAccountUpdateParameters: Models.MapsAccountUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -141,8 +96,7 @@ export class Accounts { options }, updateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -152,39 +106,21 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - resourceGroupName: string, - accountName: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param callback The callback */ - deleteMethod( - resourceGroupName: string, - accountName: string, - callback: msRest.ServiceCallback - ): void; + deleteMethod(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param options The optional parameters * @param callback The callback */ - deleteMethod( - resourceGroupName: string, - accountName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteMethod( - resourceGroupName: string, - accountName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteMethod(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -192,8 +128,7 @@ export class Accounts { options }, deleteMethodOperationSpec, - callback - ); + callback); } /** @@ -203,39 +138,21 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - get( - resourceGroupName: string, - accountName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param callback The callback */ - get( - resourceGroupName: string, - accountName: string, - callback: msRest.ServiceCallback - ): void; + get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param options The optional parameters * @param callback The callback */ - get( - resourceGroupName: string, - accountName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - resourceGroupName: string, - accountName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -243,8 +160,7 @@ export class Accounts { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -253,41 +169,26 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ - listByResourceGroup( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ - listByResourceGroup( - resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, listByResourceGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -295,9 +196,7 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - listBySubscription( - options?: msRest.RequestOptionsBase - ): Promise; + listBySubscription(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ @@ -306,21 +205,57 @@ export class Accounts { * @param options The optional parameters * @param callback The callback */ - listBySubscription( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listBySubscription( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listBySubscriptionOperationSpec, - callback - ) as Promise; + callback) as Promise; + } + + /** + * Create and list an account shared access signature token. Use this SAS token for authentication + * to Azure Maps REST APIs through various Azure Maps SDKs. As prerequisite to create a SAS Token. + * + * Prerequisites: + * 1. Create or have an existing User Assigned Managed Identity in the same Azure region as the + * account. + * 2. Create or update an Azure Map account with the same Azure region as the User Assigned Managed + * Identity is placed. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the Maps Account. + * @param mapsAccountSasParameters The updated parameters for the Maps Account. + * @param [options] The optional parameters + * @returns Promise + */ + listSas(resourceGroupName: string, accountName: string, mapsAccountSasParameters: Models.AccountSasParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the Maps Account. + * @param mapsAccountSasParameters The updated parameters for the Maps Account. + * @param callback The callback + */ + listSas(resourceGroupName: string, accountName: string, mapsAccountSasParameters: Models.AccountSasParameters, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the Maps Account. + * @param mapsAccountSasParameters The updated parameters for the Maps Account. + * @param options The optional parameters + * @param callback The callback + */ + listSas(resourceGroupName: string, accountName: string, mapsAccountSasParameters: Models.AccountSasParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSas(resourceGroupName: string, accountName: string, mapsAccountSasParameters: Models.AccountSasParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + mapsAccountSasParameters, + options + }, + listSasOperationSpec, + callback) as Promise; } /** @@ -332,39 +267,21 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - listKeys( - resourceGroupName: string, - accountName: string, - options?: msRest.RequestOptionsBase - ): Promise; + listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param callback The callback */ - listKeys( - resourceGroupName: string, - accountName: string, - callback: msRest.ServiceCallback - ): void; + listKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param options The optional parameters * @param callback The callback */ - listKeys( - resourceGroupName: string, - accountName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listKeys( - resourceGroupName: string, - accountName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listKeys(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -372,8 +289,7 @@ export class Accounts { options }, listKeysOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -385,24 +301,14 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - regenerateKeys( - resourceGroupName: string, - accountName: string, - keySpecification: Models.MapsKeySpecification, - options?: msRest.RequestOptionsBase - ): Promise; + regenerateKeys(resourceGroupName: string, accountName: string, keySpecification: Models.MapsKeySpecification, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param keySpecification Which key to regenerate: primary or secondary. * @param callback The callback */ - regenerateKeys( - resourceGroupName: string, - accountName: string, - keySpecification: Models.MapsKeySpecification, - callback: msRest.ServiceCallback - ): void; + regenerateKeys(resourceGroupName: string, accountName: string, keySpecification: Models.MapsKeySpecification, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. @@ -410,20 +316,8 @@ export class Accounts { * @param options The optional parameters * @param callback The callback */ - regenerateKeys( - resourceGroupName: string, - accountName: string, - keySpecification: Models.MapsKeySpecification, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - regenerateKeys( - resourceGroupName: string, - accountName: string, - keySpecification: Models.MapsKeySpecification, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + regenerateKeys(resourceGroupName: string, accountName: string, keySpecification: Models.MapsKeySpecification, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + regenerateKeys(resourceGroupName: string, accountName: string, keySpecification: Models.MapsKeySpecification, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -432,8 +326,7 @@ export class Accounts { options }, regenerateKeysOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -442,41 +335,26 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByResourceGroupNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listByResourceGroupNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -485,41 +363,26 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - listBySubscriptionNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listBySubscriptionNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listBySubscriptionNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listBySubscriptionNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listBySubscriptionNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -527,11 +390,18 @@ export class Accounts { const serializer = new msRest.Serializer(Mappers); const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "mapsAccount", mapper: { @@ -555,11 +425,18 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "mapsAccountUpdateParameters", mapper: { @@ -580,11 +457,18 @@ const updateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 204: {}, @@ -597,11 +481,18 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.MapsAccount @@ -615,11 +506,17 @@ const getOperationSpec: msRest.OperationSpec = { const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.MapsAccounts @@ -634,9 +531,15 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { const listBySubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Maps/accounts", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.MapsAccounts @@ -648,13 +551,52 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { serializer }; +const listSasOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/listSas", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "mapsAccountSasParameters", + mapper: { + ...Mappers.AccountSasParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.MapsAccountSasToken + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const listKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/listKeys", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/listKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.MapsAccountKeys @@ -668,11 +610,18 @@ const listKeysOperationSpec: msRest.OperationSpec = { const regenerateKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/regenerateKey", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/regenerateKey", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "keySpecification", mapper: { @@ -695,9 +644,15 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.MapsAccounts @@ -713,9 +668,15 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.MapsAccounts diff --git a/sdk/maps/arm-maps/src/operations/creators.ts b/sdk/maps/arm-maps/src/operations/creators.ts index 05b2dfa738eb..260e5440fbeb 100644 --- a/sdk/maps/arm-maps/src/operations/creators.ts +++ b/sdk/maps/arm-maps/src/operations/creators.ts @@ -32,39 +32,21 @@ export class Creators { * @param [options] The optional parameters * @returns Promise */ - listByAccount( - resourceGroupName: string, - accountName: string, - options?: msRest.RequestOptionsBase - ): Promise; + listByAccount(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param callback The callback */ - listByAccount( - resourceGroupName: string, - accountName: string, - callback: msRest.ServiceCallback - ): void; + listByAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param options The optional parameters * @param callback The callback */ - listByAccount( - resourceGroupName: string, - accountName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByAccount( - resourceGroupName: string, - accountName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByAccount(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -72,8 +54,7 @@ export class Creators { options }, listByAccountOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -87,13 +68,7 @@ export class Creators { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate( - resourceGroupName: string, - accountName: string, - creatorName: string, - creatorResource: Models.Creator, - options?: msRest.RequestOptionsBase - ): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, creatorName: string, creatorResource: Models.Creator, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. @@ -101,13 +76,7 @@ export class Creators { * @param creatorResource The new or updated parameters for the Creator resource. * @param callback The callback */ - createOrUpdate( - resourceGroupName: string, - accountName: string, - creatorName: string, - creatorResource: Models.Creator, - callback: msRest.ServiceCallback - ): void; + createOrUpdate(resourceGroupName: string, accountName: string, creatorName: string, creatorResource: Models.Creator, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. @@ -116,22 +85,8 @@ export class Creators { * @param options The optional parameters * @param callback The callback */ - createOrUpdate( - resourceGroupName: string, - accountName: string, - creatorName: string, - creatorResource: Models.Creator, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - createOrUpdate( - resourceGroupName: string, - accountName: string, - creatorName: string, - creatorResource: Models.Creator, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + createOrUpdate(resourceGroupName: string, accountName: string, creatorName: string, creatorResource: Models.Creator, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, creatorName: string, creatorResource: Models.Creator, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -141,8 +96,7 @@ export class Creators { options }, createOrUpdateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -155,13 +109,7 @@ export class Creators { * @param [options] The optional parameters * @returns Promise */ - update( - resourceGroupName: string, - accountName: string, - creatorName: string, - creatorUpdateParameters: Models.CreatorUpdateParameters, - options?: msRest.RequestOptionsBase - ): Promise; + update(resourceGroupName: string, accountName: string, creatorName: string, creatorUpdateParameters: Models.CreatorUpdateParameters, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. @@ -169,13 +117,7 @@ export class Creators { * @param creatorUpdateParameters The update parameters for Maps Creator. * @param callback The callback */ - update( - resourceGroupName: string, - accountName: string, - creatorName: string, - creatorUpdateParameters: Models.CreatorUpdateParameters, - callback: msRest.ServiceCallback - ): void; + update(resourceGroupName: string, accountName: string, creatorName: string, creatorUpdateParameters: Models.CreatorUpdateParameters, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. @@ -184,22 +126,8 @@ export class Creators { * @param options The optional parameters * @param callback The callback */ - update( - resourceGroupName: string, - accountName: string, - creatorName: string, - creatorUpdateParameters: Models.CreatorUpdateParameters, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - update( - resourceGroupName: string, - accountName: string, - creatorName: string, - creatorUpdateParameters: Models.CreatorUpdateParameters, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + update(resourceGroupName: string, accountName: string, creatorName: string, creatorUpdateParameters: Models.CreatorUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, creatorName: string, creatorUpdateParameters: Models.CreatorUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -209,8 +137,7 @@ export class Creators { options }, updateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -221,24 +148,14 @@ export class Creators { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - resourceGroupName: string, - accountName: string, - creatorName: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteMethod(resourceGroupName: string, accountName: string, creatorName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param creatorName The name of the Maps Creator instance. * @param callback The callback */ - deleteMethod( - resourceGroupName: string, - accountName: string, - creatorName: string, - callback: msRest.ServiceCallback - ): void; + deleteMethod(resourceGroupName: string, accountName: string, creatorName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. @@ -246,20 +163,8 @@ export class Creators { * @param options The optional parameters * @param callback The callback */ - deleteMethod( - resourceGroupName: string, - accountName: string, - creatorName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteMethod( - resourceGroupName: string, - accountName: string, - creatorName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteMethod(resourceGroupName: string, accountName: string, creatorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, creatorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -268,8 +173,7 @@ export class Creators { options }, deleteMethodOperationSpec, - callback - ); + callback); } /** @@ -280,24 +184,14 @@ export class Creators { * @param [options] The optional parameters * @returns Promise */ - get( - resourceGroupName: string, - accountName: string, - creatorName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(resourceGroupName: string, accountName: string, creatorName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. * @param creatorName The name of the Maps Creator instance. * @param callback The callback */ - get( - resourceGroupName: string, - accountName: string, - creatorName: string, - callback: msRest.ServiceCallback - ): void; + get(resourceGroupName: string, accountName: string, creatorName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the Maps Account. @@ -305,20 +199,8 @@ export class Creators { * @param options The optional parameters * @param callback The callback */ - get( - resourceGroupName: string, - accountName: string, - creatorName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - resourceGroupName: string, - accountName: string, - creatorName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(resourceGroupName: string, accountName: string, creatorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, creatorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -327,8 +209,7 @@ export class Creators { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -337,41 +218,26 @@ export class Creators { * @param [options] The optional parameters * @returns Promise */ - listByAccountNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByAccountNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listByAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByAccountNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByAccountNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listByAccountNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -379,11 +245,18 @@ export class Creators { const serializer = new msRest.Serializer(Mappers); const listByAccountOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/creators", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/creators", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.CreatorList @@ -397,16 +270,19 @@ const listByAccountOperationSpec: msRest.OperationSpec = { const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/creators/{creatorName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/creators/{creatorName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.creatorName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "creatorResource", mapper: { @@ -430,16 +306,19 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/creators/{creatorName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/creators/{creatorName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.creatorName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "creatorUpdateParameters", mapper: { @@ -460,16 +339,19 @@ const updateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/creators/{creatorName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/creators/{creatorName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.creatorName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 204: {}, @@ -482,16 +364,19 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/creators/{creatorName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/creators/{creatorName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.creatorName ], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.Creator @@ -507,9 +392,15 @@ const listByAccountNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.CreatorList diff --git a/sdk/maps/arm-maps/src/operations/maps.ts b/sdk/maps/arm-maps/src/operations/maps.ts index 61a8da5937d2..eea2e18d3a44 100644 --- a/sdk/maps/arm-maps/src/operations/maps.ts +++ b/sdk/maps/arm-maps/src/operations/maps.ts @@ -39,21 +39,38 @@ export class Maps { * @param options The optional parameters * @param callback The callback */ - listOperations( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listOperations( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listOperations(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listOperations(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationsOperationSpec, - callback - ) as Promise; + callback) as Promise; + } + + /** + * List operations available for the Maps Resource Provider + * @param [options] The optional parameters + * @returns Promise + */ + listSubscriptionOperations(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listSubscriptionOperations(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listSubscriptionOperations(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSubscriptionOperations(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listSubscriptionOperationsOperationSpec, + callback) as Promise; } /** @@ -62,41 +79,54 @@ export class Maps { * @param [options] The optional parameters * @returns Promise */ - listOperationsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + listOperationsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listOperationsNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listOperationsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listOperationsNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listOperationsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listOperationsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listOperationsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listOperationsNextOperationSpec, - callback - ) as Promise; + callback) as Promise; + } + + /** + * List operations available for the Maps Resource Provider + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listSubscriptionOperationsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listSubscriptionOperationsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listSubscriptionOperationsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSubscriptionOperationsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listSubscriptionOperationsNextOperationSpec, + callback) as Promise; } } @@ -105,8 +135,35 @@ const serializer = new msRest.Serializer(Mappers); const listOperationsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Maps/operations", - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MapsOperations + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listSubscriptionOperationsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Maps/operations", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.MapsOperations @@ -122,9 +179,39 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MapsOperations + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listSubscriptionOperationsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.MapsOperations