diff --git a/sdk/cosmosdb/arm-cosmosdb/LICENSE.txt b/sdk/cosmosdb/arm-cosmosdb/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/LICENSE.txt +++ b/sdk/cosmosdb/arm-cosmosdb/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/cosmosdb/arm-cosmosdb/README.md b/sdk/cosmosdb/arm-cosmosdb/README.md index 21e88ef5a4a7..34d35f6daecc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/README.md +++ b/sdk/cosmosdb/arm-cosmosdb/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for CosmosDBManagementClient. ### How to Install -``` +```bash npm install @azure/arm-cosmosdb ``` @@ -19,13 +19,13 @@ npm install @azure/arm-cosmosdb ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -49,7 +49,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -98,6 +98,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/cosmosdb/arm-cosmosdb/README.png) diff --git a/sdk/cosmosdb/arm-cosmosdb/package.json b/sdk/cosmosdb/arm-cosmosdb/package.json index 361c6fc2575f..b647b95a4c1c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/package.json @@ -4,8 +4,8 @@ "description": "CosmosDBManagementClient Library with typescript type definitions for node.js and browser.", "version": "2.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.3" }, "keywords": [ @@ -23,9 +23,10 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/cosmos-db/arm-cosmosdb", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/cosmosdb/arm-cosmosdb/rollup.config.js b/sdk/cosmosdb/arm-cosmosdb/rollup.config.js index 45bce80ed12e..7a75345fce0c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/rollup.config.js +++ b/sdk/cosmosdb/arm-cosmosdb/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/cosmosDBManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/cosmosDBManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-cosmosdb.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts index 651fd8a59271..d843de9fb73d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-cosmosdb"; -const packageVersion = "0.1.0"; +const packageVersion = "2.3.0"; export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/collectionMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/collectionMappers.ts index 4b2934f1b237..944586670c79 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/collectionMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/collectionMappers.ts @@ -1,26 +1,23 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - MetricListResult, + CloudError, Metric, + MetricAvailability, + MetricDefinition, + MetricDefinitionsListResult, + MetricListResult, MetricName, MetricValue, - CloudError, - UsagesResult, - Usage, - MetricDefinitionsListResult, - MetricDefinition, - MetricAvailability, + PartitionMetric, PartitionUsage, PercentileMetricValue, - PartitionMetric + Usage, + UsagesResult } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/collectionPartitionMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/collectionPartitionMappers.ts index 35b2d6172947..8a50f863252d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/collectionPartitionMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/collectionPartitionMappers.ts @@ -1,23 +1,20 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - PartitionMetricListResult, - PartitionMetric, + CloudError, Metric, MetricName, MetricValue, - CloudError, - PartitionUsagesResult, + PartitionMetric, + PartitionMetricListResult, PartitionUsage, - Usage, - PercentileMetricValue + PartitionUsagesResult, + PercentileMetricValue, + Usage } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/collectionPartitionRegionMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/collectionPartitionRegionMappers.ts index a0b31db71d0f..c901f39fec5e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/collectionPartitionRegionMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/collectionPartitionRegionMappers.ts @@ -1,20 +1,17 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - PartitionMetricListResult, - PartitionMetric, + CloudError, Metric, MetricName, MetricValue, - CloudError, + PartitionMetric, + PartitionMetricListResult, PercentileMetricValue } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/collectionRegionMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/collectionRegionMappers.ts index 7fa443e0fd5a..357a24d97955 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/collectionRegionMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/collectionRegionMappers.ts @@ -1,20 +1,17 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - MetricListResult, + CloudError, Metric, + MetricListResult, MetricName, MetricValue, - CloudError, - PercentileMetricValue, - PartitionMetric + PartitionMetric, + PercentileMetricValue } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountRegionMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountRegionMappers.ts index 7fa443e0fd5a..357a24d97955 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountRegionMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountRegionMappers.ts @@ -1,20 +1,17 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - MetricListResult, + CloudError, Metric, + MetricListResult, MetricName, MetricValue, - CloudError, - PercentileMetricValue, - PartitionMetric + PartitionMetric, + PercentileMetricValue } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts index db0fe95e4262..ade496e51c50 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts @@ -1,45 +1,93 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - DatabaseAccount, - Resource, BaseResource, - ConsistencyPolicy, Capability, - Location, - FailoverPolicy, - VirtualNetworkRule, + CassandraKeyspace, + CassandraKeyspaceCreateUpdateParameters, + CassandraKeyspaceListResult, + CassandraKeyspaceResource, + CassandraPartitionKey, + CassandraSchema, + CassandraTable, + CassandraTableCreateUpdateParameters, + CassandraTableListResult, + CassandraTableResource, CloudError, - DatabaseAccountPatchParameters, + ClusterKey, + Column, + ConflictResolutionPolicy, + ConsistencyPolicy, + ContainerPartitionKey, + DatabaseAccount, + DatabaseAccountConnectionString, DatabaseAccountCreateUpdateParameters, - FailoverPolicies, - DatabaseAccountsListResult, - DatabaseAccountListKeysResult, DatabaseAccountListConnectionStringsResult, - DatabaseAccountConnectionString, - RegionForOnlineOffline, - ErrorResponse, + DatabaseAccountListKeysResult, DatabaseAccountListReadOnlyKeysResult, + DatabaseAccountPatchParameters, DatabaseAccountRegenerateKeyParameters, - MetricListResult, + DatabaseAccountsListResult, + ErrorResponse, + ExcludedPath, + FailoverPolicies, + FailoverPolicy, + GremlinDatabase, + GremlinDatabaseCreateUpdateParameters, + GremlinDatabaseListResult, + GremlinDatabaseResource, + GremlinGraph, + GremlinGraphCreateUpdateParameters, + GremlinGraphListResult, + GremlinGraphResource, + IncludedPath, + Indexes, + IndexingPolicy, + Location, Metric, + MetricAvailability, + MetricDefinition, + MetricDefinitionsListResult, + MetricListResult, MetricName, MetricValue, - UsagesResult, - Usage, - MetricDefinitionsListResult, - MetricDefinition, - MetricAvailability, + MongoDBCollection, + MongoDBCollectionCreateUpdateParameters, + MongoDBCollectionListResult, + MongoDBCollectionResource, + MongoDBDatabase, + MongoDBDatabaseCreateUpdateParameters, + MongoDBDatabaseListResult, + MongoDBDatabaseResource, + MongoIndex, + MongoIndexKeys, + MongoIndexOptions, + PartitionMetric, PartitionUsage, PercentileMetricValue, - PartitionMetric + RegionForOnlineOffline, + Resource, + SqlContainer, + SqlContainerCreateUpdateParameters, + SqlContainerListResult, + SqlContainerResource, + SqlDatabase, + SqlDatabaseCreateUpdateParameters, + SqlDatabaseListResult, + SqlDatabaseResource, + Table, + TableCreateUpdateParameters, + TableListResult, + TableResource, + UniqueKey, + UniqueKeyPolicy, + Usage, + UsagesResult, + VirtualNetworkRule } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseMappers.ts index 4b2934f1b237..944586670c79 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseMappers.ts @@ -1,26 +1,23 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - MetricListResult, + CloudError, Metric, + MetricAvailability, + MetricDefinition, + MetricDefinitionsListResult, + MetricListResult, MetricName, MetricValue, - CloudError, - UsagesResult, - Usage, - MetricDefinitionsListResult, - MetricDefinition, - MetricAvailability, + PartitionMetric, PartitionUsage, PercentileMetricValue, - PartitionMetric + Usage, + UsagesResult } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts index 5e2aff757a9b..5660472f8adf 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,1140 +11,2415 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing ConsistencyPolicy. * The consistency policy for the Cosmos DB database account. - * */ export interface ConsistencyPolicy { /** - * @member {DefaultConsistencyLevel} defaultConsistencyLevel The default - * consistency level and configuration settings of the Cosmos DB account. - * Possible values include: 'Eventual', 'Session', 'BoundedStaleness', - * 'Strong', 'ConsistentPrefix' + * The default consistency level and configuration settings of the Cosmos DB account. Possible + * values include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' */ defaultConsistencyLevel: DefaultConsistencyLevel; /** - * @member {number} [maxStalenessPrefix] When used with the Bounded Staleness - * consistency level, this value represents the number of stale requests - * tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - * when defaultConsistencyPolicy is set to 'BoundedStaleness'. + * When used with the Bounded Staleness consistency level, this value represents the number of + * stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when + * defaultConsistencyPolicy is set to 'BoundedStaleness'. */ maxStalenessPrefix?: number; /** - * @member {number} [maxIntervalInSeconds] When used with the Bounded - * Staleness consistency level, this value represents the time amount of - * staleness (in seconds) tolerated. Accepted range for this value is 5 - - * 86400. Required when defaultConsistencyPolicy is set to - * 'BoundedStaleness'. + * When used with the Bounded Staleness consistency level, this value represents the time amount + * of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when + * defaultConsistencyPolicy is set to 'BoundedStaleness'. */ maxIntervalInSeconds?: number; } /** - * @interface - * An interface representing Capability. * Cosmos DB capability object - * */ export interface Capability { /** - * @member {string} [name] Name of the Cosmos DB capability. For example, - * "name": "EnableCassandra". Current values also include "EnableTable" and - * "EnableGremlin". + * Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also + * include "EnableTable" and "EnableGremlin". */ name?: string; } /** - * @interface - * An interface representing Location. * A region in which the Azure Cosmos DB database account is deployed. - * */ export interface Location { /** - * @member {string} [id] The unique identifier of the region within the - * database account. Example: <accountName>-<locationName>. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unique identifier of the region within the database account. Example: + * <accountName>-<locationName>. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [locationName] The name of the region. + * The name of the region. */ locationName?: string; /** - * @member {string} [documentEndpoint] The connection endpoint for the - * specific region. Example: + * The connection endpoint for the specific region. Example: * https://<accountName>-<locationName>.documents.azure.com:443/ - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly documentEndpoint?: string; - /** - * @member {string} [provisioningState] - */ provisioningState?: string; /** - * @member {number} [failoverPriority] The failover priority of the region. A - * failover priority of 0 indicates a write region. The maximum value for a - * failover priority = (total number of regions - 1). Failover priority - * values must be unique for each of the regions in which the database - * account exists. + * The failover priority of the region. A failover priority of 0 indicates a write region. The + * maximum value for a failover priority = (total number of regions - 1). Failover priority + * values must be unique for each of the regions in which the database account exists. */ failoverPriority?: number; } /** - * @interface - * An interface representing FailoverPolicy. * The failover policy for a given region of a database account. - * */ export interface FailoverPolicy { /** - * @member {string} [id] The unique identifier of the region in which the - * database account replicates to. Example: + * The unique identifier of the region in which the database account replicates to. Example: * <accountName>-<locationName>. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [locationName] The name of the region in which the - * database account exists. + * The name of the region in which the database account exists. */ locationName?: string; /** - * @member {number} [failoverPriority] The failover priority of the region. A - * failover priority of 0 indicates a write region. The maximum value for a - * failover priority = (total number of regions - 1). Failover priority - * values must be unique for each of the regions in which the database - * account exists. + * The failover priority of the region. A failover priority of 0 indicates a write region. The + * maximum value for a failover priority = (total number of regions - 1). Failover priority + * values must be unique for each of the regions in which the database account exists. */ failoverPriority?: number; } /** - * @interface - * An interface representing VirtualNetworkRule. * Virtual Network ACL Rule object - * */ export interface VirtualNetworkRule { /** - * @member {string} [id] Resource ID of a subnet, for example: + * Resource ID of a subnet, for example: * /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. */ id?: string; /** - * @member {boolean} [ignoreMissingVNetServiceEndpoint] Create firewall rule - * before the virtual network has vnet service endpoint enabled. + * Create firewall rule before the virtual network has vnet service endpoint enabled. */ ignoreMissingVNetServiceEndpoint?: boolean; } /** - * @interface - * An interface representing Resource. - * A database account resource. - * - * @extends BaseResource + * The core properties of ARM resources. */ export interface Resource extends BaseResource { /** - * @member {string} [id] The unique resource identifier of the database - * account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unique resource identifier of the database account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the database account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the database account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] The type of Azure resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of Azure resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} location The location of the resource group to which the - * resource belongs. - */ - location: string; - /** - * @member {{ [propertyName: string]: string }} [tags] + * The location of the resource group to which the resource belongs. */ + location?: string; tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing DatabaseAccount. * An Azure Cosmos DB database account. - * - * @extends Resource */ export interface DatabaseAccount extends Resource { /** - * @member {DatabaseAccountKind} [kind] Indicates the type of database - * account. This can only be set at database account creation. Possible - * values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: - * 'GlobalDocumentDB' . + * Indicates the type of database account. This can only be set at database account creation. + * Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: + * 'GlobalDocumentDB'. */ kind?: DatabaseAccountKind; - /** - * @member {string} [provisioningState] - */ provisioningState?: string; /** - * @member {string} [documentEndpoint] The connection endpoint for the Cosmos - * DB database account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The connection endpoint for the Cosmos DB database account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly documentEndpoint?: string; /** - * @member {DatabaseAccountOfferType} [databaseAccountOfferType] The offer - * type for the Cosmos DB database account. Default value: Standard. Possible - * values include: 'Standard' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The offer type for the Cosmos DB database account. Default value: Standard. Possible values + * include: 'Standard' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly databaseAccountOfferType?: DatabaseAccountOfferType; /** - * @member {string} [ipRangeFilter] Cosmos DB Firewall Support: This value - * specifies the set of IP addresses or IP address ranges in CIDR form to be - * included as the allowed list of client IPs for a given database account. - * IP addresses/ranges must be comma separated and must not contain any - * spaces. + * Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges + * in CIDR form to be included as the allowed list of client IPs for a given database account. IP + * addresses/ranges must be comma separated and must not contain any spaces. */ ipRangeFilter?: string; /** - * @member {boolean} [isVirtualNetworkFilterEnabled] Flag to indicate whether - * to enable/disable Virtual Network ACL rules. + * Flag to indicate whether to enable/disable Virtual Network ACL rules. */ isVirtualNetworkFilterEnabled?: boolean; /** - * @member {boolean} [enableAutomaticFailover] Enables automatic failover of - * the write region in the rare event that the region is unavailable due to - * an outage. Automatic failover will result in a new write region for the - * account and is chosen based on the failover priorities configured for the - * account. + * Enables automatic failover of the write region in the rare event that the region is + * unavailable due to an outage. Automatic failover will result in a new write region for the + * account and is chosen based on the failover priorities configured for the account. */ enableAutomaticFailover?: boolean; /** - * @member {ConsistencyPolicy} [consistencyPolicy] The consistency policy for - * the Cosmos DB database account. + * The consistency policy for the Cosmos DB database account. */ consistencyPolicy?: ConsistencyPolicy; /** - * @member {Capability[]} [capabilities] List of Cosmos DB capabilities for - * the account + * List of Cosmos DB capabilities for the account */ capabilities?: Capability[]; /** - * @member {Location[]} [writeLocations] An array that contains the write - * location for the Cosmos DB account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * An array that contains the write location for the Cosmos DB account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly writeLocations?: Location[]; /** - * @member {Location[]} [readLocations] An array that contains of the read - * locations enabled for the Cosmos DB account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * An array that contains of the read locations enabled for the Cosmos DB account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly readLocations?: Location[]; /** - * @member {FailoverPolicy[]} [failoverPolicies] An array that contains the - * regions ordered by their failover priorities. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * An array that contains the regions ordered by their failover priorities. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly failoverPolicies?: FailoverPolicy[]; /** - * @member {VirtualNetworkRule[]} [virtualNetworkRules] List of Virtual - * Network ACL rules configured for the Cosmos DB account. + * List of Virtual Network ACL rules configured for the Cosmos DB account. */ virtualNetworkRules?: VirtualNetworkRule[]; /** - * @member {boolean} [enableMultipleWriteLocations] Enables the account to - * write in multiple locations + * Enables the account to write in multiple locations */ enableMultipleWriteLocations?: boolean; } /** - * @interface - * An interface representing ErrorResponse. - * Error Response. - * - */ -export interface ErrorResponse { - /** - * @member {string} [code] Error code. - */ - code?: string; - /** - * @member {string} [message] Error message indicating why the operation - * failed. - */ - message?: string; -} - -/** - * @interface - * An interface representing FailoverPolicies. - * The list of new failover policies for the failover priority change. - * - */ -export interface FailoverPolicies { - /** - * @member {FailoverPolicy[]} failoverPolicies List of failover policies. - */ - failoverPolicies: FailoverPolicy[]; -} - -/** - * @interface - * An interface representing RegionForOnlineOffline. - * Cosmos DB region to online or offline. - * - */ -export interface RegionForOnlineOffline { - /** - * @member {string} region Cosmos DB region, with spaces between words and - * each word capitalized. - */ - region: string; -} - -/** - * @interface - * An interface representing DatabaseAccountCreateUpdateParameters. - * Parameters to create and update Cosmos DB database accounts. - * - * @extends Resource + * An Azure Cosmos DB SQL database. */ -export interface DatabaseAccountCreateUpdateParameters extends Resource { +export interface SqlDatabase extends Resource { /** - * @member {DatabaseAccountKind} [kind] Indicates the type of database - * account. This can only be set at database account creation. Possible - * values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: - * 'GlobalDocumentDB' . + * Name of the Cosmos DB SQL database */ - kind?: DatabaseAccountKind; + sqlDatabaseId: string; /** - * @member {ConsistencyPolicy} [consistencyPolicy] The consistency policy for - * the Cosmos DB account. + * A system generated property. A unique identifier. */ - consistencyPolicy?: ConsistencyPolicy; + _rid?: string; /** - * @member {Location[]} locations An array that contains the georeplication - * locations enabled for the Cosmos DB account. + * A system generated property that denotes the last updated timestamp of the resource. */ - locations: Location[]; + _ts?: any; /** - * @member {string} [ipRangeFilter] Cosmos DB Firewall Support: This value - * specifies the set of IP addresses or IP address ranges in CIDR form to be - * included as the allowed list of client IPs for a given database account. - * IP addresses/ranges must be comma separated and must not contain any - * spaces. + * A system generated property representing the resource etag required for optimistic concurrency + * control. */ - ipRangeFilter?: string; + _etag?: string; /** - * @member {boolean} [isVirtualNetworkFilterEnabled] Flag to indicate whether - * to enable/disable Virtual Network ACL rules. + * A system generated property that specified the addressable path of the collections resource. */ - isVirtualNetworkFilterEnabled?: boolean; + _colls?: string; /** - * @member {boolean} [enableAutomaticFailover] Enables automatic failover of - * the write region in the rare event that the region is unavailable due to - * an outage. Automatic failover will result in a new write region for the - * account and is chosen based on the failover priorities configured for the - * account. + * A system generated property that specifies the addressable path of the users resource. */ - enableAutomaticFailover?: boolean; + _users?: string; +} + +/** + * The indexes for the path. + */ +export interface Indexes { /** - * @member {Capability[]} [capabilities] List of Cosmos DB capabilities for - * the account + * The datatype for which the indexing behavior is applied to. Possible values include: 'String', + * 'Number', 'Point', 'Polygon', 'LineString', 'MultiPolygon'. Default value: 'String'. */ - capabilities?: Capability[]; + dataType?: DataType; /** - * @member {VirtualNetworkRule[]} [virtualNetworkRules] List of Virtual - * Network ACL rules configured for the Cosmos DB account. + * The precision of the index. -1 is maximum precision. */ - virtualNetworkRules?: VirtualNetworkRule[]; + precision?: number; /** - * @member {boolean} [enableMultipleWriteLocations] Enables the account to - * write in multiple locations + * Indicates the type of index. Possible values include: 'Hash', 'Range', 'Spatial'. Default + * value: 'Hash'. */ - enableMultipleWriteLocations?: boolean; + kind?: IndexKind; } /** - * @interface - * An interface representing DatabaseAccountPatchParameters. - * Parameters for patching Azure Cosmos DB database account properties. - * + * The paths that are included in indexing */ -export interface DatabaseAccountPatchParameters { +export interface IncludedPath { /** - * @member {{ [propertyName: string]: string }} [tags] + * The path for which the indexing behavior applies to. Index paths typically start with root and + * end with wildcard (/path/*) */ - tags?: { [propertyName: string]: string }; + path?: string; /** - * @member {Capability[]} [capabilities] List of Cosmos DB capabilities for - * the account + * List of indexes for this path */ - capabilities?: Capability[]; + indexes?: Indexes[]; } /** - * @interface - * An interface representing DatabaseAccountListReadOnlyKeysResult. - * The read-only access keys for the given database account. - * + * An interface representing ExcludedPath. */ -export interface DatabaseAccountListReadOnlyKeysResult { - /** - * @member {string} [primaryReadonlyMasterKey] Base 64 encoded value of the - * primary read-only key. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly primaryReadonlyMasterKey?: string; +export interface ExcludedPath { /** - * @member {string} [secondaryReadonlyMasterKey] Base 64 encoded value of the - * secondary read-only key. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The path for which the indexing behavior applies to. Index paths typically start with root and + * end with wildcard (/path/*) */ - readonly secondaryReadonlyMasterKey?: string; + path?: string; } /** - * @interface - * An interface representing DatabaseAccountListKeysResult. - * The access keys for the given database account. - * + * Cosmos DB indexing policy */ -export interface DatabaseAccountListKeysResult { +export interface IndexingPolicy { /** - * @member {string} [primaryMasterKey] Base 64 encoded value of the primary - * read-write key. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Indicates if the indexing policy is automatic */ - readonly primaryMasterKey?: string; + automatic?: boolean; /** - * @member {string} [secondaryMasterKey] Base 64 encoded value of the - * secondary read-write key. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Indicates the indexing mode. Possible values include: 'Consistent', 'Lazy', 'None'. Default + * value: 'Consistent'. */ - readonly secondaryMasterKey?: string; + indexingMode?: IndexingMode; /** - * @member {string} [primaryReadonlyMasterKey] Base 64 encoded value of the - * primary read-only key. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * List of paths to include in the indexing */ - readonly primaryReadonlyMasterKey?: string; + includedPaths?: IncludedPath[]; /** - * @member {string} [secondaryReadonlyMasterKey] Base 64 encoded value of the - * secondary read-only key. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * List of paths to exclude from indexing */ - readonly secondaryReadonlyMasterKey?: string; + excludedPaths?: ExcludedPath[]; } /** - * @interface - * An interface representing DatabaseAccountConnectionString. - * Connection string for the Cosmos DB account - * + * The configuration of the partition key to be used for partitioning data into multiple partitions */ -export interface DatabaseAccountConnectionString { +export interface ContainerPartitionKey { /** - * @member {string} [connectionString] Value of the connection string - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * List of paths using which data within the container can be partitioned */ - readonly connectionString?: string; + paths?: string[]; /** - * @member {string} [description] Description of the connection string - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Indicates the kind of algorithm used for partitioning. Possible values include: 'Hash', + * 'Range'. Default value: 'Hash'. */ - readonly description?: string; + kind?: PartitionKind; } /** - * @interface - * An interface representing DatabaseAccountListConnectionStringsResult. - * The connection strings for the given database account. - * + * The unique key on that enforces uniqueness constraint on documents in the collection in the + * Azure Cosmos DB service. */ -export interface DatabaseAccountListConnectionStringsResult { +export interface UniqueKey { /** - * @member {DatabaseAccountConnectionString[]} [connectionStrings] An array - * that contains the connection strings for the Cosmos DB account. + * List of paths must be unique for each document in the Azure Cosmos DB service */ - connectionStrings?: DatabaseAccountConnectionString[]; + paths?: string[]; } /** - * @interface - * An interface representing DatabaseAccountRegenerateKeyParameters. - * Parameters to regenerate the keys within the database account. - * + * The unique key policy configuration for specifying uniqueness constraints on documents in the + * collection in the Azure Cosmos DB service. */ -export interface DatabaseAccountRegenerateKeyParameters { +export interface UniqueKeyPolicy { /** - * @member {KeyKind} keyKind The access key to regenerate. Possible values - * include: 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + * List of unique keys on that enforces uniqueness constraint on documents in the collection in + * the Azure Cosmos DB service. */ - keyKind: KeyKind; + uniqueKeys?: UniqueKey[]; } /** - * @interface - * An interface representing OperationDisplay. - * The object that represents the operation. - * + * The conflict resolution policy for the container. */ -export interface OperationDisplay { - /** - * @member {string} [provider] Service provider: Microsoft.ResourceProvider - */ - provider?: string; +export interface ConflictResolutionPolicy { /** - * @member {string} [resource] Resource on which the operation is performed: - * Profile, endpoint, etc. + * Indicates the conflict resolution mode. Possible values include: 'LastWriterWins', 'Custom'. + * Default value: 'LastWriterWins'. */ - resource?: string; + mode?: ConflictResolutionMode; /** - * @member {string} [operation] Operation type: Read, write, delete, etc. + * The conflict resolution path in the case of LastWriterWins mode. */ - operation?: string; + conflictResolutionPath?: string; /** - * @member {string} [description] Description of operation + * The procedure to resolve conflicts in the case of custom mode. */ - description?: string; + conflictResolutionProcedure?: string; } /** - * @interface - * An interface representing Operation. - * REST API operation - * + * An Azure Cosmos DB container. */ -export interface Operation { +export interface SqlContainer extends Resource { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * Name of the Cosmos DB SQL container */ - name?: string; + sqlContainerId: string; /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The configuration of the indexing policy. By default, the indexing is automatic for all + * document paths within the container */ - display?: OperationDisplay; -} - -/** - * @interface - * An interface representing MetricName. - * A metric name. - * - */ -export interface MetricName { + indexingPolicy?: IndexingPolicy; /** - * @member {string} [value] The name of the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The configuration of the partition key to be used for partitioning data into multiple + * partitions */ - readonly value?: string; + partitionKey?: ContainerPartitionKey; /** - * @member {string} [localizedValue] The friendly name of the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Default time to live */ - readonly localizedValue?: string; -} - -/** - * @interface - * An interface representing Usage. - * The usage data for a usage request. - * - */ -export interface Usage { + defaultTtl?: number; /** - * @member {UnitType} [unit] The unit of the metric. Possible values include: - * 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', - * 'BytesPerSecond', 'Milliseconds' + * The unique key policy configuration for specifying uniqueness constraints on documents in the + * collection in the Azure Cosmos DB service. */ - unit?: UnitType; + uniqueKeyPolicy?: UniqueKeyPolicy; /** - * @member {MetricName} [name] The name information for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The conflict resolution policy for the container. */ - readonly name?: MetricName; + conflictResolutionPolicy?: ConflictResolutionPolicy; /** - * @member {string} [quotaPeriod] The quota period used to summarize the - * usage values. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A system generated property. A unique identifier. */ - readonly quotaPeriod?: string; + _rid?: string; /** - * @member {number} [limit] Maximum value for this metric - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A system generated property that denotes the last updated timestamp of the resource. */ - readonly limit?: number; + _ts?: any; /** - * @member {number} [currentValue] Current value for this metric - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A system generated property representing the resource etag required for optimistic concurrency + * control. */ - readonly currentValue?: number; + _etag?: string; } /** - * @interface - * An interface representing PartitionUsage. - * The partition level usage data for a usage request. - * - * @extends Usage + * An Azure Cosmos DB MongoDB database. */ -export interface PartitionUsage extends Usage { +export interface MongoDBDatabase extends Resource { /** - * @member {string} [partitionId] The parition id (GUID identifier) of the - * usages. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the Cosmos DB MongoDB database */ - readonly partitionId?: string; - /** - * @member {string} [partitionKeyRangeId] The partition key range id (integer - * identifier) of the usages. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly partitionKeyRangeId?: string; + mongoDBDatabaseId: string; } /** - * @interface - * An interface representing MetricAvailability. - * The availability of the metric. - * + * An Azure Cosmos DB MongoDB collection. */ -export interface MetricAvailability { +export interface MongoDBCollection extends Resource { /** - * @member {string} [timeGrain] The time grain to be used to summarize the - * metric values. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the Cosmos DB MongoDB collection */ - readonly timeGrain?: string; + mongoDBCollectionId: string; /** - * @member {string} [retention] The retention for the metric values. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A key-value pair of shard keys to be applied for the request. */ - readonly retention?: string; + shardKey?: { [propertyName: string]: string }; + /** + * List of index keys + */ + indexes?: MongoIndex[]; } /** - * @interface - * An interface representing MetricDefinition. - * The definition of a metric. - * + * An Azure Cosmos DB Table. */ -export interface MetricDefinition { +export interface Table extends Resource { /** - * @member {MetricAvailability[]} [metricAvailabilities] The list of metric - * availabilities for the account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the Cosmos DB table */ - readonly metricAvailabilities?: MetricAvailability[]; + tableId: string; +} + +/** + * An Azure Cosmos DB Cassandra keyspace. + */ +export interface CassandraKeyspace extends Resource { /** - * @member {PrimaryAggregationType} [primaryAggregationType] The primary - * aggregation type of the metric. Possible values include: 'None', - * 'Average', 'Total', 'Minimimum', 'Maximum', 'Last' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the Cosmos DB Cassandra keyspace */ - readonly primaryAggregationType?: PrimaryAggregationType; + cassandraKeyspaceId: string; +} + +/** + * An Azure Cosmos DB Cassandra table. + */ +export interface CassandraTable extends Resource { /** - * @member {UnitType} [unit] The unit of the metric. Possible values include: - * 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', - * 'BytesPerSecond', 'Milliseconds' + * Name of the Cosmos DB Cassandra table */ - unit?: UnitType; + cassandraTableId: string; /** - * @member {string} [resourceUri] The resource uri of the database. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Time to live of the Cosmos DB Cassandra table */ - readonly resourceUri?: string; + defaultTtl?: number; /** - * @member {MetricName} [name] The name information for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Schema of the Cosmos DB Cassandra table */ - readonly name?: MetricName; + schema?: CassandraSchema; } /** - * @interface - * An interface representing MetricValue. - * Represents metrics values. - * + * An Azure Cosmos DB Gremlin database. */ -export interface MetricValue { - /** - * @member {number} [_count] The number of values for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly _count?: number; +export interface GremlinDatabase extends Resource { /** - * @member {number} [average] The average value of the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the Cosmos DB Gremlin database */ - readonly average?: number; - /** - * @member {number} [maximum] The max value of the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly maximum?: number; + gremlinDatabaseId: string; /** - * @member {number} [minimum] The min value of the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A system generated property. A unique identifier. */ - readonly minimum?: number; + _rid?: string; /** - * @member {Date} [timestamp] The metric timestamp (ISO-8601 format). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A system generated property that denotes the last updated timestamp of the resource. */ - readonly timestamp?: Date; + _ts?: any; /** - * @member {number} [total] The total value of the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A system generated property representing the resource etag required for optimistic concurrency + * control. */ - readonly total?: number; + _etag?: string; } /** - * @interface - * An interface representing Metric. - * Metric data - * + * An Azure Cosmos DB Gremlin graph. */ -export interface Metric { +export interface GremlinGraph extends Resource { /** - * @member {Date} [startTime] The start time for the metric (ISO-8601 - * format). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the Cosmos DB Gremlin graph */ - readonly startTime?: Date; + gremlinGraphId: string; /** - * @member {Date} [endTime] The end time for the metric (ISO-8601 format). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The configuration of the indexing policy. By default, the indexing is automatic for all + * document paths within the graph */ - readonly endTime?: Date; + indexingPolicy?: IndexingPolicy; /** - * @member {string} [timeGrain] The time grain to be used to summarize the - * metric values. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The configuration of the partition key to be used for partitioning data into multiple + * partitions */ - readonly timeGrain?: string; + partitionKey?: ContainerPartitionKey; /** - * @member {UnitType} [unit] The unit of the metric. Possible values include: - * 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', - * 'BytesPerSecond', 'Milliseconds' + * Default time to live */ - unit?: UnitType; + defaultTtl?: number; /** - * @member {MetricName} [name] The name information for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unique key policy configuration for specifying uniqueness constraints on documents in the + * collection in the Azure Cosmos DB service. */ - readonly name?: MetricName; + uniqueKeyPolicy?: UniqueKeyPolicy; /** - * @member {MetricValue[]} [metricValues] The metric values for the specified - * time window and timestep. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The conflict resolution policy for the graph. */ - readonly metricValues?: MetricValue[]; + conflictResolutionPolicy?: ConflictResolutionPolicy; + /** + * A system generated property. A unique identifier. + */ + _rid?: string; + /** + * A system generated property that denotes the last updated timestamp of the resource. + */ + _ts?: any; + /** + * A system generated property representing the resource etag required for optimistic concurrency + * control. + */ + _etag?: string; } /** - * @interface - * An interface representing PercentileMetricValue. - * Represents percentile metrics values. - * - * @extends MetricValue + * Error Response. */ -export interface PercentileMetricValue extends MetricValue { +export interface ErrorResponse { /** - * @member {number} [p10] The 10th percentile value for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error code. */ - readonly p10?: number; + code?: string; /** - * @member {number} [p25] The 25th percentile value for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error message indicating why the operation failed. */ - readonly p25?: number; + message?: string; +} + +/** + * The list of new failover policies for the failover priority change. + */ +export interface FailoverPolicies { /** - * @member {number} [p50] The 50th percentile value for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * List of failover policies. */ - readonly p50?: number; + failoverPolicies: FailoverPolicy[]; +} + +/** + * Cosmos DB region to online or offline. + */ +export interface RegionForOnlineOffline { /** - * @member {number} [p75] The 75th percentile value for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Cosmos DB region, with spaces between words and each word capitalized. */ - readonly p75?: number; + region: string; +} + +/** + * The system generated resource properties associated with SQL databases and SQL containers. + */ +export interface ExtendedResourceProperties { /** - * @member {number} [p90] The 90th percentile value for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A system generated property. A unique identifier. */ - readonly p90?: number; + _rid?: string; /** - * @member {number} [p95] The 95th percentile value for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A system generated property that denotes the last updated timestamp of the resource. */ - readonly p95?: number; + _ts?: any; /** - * @member {number} [p99] The 99th percentile value for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A system generated property representing the resource etag required for optimistic concurrency + * control. */ - readonly p99?: number; + _etag?: string; } /** - * @interface - * An interface representing PercentileMetric. - * Percentile Metric data - * + * Parameters to create and update Cosmos DB database accounts. */ -export interface PercentileMetric { +export interface DatabaseAccountCreateUpdateParameters extends Resource { /** - * @member {Date} [startTime] The start time for the metric (ISO-8601 - * format). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Indicates the type of database account. This can only be set at database account creation. + * Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: + * 'GlobalDocumentDB'. */ - readonly startTime?: Date; + kind?: DatabaseAccountKind; /** - * @member {Date} [endTime] The end time for the metric (ISO-8601 format). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The consistency policy for the Cosmos DB account. */ - readonly endTime?: Date; + consistencyPolicy?: ConsistencyPolicy; /** - * @member {string} [timeGrain] The time grain to be used to summarize the - * metric values. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * An array that contains the georeplication locations enabled for the Cosmos DB account. */ - readonly timeGrain?: string; + locations: Location[]; /** - * @member {UnitType} [unit] The unit of the metric. Possible values include: - * 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', - * 'BytesPerSecond', 'Milliseconds' + * Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges + * in CIDR form to be included as the allowed list of client IPs for a given database account. IP + * addresses/ranges must be comma separated and must not contain any spaces. */ - unit?: UnitType; + ipRangeFilter?: string; /** - * @member {MetricName} [name] The name information for the metric. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Flag to indicate whether to enable/disable Virtual Network ACL rules. */ - readonly name?: MetricName; + isVirtualNetworkFilterEnabled?: boolean; /** - * @member {PercentileMetricValue[]} [metricValues] The percentile metric - * values for the specified time window and timestep. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Enables automatic failover of the write region in the rare event that the region is + * unavailable due to an outage. Automatic failover will result in a new write region for the + * account and is chosen based on the failover priorities configured for the account. */ - readonly metricValues?: PercentileMetricValue[]; + enableAutomaticFailover?: boolean; + /** + * List of Cosmos DB capabilities for the account + */ + capabilities?: Capability[]; + /** + * List of Virtual Network ACL rules configured for the Cosmos DB account. + */ + virtualNetworkRules?: VirtualNetworkRule[]; + /** + * Enables the account to write in multiple locations + */ + enableMultipleWriteLocations?: boolean; } /** - * @interface - * An interface representing PartitionMetric. - * The metric values for a single partition. - * - * @extends Metric + * Parameters for patching Azure Cosmos DB database account properties. */ -export interface PartitionMetric extends Metric { +export interface DatabaseAccountPatchParameters { + tags?: { [propertyName: string]: string }; /** - * @member {string} [partitionId] The parition id (GUID identifier) of the - * metric values. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * List of Cosmos DB capabilities for the account */ - readonly partitionId?: string; + capabilities?: Capability[]; +} + +/** + * The read-only access keys for the given database account. + */ +export interface DatabaseAccountListReadOnlyKeysResult { /** - * @member {string} [partitionKeyRangeId] The partition key range id (integer - * identifier) of the metric values. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Base 64 encoded value of the primary read-only key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly partitionKeyRangeId?: string; + readonly primaryReadonlyMasterKey?: string; + /** + * Base 64 encoded value of the secondary read-only key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly secondaryReadonlyMasterKey?: string; } /** - * @interface - * An interface representing DatabaseAccountsListUsagesOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The access keys for the given database account. */ -export interface DatabaseAccountsListUsagesOptionalParams extends msRest.RequestOptionsBase { +export interface DatabaseAccountListKeysResult { /** - * @member {string} [filter] An OData filter expression that describes a - * subset of usages to return. The supported parameter is name.value (name of - * the metric, can have an or of multiple names). + * Base 64 encoded value of the primary read-write key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly primaryMasterKey?: string; + /** + * Base 64 encoded value of the secondary read-write key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly secondaryMasterKey?: string; + /** + * Base 64 encoded value of the primary read-only key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly primaryReadonlyMasterKey?: string; + /** + * Base 64 encoded value of the secondary read-only key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly secondaryReadonlyMasterKey?: string; } /** - * @interface - * An interface representing DatabaseListUsagesOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Connection string for the Cosmos DB account */ -export interface DatabaseListUsagesOptionalParams extends msRest.RequestOptionsBase { +export interface DatabaseAccountConnectionString { /** - * @member {string} [filter] An OData filter expression that describes a - * subset of usages to return. The supported parameter is name.value (name of - * the metric, can have an or of multiple names). + * Value of the connection string + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly connectionString?: string; + /** + * Description of the connection string + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; } /** - * @interface - * An interface representing CollectionListUsagesOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The connection strings for the given database account. */ -export interface CollectionListUsagesOptionalParams extends msRest.RequestOptionsBase { +export interface DatabaseAccountListConnectionStringsResult { /** - * @member {string} [filter] An OData filter expression that describes a - * subset of usages to return. The supported parameter is name.value (name of - * the metric, can have an or of multiple names). + * An array that contains the connection strings for the Cosmos DB account. */ - filter?: string; + connectionStrings?: DatabaseAccountConnectionString[]; } /** - * @interface - * An interface representing CollectionPartitionListUsagesOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Parameters to regenerate the keys within the database account. */ -export interface CollectionPartitionListUsagesOptionalParams extends msRest.RequestOptionsBase { +export interface DatabaseAccountRegenerateKeyParameters { /** - * @member {string} [filter] An OData filter expression that describes a - * subset of usages to return. The supported parameter is name.value (name of - * the metric, can have an or of multiple names). + * The access key to regenerate. Possible values include: 'primary', 'secondary', + * 'primaryReadonly', 'secondaryReadonly' */ - filter?: string; + keyKind: KeyKind; } /** - * @interface - * An interface representing CosmosDBManagementClientOptions. - * @extends AzureServiceClientOptions + * Cosmos DB SQL database id object */ -export interface CosmosDBManagementClientOptions extends AzureServiceClientOptions { +export interface SqlDatabaseResource { /** - * @member {string} [baseUri] + * Name of the Cosmos DB SQL database */ - baseUri?: string; + id: string; } +/** + * Parameters to create and update Cosmos DB SQL database. + */ +export interface SqlDatabaseCreateUpdateParameters { + /** + * The standard JSON format of a SQL database + */ + resource: SqlDatabaseResource; + /** + * A key-value pair of options to be applied for the request. This corresponds to the headers + * sent with the request. + */ + options: { [propertyName: string]: string }; +} /** - * @interface - * An interface representing the DatabaseAccountsListResult. - * The List operation response, that contains the database accounts and their - * properties. - * - * @extends Array + * Cosmos DB SQL container resource object */ -export interface DatabaseAccountsListResult extends Array { +export interface SqlContainerResource { + /** + * Name of the Cosmos DB SQL container + */ + id: string; + /** + * The configuration of the indexing policy. By default, the indexing is automatic for all + * document paths within the container + */ + indexingPolicy?: IndexingPolicy; + /** + * The configuration of the partition key to be used for partitioning data into multiple + * partitions + */ + partitionKey?: ContainerPartitionKey; + /** + * Default time to live + */ + defaultTtl?: number; + /** + * The unique key policy configuration for specifying uniqueness constraints on documents in the + * collection in the Azure Cosmos DB service. + */ + uniqueKeyPolicy?: UniqueKeyPolicy; + /** + * The conflict resolution policy for the container. + */ + conflictResolutionPolicy?: ConflictResolutionPolicy; } /** - * @interface - * An interface representing the MetricListResult. - * The response to a list metrics request. - * - * @extends Array + * Parameters to create and update Cosmos DB container. */ -export interface MetricListResult extends Array { +export interface SqlContainerCreateUpdateParameters { + /** + * The standard JSON format of a container + */ + resource: SqlContainerResource; + /** + * A key-value pair of options to be applied for the request. This corresponds to the headers + * sent with the request. + */ + options: { [propertyName: string]: string }; } /** - * @interface - * An interface representing the UsagesResult. - * The response to a list usage request. - * - * @extends Array + * Cosmos DB MongoDB database id object */ -export interface UsagesResult extends Array { +export interface MongoDBDatabaseResource { + /** + * Name of the Cosmos DB MongoDB database + */ + id: string; } /** - * @interface - * An interface representing the MetricDefinitionsListResult. - * The response to a list metric definitions request. - * - * @extends Array + * Parameters to create and update Cosmos DB MongoDB database. */ -export interface MetricDefinitionsListResult extends Array { +export interface MongoDBDatabaseCreateUpdateParameters { + /** + * The standard JSON format of a MongoDB database + */ + resource: MongoDBDatabaseResource; + /** + * A key-value pair of options to be applied for the request. This corresponds to the headers + * sent with the request. + */ + options: { [propertyName: string]: string }; +} + +/** + * Cosmos DB MongoDB collection resource object + */ +export interface MongoIndexKeys { + /** + * List of keys for each MongoDB collection in the Azure Cosmos DB service + */ + keys?: string[]; +} + +/** + * Cosmos DB MongoDB collection index options + */ +export interface MongoIndexOptions { + /** + * Expire after seconds + */ + expireAfterSeconds?: number; + /** + * Is unique or not + */ + unique?: boolean; +} + +/** + * Cosmos DB MongoDB collection index key + */ +export interface MongoIndex { + /** + * Cosmos DB MongoDB collection index keys + */ + key?: MongoIndexKeys; + /** + * Cosmos DB MongoDB collection index key options + */ + options?: MongoIndexOptions; +} + +/** + * Cosmos DB MongoDB collection resource object + */ +export interface MongoDBCollectionResource { + /** + * Name of the Cosmos DB MongoDB collection + */ + id: string; + /** + * A key-value pair of shard keys to be applied for the request. + */ + shardKey?: { [propertyName: string]: string }; + /** + * List of index keys + */ + indexes?: MongoIndex[]; +} + +/** + * Parameters to create and update Cosmos DB MongoDB collection. + */ +export interface MongoDBCollectionCreateUpdateParameters { + /** + * The standard JSON format of a MongoDB collection + */ + resource: MongoDBCollectionResource; + /** + * A key-value pair of options to be applied for the request. This corresponds to the headers + * sent with the request. + */ + options: { [propertyName: string]: string }; +} + +/** + * Cosmos DB table id object + */ +export interface TableResource { + /** + * Name of the Cosmos DB table + */ + id: string; +} + +/** + * Parameters to create and update Cosmos DB Table. + */ +export interface TableCreateUpdateParameters { + /** + * The standard JSON format of a Table + */ + resource: TableResource; + /** + * A key-value pair of options to be applied for the request. This corresponds to the headers + * sent with the request. + */ + options: { [propertyName: string]: string }; +} + +/** + * Cosmos DB Cassandra keyspace id object + */ +export interface CassandraKeyspaceResource { + /** + * Name of the Cosmos DB Cassandra keyspace + */ + id: string; +} + +/** + * Parameters to create and update Cosmos DB Cassandra keyspace. + */ +export interface CassandraKeyspaceCreateUpdateParameters { + /** + * The standard JSON format of a Cassandra keyspace + */ + resource: CassandraKeyspaceResource; + /** + * A key-value pair of options to be applied for the request. This corresponds to the headers + * sent with the request. + */ + options: { [propertyName: string]: string }; +} + +/** + * Cosmos DB Cassandra table column + */ +export interface Column { + /** + * Name of the Cosmos DB Cassandra table column + */ + name?: string; + /** + * Type of the Cosmos DB Cassandra table column + */ + type?: string; +} + +/** + * Cosmos DB Cassandra table partition key + */ +export interface CassandraPartitionKey { + /** + * Name of the Cosmos DB Cassandra table partition key + */ + name?: string; +} + +/** + * Cosmos DB Cassandra table cluster key + */ +export interface ClusterKey { + /** + * Name of the Cosmos DB Cassandra table cluster key + */ + name?: string; + /** + * Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and "Desc" + */ + orderBy?: string; +} + +/** + * Cosmos DB Cassandra table schema + */ +export interface CassandraSchema { + /** + * List of Cassandra table columns. + */ + columns?: Column[]; + /** + * List of partition key. + */ + partitionKeys?: CassandraPartitionKey[]; + /** + * List of cluster key. + */ + clusterKeys?: ClusterKey[]; +} + +/** + * Cosmos DB Cassandra table id object + */ +export interface CassandraTableResource { + /** + * Name of the Cosmos DB Cassandra table + */ + id: string; + /** + * Time to live of the Cosmos DB Cassandra table + */ + defaultTtl?: number; + /** + * Schema of the Cosmos DB Cassandra table + */ + schema?: CassandraSchema; +} + +/** + * Parameters to create and update Cosmos DB Cassandra table. + */ +export interface CassandraTableCreateUpdateParameters { + /** + * The standard JSON format of a Cassandra table + */ + resource: CassandraTableResource; + /** + * A key-value pair of options to be applied for the request. This corresponds to the headers + * sent with the request. + */ + options: { [propertyName: string]: string }; } /** - * @interface - * An interface representing the OperationListResult. - * Result of the request to list Resource Provider operations. It contains a - * list of operations and a URL link to get the next set of results. - * - * @extends Array + * Cosmos DB Gremlin database id object + */ +export interface GremlinDatabaseResource { + /** + * Name of the Cosmos DB Gremlin database + */ + id: string; +} + +/** + * Parameters to create and update Cosmos DB Gremlin database. + */ +export interface GremlinDatabaseCreateUpdateParameters { + /** + * The standard JSON format of a Gremlin database + */ + resource: GremlinDatabaseResource; + /** + * A key-value pair of options to be applied for the request. This corresponds to the headers + * sent with the request. + */ + options: { [propertyName: string]: string }; +} + +/** + * Cosmos DB Gremlin graph resource object + */ +export interface GremlinGraphResource { + /** + * Name of the Cosmos DB Gremlin graph + */ + id: string; + /** + * The configuration of the indexing policy. By default, the indexing is automatic for all + * document paths within the graph + */ + indexingPolicy?: IndexingPolicy; + /** + * The configuration of the partition key to be used for partitioning data into multiple + * partitions + */ + partitionKey?: ContainerPartitionKey; + /** + * Default time to live + */ + defaultTtl?: number; + /** + * The unique key policy configuration for specifying uniqueness constraints on documents in the + * collection in the Azure Cosmos DB service. + */ + uniqueKeyPolicy?: UniqueKeyPolicy; + /** + * The conflict resolution policy for the graph. + */ + conflictResolutionPolicy?: ConflictResolutionPolicy; +} + +/** + * Parameters to create and update Cosmos DB Gremlin graph. + */ +export interface GremlinGraphCreateUpdateParameters { + /** + * The standard JSON format of a Gremlin graph + */ + resource: GremlinGraphResource; + /** + * A key-value pair of options to be applied for the request. This corresponds to the headers + * sent with the request. + */ + options: { [propertyName: string]: string }; +} + +/** + * The object that represents the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft.ResourceProvider + */ + provider?: string; + /** + * Resource on which the operation is performed: Profile, endpoint, etc. + */ + resource?: string; + /** + * Operation type: Read, write, delete, etc. + */ + operation?: string; + /** + * Description of operation + */ + description?: string; +} + +/** + * REST API operation + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + */ + name?: string; + /** + * The object that represents the operation. + */ + display?: OperationDisplay; +} + +/** + * A metric name. + */ +export interface MetricName { + /** + * The name of the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: string; + /** + * The friendly name of the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly localizedValue?: string; +} + +/** + * The usage data for a usage request. + */ +export interface Usage { + /** + * The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', + * 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' + */ + unit?: UnitType; + /** + * The name information for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: MetricName; + /** + * The quota period used to summarize the usage values. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly quotaPeriod?: string; + /** + * Maximum value for this metric + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly limit?: number; + /** + * Current value for this metric + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currentValue?: number; +} + +/** + * The partition level usage data for a usage request. + */ +export interface PartitionUsage extends Usage { + /** + * The partition id (GUID identifier) of the usages. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly partitionId?: string; + /** + * The partition key range id (integer identifier) of the usages. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly partitionKeyRangeId?: string; +} + +/** + * The availability of the metric. + */ +export interface MetricAvailability { + /** + * The time grain to be used to summarize the metric values. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly timeGrain?: string; + /** + * The retention for the metric values. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly retention?: string; +} + +/** + * The definition of a metric. + */ +export interface MetricDefinition { + /** + * The list of metric availabilities for the account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly metricAvailabilities?: MetricAvailability[]; + /** + * The primary aggregation type of the metric. Possible values include: 'None', 'Average', + * 'Total', 'Minimimum', 'Maximum', 'Last' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly primaryAggregationType?: PrimaryAggregationType; + /** + * The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', + * 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' + */ + unit?: UnitType; + /** + * The resource uri of the database. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceUri?: string; + /** + * The name information for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: MetricName; +} + +/** + * Represents metrics values. + */ +export interface MetricValue { + /** + * The number of values for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly _count?: number; + /** + * The average value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly average?: number; + /** + * The max value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly maximum?: number; + /** + * The min value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly minimum?: number; + /** + * The metric timestamp (ISO-8601 format). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly timestamp?: Date; + /** + * The total value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly total?: number; +} + +/** + * Metric data + */ +export interface Metric { + /** + * The start time for the metric (ISO-8601 format). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startTime?: Date; + /** + * The end time for the metric (ISO-8601 format). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endTime?: Date; + /** + * The time grain to be used to summarize the metric values. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly timeGrain?: string; + /** + * The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', + * 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' + */ + unit?: UnitType; + /** + * The name information for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: MetricName; + /** + * The metric values for the specified time window and timestep. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly metricValues?: MetricValue[]; +} + +/** + * Represents percentile metrics values. + */ +export interface PercentileMetricValue extends MetricValue { + /** + * The 10th percentile value for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly p10?: number; + /** + * The 25th percentile value for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly p25?: number; + /** + * The 50th percentile value for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly p50?: number; + /** + * The 75th percentile value for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly p75?: number; + /** + * The 90th percentile value for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly p90?: number; + /** + * The 95th percentile value for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly p95?: number; + /** + * The 99th percentile value for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly p99?: number; +} + +/** + * Percentile Metric data + */ +export interface PercentileMetric { + /** + * The start time for the metric (ISO-8601 format). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startTime?: Date; + /** + * The end time for the metric (ISO-8601 format). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endTime?: Date; + /** + * The time grain to be used to summarize the metric values. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly timeGrain?: string; + /** + * The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', + * 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' + */ + unit?: UnitType; + /** + * The name information for the metric. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: MetricName; + /** + * The percentile metric values for the specified time window and timestep. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly metricValues?: PercentileMetricValue[]; +} + +/** + * The metric values for a single partition. + */ +export interface PartitionMetric extends Metric { + /** + * The partition id (GUID identifier) of the metric values. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly partitionId?: string; + /** + * The partition key range id (integer identifier) of the metric values. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly partitionKeyRangeId?: string; +} + +/** + * Optional Parameters. + */ +export interface DatabaseAccountsListUsagesOptionalParams extends msRest.RequestOptionsBase { + /** + * An OData filter expression that describes a subset of usages to return. The supported + * parameter is name.value (name of the metric, can have an or of multiple names). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DatabaseListUsagesOptionalParams extends msRest.RequestOptionsBase { + /** + * An OData filter expression that describes a subset of usages to return. The supported + * parameter is name.value (name of the metric, can have an or of multiple names). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface CollectionListUsagesOptionalParams extends msRest.RequestOptionsBase { + /** + * An OData filter expression that describes a subset of usages to return. The supported + * parameter is name.value (name of the metric, can have an or of multiple names). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface CollectionPartitionListUsagesOptionalParams extends msRest.RequestOptionsBase { + /** + * An OData filter expression that describes a subset of usages to return. The supported + * parameter is name.value (name of the metric, can have an or of multiple names). + */ + filter?: string; +} + +/** + * An interface representing CosmosDBManagementClientOptions. + */ +export interface CosmosDBManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * The List operation response, that contains the database accounts and their properties. + * @extends Array + */ +export interface DatabaseAccountsListResult extends Array { +} + +/** + * @interface + * The response to a list metrics request. + * @extends Array + */ +export interface MetricListResult extends Array { +} + +/** + * @interface + * The response to a list usage request. + * @extends Array + */ +export interface UsagesResult extends Array { +} + +/** + * @interface + * The response to a list metric definitions request. + * @extends Array + */ +export interface MetricDefinitionsListResult extends Array { +} + +/** + * @interface + * The List operation response, that contains the SQL databases and their properties. + * @extends Array + */ +export interface SqlDatabaseListResult extends Array { +} + +/** + * @interface + * The List operation response, that contains the containers and their properties. + * @extends Array + */ +export interface SqlContainerListResult extends Array { +} + +/** + * @interface + * The List operation response, that contains the MongoDB databases and their properties. + * @extends Array + */ +export interface MongoDBDatabaseListResult extends Array { +} + +/** + * @interface + * The List operation response, that contains the MongoDB collections and their properties. + * @extends Array + */ +export interface MongoDBCollectionListResult extends Array { +} + +/** + * @interface + * The List operation response, that contains the Table and their properties. + * @extends Array + */ +export interface TableListResult extends Array
{ +} + +/** + * @interface + * The List operation response, that contains the Cassandra keyspaces and their properties. + * @extends Array + */ +export interface CassandraKeyspaceListResult extends Array { +} + +/** + * @interface + * The List operation response, that contains the Cassandra tables and their properties. + * @extends Array + */ +export interface CassandraTableListResult extends Array { +} + +/** + * @interface + * The List operation response, that contains the Gremlin databases and their properties. + * @extends Array + */ +export interface GremlinDatabaseListResult extends Array { +} + +/** + * @interface + * The List operation response, that contains the graphs and their properties. + * @extends Array + */ +export interface GremlinGraphListResult extends Array { +} + +/** + * @interface + * Result of the request to list Resource Provider operations. It contains a list of operations and + * a URL link to get the next set of results. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * URL to get the next set of operation list results if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * The response to a list percentile metrics request. + * @extends Array + */ +export interface PercentileMetricListResult extends Array { +} + +/** + * @interface + * The response to a list partition metrics request. + * @extends Array + */ +export interface PartitionMetricListResult extends Array { +} + +/** + * @interface + * The response to a list partition level usage request. + * @extends Array + */ +export interface PartitionUsagesResult extends Array { +} + +/** + * Defines values for DatabaseAccountKind. + * Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse' + * @readonly + * @enum {string} + */ +export type DatabaseAccountKind = 'GlobalDocumentDB' | 'MongoDB' | 'Parse'; + +/** + * Defines values for DatabaseAccountOfferType. + * Possible values include: 'Standard' + * @readonly + * @enum {string} + */ +export type DatabaseAccountOfferType = 'Standard'; + +/** + * Defines values for DefaultConsistencyLevel. + * Possible values include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' + * @readonly + * @enum {string} + */ +export type DefaultConsistencyLevel = 'Eventual' | 'Session' | 'BoundedStaleness' | 'Strong' | 'ConsistentPrefix'; + +/** + * Defines values for IndexingMode. + * Possible values include: 'Consistent', 'Lazy', 'None' + * @readonly + * @enum {string} + */ +export type IndexingMode = 'Consistent' | 'Lazy' | 'None'; + +/** + * Defines values for DataType. + * Possible values include: 'String', 'Number', 'Point', 'Polygon', 'LineString', 'MultiPolygon' + * @readonly + * @enum {string} + */ +export type DataType = 'String' | 'Number' | 'Point' | 'Polygon' | 'LineString' | 'MultiPolygon'; + +/** + * Defines values for IndexKind. + * Possible values include: 'Hash', 'Range', 'Spatial' + * @readonly + * @enum {string} + */ +export type IndexKind = 'Hash' | 'Range' | 'Spatial'; + +/** + * Defines values for PartitionKind. + * Possible values include: 'Hash', 'Range' + * @readonly + * @enum {string} + */ +export type PartitionKind = 'Hash' | 'Range'; + +/** + * Defines values for ConflictResolutionMode. + * Possible values include: 'LastWriterWins', 'Custom' + * @readonly + * @enum {string} + */ +export type ConflictResolutionMode = 'LastWriterWins' | 'Custom'; + +/** + * Defines values for KeyKind. + * Possible values include: 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + * @readonly + * @enum {string} + */ +export type KeyKind = 'primary' | 'secondary' | 'primaryReadonly' | 'secondaryReadonly'; + +/** + * Defines values for UnitType. + * Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', + * 'BytesPerSecond', 'Milliseconds' + * @readonly + * @enum {string} + */ +export type UnitType = 'Count' | 'Bytes' | 'Seconds' | 'Percent' | 'CountPerSecond' | 'BytesPerSecond' | 'Milliseconds'; + +/** + * Defines values for PrimaryAggregationType. + * Possible values include: 'None', 'Average', 'Total', 'Minimimum', 'Maximum', 'Last' + * @readonly + * @enum {string} + */ +export type PrimaryAggregationType = 'None' | 'Average' | 'Total' | 'Minimimum' | 'Maximum' | 'Last'; + +/** + * Contains response data for the get operation. + */ +export type DatabaseAccountsGetResponse = DatabaseAccount & { + /** + * 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: DatabaseAccount; + }; +}; + +/** + * Contains response data for the patch operation. + */ +export type DatabaseAccountsPatchResponse = DatabaseAccount & { + /** + * 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: DatabaseAccount; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DatabaseAccountsCreateOrUpdateResponse = DatabaseAccount & { + /** + * 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: DatabaseAccount; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type DatabaseAccountsListResponse = DatabaseAccountsListResult & { + /** + * 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: DatabaseAccountsListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type DatabaseAccountsListByResourceGroupResponse = DatabaseAccountsListResult & { + /** + * 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: DatabaseAccountsListResult; + }; +}; + +/** + * Contains response data for the listKeys operation. + */ +export type DatabaseAccountsListKeysResponse = DatabaseAccountListKeysResult & { + /** + * 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: DatabaseAccountListKeysResult; + }; +}; + +/** + * Contains response data for the listConnectionStrings operation. + */ +export type DatabaseAccountsListConnectionStringsResponse = DatabaseAccountListConnectionStringsResult & { + /** + * 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: DatabaseAccountListConnectionStringsResult; + }; +}; + +/** + * Contains response data for the getReadOnlyKeys operation. + */ +export type DatabaseAccountsGetReadOnlyKeysResponse = DatabaseAccountListReadOnlyKeysResult & { + /** + * 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: DatabaseAccountListReadOnlyKeysResult; + }; +}; + +/** + * Contains response data for the listReadOnlyKeys operation. + */ +export type DatabaseAccountsListReadOnlyKeysResponse = DatabaseAccountListReadOnlyKeysResult & { + /** + * 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: DatabaseAccountListReadOnlyKeysResult; + }; +}; + +/** + * Contains response data for the checkNameExists operation. + */ +export type DatabaseAccountsCheckNameExistsResponse = { + /** + * The parsed response body. + */ + body: boolean; + + /** + * 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: boolean; + }; +}; + +/** + * Contains response data for the listMetrics operation. + */ +export type DatabaseAccountsListMetricsResponse = MetricListResult & { + /** + * 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: MetricListResult; + }; +}; + +/** + * Contains response data for the listUsages operation. + */ +export type DatabaseAccountsListUsagesResponse = UsagesResult & { + /** + * 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: UsagesResult; + }; +}; + +/** + * Contains response data for the listMetricDefinitions operation. + */ +export type DatabaseAccountsListMetricDefinitionsResponse = MetricDefinitionsListResult & { + /** + * 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: MetricDefinitionsListResult; + }; +}; + +/** + * Contains response data for the listSqlDatabases operation. + */ +export type DatabaseAccountsListSqlDatabasesResponse = SqlDatabaseListResult & { + /** + * 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: SqlDatabaseListResult; + }; +}; + +/** + * Contains response data for the getSqlDatabase operation. + */ +export type DatabaseAccountsGetSqlDatabaseResponse = SqlDatabase & { + /** + * 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: SqlDatabase; + }; +}; + +/** + * Contains response data for the createUpdateSqlDatabase operation. + */ +export type DatabaseAccountsCreateUpdateSqlDatabaseResponse = SqlDatabase & { + /** + * 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: SqlDatabase; + }; +}; + +/** + * Contains response data for the listSqlContainers operation. + */ +export type DatabaseAccountsListSqlContainersResponse = SqlContainerListResult & { + /** + * 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: SqlContainerListResult; + }; +}; + +/** + * Contains response data for the getSqlContainer operation. + */ +export type DatabaseAccountsGetSqlContainerResponse = SqlContainer & { + /** + * 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: SqlContainer; + }; +}; + +/** + * Contains response data for the createUpdateSqlContainer operation. + */ +export type DatabaseAccountsCreateUpdateSqlContainerResponse = SqlContainer & { + /** + * 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: SqlContainer; + }; +}; + +/** + * Contains response data for the listMongoDBDatabases operation. + */ +export type DatabaseAccountsListMongoDBDatabasesResponse = MongoDBDatabaseListResult & { + /** + * 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: MongoDBDatabaseListResult; + }; +}; + +/** + * Contains response data for the getMongoDBDatabase operation. + */ +export type DatabaseAccountsGetMongoDBDatabaseResponse = MongoDBDatabase & { + /** + * 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: MongoDBDatabase; + }; +}; + +/** + * Contains response data for the createUpdateMongoDBDatabase operation. + */ +export type DatabaseAccountsCreateUpdateMongoDBDatabaseResponse = MongoDBDatabase & { + /** + * 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: MongoDBDatabase; + }; +}; + +/** + * Contains response data for the listMongoDBCollections operation. + */ +export type DatabaseAccountsListMongoDBCollectionsResponse = MongoDBCollectionListResult & { + /** + * 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: MongoDBCollectionListResult; + }; +}; + +/** + * Contains response data for the getMongoDBCollection operation. + */ +export type DatabaseAccountsGetMongoDBCollectionResponse = MongoDBCollection & { + /** + * 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: MongoDBCollection; + }; +}; + +/** + * Contains response data for the createUpdateMongoDBCollection operation. + */ +export type DatabaseAccountsCreateUpdateMongoDBCollectionResponse = MongoDBCollection & { + /** + * 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: MongoDBCollection; + }; +}; + +/** + * Contains response data for the listTables operation. + */ +export type DatabaseAccountsListTablesResponse = TableListResult & { + /** + * 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: TableListResult; + }; +}; + +/** + * Contains response data for the getTable operation. + */ +export type DatabaseAccountsGetTableResponse = Table & { + /** + * 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: Table; + }; +}; + +/** + * Contains response data for the createUpdateTable operation. + */ +export type DatabaseAccountsCreateUpdateTableResponse = Table & { + /** + * 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: Table; + }; +}; + +/** + * Contains response data for the listCassandraKeyspaces operation. */ -export interface OperationListResult extends Array { +export type DatabaseAccountsListCassandraKeyspacesResponse = CassandraKeyspaceListResult & { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * @interface - * An interface representing the PercentileMetricListResult. - * The response to a list percentile metrics request. - * - * @extends Array - */ -export interface PercentileMetricListResult extends Array { -} + /** + * The response body as parsed JSON or XML + */ + parsedBody: CassandraKeyspaceListResult; + }; +}; /** - * @interface - * An interface representing the PartitionMetricListResult. - * The response to a list partition metrics request. - * - * @extends Array + * Contains response data for the getCassandraKeyspace operation. */ -export interface PartitionMetricListResult extends Array { -} +export type DatabaseAccountsGetCassandraKeyspaceResponse = CassandraKeyspace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * @interface - * An interface representing the PartitionUsagesResult. - * The response to a list partition level usage request. - * - * @extends Array - */ -export interface PartitionUsagesResult extends Array { -} + /** + * The response body as parsed JSON or XML + */ + parsedBody: CassandraKeyspace; + }; +}; /** - * Defines values for DatabaseAccountKind. - * Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse' - * @readonly - * @enum {string} + * Contains response data for the createUpdateCassandraKeyspace operation. */ -export type DatabaseAccountKind = 'GlobalDocumentDB' | 'MongoDB' | 'Parse'; +export type DatabaseAccountsCreateUpdateCassandraKeyspaceResponse = CassandraKeyspace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for DatabaseAccountOfferType. - * Possible values include: 'Standard' - * @readonly - * @enum {string} - */ -export type DatabaseAccountOfferType = 'Standard'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: CassandraKeyspace; + }; +}; /** - * Defines values for DefaultConsistencyLevel. - * Possible values include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix' - * @readonly - * @enum {string} + * Contains response data for the listCassandraTables operation. */ -export type DefaultConsistencyLevel = 'Eventual' | 'Session' | 'BoundedStaleness' | 'Strong' | 'ConsistentPrefix'; +export type DatabaseAccountsListCassandraTablesResponse = CassandraTableListResult & { + /** + * 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: CassandraTableListResult; + }; +}; /** - * Defines values for KeyKind. - * Possible values include: 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - * @readonly - * @enum {string} + * Contains response data for the getCassandraTable operation. */ -export type KeyKind = 'primary' | 'secondary' | 'primaryReadonly' | 'secondaryReadonly'; +export type DatabaseAccountsGetCassandraTableResponse = CassandraTable & { + /** + * 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: CassandraTable; + }; +}; /** - * Defines values for UnitType. - * Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', - * 'BytesPerSecond', 'Milliseconds' - * @readonly - * @enum {string} + * Contains response data for the createUpdateCassandraTable operation. */ -export type UnitType = 'Count' | 'Bytes' | 'Seconds' | 'Percent' | 'CountPerSecond' | 'BytesPerSecond' | 'Milliseconds'; +export type DatabaseAccountsCreateUpdateCassandraTableResponse = CassandraTable & { + /** + * 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: CassandraTable; + }; +}; /** - * Defines values for PrimaryAggregationType. - * Possible values include: 'None', 'Average', 'Total', 'Minimimum', 'Maximum', 'Last' - * @readonly - * @enum {string} + * Contains response data for the listGremlinDatabases operation. */ -export type PrimaryAggregationType = 'None' | 'Average' | 'Total' | 'Minimimum' | 'Maximum' | 'Last'; +export type DatabaseAccountsListGremlinDatabasesResponse = GremlinDatabaseListResult & { + /** + * 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: GremlinDatabaseListResult; + }; +}; /** - * Contains response data for the get operation. + * Contains response data for the getGremlinDatabase operation. */ -export type DatabaseAccountsGetResponse = DatabaseAccount & { +export type DatabaseAccountsGetGremlinDatabaseResponse = GremlinDatabase & { /** * The underlying HTTP response. */ @@ -1155,17 +2428,18 @@ export type DatabaseAccountsGetResponse = DatabaseAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccount; + parsedBody: GremlinDatabase; }; }; /** - * Contains response data for the patch operation. + * Contains response data for the createUpdateGremlinDatabase operation. */ -export type DatabaseAccountsPatchResponse = DatabaseAccount & { +export type DatabaseAccountsCreateUpdateGremlinDatabaseResponse = GremlinDatabase & { /** * The underlying HTTP response. */ @@ -1174,17 +2448,18 @@ export type DatabaseAccountsPatchResponse = DatabaseAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccount; + parsedBody: GremlinDatabase; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listGremlinGraphs operation. */ -export type DatabaseAccountsCreateOrUpdateResponse = DatabaseAccount & { +export type DatabaseAccountsListGremlinGraphsResponse = GremlinGraphListResult & { /** * The underlying HTTP response. */ @@ -1193,17 +2468,18 @@ export type DatabaseAccountsCreateOrUpdateResponse = DatabaseAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccount; + parsedBody: GremlinGraphListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the getGremlinGraph operation. */ -export type DatabaseAccountsListResponse = DatabaseAccountsListResult & { +export type DatabaseAccountsGetGremlinGraphResponse = GremlinGraph & { /** * The underlying HTTP response. */ @@ -1212,17 +2488,18 @@ export type DatabaseAccountsListResponse = DatabaseAccountsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccountsListResult; + parsedBody: GremlinGraph; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the createUpdateGremlinGraph operation. */ -export type DatabaseAccountsListByResourceGroupResponse = DatabaseAccountsListResult & { +export type DatabaseAccountsCreateUpdateGremlinGraphResponse = GremlinGraph & { /** * The underlying HTTP response. */ @@ -1231,17 +2508,18 @@ export type DatabaseAccountsListByResourceGroupResponse = DatabaseAccountsListRe * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccountsListResult; + parsedBody: GremlinGraph; }; }; /** - * Contains response data for the listKeys operation. + * Contains response data for the beginPatch operation. */ -export type DatabaseAccountsListKeysResponse = DatabaseAccountListKeysResult & { +export type DatabaseAccountsBeginPatchResponse = DatabaseAccount & { /** * The underlying HTTP response. */ @@ -1250,17 +2528,18 @@ export type DatabaseAccountsListKeysResponse = DatabaseAccountListKeysResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccountListKeysResult; + parsedBody: DatabaseAccount; }; }; /** - * Contains response data for the listConnectionStrings operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type DatabaseAccountsListConnectionStringsResponse = DatabaseAccountListConnectionStringsResult & { +export type DatabaseAccountsBeginCreateOrUpdateResponse = DatabaseAccount & { /** * The underlying HTTP response. */ @@ -1269,17 +2548,18 @@ export type DatabaseAccountsListConnectionStringsResponse = DatabaseAccountListC * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccountListConnectionStringsResult; + parsedBody: DatabaseAccount; }; }; /** - * Contains response data for the getReadOnlyKeys operation. + * Contains response data for the beginCreateUpdateSqlDatabase operation. */ -export type DatabaseAccountsGetReadOnlyKeysResponse = DatabaseAccountListReadOnlyKeysResult & { +export type DatabaseAccountsBeginCreateUpdateSqlDatabaseResponse = SqlDatabase & { /** * The underlying HTTP response. */ @@ -1288,17 +2568,18 @@ export type DatabaseAccountsGetReadOnlyKeysResponse = DatabaseAccountListReadOnl * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccountListReadOnlyKeysResult; + parsedBody: SqlDatabase; }; }; /** - * Contains response data for the listReadOnlyKeys operation. + * Contains response data for the beginCreateUpdateSqlContainer operation. */ -export type DatabaseAccountsListReadOnlyKeysResponse = DatabaseAccountListReadOnlyKeysResult & { +export type DatabaseAccountsBeginCreateUpdateSqlContainerResponse = SqlContainer & { /** * The underlying HTTP response. */ @@ -1307,21 +2588,38 @@ export type DatabaseAccountsListReadOnlyKeysResponse = DatabaseAccountListReadOn * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccountListReadOnlyKeysResult; + parsedBody: SqlContainer; }; }; /** - * Contains response data for the checkNameExists operation. + * Contains response data for the beginCreateUpdateMongoDBDatabase operation. */ -export type DatabaseAccountsCheckNameExistsResponse = { +export type DatabaseAccountsBeginCreateUpdateMongoDBDatabaseResponse = MongoDBDatabase & { /** - * The parsed response body. + * The underlying HTTP response. */ - body: boolean; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: MongoDBDatabase; + }; +}; + +/** + * Contains response data for the beginCreateUpdateMongoDBCollection operation. + */ +export type DatabaseAccountsBeginCreateUpdateMongoDBCollectionResponse = MongoDBCollection & { /** * The underlying HTTP response. */ @@ -1330,17 +2628,18 @@ export type DatabaseAccountsCheckNameExistsResponse = { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: boolean; + parsedBody: MongoDBCollection; }; }; /** - * Contains response data for the listMetrics operation. + * Contains response data for the beginCreateUpdateTable operation. */ -export type DatabaseAccountsListMetricsResponse = MetricListResult & { +export type DatabaseAccountsBeginCreateUpdateTableResponse = Table & { /** * The underlying HTTP response. */ @@ -1349,17 +2648,18 @@ export type DatabaseAccountsListMetricsResponse = MetricListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MetricListResult; + parsedBody: Table; }; }; /** - * Contains response data for the listUsages operation. + * Contains response data for the beginCreateUpdateCassandraKeyspace operation. */ -export type DatabaseAccountsListUsagesResponse = UsagesResult & { +export type DatabaseAccountsBeginCreateUpdateCassandraKeyspaceResponse = CassandraKeyspace & { /** * The underlying HTTP response. */ @@ -1368,17 +2668,18 @@ export type DatabaseAccountsListUsagesResponse = UsagesResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: UsagesResult; + parsedBody: CassandraKeyspace; }; }; /** - * Contains response data for the listMetricDefinitions operation. + * Contains response data for the beginCreateUpdateCassandraTable operation. */ -export type DatabaseAccountsListMetricDefinitionsResponse = MetricDefinitionsListResult & { +export type DatabaseAccountsBeginCreateUpdateCassandraTableResponse = CassandraTable & { /** * The underlying HTTP response. */ @@ -1387,17 +2688,18 @@ export type DatabaseAccountsListMetricDefinitionsResponse = MetricDefinitionsLis * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MetricDefinitionsListResult; + parsedBody: CassandraTable; }; }; /** - * Contains response data for the beginPatch operation. + * Contains response data for the beginCreateUpdateGremlinDatabase operation. */ -export type DatabaseAccountsBeginPatchResponse = DatabaseAccount & { +export type DatabaseAccountsBeginCreateUpdateGremlinDatabaseResponse = GremlinDatabase & { /** * The underlying HTTP response. */ @@ -1406,17 +2708,18 @@ export type DatabaseAccountsBeginPatchResponse = DatabaseAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccount; + parsedBody: GremlinDatabase; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the beginCreateUpdateGremlinGraph operation. */ -export type DatabaseAccountsBeginCreateOrUpdateResponse = DatabaseAccount & { +export type DatabaseAccountsBeginCreateUpdateGremlinGraphResponse = GremlinGraph & { /** * The underlying HTTP response. */ @@ -1425,10 +2728,11 @@ export type DatabaseAccountsBeginCreateOrUpdateResponse = DatabaseAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseAccount; + parsedBody: GremlinGraph; }; }; @@ -1444,6 +2748,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1463,6 +2768,7 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1482,6 +2788,7 @@ export type DatabaseListMetricsResponse = MetricListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1501,6 +2808,7 @@ export type DatabaseListUsagesResponse = UsagesResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1520,6 +2828,7 @@ export type DatabaseListMetricDefinitionsResponse = MetricDefinitionsListResult * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1539,6 +2848,7 @@ export type CollectionListMetricsResponse = MetricListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1558,6 +2868,7 @@ export type CollectionListUsagesResponse = UsagesResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1577,6 +2888,7 @@ export type CollectionListMetricDefinitionsResponse = MetricDefinitionsListResul * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1596,6 +2908,7 @@ export type CollectionRegionListMetricsResponse = MetricListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1615,6 +2928,7 @@ export type DatabaseAccountRegionListMetricsResponse = MetricListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1634,6 +2948,7 @@ export type PercentileSourceTargetListMetricsResponse = PercentileMetricListResu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1653,6 +2968,7 @@ export type PercentileTargetListMetricsResponse = PercentileMetricListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1672,6 +2988,7 @@ export type PercentileListMetricsResponse = PercentileMetricListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1691,6 +3008,7 @@ export type CollectionPartitionRegionListMetricsResponse = PartitionMetricListRe * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1710,6 +3028,7 @@ export type CollectionPartitionListMetricsResponse = PartitionMetricListResult & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1729,6 +3048,7 @@ export type CollectionPartitionListUsagesResponse = PartitionUsagesResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1748,6 +3068,7 @@ export type PartitionKeyRangeIdListMetricsResponse = PartitionMetricListResult & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1767,6 +3088,7 @@ export type PartitionKeyRangeIdRegionListMetricsResponse = PartitionMetricListRe * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts index be398210e186..9ae39d547034 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -201,7 +199,6 @@ export const Resource: msRest.CompositeMapper = { } }, location: { - required: true, serializedName: "location", type: { name: "String" @@ -357,20 +354,46 @@ export const DatabaseAccount: msRest.CompositeMapper = { } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", +export const SqlDatabase: msRest.CompositeMapper = { + serializedName: "SqlDatabase", type: { name: "Composite", - className: "ErrorResponse", + className: "SqlDatabase", modelProperties: { - code: { - serializedName: "code", + ...Resource.type.modelProperties, + sqlDatabaseId: { + required: true, + serializedName: "properties.id", type: { name: "String" } }, - message: { - serializedName: "message", + _rid: { + serializedName: "properties._rid", + type: { + name: "String" + } + }, + _ts: { + serializedName: "properties._ts", + type: { + name: "Object" + } + }, + _etag: { + serializedName: "properties._etag", + type: { + name: "String" + } + }, + _colls: { + serializedName: "properties._colls", + type: { + name: "String" + } + }, + _users: { + serializedName: "properties._users", type: { name: "String" } @@ -379,21 +402,56 @@ export const ErrorResponse: msRest.CompositeMapper = { } }; -export const FailoverPolicies: msRest.CompositeMapper = { - serializedName: "FailoverPolicies", +export const Indexes: msRest.CompositeMapper = { + serializedName: "Indexes", type: { name: "Composite", - className: "FailoverPolicies", + className: "Indexes", modelProperties: { - failoverPolicies: { - required: true, - serializedName: "failoverPolicies", + dataType: { + serializedName: "dataType", + defaultValue: 'String', + type: { + name: "String" + } + }, + precision: { + serializedName: "precision", + type: { + name: "Number" + } + }, + kind: { + serializedName: "kind", + defaultValue: 'Hash', + type: { + name: "String" + } + } + } + } +}; + +export const IncludedPath: msRest.CompositeMapper = { + serializedName: "IncludedPath", + type: { + name: "Composite", + className: "IncludedPath", + modelProperties: { + path: { + serializedName: "path", + type: { + name: "String" + } + }, + indexes: { + serializedName: "indexes", type: { name: "Sequence", element: { type: { name: "Composite", - className: "FailoverPolicy" + className: "Indexes" } } } @@ -402,15 +460,14 @@ export const FailoverPolicies: msRest.CompositeMapper = { } }; -export const RegionForOnlineOffline: msRest.CompositeMapper = { - serializedName: "RegionForOnlineOffline", +export const ExcludedPath: msRest.CompositeMapper = { + serializedName: "ExcludedPath", type: { name: "Composite", - className: "RegionForOnlineOffline", + className: "ExcludedPath", modelProperties: { - region: { - required: true, - serializedName: "region", + path: { + serializedName: "path", type: { name: "String" } @@ -419,109 +476,257 @@ export const RegionForOnlineOffline: msRest.CompositeMapper = { } }; -export const DatabaseAccountCreateUpdateParameters: msRest.CompositeMapper = { - serializedName: "DatabaseAccountCreateUpdateParameters", +export const IndexingPolicy: msRest.CompositeMapper = { + serializedName: "IndexingPolicy", type: { name: "Composite", - className: "DatabaseAccountCreateUpdateParameters", + className: "IndexingPolicy", modelProperties: { - ...Resource.type.modelProperties, - kind: { - serializedName: "kind", - defaultValue: 'GlobalDocumentDB', + automatic: { + serializedName: "automatic", type: { - name: "String" + name: "Boolean" } }, - consistencyPolicy: { - serializedName: "properties.consistencyPolicy", + indexingMode: { + serializedName: "indexingMode", + defaultValue: 'Consistent', type: { - name: "Composite", - className: "ConsistencyPolicy" + name: "String" } }, - locations: { - required: true, - serializedName: "properties.locations", + includedPaths: { + serializedName: "includedPaths", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Location" + className: "IncludedPath" } } } }, - databaseAccountOfferType: { - required: true, - isConstant: true, - serializedName: "properties.databaseAccountOfferType", - defaultValue: 'Standard', - type: { - name: "String" - } - }, - ipRangeFilter: { - serializedName: "properties.ipRangeFilter", + excludedPaths: { + serializedName: "excludedPaths", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExcludedPath" + } + } } - }, - isVirtualNetworkFilterEnabled: { - serializedName: "properties.isVirtualNetworkFilterEnabled", + } + } + } +}; + +export const ContainerPartitionKey: msRest.CompositeMapper = { + serializedName: "ContainerPartitionKey", + type: { + name: "Composite", + className: "ContainerPartitionKey", + modelProperties: { + paths: { + serializedName: "paths", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - enableAutomaticFailover: { - serializedName: "properties.enableAutomaticFailover", + kind: { + serializedName: "kind", + defaultValue: 'Hash', type: { - name: "Boolean" + name: "String" } - }, - capabilities: { - serializedName: "properties.capabilities", + } + } + } +}; + +export const UniqueKey: msRest.CompositeMapper = { + serializedName: "UniqueKey", + type: { + name: "Composite", + className: "UniqueKey", + modelProperties: { + paths: { + serializedName: "paths", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Capability" + name: "String" } } } - }, - virtualNetworkRules: { - serializedName: "properties.virtualNetworkRules", + } + } + } +}; + +export const UniqueKeyPolicy: msRest.CompositeMapper = { + serializedName: "UniqueKeyPolicy", + type: { + name: "Composite", + className: "UniqueKeyPolicy", + modelProperties: { + uniqueKeys: { + serializedName: "uniqueKeys", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualNetworkRule" + className: "UniqueKey" } } } + } + } + } +}; + +export const ConflictResolutionPolicy: msRest.CompositeMapper = { + serializedName: "ConflictResolutionPolicy", + type: { + name: "Composite", + className: "ConflictResolutionPolicy", + modelProperties: { + mode: { + serializedName: "mode", + defaultValue: 'LastWriterWins', + type: { + name: "String" + } }, - enableMultipleWriteLocations: { - serializedName: "properties.enableMultipleWriteLocations", + conflictResolutionPath: { + serializedName: "conflictResolutionPath", type: { - name: "Boolean" + name: "String" + } + }, + conflictResolutionProcedure: { + serializedName: "conflictResolutionProcedure", + type: { + name: "String" } } } } }; -export const DatabaseAccountPatchParameters: msRest.CompositeMapper = { - serializedName: "DatabaseAccountPatchParameters", +export const SqlContainer: msRest.CompositeMapper = { + serializedName: "SqlContainer", type: { name: "Composite", - className: "DatabaseAccountPatchParameters", + className: "SqlContainer", modelProperties: { - tags: { - serializedName: "tags", + ...Resource.type.modelProperties, + sqlContainerId: { + required: true, + serializedName: "properties.id", + type: { + name: "String" + } + }, + indexingPolicy: { + serializedName: "properties.indexingPolicy", + type: { + name: "Composite", + className: "IndexingPolicy" + } + }, + partitionKey: { + serializedName: "properties.partitionKey", + type: { + name: "Composite", + className: "ContainerPartitionKey" + } + }, + defaultTtl: { + serializedName: "properties.defaultTtl", + type: { + name: "Number" + } + }, + uniqueKeyPolicy: { + serializedName: "properties.uniqueKeyPolicy", + type: { + name: "Composite", + className: "UniqueKeyPolicy" + } + }, + conflictResolutionPolicy: { + serializedName: "properties.conflictResolutionPolicy", + type: { + name: "Composite", + className: "ConflictResolutionPolicy" + } + }, + _rid: { + serializedName: "properties._rid", + type: { + name: "String" + } + }, + _ts: { + serializedName: "properties._ts", + type: { + name: "Object" + } + }, + _etag: { + serializedName: "properties._etag", + type: { + name: "String" + } + } + } + } +}; + +export const MongoDBDatabase: msRest.CompositeMapper = { + serializedName: "MongoDBDatabase", + type: { + name: "Composite", + className: "MongoDBDatabase", + modelProperties: { + ...Resource.type.modelProperties, + mongoDBDatabaseId: { + required: true, + serializedName: "properties.id", + type: { + name: "String" + } + } + } + } +}; + +export const MongoDBCollection: msRest.CompositeMapper = { + serializedName: "MongoDBCollection", + type: { + name: "Composite", + className: "MongoDBCollection", + modelProperties: { + ...Resource.type.modelProperties, + mongoDBCollectionId: { + required: true, + serializedName: "properties.id", + type: { + name: "String" + } + }, + shardKey: { + serializedName: "properties.shardKey", type: { name: "Dictionary", value: { @@ -531,14 +736,14 @@ export const DatabaseAccountPatchParameters: msRest.CompositeMapper = { } } }, - capabilities: { - serializedName: "properties.capabilities", + indexes: { + serializedName: "properties.indexes", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Capability" + className: "MongoIndex" } } } @@ -547,125 +752,1216 @@ export const DatabaseAccountPatchParameters: msRest.CompositeMapper = { } }; -export const DatabaseAccountListReadOnlyKeysResult: msRest.CompositeMapper = { - serializedName: "DatabaseAccountListReadOnlyKeysResult", +export const Table: msRest.CompositeMapper = { + serializedName: "Table", type: { name: "Composite", - className: "DatabaseAccountListReadOnlyKeysResult", + className: "Table", modelProperties: { - primaryReadonlyMasterKey: { - readOnly: true, - serializedName: "primaryReadonlyMasterKey", + ...Resource.type.modelProperties, + tableId: { + required: true, + serializedName: "properties.id", type: { name: "String" } - }, - secondaryReadonlyMasterKey: { - readOnly: true, - serializedName: "secondaryReadonlyMasterKey", - type: { - name: "String" + } + } + } +}; + +export const CassandraKeyspace: msRest.CompositeMapper = { + serializedName: "CassandraKeyspace", + type: { + name: "Composite", + className: "CassandraKeyspace", + modelProperties: { + ...Resource.type.modelProperties, + cassandraKeyspaceId: { + required: true, + serializedName: "properties.id", + type: { + name: "String" + } + } + } + } +}; + +export const CassandraTable: msRest.CompositeMapper = { + serializedName: "CassandraTable", + type: { + name: "Composite", + className: "CassandraTable", + modelProperties: { + ...Resource.type.modelProperties, + cassandraTableId: { + required: true, + serializedName: "properties.id", + type: { + name: "String" + } + }, + defaultTtl: { + serializedName: "properties.defaultTtl", + type: { + name: "Number" + } + }, + schema: { + serializedName: "properties.schema", + type: { + name: "Composite", + className: "CassandraSchema" + } + } + } + } +}; + +export const GremlinDatabase: msRest.CompositeMapper = { + serializedName: "GremlinDatabase", + type: { + name: "Composite", + className: "GremlinDatabase", + modelProperties: { + ...Resource.type.modelProperties, + gremlinDatabaseId: { + required: true, + serializedName: "properties.id", + type: { + name: "String" + } + }, + _rid: { + serializedName: "properties._rid", + type: { + name: "String" + } + }, + _ts: { + serializedName: "properties._ts", + type: { + name: "Object" + } + }, + _etag: { + serializedName: "properties._etag", + type: { + name: "String" + } + } + } + } +}; + +export const GremlinGraph: msRest.CompositeMapper = { + serializedName: "GremlinGraph", + type: { + name: "Composite", + className: "GremlinGraph", + modelProperties: { + ...Resource.type.modelProperties, + gremlinGraphId: { + required: true, + serializedName: "properties.id", + type: { + name: "String" + } + }, + indexingPolicy: { + serializedName: "properties.indexingPolicy", + type: { + name: "Composite", + className: "IndexingPolicy" + } + }, + partitionKey: { + serializedName: "properties.partitionKey", + type: { + name: "Composite", + className: "ContainerPartitionKey" + } + }, + defaultTtl: { + serializedName: "properties.defaultTtl", + type: { + name: "Number" + } + }, + uniqueKeyPolicy: { + serializedName: "properties.uniqueKeyPolicy", + type: { + name: "Composite", + className: "UniqueKeyPolicy" + } + }, + conflictResolutionPolicy: { + serializedName: "properties.conflictResolutionPolicy", + type: { + name: "Composite", + className: "ConflictResolutionPolicy" + } + }, + _rid: { + serializedName: "properties._rid", + type: { + name: "String" + } + }, + _ts: { + serializedName: "properties._ts", + type: { + name: "Object" + } + }, + _etag: { + serializedName: "properties._etag", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const FailoverPolicies: msRest.CompositeMapper = { + serializedName: "FailoverPolicies", + type: { + name: "Composite", + className: "FailoverPolicies", + modelProperties: { + failoverPolicies: { + required: true, + serializedName: "failoverPolicies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FailoverPolicy" + } + } + } + } + } + } +}; + +export const RegionForOnlineOffline: msRest.CompositeMapper = { + serializedName: "RegionForOnlineOffline", + type: { + name: "Composite", + className: "RegionForOnlineOffline", + modelProperties: { + region: { + required: true, + serializedName: "region", + type: { + name: "String" + } + } + } + } +}; + +export const ExtendedResourceProperties: msRest.CompositeMapper = { + serializedName: "ExtendedResourceProperties", + type: { + name: "Composite", + className: "ExtendedResourceProperties", + modelProperties: { + _rid: { + serializedName: "_rid", + type: { + name: "String" + } + }, + _ts: { + serializedName: "_ts", + type: { + name: "Object" + } + }, + _etag: { + serializedName: "_etag", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseAccountCreateUpdateParameters: msRest.CompositeMapper = { + serializedName: "DatabaseAccountCreateUpdateParameters", + type: { + name: "Composite", + className: "DatabaseAccountCreateUpdateParameters", + modelProperties: { + ...Resource.type.modelProperties, + kind: { + serializedName: "kind", + defaultValue: 'GlobalDocumentDB', + type: { + name: "String" + } + }, + consistencyPolicy: { + serializedName: "properties.consistencyPolicy", + type: { + name: "Composite", + className: "ConsistencyPolicy" + } + }, + locations: { + required: true, + serializedName: "properties.locations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Location" + } + } + } + }, + databaseAccountOfferType: { + required: true, + isConstant: true, + serializedName: "properties.databaseAccountOfferType", + defaultValue: 'Standard', + type: { + name: "String" + } + }, + ipRangeFilter: { + serializedName: "properties.ipRangeFilter", + type: { + name: "String" + } + }, + isVirtualNetworkFilterEnabled: { + serializedName: "properties.isVirtualNetworkFilterEnabled", + type: { + name: "Boolean" + } + }, + enableAutomaticFailover: { + serializedName: "properties.enableAutomaticFailover", + type: { + name: "Boolean" + } + }, + capabilities: { + serializedName: "properties.capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Capability" + } + } + } + }, + virtualNetworkRules: { + serializedName: "properties.virtualNetworkRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkRule" + } + } + } + }, + enableMultipleWriteLocations: { + serializedName: "properties.enableMultipleWriteLocations", + type: { + name: "Boolean" + } + } + } + } +}; + +export const DatabaseAccountPatchParameters: msRest.CompositeMapper = { + serializedName: "DatabaseAccountPatchParameters", + type: { + name: "Composite", + className: "DatabaseAccountPatchParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + capabilities: { + serializedName: "properties.capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Capability" + } + } + } + } + } + } +}; + +export const DatabaseAccountListReadOnlyKeysResult: msRest.CompositeMapper = { + serializedName: "DatabaseAccountListReadOnlyKeysResult", + type: { + name: "Composite", + className: "DatabaseAccountListReadOnlyKeysResult", + modelProperties: { + primaryReadonlyMasterKey: { + readOnly: true, + serializedName: "primaryReadonlyMasterKey", + type: { + name: "String" + } + }, + secondaryReadonlyMasterKey: { + readOnly: true, + serializedName: "secondaryReadonlyMasterKey", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseAccountListKeysResult: msRest.CompositeMapper = { + serializedName: "DatabaseAccountListKeysResult", + type: { + name: "Composite", + className: "DatabaseAccountListKeysResult", + modelProperties: { + primaryMasterKey: { + readOnly: true, + serializedName: "primaryMasterKey", + type: { + name: "String" + } + }, + secondaryMasterKey: { + readOnly: true, + serializedName: "secondaryMasterKey", + type: { + name: "String" + } + }, + primaryReadonlyMasterKey: { + readOnly: true, + serializedName: "properties.primaryReadonlyMasterKey", + type: { + name: "String" + } + }, + secondaryReadonlyMasterKey: { + readOnly: true, + serializedName: "properties.secondaryReadonlyMasterKey", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseAccountConnectionString: msRest.CompositeMapper = { + serializedName: "DatabaseAccountConnectionString", + type: { + name: "Composite", + className: "DatabaseAccountConnectionString", + modelProperties: { + connectionString: { + readOnly: true, + serializedName: "connectionString", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseAccountListConnectionStringsResult: msRest.CompositeMapper = { + serializedName: "DatabaseAccountListConnectionStringsResult", + type: { + name: "Composite", + className: "DatabaseAccountListConnectionStringsResult", + modelProperties: { + connectionStrings: { + serializedName: "connectionStrings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseAccountConnectionString" + } + } + } + } + } + } +}; + +export const DatabaseAccountRegenerateKeyParameters: msRest.CompositeMapper = { + serializedName: "DatabaseAccountRegenerateKeyParameters", + type: { + name: "Composite", + className: "DatabaseAccountRegenerateKeyParameters", + modelProperties: { + keyKind: { + required: true, + serializedName: "keyKind", + type: { + name: "String" + } + } + } + } +}; + +export const SqlDatabaseResource: msRest.CompositeMapper = { + serializedName: "SqlDatabaseResource", + type: { + name: "Composite", + className: "SqlDatabaseResource", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const SqlDatabaseCreateUpdateParameters: msRest.CompositeMapper = { + serializedName: "SqlDatabaseCreateUpdateParameters", + type: { + name: "Composite", + className: "SqlDatabaseCreateUpdateParameters", + modelProperties: { + resource: { + required: true, + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlDatabaseResource" + } + }, + options: { + required: true, + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SqlContainerResource: msRest.CompositeMapper = { + serializedName: "SqlContainerResource", + type: { + name: "Composite", + className: "SqlContainerResource", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + indexingPolicy: { + serializedName: "indexingPolicy", + type: { + name: "Composite", + className: "IndexingPolicy" + } + }, + partitionKey: { + serializedName: "partitionKey", + type: { + name: "Composite", + className: "ContainerPartitionKey" + } + }, + defaultTtl: { + serializedName: "defaultTtl", + type: { + name: "Number" + } + }, + uniqueKeyPolicy: { + serializedName: "uniqueKeyPolicy", + type: { + name: "Composite", + className: "UniqueKeyPolicy" + } + }, + conflictResolutionPolicy: { + serializedName: "conflictResolutionPolicy", + type: { + name: "Composite", + className: "ConflictResolutionPolicy" + } + } + } + } +}; + +export const SqlContainerCreateUpdateParameters: msRest.CompositeMapper = { + serializedName: "SqlContainerCreateUpdateParameters", + type: { + name: "Composite", + className: "SqlContainerCreateUpdateParameters", + modelProperties: { + resource: { + required: true, + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlContainerResource" + } + }, + options: { + required: true, + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MongoDBDatabaseResource: msRest.CompositeMapper = { + serializedName: "MongoDBDatabaseResource", + type: { + name: "Composite", + className: "MongoDBDatabaseResource", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const MongoDBDatabaseCreateUpdateParameters: msRest.CompositeMapper = { + serializedName: "MongoDBDatabaseCreateUpdateParameters", + type: { + name: "Composite", + className: "MongoDBDatabaseCreateUpdateParameters", + modelProperties: { + resource: { + required: true, + serializedName: "properties.resource", + type: { + name: "Composite", + className: "MongoDBDatabaseResource" + } + }, + options: { + required: true, + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MongoIndexKeys: msRest.CompositeMapper = { + serializedName: "MongoIndexKeys", + type: { + name: "Composite", + className: "MongoIndexKeys", + modelProperties: { + keys: { + serializedName: "keys", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MongoIndexOptions: msRest.CompositeMapper = { + serializedName: "MongoIndexOptions", + type: { + name: "Composite", + className: "MongoIndexOptions", + modelProperties: { + expireAfterSeconds: { + serializedName: "expireAfterSeconds", + type: { + name: "Number" + } + }, + unique: { + serializedName: "unique", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MongoIndex: msRest.CompositeMapper = { + serializedName: "MongoIndex", + type: { + name: "Composite", + className: "MongoIndex", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "Composite", + className: "MongoIndexKeys" + } + }, + options: { + serializedName: "options", + type: { + name: "Composite", + className: "MongoIndexOptions" + } + } + } + } +}; + +export const MongoDBCollectionResource: msRest.CompositeMapper = { + serializedName: "MongoDBCollectionResource", + type: { + name: "Composite", + className: "MongoDBCollectionResource", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + shardKey: { + serializedName: "shardKey", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + indexes: { + serializedName: "indexes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MongoIndex" + } + } + } + } + } + } +}; + +export const MongoDBCollectionCreateUpdateParameters: msRest.CompositeMapper = { + serializedName: "MongoDBCollectionCreateUpdateParameters", + type: { + name: "Composite", + className: "MongoDBCollectionCreateUpdateParameters", + modelProperties: { + resource: { + required: true, + serializedName: "properties.resource", + type: { + name: "Composite", + className: "MongoDBCollectionResource" + } + }, + options: { + required: true, + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TableResource: msRest.CompositeMapper = { + serializedName: "TableResource", + type: { + name: "Composite", + className: "TableResource", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const TableCreateUpdateParameters: msRest.CompositeMapper = { + serializedName: "TableCreateUpdateParameters", + type: { + name: "Composite", + className: "TableCreateUpdateParameters", + modelProperties: { + resource: { + required: true, + serializedName: "properties.resource", + type: { + name: "Composite", + className: "TableResource" + } + }, + options: { + required: true, + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CassandraKeyspaceResource: msRest.CompositeMapper = { + serializedName: "CassandraKeyspaceResource", + type: { + name: "Composite", + className: "CassandraKeyspaceResource", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const CassandraKeyspaceCreateUpdateParameters: msRest.CompositeMapper = { + serializedName: "CassandraKeyspaceCreateUpdateParameters", + type: { + name: "Composite", + className: "CassandraKeyspaceCreateUpdateParameters", + modelProperties: { + resource: { + required: true, + serializedName: "properties.resource", + type: { + name: "Composite", + className: "CassandraKeyspaceResource" + } + }, + options: { + required: true, + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Column: msRest.CompositeMapper = { + serializedName: "Column", + type: { + name: "Composite", + className: "Column", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const CassandraPartitionKey: msRest.CompositeMapper = { + serializedName: "CassandraPartitionKey", + type: { + name: "Composite", + className: "CassandraPartitionKey", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterKey: msRest.CompositeMapper = { + serializedName: "ClusterKey", + type: { + name: "Composite", + className: "ClusterKey", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + orderBy: { + serializedName: "orderBy", + type: { + name: "String" + } + } + } + } +}; + +export const CassandraSchema: msRest.CompositeMapper = { + serializedName: "CassandraSchema", + type: { + name: "Composite", + className: "CassandraSchema", + modelProperties: { + columns: { + serializedName: "columns", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Column" + } + } + } + }, + partitionKeys: { + serializedName: "partitionKeys", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CassandraPartitionKey" + } + } + } + }, + clusterKeys: { + serializedName: "clusterKeys", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterKey" + } + } + } + } + } + } +}; + +export const CassandraTableResource: msRest.CompositeMapper = { + serializedName: "CassandraTableResource", + type: { + name: "Composite", + className: "CassandraTableResource", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + defaultTtl: { + serializedName: "defaultTtl", + type: { + name: "Number" + } + }, + schema: { + serializedName: "schema", + type: { + name: "Composite", + className: "CassandraSchema" + } + } + } + } +}; + +export const CassandraTableCreateUpdateParameters: msRest.CompositeMapper = { + serializedName: "CassandraTableCreateUpdateParameters", + type: { + name: "Composite", + className: "CassandraTableCreateUpdateParameters", + modelProperties: { + resource: { + required: true, + serializedName: "properties.resource", + type: { + name: "Composite", + className: "CassandraTableResource" + } + }, + options: { + required: true, + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const GremlinDatabaseResource: msRest.CompositeMapper = { + serializedName: "GremlinDatabaseResource", + type: { + name: "Composite", + className: "GremlinDatabaseResource", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const GremlinDatabaseCreateUpdateParameters: msRest.CompositeMapper = { + serializedName: "GremlinDatabaseCreateUpdateParameters", + type: { + name: "Composite", + className: "GremlinDatabaseCreateUpdateParameters", + modelProperties: { + resource: { + required: true, + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GremlinDatabaseResource" + } + }, + options: { + required: true, + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } } } } } }; -export const DatabaseAccountListKeysResult: msRest.CompositeMapper = { - serializedName: "DatabaseAccountListKeysResult", +export const GremlinGraphResource: msRest.CompositeMapper = { + serializedName: "GremlinGraphResource", type: { name: "Composite", - className: "DatabaseAccountListKeysResult", + className: "GremlinGraphResource", modelProperties: { - primaryMasterKey: { - readOnly: true, - serializedName: "primaryMasterKey", + id: { + required: true, + serializedName: "id", type: { name: "String" } }, - secondaryMasterKey: { - readOnly: true, - serializedName: "secondaryMasterKey", + indexingPolicy: { + serializedName: "indexingPolicy", type: { - name: "String" + name: "Composite", + className: "IndexingPolicy" } }, - primaryReadonlyMasterKey: { - readOnly: true, - serializedName: "properties.primaryReadonlyMasterKey", + partitionKey: { + serializedName: "partitionKey", type: { - name: "String" + name: "Composite", + className: "ContainerPartitionKey" } }, - secondaryReadonlyMasterKey: { - readOnly: true, - serializedName: "properties.secondaryReadonlyMasterKey", + defaultTtl: { + serializedName: "defaultTtl", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const DatabaseAccountConnectionString: msRest.CompositeMapper = { - serializedName: "DatabaseAccountConnectionString", - type: { - name: "Composite", - className: "DatabaseAccountConnectionString", - modelProperties: { - connectionString: { - readOnly: true, - serializedName: "connectionString", + }, + uniqueKeyPolicy: { + serializedName: "uniqueKeyPolicy", type: { - name: "String" + name: "Composite", + className: "UniqueKeyPolicy" } }, - description: { - readOnly: true, - serializedName: "description", + conflictResolutionPolicy: { + serializedName: "conflictResolutionPolicy", type: { - name: "String" + name: "Composite", + className: "ConflictResolutionPolicy" } } } } }; -export const DatabaseAccountListConnectionStringsResult: msRest.CompositeMapper = { - serializedName: "DatabaseAccountListConnectionStringsResult", +export const GremlinGraphCreateUpdateParameters: msRest.CompositeMapper = { + serializedName: "GremlinGraphCreateUpdateParameters", type: { name: "Composite", - className: "DatabaseAccountListConnectionStringsResult", + className: "GremlinGraphCreateUpdateParameters", modelProperties: { - connectionStrings: { - serializedName: "connectionStrings", + resource: { + required: true, + serializedName: "properties.resource", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DatabaseAccountConnectionString" - } - } + name: "Composite", + className: "GremlinGraphResource" } - } - } - } -}; - -export const DatabaseAccountRegenerateKeyParameters: msRest.CompositeMapper = { - serializedName: "DatabaseAccountRegenerateKeyParameters", - type: { - name: "Composite", - className: "DatabaseAccountRegenerateKeyParameters", - modelProperties: { - keyKind: { + }, + options: { required: true, - serializedName: "keyKind", + serializedName: "properties.options", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } } } @@ -1243,6 +2539,213 @@ export const MetricDefinitionsListResult: msRest.CompositeMapper = { } }; +export const SqlDatabaseListResult: msRest.CompositeMapper = { + serializedName: "SqlDatabaseListResult", + type: { + name: "Composite", + className: "SqlDatabaseListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlDatabase" + } + } + } + } + } + } +}; + +export const SqlContainerListResult: msRest.CompositeMapper = { + serializedName: "SqlContainerListResult", + type: { + name: "Composite", + className: "SqlContainerListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlContainer" + } + } + } + } + } + } +}; + +export const MongoDBDatabaseListResult: msRest.CompositeMapper = { + serializedName: "MongoDBDatabaseListResult", + type: { + name: "Composite", + className: "MongoDBDatabaseListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MongoDBDatabase" + } + } + } + } + } + } +}; + +export const MongoDBCollectionListResult: msRest.CompositeMapper = { + serializedName: "MongoDBCollectionListResult", + type: { + name: "Composite", + className: "MongoDBCollectionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MongoDBCollection" + } + } + } + } + } + } +}; + +export const TableListResult: msRest.CompositeMapper = { + serializedName: "TableListResult", + type: { + name: "Composite", + className: "TableListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Table" + } + } + } + } + } + } +}; + +export const CassandraKeyspaceListResult: msRest.CompositeMapper = { + serializedName: "CassandraKeyspaceListResult", + type: { + name: "Composite", + className: "CassandraKeyspaceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CassandraKeyspace" + } + } + } + } + } + } +}; + +export const CassandraTableListResult: msRest.CompositeMapper = { + serializedName: "CassandraTableListResult", + type: { + name: "Composite", + className: "CassandraTableListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CassandraTable" + } + } + } + } + } + } +}; + +export const GremlinDatabaseListResult: msRest.CompositeMapper = { + serializedName: "GremlinDatabaseListResult", + type: { + name: "Composite", + className: "GremlinDatabaseListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GremlinDatabase" + } + } + } + } + } + } +}; + +export const GremlinGraphListResult: msRest.CompositeMapper = { + serializedName: "GremlinGraphListResult", + type: { + name: "Composite", + className: "GremlinGraphListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GremlinGraph" + } + } + } + } + } + } +}; + export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/operationsMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/operationsMappers.ts index 2edcc577920e..689688180be7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/operationsMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/operationsMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + CloudError, Operation, OperationDisplay, - CloudError + OperationListResult } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts index 43bb72b48f40..178e0ec47263 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts @@ -44,6 +44,16 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const collectionName: msRest.OperationURLParameter = { + parameterPath: "collectionName", + mapper: { + required: true, + serializedName: "collectionName", + type: { + name: "String" + } + } +}; export const collectionRid: msRest.OperationURLParameter = { parameterPath: "collectionRid", mapper: { @@ -54,6 +64,26 @@ export const collectionRid: msRest.OperationURLParameter = { } } }; +export const containerName: msRest.OperationURLParameter = { + parameterPath: "containerName", + mapper: { + required: true, + serializedName: "containerName", + type: { + name: "String" + } + } +}; +export const databaseName: msRest.OperationURLParameter = { + parameterPath: "databaseName", + mapper: { + required: true, + serializedName: "databaseName", + type: { + name: "String" + } + } +}; export const databaseRid: msRest.OperationURLParameter = { parameterPath: "databaseRid", mapper: { @@ -86,6 +116,26 @@ export const filter1: msRest.OperationQueryParameter = { } } }; +export const graphName: msRest.OperationURLParameter = { + parameterPath: "graphName", + mapper: { + required: true, + serializedName: "graphName", + type: { + name: "String" + } + } +}; +export const keyspaceName: msRest.OperationURLParameter = { + parameterPath: "keyspaceName", + mapper: { + required: true, + serializedName: "keyspaceName", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -152,6 +202,16 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; +export const tableName: msRest.OperationURLParameter = { + parameterPath: "tableName", + mapper: { + required: true, + serializedName: "tableName", + type: { + name: "String" + } + } +}; export const targetRegion: msRest.OperationURLParameter = { parameterPath: "targetRegion", mapper: { diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/partitionKeyRangeIdMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/partitionKeyRangeIdMappers.ts index a0b31db71d0f..c901f39fec5e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/partitionKeyRangeIdMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/partitionKeyRangeIdMappers.ts @@ -1,20 +1,17 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - PartitionMetricListResult, - PartitionMetric, + CloudError, Metric, MetricName, MetricValue, - CloudError, + PartitionMetric, + PartitionMetricListResult, PercentileMetricValue } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/partitionKeyRangeIdRegionMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/partitionKeyRangeIdRegionMappers.ts index a0b31db71d0f..c901f39fec5e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/partitionKeyRangeIdRegionMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/partitionKeyRangeIdRegionMappers.ts @@ -1,20 +1,17 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - PartitionMetricListResult, - PartitionMetric, + CloudError, Metric, MetricName, MetricValue, - CloudError, + PartitionMetric, + PartitionMetricListResult, PercentileMetricValue } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/percentileMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/percentileMappers.ts index 9399a370caff..969936d1541a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/percentileMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/percentileMappers.ts @@ -1,19 +1,16 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - PercentileMetricListResult, - PercentileMetric, + CloudError, MetricName, - PercentileMetricValue, MetricValue, - CloudError + PercentileMetric, + PercentileMetricListResult, + PercentileMetricValue } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/percentileSourceTargetMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/percentileSourceTargetMappers.ts index 9399a370caff..969936d1541a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/percentileSourceTargetMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/percentileSourceTargetMappers.ts @@ -1,19 +1,16 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - PercentileMetricListResult, - PercentileMetric, + CloudError, MetricName, - PercentileMetricValue, MetricValue, - CloudError + PercentileMetric, + PercentileMetricListResult, + PercentileMetricValue } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/percentileTargetMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/percentileTargetMappers.ts index 9399a370caff..969936d1541a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/percentileTargetMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/percentileTargetMappers.ts @@ -1,19 +1,16 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - PercentileMetricListResult, - PercentileMetric, + CloudError, MetricName, - PercentileMetricValue, MetricValue, - CloudError + PercentileMetric, + PercentileMetricListResult, + PercentileMetricValue } from "../models/mappers"; - diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts index 0422c89def77..1171fd01e545 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/collection.ts @@ -118,7 +118,7 @@ export class Collection { } /** - * Retrieves metric defintions for the given collection. + * Retrieves metric definitions for the given collection. * @param resourceGroupName Name of an Azure resource group. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts index 72e78748a348..067e391c72cd 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/database.ts @@ -110,7 +110,7 @@ export class Database { } /** - * Retrieves metric defintions for the given database. + * Retrieves metric definitions for the given database. * @param resourceGroupName Name of an Azure resource group. * @param accountName Cosmos DB database account name. * @param databaseRid Cosmos DB database rid. diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts index 50b579fdd470..910cf42e9fc9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts @@ -436,7 +436,7 @@ export class DatabaseAccounts { } /** - * Retrieves metric defintions for the given database account. + * Retrieves metric definitions for the given database account. * @param resourceGroupName Name of an Azure resource group. * @param accountName Cosmos DB database account name. * @param [options] The optional parameters @@ -468,152 +468,2378 @@ export class DatabaseAccounts { } /** - * Patches the properties of an existing Azure Cosmos DB database account. + * Lists the SQL databases under an existing Azure Cosmos DB database account. * @param resourceGroupName Name of an Azure resource group. * @param accountName Cosmos DB database account name. - * @param updateParameters The tags parameter to patch for the current database account. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - beginPatch(resourceGroupName: string, accountName: string, updateParameters: Models.DatabaseAccountPatchParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + listSqlDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param callback The callback + */ + listSqlDatabases(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param options The optional parameters + * @param callback The callback + */ + listSqlDatabases(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSqlDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( { resourceGroupName, accountName, - updateParameters, options }, - beginPatchOperationSpec, - options); + listSqlDatabasesOperationSpec, + callback) as Promise; } /** - * Creates or updates an Azure Cosmos DB database account. + * Gets the SQL databases under an existing Azure Cosmos DB database account with the provided + * name. * @param resourceGroupName Name of an Azure resource group. * @param accountName Cosmos DB database account name. - * @param createUpdateParameters The parameters to provide for the current database account. + * @param databaseName Cosmos DB database name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - beginCreateOrUpdate(resourceGroupName: string, accountName: string, createUpdateParameters: Models.DatabaseAccountCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + getSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param callback The callback + */ + getSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param options The optional parameters + * @param callback The callback + */ + getSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( { resourceGroupName, accountName, - createUpdateParameters, + databaseName, options }, - beginCreateOrUpdateOperationSpec, - options); + getSqlDatabaseOperationSpec, + callback) as Promise; } /** - * Deletes an existing Azure Cosmos DB database account. + * Create or update an Azure Cosmos DB SQL database * @param resourceGroupName Name of an Azure resource group. * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param createUpdateSqlDatabaseParameters The parameters to provide for the current SQL database. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - beginDeleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + createUpdateSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, createUpdateSqlDatabaseParameters: Models.SqlDatabaseCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdateSqlDatabase(resourceGroupName,accountName,databaseName,createUpdateSqlDatabaseParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Azure Cosmos DB SQL database. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteSqlDatabase(resourceGroupName,accountName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists the SQL container under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + listSqlContainers(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param callback The callback + */ + listSqlContainers(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param options The optional parameters + * @param callback The callback + */ + listSqlContainers(resourceGroupName: string, accountName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSqlContainers(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( { resourceGroupName, accountName, + databaseName, options }, - beginDeleteMethodOperationSpec, - options); + listSqlContainersOperationSpec, + callback) as Promise; } /** - * Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 - * indicates a write region. The maximum value for a failover priority = (total number of regions - - * 1). Failover priority values must be unique for each of the regions in which the database - * account exists. + * Gets the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName Name of an Azure resource group. * @param accountName Cosmos DB database account name. - * @param failoverParameters The new failover policies for the database account. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - beginFailoverPriorityChange(resourceGroupName: string, accountName: string, failoverParameters: Models.FailoverPolicies, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + getSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param callback The callback + */ + getSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param options The optional parameters + * @param callback The callback + */ + getSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( { resourceGroupName, accountName, - failoverParameters, + databaseName, + containerName, options }, - beginFailoverPriorityChangeOperationSpec, - options); + getSqlContainerOperationSpec, + callback) as Promise; } /** - * Offline the specified region for the specified Azure Cosmos DB database account. + * Create or update an Azure Cosmos DB SQL container * @param resourceGroupName Name of an Azure resource group. * @param accountName Cosmos DB database account name. - * @param regionParameterForOffline Cosmos DB region to offline for the database account. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param createUpdateSqlContainerParameters The parameters to provide for the current SQL + * container. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - beginOfflineRegion(resourceGroupName: string, accountName: string, regionParameterForOffline: Models.RegionForOnlineOffline, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + createUpdateSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, createUpdateSqlContainerParameters: Models.SqlContainerCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdateSqlContainer(resourceGroupName,accountName,databaseName,containerName,createUpdateSqlContainerParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Azure Cosmos DB SQL container. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteSqlContainer(resourceGroupName,accountName,databaseName,containerName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists the MongoDB databases under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param [options] The optional parameters + * @returns Promise + */ + listMongoDBDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param callback The callback + */ + listMongoDBDatabases(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param options The optional parameters + * @param callback The callback + */ + listMongoDBDatabases(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listMongoDBDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( { resourceGroupName, accountName, - regionParameterForOffline, options }, - beginOfflineRegionOperationSpec, - options); + listMongoDBDatabasesOperationSpec, + callback) as Promise; } /** - * Online the specified region for the specified Azure Cosmos DB database account. + * Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided + * name. * @param resourceGroupName Name of an Azure resource group. * @param accountName Cosmos DB database account name. - * @param regionParameterForOnline Cosmos DB region to online for the database account. + * @param databaseName Cosmos DB database name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - beginOnlineRegion(resourceGroupName: string, accountName: string, regionParameterForOnline: Models.RegionForOnlineOffline, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + getMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param callback The callback + */ + getMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param options The optional parameters + * @param callback The callback + */ + getMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( { resourceGroupName, accountName, - regionParameterForOnline, + databaseName, options }, - beginOnlineRegionOperationSpec, - options); + getMongoDBDatabaseOperationSpec, + callback) as Promise; } /** - * Regenerates an access key for the specified Azure Cosmos DB database account. + * Create or updates Azure Cosmos DB MongoDB database * @param resourceGroupName Name of an Azure resource group. * @param accountName Cosmos DB database account name. - * @param keyToRegenerate The name of the key to regenerate. + * @param databaseName Cosmos DB database name. + * @param createUpdateMongoDBDatabaseParameters The parameters to provide for the current MongoDB + * database. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - beginRegenerateKey(resourceGroupName: string, accountName: string, keyToRegenerate: Models.DatabaseAccountRegenerateKeyParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + createUpdateMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, createUpdateMongoDBDatabaseParameters: Models.MongoDBDatabaseCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdateMongoDBDatabase(resourceGroupName,accountName,databaseName,createUpdateMongoDBDatabaseParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Azure Cosmos DB MongoDB database. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMongoDBDatabase(resourceGroupName,accountName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists the MongoDB collection under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + listMongoDBCollections(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param callback The callback + */ + listMongoDBCollections(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param options The optional parameters + * @param callback The callback + */ + listMongoDBCollections(resourceGroupName: string, accountName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listMongoDBCollections(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( { resourceGroupName, accountName, - keyToRegenerate, + databaseName, options }, - beginRegenerateKeyOperationSpec, - options); + listMongoDBCollectionsOperationSpec, + callback) as Promise; } -} -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + /** + * Gets the MongoDB collection under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param [options] The optional parameters + * @returns Promise + */ + getMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param callback The callback + */ + getMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param options The optional parameters + * @param callback The callback + */ + getMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + databaseName, + collectionName, + options + }, + getMongoDBCollectionOperationSpec, + callback) as Promise; + } + + /** + * Create or update an Azure Cosmos DB MongoDB Collection + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB + * Collection. + * @param [options] The optional parameters + * @returns Promise + */ + createUpdateMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, createUpdateMongoDBCollectionParameters: Models.MongoDBCollectionCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdateMongoDBCollection(resourceGroupName,accountName,databaseName,collectionName,createUpdateMongoDBCollectionParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Azure Cosmos DB MongoDB Collection. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMongoDBCollection(resourceGroupName,accountName,databaseName,collectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists the Tables under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param [options] The optional parameters + * @returns Promise + */ + listTables(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param callback The callback + */ + listTables(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param options The optional parameters + * @param callback The callback + */ + listTables(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listTables(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listTablesOperationSpec, + callback) as Promise; + } + + /** + * Gets the Tables under an existing Azure Cosmos DB database account with the provided name. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + getTable(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param callback The callback + */ + getTable(resourceGroupName: string, accountName: string, tableName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param options The optional parameters + * @param callback The callback + */ + getTable(resourceGroupName: string, accountName: string, tableName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getTable(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + tableName, + options + }, + getTableOperationSpec, + callback) as Promise; + } + + /** + * Create or update an Azure Cosmos DB Table + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param createUpdateTableParameters The parameters to provide for the current Table. + * @param [options] The optional parameters + * @returns Promise + */ + createUpdateTable(resourceGroupName: string, accountName: string, tableName: string, createUpdateTableParameters: Models.TableCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdateTable(resourceGroupName,accountName,tableName,createUpdateTableParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Azure Cosmos DB Table. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteTable(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteTable(resourceGroupName,accountName,tableName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param [options] The optional parameters + * @returns Promise + */ + listCassandraKeyspaces(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param callback The callback + */ + listCassandraKeyspaces(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param options The optional parameters + * @param callback The callback + */ + listCassandraKeyspaces(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listCassandraKeyspaces(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listCassandraKeyspacesOperationSpec, + callback) as Promise; + } + + /** + * Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the + * provided name. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param [options] The optional parameters + * @returns Promise + */ + getCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param callback The callback + */ + getCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The optional parameters + * @param callback The callback + */ + getCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + keyspaceName, + options + }, + getCassandraKeyspaceOperationSpec, + callback) as Promise; + } + + /** + * Create or update an Azure Cosmos DB Cassandra keyspace + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current + * Cassandra keyspace. + * @param [options] The optional parameters + * @returns Promise + */ + createUpdateCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, createUpdateCassandraKeyspaceParameters: Models.CassandraKeyspaceCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdateCassandraKeyspace(resourceGroupName,accountName,keyspaceName,createUpdateCassandraKeyspaceParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Azure Cosmos DB Cassandra keyspace. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteCassandraKeyspace(resourceGroupName,accountName,keyspaceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists the Cassandra table under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param [options] The optional parameters + * @returns Promise + */ + listCassandraTables(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param callback The callback + */ + listCassandraTables(resourceGroupName: string, accountName: string, keyspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The optional parameters + * @param callback The callback + */ + listCassandraTables(resourceGroupName: string, accountName: string, keyspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listCassandraTables(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + keyspaceName, + options + }, + listCassandraTablesOperationSpec, + callback) as Promise; + } + + /** + * Gets the Cassandra table under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + getCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param callback The callback + */ + getCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param options The optional parameters + * @param callback The callback + */ + getCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + keyspaceName, + tableName, + options + }, + getCassandraTableOperationSpec, + callback) as Promise; + } + + /** + * Create or update an Azure Cosmos DB Cassandra Table + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra + * Table. + * @param [options] The optional parameters + * @returns Promise + */ + createUpdateCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, createUpdateCassandraTableParameters: Models.CassandraTableCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdateCassandraTable(resourceGroupName,accountName,keyspaceName,tableName,createUpdateCassandraTableParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Azure Cosmos DB Cassandra table. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteCassandraTable(resourceGroupName,accountName,keyspaceName,tableName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists the Gremlin databases under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param [options] The optional parameters + * @returns Promise + */ + listGremlinDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param callback The callback + */ + listGremlinDatabases(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param options The optional parameters + * @param callback The callback + */ + listGremlinDatabases(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listGremlinDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listGremlinDatabasesOperationSpec, + callback) as Promise; + } + + /** + * Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided + * name. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + getGremlinDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param callback The callback + */ + getGremlinDatabase(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param options The optional parameters + * @param callback The callback + */ + getGremlinDatabase(resourceGroupName: string, accountName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getGremlinDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + getGremlinDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Create or update an Azure Cosmos DB Gremlin database + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param createUpdateGremlinDatabaseParameters The parameters to provide for the current Gremlin + * database. + * @param [options] The optional parameters + * @returns Promise + */ + createUpdateGremlinDatabase(resourceGroupName: string, accountName: string, databaseName: string, createUpdateGremlinDatabaseParameters: Models.GremlinDatabaseCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdateGremlinDatabase(resourceGroupName,accountName,databaseName,createUpdateGremlinDatabaseParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Azure Cosmos DB Gremlin database. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteGremlinDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteGremlinDatabase(resourceGroupName,accountName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists the Gremlin graph under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + listGremlinGraphs(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param callback The callback + */ + listGremlinGraphs(resourceGroupName: string, accountName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param options The optional parameters + * @param callback The callback + */ + listGremlinGraphs(resourceGroupName: string, accountName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listGremlinGraphs(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + listGremlinGraphsOperationSpec, + callback) as Promise; + } + + /** + * Gets the Gremlin graph under an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param [options] The optional parameters + * @returns Promise + */ + getGremlinGraph(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param callback The callback + */ + getGremlinGraph(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param options The optional parameters + * @param callback The callback + */ + getGremlinGraph(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getGremlinGraph(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + databaseName, + graphName, + options + }, + getGremlinGraphOperationSpec, + callback) as Promise; + } + + /** + * Create or update an Azure Cosmos DB Gremlin graph + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param createUpdateGremlinGraphParameters The parameters to provide for the current Gremlin + * graph. + * @param [options] The optional parameters + * @returns Promise + */ + createUpdateGremlinGraph(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, createUpdateGremlinGraphParameters: Models.GremlinGraphCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdateGremlinGraph(resourceGroupName,accountName,databaseName,graphName,createUpdateGremlinGraphParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Azure Cosmos DB Gremlin graph. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteGremlinGraph(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteGremlinGraph(resourceGroupName,accountName,databaseName,graphName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Patches the properties of an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param updateParameters The tags parameter to patch for the current database account. + * @param [options] The optional parameters + * @returns Promise + */ + beginPatch(resourceGroupName: string, accountName: string, updateParameters: Models.DatabaseAccountPatchParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + updateParameters, + options + }, + beginPatchOperationSpec, + options); + } + + /** + * Creates or updates an Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param createUpdateParameters The parameters to provide for the current database account. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, accountName: string, createUpdateParameters: Models.DatabaseAccountCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + createUpdateParameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes an existing Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 + * indicates a write region. The maximum value for a failover priority = (total number of regions - + * 1). Failover priority values must be unique for each of the regions in which the database + * account exists. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param failoverParameters The new failover policies for the database account. + * @param [options] The optional parameters + * @returns Promise + */ + beginFailoverPriorityChange(resourceGroupName: string, accountName: string, failoverParameters: Models.FailoverPolicies, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + failoverParameters, + options + }, + beginFailoverPriorityChangeOperationSpec, + options); + } + + /** + * Offline the specified region for the specified Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param regionParameterForOffline Cosmos DB region to offline for the database account. + * @param [options] The optional parameters + * @returns Promise + */ + beginOfflineRegion(resourceGroupName: string, accountName: string, regionParameterForOffline: Models.RegionForOnlineOffline, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + regionParameterForOffline, + options + }, + beginOfflineRegionOperationSpec, + options); + } + + /** + * Online the specified region for the specified Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param regionParameterForOnline Cosmos DB region to online for the database account. + * @param [options] The optional parameters + * @returns Promise + */ + beginOnlineRegion(resourceGroupName: string, accountName: string, regionParameterForOnline: Models.RegionForOnlineOffline, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + regionParameterForOnline, + options + }, + beginOnlineRegionOperationSpec, + options); + } + + /** + * Regenerates an access key for the specified Azure Cosmos DB database account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyToRegenerate The name of the key to regenerate. + * @param [options] The optional parameters + * @returns Promise + */ + beginRegenerateKey(resourceGroupName: string, accountName: string, keyToRegenerate: Models.DatabaseAccountRegenerateKeyParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + keyToRegenerate, + options + }, + beginRegenerateKeyOperationSpec, + options); + } + + /** + * Create or update an Azure Cosmos DB SQL database + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param createUpdateSqlDatabaseParameters The parameters to provide for the current SQL database. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdateSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, createUpdateSqlDatabaseParameters: Models.SqlDatabaseCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + createUpdateSqlDatabaseParameters, + options + }, + beginCreateUpdateSqlDatabaseOperationSpec, + options); + } + + /** + * Deletes an existing Azure Cosmos DB SQL database. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + beginDeleteSqlDatabaseOperationSpec, + options); + } + + /** + * Create or update an Azure Cosmos DB SQL container + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param createUpdateSqlContainerParameters The parameters to provide for the current SQL + * container. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdateSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, createUpdateSqlContainerParameters: Models.SqlContainerCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + containerName, + createUpdateSqlContainerParameters, + options + }, + beginCreateUpdateSqlContainerOperationSpec, + options); + } + + /** + * Deletes an existing Azure Cosmos DB SQL container. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + containerName, + options + }, + beginDeleteSqlContainerOperationSpec, + options); + } + + /** + * Create or updates Azure Cosmos DB MongoDB database + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param createUpdateMongoDBDatabaseParameters The parameters to provide for the current MongoDB + * database. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdateMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, createUpdateMongoDBDatabaseParameters: Models.MongoDBDatabaseCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + createUpdateMongoDBDatabaseParameters, + options + }, + beginCreateUpdateMongoDBDatabaseOperationSpec, + options); + } + + /** + * Deletes an existing Azure Cosmos DB MongoDB database. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + beginDeleteMongoDBDatabaseOperationSpec, + options); + } + + /** + * Create or update an Azure Cosmos DB MongoDB Collection + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB + * Collection. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdateMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, createUpdateMongoDBCollectionParameters: Models.MongoDBCollectionCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + collectionName, + createUpdateMongoDBCollectionParameters, + options + }, + beginCreateUpdateMongoDBCollectionOperationSpec, + options); + } + + /** + * Deletes an existing Azure Cosmos DB MongoDB Collection. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + collectionName, + options + }, + beginDeleteMongoDBCollectionOperationSpec, + options); + } + + /** + * Create or update an Azure Cosmos DB Table + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param createUpdateTableParameters The parameters to provide for the current Table. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdateTable(resourceGroupName: string, accountName: string, tableName: string, createUpdateTableParameters: Models.TableCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + tableName, + createUpdateTableParameters, + options + }, + beginCreateUpdateTableOperationSpec, + options); + } + + /** + * Deletes an existing Azure Cosmos DB Table. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteTable(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + tableName, + options + }, + beginDeleteTableOperationSpec, + options); + } + + /** + * Create or update an Azure Cosmos DB Cassandra keyspace + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current + * Cassandra keyspace. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdateCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, createUpdateCassandraKeyspaceParameters: Models.CassandraKeyspaceCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + keyspaceName, + createUpdateCassandraKeyspaceParameters, + options + }, + beginCreateUpdateCassandraKeyspaceOperationSpec, + options); + } + + /** + * Deletes an existing Azure Cosmos DB Cassandra keyspace. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + keyspaceName, + options + }, + beginDeleteCassandraKeyspaceOperationSpec, + options); + } + + /** + * Create or update an Azure Cosmos DB Cassandra Table + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra + * Table. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdateCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, createUpdateCassandraTableParameters: Models.CassandraTableCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + keyspaceName, + tableName, + createUpdateCassandraTableParameters, + options + }, + beginCreateUpdateCassandraTableOperationSpec, + options); + } + + /** + * Deletes an existing Azure Cosmos DB Cassandra table. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + keyspaceName, + tableName, + options + }, + beginDeleteCassandraTableOperationSpec, + options); + } + + /** + * Create or update an Azure Cosmos DB Gremlin database + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param createUpdateGremlinDatabaseParameters The parameters to provide for the current Gremlin + * database. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdateGremlinDatabase(resourceGroupName: string, accountName: string, databaseName: string, createUpdateGremlinDatabaseParameters: Models.GremlinDatabaseCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + createUpdateGremlinDatabaseParameters, + options + }, + beginCreateUpdateGremlinDatabaseOperationSpec, + options); + } + + /** + * Deletes an existing Azure Cosmos DB Gremlin database. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteGremlinDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + beginDeleteGremlinDatabaseOperationSpec, + options); + } + + /** + * Create or update an Azure Cosmos DB Gremlin graph + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param createUpdateGremlinGraphParameters The parameters to provide for the current Gremlin + * graph. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdateGremlinGraph(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, createUpdateGremlinGraphParameters: Models.GremlinGraphCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + graphName, + createUpdateGremlinGraphParameters, + options + }, + beginCreateUpdateGremlinGraphOperationSpec, + options); + } + + /** + * Deletes an existing Azure Cosmos DB Gremlin graph. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteGremlinGraph(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + graphName, + options + }, + beginDeleteGremlinGraphOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseAccountsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseAccountsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseAccountListKeysResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listConnectionStringsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseAccountListConnectionStringsResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getReadOnlyKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseAccountListReadOnlyKeysResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listReadOnlyKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseAccountListReadOnlyKeysResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const checkNameExistsOperationSpec: msRest.OperationSpec = { + httpMethod: "HEAD", + path: "providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}", + urlParameters: [ + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 404: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listMetricsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetricListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listUsagesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsagesResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listMetricDefinitionsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetricDefinitionsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listSqlDatabasesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SqlDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getSqlDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SqlDatabase + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listSqlContainersOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SqlContainerListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getSqlContainerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SqlContainer + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listMongoDBDatabasesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MongoDBDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getMongoDBDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MongoDBDatabase + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listMongoDBCollectionsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MongoDBCollectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getMongoDBCollectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MongoDBCollection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listTablesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TableListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getTableOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Table + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listCassandraKeyspacesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspaceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getCassandraKeyspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspace + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listCassandraTablesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CassandraTableListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getCassandraTableOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CassandraTable + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listGremlinDatabasesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GremlinDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getGremlinDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GremlinDatabase + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listGremlinGraphsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GremlinGraphListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getGremlinGraphOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.graphName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GremlinGraph + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginPatchOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "updateParameters", + mapper: { + ...Mappers.DatabaseAccountPatchParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DatabaseAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "createUpdateParameters", + mapper: { + ...Mappers.DatabaseAccountCreateUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DatabaseAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginFailoverPriorityChangeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "failoverParameters", + mapper: { + ...Mappers.FailoverPolicies, + required: true + } + }, + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginOfflineRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "regionParameterForOffline", + mapper: { + ...Mappers.RegionForOnlineOffline, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginOnlineRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "regionParameterForOnline", + mapper: { + ...Mappers.RegionForOnlineOffline, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -625,10 +2851,16 @@ const getOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "keyToRegenerate", + mapper: { + ...Mappers.DatabaseAccountRegenerateKeyParameters, + required: true + } + }, responses: { - 200: { - bodyMapper: Mappers.DatabaseAccount - }, + 200: {}, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -636,11 +2868,14 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts", +const beginCreateUpdateSqlDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}", urlParameters: [ - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName ], queryParameters: [ Parameters.apiVersion @@ -648,10 +2883,18 @@ const listOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "createUpdateSqlDatabaseParameters", + mapper: { + ...Mappers.SqlDatabaseCreateUpdateParameters, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.DatabaseAccountsListResult + bodyMapper: Mappers.SqlDatabase }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -659,12 +2902,14 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts", +const beginDeleteSqlDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}", urlParameters: [ + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.accountName, + Parameters.databaseName ], queryParameters: [ Parameters.apiVersion @@ -673,9 +2918,8 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.DatabaseAccountsListResult - }, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -683,13 +2927,15 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { serializer }; -const listKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys", +const beginCreateUpdateSqlContainerOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName ], queryParameters: [ Parameters.apiVersion @@ -697,10 +2943,18 @@ const listKeysOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "createUpdateSqlContainerParameters", + mapper: { + ...Mappers.SqlContainerCreateUpdateParameters, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.DatabaseAccountListKeysResult + bodyMapper: Mappers.SqlContainer }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -708,13 +2962,15 @@ const listKeysOperationSpec: msRest.OperationSpec = { serializer }; -const listConnectionStringsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings", +const beginDeleteSqlContainerOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName ], queryParameters: [ Parameters.apiVersion @@ -723,9 +2979,8 @@ const listConnectionStringsOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.DatabaseAccountListConnectionStringsResult - }, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -733,13 +2988,14 @@ const listConnectionStringsOperationSpec: msRest.OperationSpec = { serializer }; -const getReadOnlyKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys", +const beginCreateUpdateMongoDBDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.databaseName ], queryParameters: [ Parameters.apiVersion @@ -747,10 +3003,18 @@ const getReadOnlyKeysOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "createUpdateMongoDBDatabaseParameters", + mapper: { + ...Mappers.MongoDBDatabaseCreateUpdateParameters, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.DatabaseAccountListReadOnlyKeysResult + bodyMapper: Mappers.MongoDBDatabase }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -758,13 +3022,14 @@ const getReadOnlyKeysOperationSpec: msRest.OperationSpec = { serializer }; -const listReadOnlyKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys", +const beginDeleteMongoDBDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.databaseName ], queryParameters: [ Parameters.apiVersion @@ -773,9 +3038,8 @@ const listReadOnlyKeysOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.DatabaseAccountListReadOnlyKeysResult - }, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -783,11 +3047,15 @@ const listReadOnlyKeysOperationSpec: msRest.OperationSpec = { serializer }; -const checkNameExistsOperationSpec: msRest.OperationSpec = { - httpMethod: "HEAD", - path: "providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}", +const beginCreateUpdateMongoDBCollectionOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}", urlParameters: [ - Parameters.accountName + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName ], queryParameters: [ Parameters.apiVersion @@ -795,9 +3063,18 @@ const checkNameExistsOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "createUpdateMongoDBCollectionParameters", + mapper: { + ...Mappers.MongoDBCollectionCreateUpdateParameters, + required: true + } + }, responses: { - 200: {}, - 404: {}, + 200: { + bodyMapper: Mappers.MongoDBCollection + }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -805,25 +3082,25 @@ const checkNameExistsOperationSpec: msRest.OperationSpec = { serializer }; -const listMetricsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics", +const beginDeleteMongoDBCollectionOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName ], queryParameters: [ - Parameters.apiVersion, - Parameters.filter0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.MetricListResult - }, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -831,25 +3108,33 @@ const listMetricsOperationSpec: msRest.OperationSpec = { serializer }; -const listUsagesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages", +const beginCreateUpdateTableOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.tableName ], queryParameters: [ - Parameters.apiVersion, - Parameters.filter1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "createUpdateTableParameters", + mapper: { + ...Mappers.TableCreateUpdateParameters, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.UsagesResult + bodyMapper: Mappers.Table }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -857,13 +3142,14 @@ const listUsagesOperationSpec: msRest.OperationSpec = { serializer }; -const listMetricDefinitionsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions", +const beginDeleteTableOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.tableName ], queryParameters: [ Parameters.apiVersion @@ -872,9 +3158,8 @@ const listMetricDefinitionsOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.MetricDefinitionsListResult - }, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -882,13 +3167,14 @@ const listMetricDefinitionsOperationSpec: msRest.OperationSpec = { serializer }; -const beginPatchOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", +const beginCreateUpdateCassandraKeyspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.keyspaceName ], queryParameters: [ Parameters.apiVersion @@ -897,16 +3183,17 @@ const beginPatchOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "updateParameters", + parameterPath: "createUpdateCassandraKeyspaceParameters", mapper: { - ...Mappers.DatabaseAccountPatchParameters, + ...Mappers.CassandraKeyspaceCreateUpdateParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.DatabaseAccount + bodyMapper: Mappers.CassandraKeyspace }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -914,13 +3201,40 @@ const beginPatchOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { +const beginDeleteCassandraKeyspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateUpdateCassandraTableOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.keyspaceName, + Parameters.tableName ], queryParameters: [ Parameters.apiVersion @@ -929,16 +3243,17 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "createUpdateParameters", + parameterPath: "createUpdateCassandraTableParameters", mapper: { - ...Mappers.DatabaseAccountCreateUpdateParameters, + ...Mappers.CassandraTableCreateUpdateParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.DatabaseAccount + bodyMapper: Mappers.CassandraTable }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -946,13 +3261,15 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { +const beginDeleteCassandraTableOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.keyspaceName, + Parameters.tableName ], queryParameters: [ Parameters.apiVersion @@ -970,13 +3287,14 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const beginFailoverPriorityChangeOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange", +const beginCreateUpdateGremlinDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.databaseName ], queryParameters: [ Parameters.apiVersion @@ -985,15 +3303,17 @@ const beginFailoverPriorityChangeOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "failoverParameters", + parameterPath: "createUpdateGremlinDatabaseParameters", mapper: { - ...Mappers.FailoverPolicies, + ...Mappers.GremlinDatabaseCreateUpdateParameters, required: true } }, responses: { + 200: { + bodyMapper: Mappers.GremlinDatabase + }, 202: {}, - 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -1001,13 +3321,14 @@ const beginFailoverPriorityChangeOperationSpec: msRest.OperationSpec = { serializer }; -const beginOfflineRegionOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion", +const beginDeleteGremlinDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.databaseName ], queryParameters: [ Parameters.apiVersion @@ -1015,30 +3336,25 @@ const beginOfflineRegionOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "regionParameterForOffline", - mapper: { - ...Mappers.RegionForOnlineOffline, - required: true - } - }, responses: { - 200: {}, 202: {}, + 204: {}, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer }; -const beginOnlineRegionOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion", +const beginCreateUpdateGremlinGraphOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.databaseName, + Parameters.graphName ], queryParameters: [ Parameters.apiVersion @@ -1047,29 +3363,33 @@ const beginOnlineRegionOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "regionParameterForOnline", + parameterPath: "createUpdateGremlinGraphParameters", mapper: { - ...Mappers.RegionForOnlineOffline, + ...Mappers.GremlinGraphCreateUpdateParameters, required: true } }, responses: { - 200: {}, + 200: { + bodyMapper: Mappers.GremlinGraph + }, 202: {}, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.CloudError } }, serializer }; -const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey", +const beginDeleteGremlinGraphOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.databaseName, + Parameters.graphName ], queryParameters: [ Parameters.apiVersion @@ -1077,16 +3397,9 @@ const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "keyToRegenerate", - mapper: { - ...Mappers.DatabaseAccountRegenerateKeyParameters, - required: true - } - }, responses: { - 200: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError }