diff --git a/sdk/adp/arm-adp/LICENSE.txt b/sdk/adp/arm-adp/LICENSE.txt new file mode 100644 index 000000000000..ea8fb1516028 --- /dev/null +++ b/sdk/adp/arm-adp/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/adp/arm-adp/README.md b/sdk/adp/arm-adp/README.md new file mode 100644 index 000000000000..ac9952f9044f --- /dev/null +++ b/sdk/adp/arm-adp/README.md @@ -0,0 +1,98 @@ +## Azure AdpManagementClient SDK for JavaScript + +This package contains an isomorphic SDK for AdpManagementClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install adp +``` + +### How to use + +#### nodejs - client creation and list operations as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" +``` + +##### Sample code + +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package +```typescript +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { AdpManagementClient } = require("adp"); +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new AdpManagementClient(creds, subscriptionId); + client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list operations as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + adp sample + + + + + + + + +``` + +## 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/adp/arm-adp/README.png) diff --git a/sdk/adp/arm-adp/package.json b/sdk/adp/arm-adp/package.json new file mode 100644 index 000000000000..7237f0157697 --- /dev/null +++ b/sdk/adp/arm-adp/package.json @@ -0,0 +1,58 @@ +{ + "name": "adp", + "author": "Microsoft Corporation", + "description": "AdpManagementClient Library with typescript type definitions for node.js and browser.", + "version": "0.0.1", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/adp.js", + "module": "./esm/adpManagementClient.js", + "types": "./esm/adpManagementClient.d.ts", + "devDependencies": { + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/adp/arm-adp", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "rollup.config.js", + "tsconfig.json" + ], + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/adp.js.map'\" -o ./dist/adp.min.js ./dist/adp.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/adp/arm-adp/rollup.config.js b/sdk/adp/arm-adp/rollup.config.js new file mode 100644 index 000000000000..a4bc0a724a57 --- /dev/null +++ b/sdk/adp/arm-adp/rollup.config.js @@ -0,0 +1,37 @@ +import rollup from "rollup"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + +/** + * @type {rollup.RollupFileOptions} + */ +const config = { + input: "./esm/adpManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/adp.js", + format: "umd", + name: "Adp", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" + }, + banner: `/* + * 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. + */` + }, + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] +}; + +export default config; diff --git a/sdk/adp/arm-adp/src/adpManagementClient.ts b/sdk/adp/arm-adp/src/adpManagementClient.ts new file mode 100644 index 000000000000..712e798a1f37 --- /dev/null +++ b/sdk/adp/arm-adp/src/adpManagementClient.ts @@ -0,0 +1,45 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { AdpManagementClientContext } from "./adpManagementClientContext"; + + +class AdpManagementClient extends AdpManagementClientContext { + // Operation groups + operations: operations.Operations; + accounts: operations.Accounts; + dataPools: operations.DataPools; + + /** + * Initializes a new instance of the AdpManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The ID of the target subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AdpManagementClientOptions) { + super(credentials, subscriptionId, options); + this.operations = new operations.Operations(this); + this.accounts = new operations.Accounts(this); + this.dataPools = new operations.DataPools(this); + } +} + +// Operation Specifications + +export { + AdpManagementClient, + AdpManagementClientContext, + Models as AdpManagementModels, + Mappers as AdpManagementMappers +}; +export * from "./operations"; diff --git a/sdk/adp/arm-adp/src/adpManagementClientContext.ts b/sdk/adp/arm-adp/src/adpManagementClientContext.ts new file mode 100644 index 000000000000..5ea9472eb4c0 --- /dev/null +++ b/sdk/adp/arm-adp/src/adpManagementClientContext.ts @@ -0,0 +1,61 @@ +/* + * 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. + */ + +import * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "adp"; +const packageVersion = "0.0.1"; + +export class AdpManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + apiVersion?: string; + subscriptionId: string; + + /** + * Initializes a new instance of the AdpManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The ID of the target subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AdpManagementClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2020-07-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) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/adp/arm-adp/src/models/accountsMappers.ts b/sdk/adp/arm-adp/src/models/accountsMappers.ts new file mode 100644 index 000000000000..a10fa4259844 --- /dev/null +++ b/sdk/adp/arm-adp/src/models/accountsMappers.ts @@ -0,0 +1,25 @@ +/* + * 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 { + Account, + AccountList, + AccountPatch, + AzureEntityResource, + BaseResource, + DataPool, + DataPoolLocation, + DataPoolPatch, + ErrorDefinition, + ErrorResponse, + ProxyResource, + Resource, + SystemData, + Tags, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/adp/arm-adp/src/models/dataPoolsMappers.ts b/sdk/adp/arm-adp/src/models/dataPoolsMappers.ts new file mode 100644 index 000000000000..a24e851b3e7c --- /dev/null +++ b/sdk/adp/arm-adp/src/models/dataPoolsMappers.ts @@ -0,0 +1,23 @@ +/* + * 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 { + Account, + AzureEntityResource, + BaseResource, + DataPool, + DataPoolList, + DataPoolLocation, + DataPoolPatch, + ErrorDefinition, + ErrorResponse, + ProxyResource, + Resource, + SystemData, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/adp/arm-adp/src/models/index.ts b/sdk/adp/arm-adp/src/models/index.ts new file mode 100644 index 000000000000..c446b52b8eb3 --- /dev/null +++ b/sdk/adp/arm-adp/src/models/index.ts @@ -0,0 +1,872 @@ +/* + * 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. + */ + +import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + +/** + * Resource tags + */ +export interface Tags { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The type of identity that last modified the resource. + */ + lastModifiedAt?: Date; +} + +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource + */ +export interface TrackedResource extends Resource { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; +} + +/** + * An ADP account. + */ +export interface Account extends TrackedResource { + /** + * The account's data-plane ID + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountId?: string; + /** + * Gets the status of the account at the time the operation was called. Possible values include: + * 'Succeeded', 'Failed', 'Canceled', 'Accepted', 'Provisioning', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; +} + +/** + * An ADP account. + */ +export interface AccountPatch extends Tags { + /** + * The account's data-plane ID + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountId?: string; + /** + * Gets the status of the account at the time the operation was called. Possible values include: + * 'Succeeded', 'Failed', 'Canceled', 'Accepted', 'Provisioning', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; +} + +/** + * An ADP Data Pool. + */ +export interface DataPool extends Resource { + /** + * The Data Pool's data-plane ID + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataPoolId?: string; + /** + * Gets the status of the data pool at the time the operation was called. Possible values + * include: 'Succeeded', 'Failed', 'Canceled', 'Accepted', 'Provisioning', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * Gets or sets the collection of locations where Data Pool resources should be created. + */ + locations?: DataPoolLocation[]; +} + +/** + * Location of a Data Pool + */ +export interface DataPoolLocation { + /** + * The location name + */ + name: string; +} + +/** + * An ADP Data Pool. + */ +export interface DataPoolPatch extends Resource { + /** + * The Data Pool's data-plane ID + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataPoolId?: string; + /** + * Gets the status of the data pool at the time the operation was called. Possible values + * include: 'Succeeded', 'Failed', 'Canceled', 'Accepted', 'Provisioning', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * Gets or sets the collection of locations where Data Pool resources should be created. + */ + locations?: DataPoolLocation[]; +} + +/** + * Operation display payload + */ +export interface OperationDisplay { + /** + * Resource provider of the operation + */ + provider?: string; + /** + * Resource of the operation + */ + resource?: string; + /** + * Localized friendly name for the operation + */ + operation?: string; + /** + * Localized friendly description for the operation + */ + description?: string; +} + +/** + * Details about an operation related to logs. + */ +export interface OperationLogSpecification { + /** + * The name of the log category. + */ + name?: string; + /** + * Localized display name. + */ + displayName?: string; + /** + * Blobs created in the customer storage account, per hour. + */ + blobDuration?: string; +} + +/** + * Defines how often data for a metric becomes available. + */ +export interface OperationMetricAvailability { + /** + * The granularity for the metric. + */ + timeGrain?: string; + /** + * Blob created in the customer storage account, per hour. + */ + blobDuration?: string; +} + +/** + * Details about an operation related to metrics. + */ +export interface OperationMetricSpecification { + /** + * The name of the metric. + */ + name?: string; + /** + * Localized display name of the metric. + */ + displayName?: string; + /** + * The description of the metric. + */ + displayDescription?: string; + /** + * The unit that the metric is measured in. + */ + unit?: string; + /** + * The type of metric aggregation. + */ + aggregationType?: string; + /** + * Whether or not the service is using regional MDM accounts. + */ + enableRegionalMdmAccount?: string; + /** + * The name of the MDM account. + */ + sourceMdmAccount?: string; + /** + * The name of the MDM namespace. + */ + sourceMdmNamespace?: string; + /** + * Defines how often data for metrics becomes available. + */ + availabilities?: OperationMetricAvailability[]; +} + +/** + * Details about a service operation. + */ +export interface OperationServiceSpecification { + /** + * Details about operations related to logs. + */ + logSpecifications?: OperationLogSpecification[]; + /** + * Details about operations related to metrics. + */ + metricSpecifications?: OperationMetricSpecification[]; +} + +/** + * Operation detail payload + */ +export interface Operation { + /** + * Name of the operation + */ + name?: string; + /** + * Indicates whether the operation is a data action + */ + isDataAction?: boolean; + /** + * Display of the operation + */ + display?: OperationDisplay; + /** + * Origin of the operation + */ + origin?: string; + /** + * Details about a service operation. + */ + serviceSpecification?: OperationServiceSpecification; +} + +/** + * Error definition. + */ +export interface ErrorDefinition { + /** + * Service specific error code which serves as the substatus for the HTTP error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * Description of the error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * Internal error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorDefinition[]; +} + +/** + * Error response. + */ +export interface ErrorResponse { + /** + * The error details. + */ + error?: ErrorDefinition; +} + +/** + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource + */ +export interface ProxyResource extends Resource { +} + +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** + * Optional Parameters. + */ +export interface AccountsUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface AccountsCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The parameters to provide for the ADP account. + */ + parameters?: Account; +} + +/** + * Optional Parameters. + */ +export interface AccountsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface AccountsBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The parameters to provide for the ADP account. + */ + parameters?: Account; +} + +/** + * Optional Parameters. + */ +export interface DataPoolsUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Gets or sets the collection of locations where Data Pool resources should be created. + */ + locations?: DataPoolLocation[]; +} + +/** + * Optional Parameters. + */ +export interface DataPoolsCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Gets or sets the collection of locations where Data Pool resources should be created. + */ + locations?: DataPoolLocation[]; +} + +/** + * Optional Parameters. + */ +export interface DataPoolsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Gets or sets the collection of locations where Data Pool resources should be created. + */ + locations?: DataPoolLocation[]; +} + +/** + * Optional Parameters. + */ +export interface DataPoolsBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Gets or sets the collection of locations where Data Pool resources should be created. + */ + locations?: DataPoolLocation[]; +} + +/** + * An interface representing AdpManagementClientOptions. + */ +export interface AdpManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * Available operations of the service. + * @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 list operation response, that contains the data pools and their properties. + * @extends Array + */ +export interface AccountList extends Array { + /** + * URL to get the next set of operation list results if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * The list operation response, that contains the data pools and their properties. + * @extends Array + */ +export interface DataPoolList extends Array { + /** + * URL to get the next set of operation list results if there are any. + */ + nextLink?: string; +} + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Accepted', 'Provisioning', + * 'Deleting' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Succeeded' | 'Failed' | 'Canceled' | 'Accepted' | 'Provisioning' | 'Deleting'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * 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: OperationListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationListResult & { + /** + * 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: OperationListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AccountsListResponse = AccountList & { + /** + * 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: AccountList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type AccountsListByResourceGroupResponse = AccountList & { + /** + * 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: AccountList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AccountsGetResponse = Account & { + /** + * 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: Account; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type AccountsUpdateResponse = Account & { + /** + * 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: Account; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type AccountsCreateOrUpdateResponse = Account & { + /** + * 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: Account; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type AccountsBeginUpdateResponse = Account & { + /** + * 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: Account; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type AccountsBeginCreateOrUpdateResponse = Account & { + /** + * 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: Account; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AccountsListNextResponse = AccountList & { + /** + * 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: AccountList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type AccountsListByResourceGroupNextResponse = AccountList & { + /** + * 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: AccountList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type DataPoolsListResponse = DataPoolList & { + /** + * 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: DataPoolList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DataPoolsGetResponse = DataPool & { + /** + * 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: DataPool; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type DataPoolsUpdateResponse = DataPool & { + /** + * 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: DataPool; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DataPoolsCreateOrUpdateResponse = DataPool & { + /** + * 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: DataPool; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type DataPoolsBeginUpdateResponse = DataPool & { + /** + * 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: DataPool; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type DataPoolsBeginCreateOrUpdateResponse = DataPool & { + /** + * 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: DataPool; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type DataPoolsListNextResponse = DataPoolList & { + /** + * 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: DataPoolList; + }; +}; diff --git a/sdk/adp/arm-adp/src/models/mappers.ts b/sdk/adp/arm-adp/src/models/mappers.ts new file mode 100644 index 000000000000..944d83a3ad6b --- /dev/null +++ b/sdk/adp/arm-adp/src/models/mappers.ts @@ -0,0 +1,694 @@ +/* + * 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. + */ + +import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const Tags: msRest.CompositeMapper = { + serializedName: "Tags", + type: { + name: "Composite", + className: "Tags", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const Account: msRest.CompositeMapper = { + serializedName: "Account", + type: { + name: "Composite", + className: "Account", + modelProperties: { + ...TrackedResource.type.modelProperties, + accountId: { + readOnly: true, + serializedName: "properties.accountId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const AccountPatch: msRest.CompositeMapper = { + serializedName: "AccountPatch", + type: { + name: "Composite", + className: "AccountPatch", + modelProperties: { + ...Tags.type.modelProperties, + accountId: { + readOnly: true, + serializedName: "properties.accountId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const DataPool: msRest.CompositeMapper = { + serializedName: "DataPool", + type: { + name: "Composite", + className: "DataPool", + modelProperties: { + ...Resource.type.modelProperties, + dataPoolId: { + readOnly: true, + serializedName: "properties.dataPoolId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + locations: { + serializedName: "properties.locations", + constraints: { + MinItems: 1 + }, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataPoolLocation" + } + } + } + } + } + } +}; + +export const DataPoolLocation: msRest.CompositeMapper = { + serializedName: "DataPoolLocation", + type: { + name: "Composite", + className: "DataPoolLocation", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const DataPoolPatch: msRest.CompositeMapper = { + serializedName: "DataPoolPatch", + type: { + name: "Composite", + className: "DataPoolPatch", + modelProperties: { + ...Resource.type.modelProperties, + dataPoolId: { + readOnly: true, + serializedName: "properties.dataPoolId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + locations: { + serializedName: "properties.locations", + constraints: { + MinItems: 1 + }, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataPoolLocation" + } + } + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const OperationLogSpecification: msRest.CompositeMapper = { + serializedName: "OperationLogSpecification", + type: { + name: "Composite", + className: "OperationLogSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + blobDuration: { + serializedName: "blobDuration", + type: { + name: "String" + } + } + } + } +}; + +export const OperationMetricAvailability: msRest.CompositeMapper = { + serializedName: "OperationMetricAvailability", + type: { + name: "Composite", + className: "OperationMetricAvailability", + modelProperties: { + timeGrain: { + serializedName: "timeGrain", + type: { + name: "String" + } + }, + blobDuration: { + serializedName: "blobDuration", + type: { + name: "String" + } + } + } + } +}; + +export const OperationMetricSpecification: msRest.CompositeMapper = { + serializedName: "OperationMetricSpecification", + type: { + name: "Composite", + className: "OperationMetricSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String" + } + }, + enableRegionalMdmAccount: { + serializedName: "enableRegionalMdmAccount", + type: { + name: "String" + } + }, + sourceMdmAccount: { + serializedName: "sourceMdmAccount", + type: { + name: "String" + } + }, + sourceMdmNamespace: { + serializedName: "sourceMdmNamespace", + type: { + name: "String" + } + }, + availabilities: { + serializedName: "availabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationMetricAvailability" + } + } + } + } + } + } +}; + +export const OperationServiceSpecification: msRest.CompositeMapper = { + serializedName: "OperationServiceSpecification", + type: { + name: "Composite", + className: "OperationServiceSpecification", + modelProperties: { + logSpecifications: { + serializedName: "logSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationLogSpecification" + } + } + } + }, + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationMetricSpecification" + } + } + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + serviceSpecification: { + serializedName: "properties.serviceSpecification", + type: { + name: "Composite", + className: "OperationServiceSpecification" + } + } + } + } +}; + +export const ErrorDefinition: msRest.CompositeMapper = { + serializedName: "ErrorDefinition", + type: { + name: "Composite", + className: "ErrorDefinition", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDefinition" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDefinition" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AccountList: msRest.CompositeMapper = { + serializedName: "AccountList", + type: { + name: "Composite", + className: "AccountList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Account" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DataPoolList: msRest.CompositeMapper = { + serializedName: "DataPoolList", + type: { + name: "Composite", + className: "DataPoolList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataPool" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/adp/arm-adp/src/models/operationsMappers.ts b/sdk/adp/arm-adp/src/models/operationsMappers.ts new file mode 100644 index 000000000000..5ba8acbb57ae --- /dev/null +++ b/sdk/adp/arm-adp/src/models/operationsMappers.ts @@ -0,0 +1,19 @@ +/* + * 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 { + ErrorDefinition, + ErrorResponse, + Operation, + OperationDisplay, + OperationListResult, + OperationLogSpecification, + OperationMetricAvailability, + OperationMetricSpecification, + OperationServiceSpecification +} from "../models/mappers"; diff --git a/sdk/adp/arm-adp/src/models/parameters.ts b/sdk/adp/arm-adp/src/models/parameters.ts new file mode 100644 index 000000000000..4783102b4e7a --- /dev/null +++ b/sdk/adp/arm-adp/src/models/parameters.ts @@ -0,0 +1,101 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const accountName: msRest.OperationURLParameter = { + parameterPath: "accountName", + mapper: { + required: true, + serializedName: "accountName", + constraints: { + MaxLength: 50, + Pattern: /^[a-z0-9]+(-[a-z0-9]+)*/ + }, + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const dataPoolName: msRest.OperationURLParameter = { + parameterPath: "dataPoolName", + mapper: { + required: true, + serializedName: "dataPoolName", + constraints: { + MaxLength: 50, + Pattern: /^[a-z0-9]+(-[a-z0-9]+)*/ + }, + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1, + Pattern: /^[-\w\._\(\)]+$/ + }, + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; diff --git a/sdk/adp/arm-adp/src/operations/accounts.ts b/sdk/adp/arm-adp/src/operations/accounts.ts new file mode 100644 index 000000000000..37a0a2a1299c --- /dev/null +++ b/sdk/adp/arm-adp/src/operations/accounts.ts @@ -0,0 +1,477 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/accountsMappers"; +import * as Parameters from "../models/parameters"; +import { AdpManagementClientContext } from "../adpManagementClientContext"; + +/** Class representing a Accounts. */ +export class Accounts { + private readonly client: AdpManagementClientContext; + + /** + * Create a Accounts. + * @param {AdpManagementClientContext} client Reference to the service client. + */ + constructor(client: AdpManagementClientContext) { + this.client = client; + } + + /** + * List all ADP accounts available under the subscription + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * List all ADP accounts available under the resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets the properties of an ADP account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of an existing ADP account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, options?: Models.AccountsUpdateOptionalParams): Promise { + return this.beginUpdate(resourceGroupName,accountName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates an ADP account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, options?: Models.AccountsCreateOrUpdateOptionalParams): Promise { + return this.beginCreateOrUpdate(resourceGroupName,accountName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an ADP account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,accountName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates the properties of an existing ADP account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, accountName: string, options?: Models.AccountsBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Creates or updates an ADP account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, accountName: string, options?: Models.AccountsBeginCreateOrUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes an ADP account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @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); + } + + /** + * List all ADP accounts available under the subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * List all ADP accounts available under the resource group + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccountList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccountList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Account + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + tags: [ + "options", + "tags" + ] + }, + mapper: Mappers.AccountPatch + }, + responses: { + 200: { + bodyMapper: Mappers.Account + }, + 201: { + bodyMapper: Mappers.Account + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.Account + }, + responses: { + 200: { + bodyMapper: Mappers.Account + }, + 201: { + bodyMapper: Mappers.Account + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccountList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccountList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/adp/arm-adp/src/operations/dataPools.ts b/sdk/adp/arm-adp/src/operations/dataPools.ts new file mode 100644 index 000000000000..7628891c2f10 --- /dev/null +++ b/sdk/adp/arm-adp/src/operations/dataPools.ts @@ -0,0 +1,402 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/dataPoolsMappers"; +import * as Parameters from "../models/parameters"; +import { AdpManagementClientContext } from "../adpManagementClientContext"; + +/** Class representing a DataPools. */ +export class DataPools { + private readonly client: AdpManagementClientContext; + + /** + * Create a DataPools. + * @param {AdpManagementClientContext} client Reference to the service client. + */ + constructor(client: AdpManagementClientContext) { + this.client = client; + } + + /** + * Lists the data pools under the ADP account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets the properties of a Data Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param dataPoolName The name of the Data Pool. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, dataPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param dataPoolName The name of the Data Pool. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, dataPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param dataPoolName The name of the Data Pool. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, dataPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, dataPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + dataPoolName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of an existing Data Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param dataPoolName The name of the Data Pool. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, dataPoolName: string, options?: Models.DataPoolsUpdateOptionalParams): Promise { + return this.beginUpdate(resourceGroupName,accountName,dataPoolName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates a Data Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param dataPoolName The name of the Data Pool. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, dataPoolName: string, options?: Models.DataPoolsCreateOrUpdateOptionalParams): Promise { + return this.beginCreateOrUpdate(resourceGroupName,accountName,dataPoolName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a Data Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param dataPoolName The name of the Data Pool. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, dataPoolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,accountName,dataPoolName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates the properties of an existing Data Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param dataPoolName The name of the Data Pool. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, accountName: string, dataPoolName: string, options?: Models.DataPoolsBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + dataPoolName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Creates or updates a Data Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param dataPoolName The name of the Data Pool. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, accountName: string, dataPoolName: string, options?: Models.DataPoolsBeginCreateOrUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + dataPoolName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a Data Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ADP account. + * @param dataPoolName The name of the Data Pool. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, accountName: string, dataPoolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + dataPoolName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists the data pools under the ADP account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}/dataPools", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataPoolList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}/dataPools/{dataPoolName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.dataPoolName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}/dataPools/{dataPoolName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.dataPoolName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + locations: [ + "options", + "locations" + ] + }, + mapper: Mappers.DataPoolPatch + }, + responses: { + 200: { + bodyMapper: Mappers.DataPool + }, + 201: { + bodyMapper: Mappers.DataPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}/dataPools/{dataPoolName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.dataPoolName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + locations: [ + "options", + "locations" + ] + }, + mapper: Mappers.DataPool + }, + responses: { + 200: { + bodyMapper: Mappers.DataPool + }, + 201: { + bodyMapper: Mappers.DataPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AutonomousDevelopmentPlatform/accounts/{accountName}/dataPools/{dataPoolName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.dataPoolName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataPoolList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/adp/arm-adp/src/operations/index.ts b/sdk/adp/arm-adp/src/operations/index.ts new file mode 100644 index 000000000000..79ec81c1b612 --- /dev/null +++ b/sdk/adp/arm-adp/src/operations/index.ts @@ -0,0 +1,12 @@ +/* + * 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 * from "./operations"; +export * from "./accounts"; +export * from "./dataPools"; diff --git a/sdk/adp/arm-adp/src/operations/operations.ts b/sdk/adp/arm-adp/src/operations/operations.ts new file mode 100644 index 000000000000..48fa32b93ab1 --- /dev/null +++ b/sdk/adp/arm-adp/src/operations/operations.ts @@ -0,0 +1,125 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { AdpManagementClientContext } from "../adpManagementClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: AdpManagementClientContext; + + /** + * Create a Operations. + * @param {AdpManagementClientContext} client Reference to the service client. + */ + constructor(client: AdpManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available Autonomous Development Platform provider operations. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the available Autonomous Development Platform provider operations. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.AutonomousDevelopmentPlatform/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/adp/arm-adp/tsconfig.json b/sdk/adp/arm-adp/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/adp/arm-adp/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts"], + "exclude": ["node_modules"] +}