Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-cosmosdb] [Hub Generated] Review request for Microsoft.DocumentDB to add version preview/2021-04-01-preview #4195

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import * as msRest from "@azure/ms-rest-js";
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 @@ -34,9 +35,19 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext {
tableResources: operations.TableResources;
cassandraResources: operations.CassandraResources;
gremlinResources: operations.GremlinResources;
restorableDatabaseAccounts: operations.RestorableDatabaseAccounts;
notebookWorkspaces: operations.NotebookWorkspaces;
restorableSqlDatabases: operations.RestorableSqlDatabases;
restorableSqlContainers: operations.RestorableSqlContainers;
restorableSqlResources: operations.RestorableSqlResources;
restorableMongodbDatabases: operations.RestorableMongodbDatabases;
restorableMongodbCollections: operations.RestorableMongodbCollections;
restorableMongodbResources: operations.RestorableMongodbResources;
cassandraClusters: operations.CassandraClusters;
cassandraDataCenters: operations.CassandraDataCenters;
privateLinkResources: operations.PrivateLinkResources;
privateEndpointConnections: operations.PrivateEndpointConnections;
service: operations.Service;

/**
* Initializes a new instance of the CosmosDBManagementClient class.
Expand Down Expand Up @@ -64,13 +75,122 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext {
this.tableResources = new operations.TableResources(this);
this.cassandraResources = new operations.CassandraResources(this);
this.gremlinResources = new operations.GremlinResources(this);
this.restorableDatabaseAccounts = new operations.RestorableDatabaseAccounts(this);
this.notebookWorkspaces = new operations.NotebookWorkspaces(this);
this.restorableSqlDatabases = new operations.RestorableSqlDatabases(this);
this.restorableSqlContainers = new operations.RestorableSqlContainers(this);
this.restorableSqlResources = new operations.RestorableSqlResources(this);
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.privateLinkResources = new operations.PrivateLinkResources(this);
this.privateEndpointConnections = new operations.PrivateEndpointConnections(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 @@ -36,25 +36,25 @@ export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceCli
if (!options) {
options = {};
}
if (!options.userAgent) {
if(!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

super(credentials, options);

this.apiVersion = '2021-03-15';
this.apiVersion = '2021-04-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
this.subscriptionId = subscriptionId;

if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
}
Expand Down
157 changes: 157 additions & 0 deletions sdk/cosmosdb/arm-cosmosdb/src/models/cassandraClustersMappers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/*
* 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,
ApiProperties,
ARMProxyResource,
ARMResourceProperties,
AutoscaleSettings,
AutoscaleSettingsResource,
AutoUpgradePolicyResource,
AzureEntityResource,
BackupPolicy,
BackupResource,
BackupResourceProperties,
BaseResource,
Capability,
CassandraKeyspaceCreateUpdateParameters,
CassandraKeyspaceGetPropertiesOptions,
CassandraKeyspaceGetPropertiesResource,
CassandraKeyspaceGetResults,
CassandraKeyspaceResource,
CassandraPartitionKey,
CassandraSchema,
CassandraTableCreateUpdateParameters,
CassandraTableGetPropertiesOptions,
CassandraTableGetPropertiesResource,
CassandraTableGetResults,
CassandraTableResource,
Certificate,
CloudError,
ClusterKey,
ClusterNodeStatus,
ClusterNodeStatusNodesItem,
ClusterResource,
ClusterResourceProperties,
Column,
CompositePath,
ConflictResolutionPolicy,
ConsistencyPolicy,
ContainerPartitionKey,
ContinuousModeBackupPolicy,
CorsPolicy,
CreateUpdateOptions,
DatabaseAccountCreateUpdateParameters,
DatabaseAccountCreateUpdateProperties,
DatabaseAccountGetResults,
DatabaseRestoreResource,
DataCenterResource,
DataCenterResourceProperties,
DataTransferRegionalServiceResource,
DataTransferServiceResourceProperties,
DefaultRequestDatabaseAccountCreateUpdateProperties,
ErrorResponse,
ExcludedPath,
FailoverPolicy,
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,
RestoreReqeustDatabaseAccountCreateUpdateProperties,
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