Skip to content

Commit

Permalink
CodeGen from PR 14817 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge c66cc63eba3efb8b7625addba9fdbef3639e1b99 into 6de27dc43268e23cbb322bdf18016c8b944f8926
  • Loading branch information
SDKAuto committed Aug 24, 2021
1 parent cadd8b2 commit 2dc0262
Show file tree
Hide file tree
Showing 25 changed files with 7,530 additions and 1,129 deletions.
2 changes: 1 addition & 1 deletion sdk/cosmosdb/arm-cosmosdb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/cosmosdb/arm-cosmosdb",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cosmosdb/arm-cosmosdb",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down
108 changes: 108 additions & 0 deletions sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as msRest from "@azure/ms-rest-js";
import { TokenCredential } from "@azure/core-auth";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as Parameters from "./models/parameters";
import * as operations from "./operations";
import { CosmosDBManagementClientContext } from "./cosmosDBManagementClientContext";

Expand All @@ -30,6 +31,7 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext {
collectionPartition: operations.CollectionPartition;
partitionKeyRangeId: operations.PartitionKeyRangeId;
partitionKeyRangeIdRegion: operations.PartitionKeyRangeIdRegion;
graphResources: operations.GraphResources;
sqlResources: operations.SqlResources;
mongoDBResources: operations.MongoDBResources;
tableResources: operations.TableResources;
Expand All @@ -45,6 +47,9 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext {
restorableMongodbDatabases: operations.RestorableMongodbDatabases;
restorableMongodbCollections: operations.RestorableMongodbCollections;
restorableMongodbResources: operations.RestorableMongodbResources;
cassandraClusters: operations.CassandraClusters;
cassandraDataCenters: operations.CassandraDataCenters;
service: operations.Service;

/**
* Initializes a new instance of the CosmosDBManagementClient class.
Expand Down Expand Up @@ -72,6 +77,7 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext {
this.collectionPartition = new operations.CollectionPartition(this);
this.partitionKeyRangeId = new operations.PartitionKeyRangeId(this);
this.partitionKeyRangeIdRegion = new operations.PartitionKeyRangeIdRegion(this);
this.graphResources = new operations.GraphResources(this);
this.sqlResources = new operations.SqlResources(this);
this.mongoDBResources = new operations.MongoDBResources(this);
this.tableResources = new operations.TableResources(this);
Expand All @@ -87,10 +93,112 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext {
this.restorableMongodbDatabases = new operations.RestorableMongodbDatabases(this);
this.restorableMongodbCollections = new operations.RestorableMongodbCollections(this);
this.restorableMongodbResources = new operations.RestorableMongodbResources(this);
this.cassandraClusters = new operations.CassandraClusters(this);
this.cassandraDataCenters = new operations.CassandraDataCenters(this);
this.service = new operations.Service(this);
}

/**
* List Cosmos DB locations and their properties
* @param [options] The optional parameters
* @returns Promise<Models.LocationListResponse>
*/
locationList(options?: msRest.RequestOptionsBase): Promise<Models.LocationListResponse>;
/**
* @param callback The callback
*/
locationList(callback: msRest.ServiceCallback<Models.LocationListResult>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
locationList(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.LocationListResult>): void;
locationList(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.LocationListResult>, callback?: msRest.ServiceCallback<Models.LocationListResult>): Promise<Models.LocationListResponse> {
return this.sendOperationRequest(
{
options
},
locationListOperationSpec,
callback) as Promise<Models.LocationListResponse>;
}

/**
* Get the properties of an existing Cosmos DB location
* @param location Cosmos DB region, with spaces between words and each word capitalized.
* @param [options] The optional parameters
* @returns Promise<Models.LocationGetResponse>
*/
locationGet(location: string, options?: msRest.RequestOptionsBase): Promise<Models.LocationGetResponse>;
/**
* @param location Cosmos DB region, with spaces between words and each word capitalized.
* @param callback The callback
*/
locationGet(location: string, callback: msRest.ServiceCallback<Models.LocationGetResult>): void;
/**
* @param location Cosmos DB region, with spaces between words and each word capitalized.
* @param options The optional parameters
* @param callback The callback
*/
locationGet(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.LocationGetResult>): void;
locationGet(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.LocationGetResult>, callback?: msRest.ServiceCallback<Models.LocationGetResult>): Promise<Models.LocationGetResponse> {
return this.sendOperationRequest(
{
location,
options
},
locationGetOperationSpec,
callback) as Promise<Models.LocationGetResponse>;
}
}

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const locationListOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations",
urlParameters: [
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.LocationListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};

const locationGetOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}",
urlParameters: [
Parameters.subscriptionId,
Parameters.location
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.LocationGetResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};

export {
CosmosDBManagementClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceCli

super(credentials, options);

this.apiVersion = '2021-06-15';
this.apiVersion = '2021-07-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
166 changes: 166 additions & 0 deletions sdk/cosmosdb/arm-cosmosdb/src/models/cassandraClustersMappers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

export {
discriminators,
AnalyticalStorageConfiguration,
ApiProperties,
ARMProxyResource,
ARMResourceProperties,
AutoscaleSettings,
AutoscaleSettingsResource,
AutoUpgradePolicyResource,
AzureEntityResource,
BackupPolicy,
BackupPolicyMigrationState,
BackupResource,
BackupResourceProperties,
BaseResource,
Capability,
CassandraKeyspaceCreateUpdateParameters,
CassandraKeyspaceGetPropertiesOptions,
CassandraKeyspaceGetPropertiesResource,
CassandraKeyspaceGetResults,
CassandraKeyspaceResource,
CassandraPartitionKey,
CassandraSchema,
CassandraTableCreateUpdateParameters,
CassandraTableGetPropertiesOptions,
CassandraTableGetPropertiesResource,
CassandraTableGetResults,
CassandraTableResource,
CassandraViewCreateUpdateParameters,
CassandraViewGetPropertiesOptions,
CassandraViewGetPropertiesResource,
CassandraViewGetResults,
CassandraViewResource,
Certificate,
CloudError,
ClusterKey,
ClusterNodeStatus,
ClusterNodeStatusNodesItem,
ClusterResource,
ClusterResourceProperties,
Column,
CompositePath,
ConflictResolutionPolicy,
ConsistencyPolicy,
ContainerPartitionKey,
ContinuousModeBackupPolicy,
CorsPolicy,
CreateUpdateOptions,
DatabaseAccountCreateUpdateParameters,
DatabaseAccountGetResults,
DatabaseRestoreResource,
DataCenterResource,
DataCenterResourceProperties,
DataTransferRegionalServiceResource,
DataTransferServiceResourceProperties,
ErrorResponse,
ExcludedPath,
FailoverPolicy,
GraphResource,
GraphResourceCreateUpdateParameters,
GraphResourceGetPropertiesOptions,
GraphResourceGetPropertiesResource,
GraphResourceGetResults,
GremlinDatabaseCreateUpdateParameters,
GremlinDatabaseGetPropertiesOptions,
GremlinDatabaseGetPropertiesResource,
GremlinDatabaseGetResults,
GremlinDatabaseResource,
GremlinGraphCreateUpdateParameters,
GremlinGraphGetPropertiesOptions,
GremlinGraphGetPropertiesResource,
GremlinGraphGetResults,
GremlinGraphResource,
IncludedPath,
Indexes,
IndexingPolicy,
IpAddressOrRange,
ListBackups,
ListClusters,
Location,
LocationGetResult,
LocationProperties,
ManagedServiceIdentity,
ManagedServiceIdentityUserAssignedIdentitiesValue,
MongoDBCollectionCreateUpdateParameters,
MongoDBCollectionGetPropertiesOptions,
MongoDBCollectionGetPropertiesResource,
MongoDBCollectionGetResults,
MongoDBCollectionResource,
MongoDBDatabaseCreateUpdateParameters,
MongoDBDatabaseGetPropertiesOptions,
MongoDBDatabaseGetPropertiesResource,
MongoDBDatabaseGetResults,
MongoDBDatabaseResource,
MongoIndex,
MongoIndexKeys,
MongoIndexOptions,
NotebookWorkspace,
NotebookWorkspaceCreateUpdateParameters,
OptionsResource,
PeriodicModeBackupPolicy,
PeriodicModeProperties,
Permission,
PrivateEndpointConnection,
PrivateEndpointProperty,
PrivateLinkResource,
PrivateLinkServiceConnectionStateProperty,
ProxyResource,
RegionalServiceResource,
RepairPostBody,
Resource,
RestoreParameters,
SeedNode,
ServiceResource,
ServiceResourceProperties,
SpatialSpec,
SqlContainerCreateUpdateParameters,
SqlContainerGetPropertiesOptions,
SqlContainerGetPropertiesResource,
SqlContainerGetResults,
SqlContainerResource,
SqlDatabaseCreateUpdateParameters,
SqlDatabaseGetPropertiesOptions,
SqlDatabaseGetPropertiesResource,
SqlDatabaseGetResults,
SqlDatabaseResource,
SqlDedicatedGatewayRegionalServiceResource,
SqlDedicatedGatewayServiceResourceProperties,
SqlRoleAssignmentGetResults,
SqlRoleDefinitionGetResults,
SqlStoredProcedureCreateUpdateParameters,
SqlStoredProcedureGetPropertiesResource,
SqlStoredProcedureGetResults,
SqlStoredProcedureResource,
SqlTriggerCreateUpdateParameters,
SqlTriggerGetPropertiesResource,
SqlTriggerGetResults,
SqlTriggerResource,
SqlUserDefinedFunctionCreateUpdateParameters,
SqlUserDefinedFunctionGetPropertiesResource,
SqlUserDefinedFunctionGetResults,
SqlUserDefinedFunctionResource,
SystemData,
TableCreateUpdateParameters,
TableGetPropertiesOptions,
TableGetPropertiesResource,
TableGetResults,
TableResource,
ThroughputPolicyResource,
ThroughputSettingsGetPropertiesResource,
ThroughputSettingsGetResults,
ThroughputSettingsResource,
ThroughputSettingsUpdateParameters,
TrackedResource,
UniqueKey,
UniqueKeyPolicy,
VirtualNetworkRule
} from "../models/mappers";
Loading

0 comments on commit 2dc0262

Please sign in to comment.