From 5cf729557911aedac441794a34c90b58330eb628 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 1 Nov 2021 02:03:14 +0000 Subject: [PATCH] CodeGen from PR 16207 in Azure/azure-rest-api-specs Fix schemas readme files (#16207) * Fix schemas readme files * fix ref --- sdk/azurearcdata/arm-azurearcdata/LICENSE.txt | 21 + sdk/azurearcdata/arm-azurearcdata/README.md | 106 ++ .../arm-azurearcdata/package.json | 59 + .../arm-azurearcdata/rollup.config.js | 37 + .../src/azureArcDataManagementClient.ts | 53 + .../azureArcDataManagementClientContext.ts | 67 + .../src/models/dataControllersMappers.ts | 37 + .../arm-azurearcdata/src/models/index.ts | 1399 ++++++++++++++++ .../arm-azurearcdata/src/models/mappers.ts | 1400 +++++++++++++++++ .../src/models/operationsMappers.ts | 15 + .../arm-azurearcdata/src/models/parameters.ts | 92 ++ .../src/models/sqlManagedInstancesMappers.ts | 37 + .../src/models/sqlServerInstancesMappers.ts | 37 + .../src/operations/dataControllers.ts | 481 ++++++ .../arm-azurearcdata/src/operations/index.ts | 13 + .../src/operations/operations.ts | 125 ++ .../src/operations/sqlManagedInstances.ts | 483 ++++++ .../src/operations/sqlServerInstances.ts | 483 ++++++ .../arm-azurearcdata/tsconfig.json | 19 + 19 files changed, 4964 insertions(+) create mode 100644 sdk/azurearcdata/arm-azurearcdata/LICENSE.txt create mode 100644 sdk/azurearcdata/arm-azurearcdata/README.md create mode 100644 sdk/azurearcdata/arm-azurearcdata/package.json create mode 100644 sdk/azurearcdata/arm-azurearcdata/rollup.config.js create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/azureArcDataManagementClient.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/azureArcDataManagementClientContext.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/models/dataControllersMappers.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/models/index.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/models/mappers.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/models/operationsMappers.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/models/parameters.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/models/sqlManagedInstancesMappers.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/models/sqlServerInstancesMappers.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/operations/dataControllers.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/operations/index.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/operations/operations.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/operations/sqlManagedInstances.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/src/operations/sqlServerInstances.ts create mode 100644 sdk/azurearcdata/arm-azurearcdata/tsconfig.json diff --git a/sdk/azurearcdata/arm-azurearcdata/LICENSE.txt b/sdk/azurearcdata/arm-azurearcdata/LICENSE.txt new file mode 100644 index 000000000000..2d3163745319 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 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/azurearcdata/arm-azurearcdata/README.md b/sdk/azurearcdata/arm-azurearcdata/README.md new file mode 100644 index 000000000000..5c6ca99fb49e --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/README.md @@ -0,0 +1,106 @@ +## Azure AzureArcDataManagementClient SDK for JavaScript + +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AzureArcDataManagementClient. + +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-azurearcdata` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-azurearcdata @azure/identity +``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + +### How to use + +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. + +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. + +##### Sample code + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { AzureArcDataManagementClient } = require("@azure/arm-azurearcdata"); +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new AzureArcDataManagementClient(creds, subscriptionId); +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); +``` + +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. + +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. + +##### Sample code + +- index.html + +```html + + + + @azure/arm-azurearcdata 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/azurearcdata/arm-azurearcdata/README.png) diff --git a/sdk/azurearcdata/arm-azurearcdata/package.json b/sdk/azurearcdata/arm-azurearcdata/package.json new file mode 100644 index 000000000000..8fe81aeb58b3 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/package.json @@ -0,0 +1,59 @@ +{ + "name": "@azure/arm-azurearcdata", + "author": "Microsoft Corporation", + "description": "AzureArcDataManagementClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", + "tslib": "^1.10.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-azurearcdata.js", + "module": "./esm/azureArcDataManagementClient.js", + "types": "./esm/azureArcDataManagementClient.d.ts", + "devDependencies": { + "typescript": "^3.6.0", + "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/azurearcdata/arm-azurearcdata", + "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/arm-azurearcdata.js.map'\" -o ./dist/arm-azurearcdata.min.js ./dist/arm-azurearcdata.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/azurearcdata/arm-azurearcdata/rollup.config.js b/sdk/azurearcdata/arm-azurearcdata/rollup.config.js new file mode 100644 index 000000000000..0dde3241b142 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/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/azureArcDataManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-azurearcdata.js", + format: "umd", + name: "Azure.ArmAzurearcdata", + 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/azurearcdata/arm-azurearcdata/src/azureArcDataManagementClient.ts b/sdk/azurearcdata/arm-azurearcdata/src/azureArcDataManagementClient.ts new file mode 100644 index 000000000000..7bfb9270bb50 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/azureArcDataManagementClient.ts @@ -0,0 +1,53 @@ +/* + * 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 { TokenCredential } from "@azure/core-auth"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { AzureArcDataManagementClientContext } from "./azureArcDataManagementClientContext"; + + +class AzureArcDataManagementClient extends AzureArcDataManagementClientContext { + // Operation groups + operations: operations.Operations; + sqlManagedInstances: operations.SqlManagedInstances; + sqlServerInstances: operations.SqlServerInstances; + dataControllers: operations.DataControllers; + + /** + * Initializes a new instance of the AzureArcDataManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param subscriptionId The ID of the Azure subscription + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureArcDataManagementClientOptions) { + super(credentials, subscriptionId, options); + this.operations = new operations.Operations(this); + this.sqlManagedInstances = new operations.SqlManagedInstances(this); + this.sqlServerInstances = new operations.SqlServerInstances(this); + this.dataControllers = new operations.DataControllers(this); + } +} + +// Operation Specifications + +export { + AzureArcDataManagementClient, + AzureArcDataManagementClientContext, + Models as AzureArcDataManagementModels, + Mappers as AzureArcDataManagementMappers +}; +export * from "./operations"; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/azureArcDataManagementClientContext.ts b/sdk/azurearcdata/arm-azurearcdata/src/azureArcDataManagementClientContext.ts new file mode 100644 index 000000000000..0e9f8d58f1ac --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/azureArcDataManagementClientContext.ts @@ -0,0 +1,67 @@ +/* + * 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"; +import { TokenCredential } from "@azure/core-auth"; + +const packageName = "@azure/arm-azurearcdata"; +const packageVersion = "1.0.0"; + +export class AzureArcDataManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials | TokenCredential; + subscriptionId: string; + apiVersion?: string; + + /** + * Initializes a new instance of the AzureArcDataManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param subscriptionId The ID of the Azure subscription + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureArcDataManagementClientOptions) { + 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 = '2021-08-01'; + 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/azurearcdata/arm-azurearcdata/src/models/dataControllersMappers.ts b/sdk/azurearcdata/arm-azurearcdata/src/models/dataControllersMappers.ts new file mode 100644 index 000000000000..88253b8f815e --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/models/dataControllersMappers.ts @@ -0,0 +1,37 @@ +/* + * 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 { + BaseResource, + BasicLoginInformation, + DataControllerProperties, + DataControllerResource, + DataControllerUpdate, + ErrorResponse, + ErrorResponseBody, + ExtendedLocation, + K8sResourceRequirements, + K8sScheduling, + K8sSchedulingOptions, + LogAnalyticsWorkspaceConfig, + OnPremiseProperty, + PageOfDataControllerResource, + ProxyResource, + Resource, + SqlManagedInstance, + SqlManagedInstanceK8sRaw, + SqlManagedInstanceK8sSpec, + SqlManagedInstanceProperties, + SqlManagedInstanceSku, + SqlServerInstance, + SqlServerInstanceProperties, + SystemData, + TrackedResource, + UploadServicePrincipal, + UploadWatermark +} from "../models/mappers"; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/models/index.ts b/sdk/azurearcdata/arm-azurearcdata/src/models/index.ts new file mode 100644 index 000000000000..e91ace2cb340 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/models/index.ts @@ -0,0 +1,1399 @@ +/* + * 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 }; + +/** + * The resource model definition representing SKU for ARM resources + */ +export interface CommonSku { + /** + * The name of the SKU. It is typically a letter+number code + */ + name: string; + /** + * Whether dev/test is enabled. When the dev field is set to true, the resource is used for + * dev/test purpose. Default value: true. + */ + dev?: boolean; + /** + * The SKU size. When the name field is the combination of tier and some other value, this would + * be the standalone code. + */ + size?: string; + /** + * If the service has different generations of hardware, for the same SKU, then that can be + * captured here. + */ + family?: string; + /** + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in + * is not possible for the resource this may be omitted. + */ + capacity?: number; +} + +/** + * The resource model definition representing SKU for Azure Managed Instance - Azure Arc + */ +export interface SqlManagedInstanceSku { + /** + * The pricing tier for the instance. Possible values include: 'GeneralPurpose', + * 'BusinessCritical'. Default value: 'GeneralPurpose'. + */ + tier?: SqlManagedInstanceSkuTier; + /** + * Whether dev/test is enabled. When the dev field is set to true, the resource is used for + * dev/test purpose. Default value: true. + */ + dev?: boolean; + /** + * The SKU size. When the name field is the combination of tier and some other value, this would + * be the standalone code. + */ + size?: string; + family?: string; + capacity?: number; +} + +/** + * Identity for the resource. + */ +export interface Identity { + /** + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The identity type. Possible values include: 'SystemAssigned' + */ + type?: ResourceIdentityType; +} + +/** + * Plan for the resource. + */ +export interface Plan { + /** + * A user defined name of the 3rd Party Artifact that is being procured. + */ + name: string; + /** + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + */ + publisher: string; + /** + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID + * specified for the artifact at the time of Data Market onboarding. + */ + product: string; + /** + * A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + */ + promotionCode?: string; + /** + * The version of the desired product/artifact. + */ + version?: string; +} + +/** + * Display metadata associated with the operation. + */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name. + */ + provider: string; + /** + * The localized friendly form of the resource type related to this action/operation. + */ + resource: string; + /** + * The localized friendly name for the operation. + */ + operation: string; + /** + * The localized friendly description for the operation. + */ + description: string; +} + +/** + * Azure Data Services on Azure Arc operation definition. + */ +export interface Operation { + /** + * The name of the operation being performed on this particular object. + */ + name: string; + /** + * The localized display information for this particular operation / action. + */ + display: OperationDisplay; + /** + * The intended executor of the operation. Possible values include: 'user', 'system' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly origin?: OperationOrigin; + /** + * Indicates whether the operation is a data action + */ + isDataAction: boolean; + /** + * Additional descriptions for the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly properties?: { [propertyName: string]: any }; +} + +/** + * An interface representing 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. Ex- 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; +} + +/** + * Read only system data + */ +export interface SystemData { + /** + * An identifier for the identity that created the resource + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: IdentityType; + /** + * The timestamp of resource creation (UTC) + */ + createdAt?: Date; + /** + * An identifier for 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?: IdentityType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + +/** + * The resource model definition for a ARM tracked top level resource + */ +export interface TrackedResource extends Resource { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; +} + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + +/** + * The complex type of the extended location. + */ +export interface ExtendedLocation { + /** + * The name of the extended location. + */ + name?: string; + /** + * The type of the extended location. Possible values include: 'CustomLocation' + */ + type?: ExtendedLocationTypes; +} + +/** + * Properties from the Kubernetes data controller + */ +export interface OnPremiseProperty { + /** + * A globally unique ID identifying the associated Kubernetes cluster + */ + id: string; + /** + * Certificate that contains the Kubernetes cluster public key used to verify signing + */ + publicSigningKey: string; + /** + * Unique thumbprint returned to customer to verify the certificate being uploaded + */ + signingCertificateThumbprint?: string; +} + +/** + * Properties on upload watermark. Mostly timestamp for each upload data type + */ +export interface UploadWatermark { + /** + * Last uploaded date for metrics from kubernetes cluster. Defaults to current date time + */ + metrics?: Date; + /** + * Last uploaded date for logs from kubernetes cluster. Defaults to current date time + */ + logs?: Date; + /** + * Last uploaded date for usages from kubernetes cluster. Defaults to current date time + */ + usages?: Date; +} + +/** + * Username and password for basic login authentication. + */ +export interface BasicLoginInformation { + /** + * Login username. + */ + username?: string; + /** + * Login password. + */ + password?: string; +} + +/** + * Log analytics workspace id and primary key + */ +export interface LogAnalyticsWorkspaceConfig { + /** + * Azure Log Analytics workspace ID + */ + workspaceId?: string; + /** + * Primary key of the workspace + */ + primaryKey?: string; +} + +/** + * Service principal for uploading billing, metrics and logs. + */ +export interface UploadServicePrincipal { + /** + * Client ID of the service principal for uploading data. + */ + clientId?: string; + /** + * Tenant ID of the service principal. + */ + tenantId?: string; + /** + * Authority for the service principal. Example: https://login.microsoftonline.com/ + */ + authority?: string; + /** + * Secret of the service principal + */ + clientSecret?: string; +} + +/** + * The data controller properties. + */ +export interface DataControllerProperties { + /** + * The infrastructure the data controller is running on. Possible values include: 'azure', 'gcp', + * 'aws', 'alibaba', 'onpremises', 'other'. Default value: 'other'. + */ + infrastructure?: Infrastructure; + onPremiseProperty?: OnPremiseProperty; + /** + * The raw kubernetes information + */ + k8sRaw?: any; + uploadWatermark?: UploadWatermark; + /** + * Last uploaded date from Kubernetes cluster. Defaults to current date time + */ + lastUploadedDate?: Date; + basicLoginInformation?: BasicLoginInformation; + logAnalyticsWorkspaceConfig?: LogAnalyticsWorkspaceConfig; + uploadServicePrincipal?: UploadServicePrincipal; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * If a CustomLocation is provided, this contains the ARM id of the connected cluster the custom + * location belongs to. + */ + clusterId?: string; + /** + * If a CustomLocation is provided, this contains the ARM id of the extension the custom location + * belongs to. + */ + extensionId?: string; +} + +/** + * Data controller resource + */ +export interface DataControllerResource extends TrackedResource { + /** + * The extendedLocation of the resource. + */ + extendedLocation?: ExtendedLocation; + /** + * The data controller's properties + */ + properties: DataControllerProperties; +} + +/** + * Used for updating a data controller resource. + */ +export interface DataControllerUpdate { + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * An interface representing ResourceSku. + */ +export interface ResourceSku { + capacity?: number; + family?: string; + name?: string; + size?: string; + tier?: string; +} + +/** + * The kubernetes resource limits and requests used to restrict or reserve resource usage. + */ +export interface K8sResourceRequirements { + /** + * Requests for a kubernetes resource type (e.g 'cpu', 'memory'). The 'cpu' request must be less + * than or equal to 'cpu' limit. Default 'cpu' is 2, minimum is 1. Default 'memory' is '4Gi', + * minimum is '2Gi. If sku.tier is GeneralPurpose, maximum 'cpu' is 24 and maximum 'memory' is + * '128Gi'. + */ + requests?: { [propertyName: string]: string }; + /** + * Limits for a kubernetes resource type (e.g 'cpu', 'memory'). The 'cpu' request must be less + * than or equal to 'cpu' limit. Default 'cpu' is 2, minimum is 1. Default 'memory' is '4Gi', + * minimum is '2Gi. If sku.tier is GeneralPurpose, maximum 'cpu' is 24 and maximum 'memory' is + * '128Gi'. + */ + limits?: { [propertyName: string]: string }; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * The kubernetes scheduling options. It describes restrictions used to help Kubernetes select + * appropriate nodes to host the database service + */ +export interface K8sSchedulingOptions { + resources?: K8sResourceRequirements; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * The kubernetes scheduling information. + */ +export interface K8sScheduling { + default?: K8sSchedulingOptions; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * The kubernetes spec information. + */ +export interface SqlManagedInstanceK8sSpec { + scheduling?: K8sScheduling; + /** + * This option specifies the number of SQL Managed Instance replicas that will be deployed in + * your Kubernetes cluster for high availability purposes. If sku.tier is BusinessCritical, + * allowed values are '2' or '3' with default of '3'. If sku.tier is GeneralPurpose, replicas + * must be '1'. + */ + replicas?: number; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * The raw kubernetes information. + */ +export interface SqlManagedInstanceK8sRaw { + spec?: SqlManagedInstanceK8sSpec; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * Properties of sqlManagedInstance. + */ +export interface SqlManagedInstanceProperties { + /** + * null + */ + dataControllerId?: string; + /** + * The instance admin user + */ + admin?: string; + /** + * The instance start time + */ + startTime?: string; + /** + * The instance end time + */ + endTime?: string; + /** + * The raw kubernetes information + */ + k8sRaw?: SqlManagedInstanceK8sRaw; + /** + * Username and password for basic authentication. + */ + basicLoginInformation?: BasicLoginInformation; + /** + * Last uploaded date from Kubernetes cluster. Defaults to current date time + */ + lastUploadedDate?: Date; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * The license type to apply for this managed instance. Possible values include: 'BasePrice', + * 'LicenseIncluded'. Default value: 'BasePrice'. + */ + licenseType?: ArcSqlManagedInstanceLicenseType; + /** + * If a CustomLocation is provided, this contains the ARM id of the connected cluster the custom + * location belongs to. + */ + clusterId?: string; + /** + * If a CustomLocation is provided, this contains the ARM id of the extension the custom location + * belongs to. + */ + extensionId?: string; +} + +/** + * A SqlManagedInstance. + */ +export interface SqlManagedInstance extends TrackedResource { + /** + * null + */ + properties: SqlManagedInstanceProperties; + /** + * The extendedLocation of the resource. + */ + extendedLocation?: ExtendedLocation; + /** + * Resource sku. + */ + sku?: SqlManagedInstanceSku; +} + +/** + * An update to a SQL Managed Instance. + */ +export interface SqlManagedInstanceUpdate { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Properties of SqlServerInstance. + */ +export interface SqlServerInstanceProperties { + /** + * SQL Server version. Possible values include: 'SQL Server 2019', 'SQL Server 2017', 'SQL Server + * 2016' + */ + version?: SqlVersion; + /** + * SQL Server edition. Possible values include: 'Evaluation', 'Enterprise', 'Standard', 'Web', + * 'Developer', 'Express' + */ + edition?: EditionType; + /** + * ARM Resource id of the container resource (Azure Arc for Servers). + */ + containerResourceId: string; + /** + * The time when the resource was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createTime?: string; + /** + * The number of logical processors used by the SQL Server instance. + */ + vCore?: string; + /** + * The cloud connectivity status. Possible values include: 'Connected', 'Disconnected', 'Unknown' + */ + status: ConnectionStatus; + /** + * SQL Server update level. + */ + patchLevel?: string; + /** + * SQL Server collation. + */ + collation?: string; + /** + * SQL Server current version. + */ + currentVersion?: string; + /** + * SQL Server instance name. + */ + instanceName?: string; + /** + * Dynamic TCP ports used by SQL Server. + */ + tcpDynamicPorts?: string; + /** + * Static TCP ports used by SQL Server. + */ + tcpStaticPorts?: string; + /** + * SQL Server product ID. + */ + productId?: string; + /** + * SQL Server license type. Possible values include: 'Paid', 'Free', 'HADR', 'Undefined' + */ + licenseType?: ArcSqlServerLicenseType; + /** + * Timestamp of last Azure Defender status update. + */ + azureDefenderStatusLastUpdated?: Date; + /** + * Status of Azure Defender. Possible values include: 'Protected', 'Unprotected', 'Unknown' + */ + azureDefenderStatus?: DefenderStatus; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * A SqlServerInstance. + */ +export interface SqlServerInstance extends TrackedResource { + /** + * null + */ + properties?: SqlServerInstanceProperties; +} + +/** + * An update to a SQL Server Instance. + */ +export interface SqlServerInstanceUpdate { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * An error response from the Batch service. + */ +export interface ErrorResponseBody { + /** + * An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. + */ + code?: string; + /** + * A message describing the error, intended to be suitable for display in a user interface. + */ + message?: string; + /** + * The target of the particular error. For example, the name of the property in error. + */ + target?: string; + /** + * A list of additional details about the error. + */ + details?: ErrorResponseBody[]; +} + +/** + * An error response from the Azure Data on Azure Arc service. + */ +export interface ErrorResponse { + /** + * null + */ + error?: ErrorResponseBody; +} + +/** + * Information about an error. + */ +export interface ODataError { + /** + * A language-independent error name. + */ + code?: string; + /** + * The error message. + */ + message?: string; + /** + * The target of the error (for example, the name of the property in error). + */ + target?: string; + /** + * The error details. + */ + details?: ODataError[]; +} + +/** + * An interface representing AzureArcDataManagementClientOptions. + */ +export interface AzureArcDataManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * Result of the request to list Azure Data Services on Azure Arc operations. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of SqlManagedInstance. + * @extends Array + */ +export interface SqlManagedInstanceListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of SqlServerInstance. + * @extends Array + */ +export interface SqlServerInstanceListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the PageOfDataControllerResource. + * @extends Array + */ +export interface PageOfDataControllerResource extends Array { + /** + * Link to retrieve next page of results. + */ + nextLink?: string; +} + +/** + * Defines values for SqlManagedInstanceSkuTier. + * Possible values include: 'GeneralPurpose', 'BusinessCritical' + * @readonly + * @enum {string} + */ +export type SqlManagedInstanceSkuTier = 'GeneralPurpose' | 'BusinessCritical'; + +/** + * Defines values for ResourceIdentityType. + * Possible values include: 'SystemAssigned' + * @readonly + * @enum {string} + */ +export type ResourceIdentityType = 'SystemAssigned'; + +/** + * Defines values for OperationOrigin. + * Possible values include: 'user', 'system' + * @readonly + * @enum {string} + */ +export type OperationOrigin = 'user' | 'system'; + +/** + * Defines values for IdentityType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type IdentityType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for ExtendedLocationTypes. + * Possible values include: 'CustomLocation' + * @readonly + * @enum {string} + */ +export type ExtendedLocationTypes = 'CustomLocation'; + +/** + * Defines values for Infrastructure. + * Possible values include: 'azure', 'gcp', 'aws', 'alibaba', 'onpremises', 'other' + * @readonly + * @enum {string} + */ +export type Infrastructure = 'azure' | 'gcp' | 'aws' | 'alibaba' | 'onpremises' | 'other'; + +/** + * Defines values for ArcSqlManagedInstanceLicenseType. + * Possible values include: 'BasePrice', 'LicenseIncluded' + * @readonly + * @enum {string} + */ +export type ArcSqlManagedInstanceLicenseType = 'BasePrice' | 'LicenseIncluded'; + +/** + * Defines values for SqlVersion. + * Possible values include: 'SQL Server 2019', 'SQL Server 2017', 'SQL Server 2016' + * @readonly + * @enum {string} + */ +export type SqlVersion = 'SQL Server 2019' | 'SQL Server 2017' | 'SQL Server 2016'; + +/** + * Defines values for EditionType. + * Possible values include: 'Evaluation', 'Enterprise', 'Standard', 'Web', 'Developer', 'Express' + * @readonly + * @enum {string} + */ +export type EditionType = 'Evaluation' | 'Enterprise' | 'Standard' | 'Web' | 'Developer' | 'Express'; + +/** + * Defines values for ConnectionStatus. + * Possible values include: 'Connected', 'Disconnected', 'Unknown' + * @readonly + * @enum {string} + */ +export type ConnectionStatus = 'Connected' | 'Disconnected' | 'Unknown'; + +/** + * Defines values for ArcSqlServerLicenseType. + * Possible values include: 'Paid', 'Free', 'HADR', 'Undefined' + * @readonly + * @enum {string} + */ +export type ArcSqlServerLicenseType = 'Paid' | 'Free' | 'HADR' | 'Undefined'; + +/** + * Defines values for DefenderStatus. + * Possible values include: 'Protected', 'Unprotected', 'Unknown' + * @readonly + * @enum {string} + */ +export type DefenderStatus = 'Protected' | 'Unprotected' | 'Unknown'; + +/** + * 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 SqlManagedInstancesListResponse = SqlManagedInstanceListResult & { + /** + * 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: SqlManagedInstanceListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type SqlManagedInstancesListByResourceGroupResponse = SqlManagedInstanceListResult & { + /** + * 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: SqlManagedInstanceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SqlManagedInstancesGetResponse = SqlManagedInstance & { + /** + * 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: SqlManagedInstance; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type SqlManagedInstancesCreateResponse = SqlManagedInstance & { + /** + * 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: SqlManagedInstance; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type SqlManagedInstancesUpdateResponse = SqlManagedInstance & { + /** + * 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: SqlManagedInstance; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type SqlManagedInstancesBeginCreateResponse = SqlManagedInstance & { + /** + * 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: SqlManagedInstance; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type SqlManagedInstancesListNextResponse = SqlManagedInstanceListResult & { + /** + * 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: SqlManagedInstanceListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type SqlManagedInstancesListByResourceGroupNextResponse = SqlManagedInstanceListResult & { + /** + * 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: SqlManagedInstanceListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type SqlServerInstancesListResponse = SqlServerInstanceListResult & { + /** + * 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: SqlServerInstanceListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type SqlServerInstancesListByResourceGroupResponse = SqlServerInstanceListResult & { + /** + * 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: SqlServerInstanceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SqlServerInstancesGetResponse = SqlServerInstance & { + /** + * 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: SqlServerInstance; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type SqlServerInstancesCreateResponse = SqlServerInstance & { + /** + * 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: SqlServerInstance; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type SqlServerInstancesUpdateResponse = SqlServerInstance & { + /** + * 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: SqlServerInstance; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type SqlServerInstancesBeginCreateResponse = SqlServerInstance & { + /** + * 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: SqlServerInstance; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type SqlServerInstancesListNextResponse = SqlServerInstanceListResult & { + /** + * 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: SqlServerInstanceListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type SqlServerInstancesListByResourceGroupNextResponse = SqlServerInstanceListResult & { + /** + * 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: SqlServerInstanceListResult; + }; +}; + +/** + * Contains response data for the listInSubscription operation. + */ +export type DataControllersListInSubscriptionResponse = PageOfDataControllerResource & { + /** + * 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: PageOfDataControllerResource; + }; +}; + +/** + * Contains response data for the listInGroup operation. + */ +export type DataControllersListInGroupResponse = PageOfDataControllerResource & { + /** + * 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: PageOfDataControllerResource; + }; +}; + +/** + * Contains response data for the putDataController operation. + */ +export type DataControllersPutDataControllerResponse = DataControllerResource & { + /** + * 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: DataControllerResource; + }; +}; + +/** + * Contains response data for the getDataController operation. + */ +export type DataControllersGetDataControllerResponse = DataControllerResource & { + /** + * 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: DataControllerResource; + }; +}; + +/** + * Contains response data for the patchDataController operation. + */ +export type DataControllersPatchDataControllerResponse = DataControllerResource & { + /** + * 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: DataControllerResource; + }; +}; + +/** + * Contains response data for the beginPutDataController operation. + */ +export type DataControllersBeginPutDataControllerResponse = DataControllerResource & { + /** + * 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: DataControllerResource; + }; +}; + +/** + * Contains response data for the listInSubscriptionNext operation. + */ +export type DataControllersListInSubscriptionNextResponse = PageOfDataControllerResource & { + /** + * 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: PageOfDataControllerResource; + }; +}; + +/** + * Contains response data for the listInGroupNext operation. + */ +export type DataControllersListInGroupNextResponse = PageOfDataControllerResource & { + /** + * 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: PageOfDataControllerResource; + }; +}; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/models/mappers.ts b/sdk/azurearcdata/arm-azurearcdata/src/models/mappers.ts new file mode 100644 index 000000000000..523cbf7bcc39 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/models/mappers.ts @@ -0,0 +1,1400 @@ +/* + * 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 CommonSku: msRest.CompositeMapper = { + serializedName: "CommonSku", + type: { + name: "Composite", + className: "CommonSku", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + dev: { + serializedName: "dev", + defaultValue: true, + type: { + name: "Boolean" + } + }, + size: { + serializedName: "size", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + } + } + } +}; + +export const SqlManagedInstanceSku: msRest.CompositeMapper = { + serializedName: "SqlManagedInstanceSku", + type: { + name: "Composite", + className: "SqlManagedInstanceSku", + modelProperties: { + name: { + required: true, + isConstant: true, + serializedName: "name", + defaultValue: 'vCore', + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + defaultValue: 'GeneralPurpose', + type: { + name: "Enum", + allowedValues: [ + "GeneralPurpose", + "BusinessCritical" + ] + } + }, + dev: { + serializedName: "dev", + defaultValue: true, + type: { + name: "Boolean" + } + }, + size: { + serializedName: "size", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + } + } + } +}; + +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned" + ] + } + } + } + } +}; + +export const Plan: msRest.CompositeMapper = { + serializedName: "Plan", + type: { + name: "Composite", + className: "Plan", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + publisher: { + required: true, + serializedName: "publisher", + type: { + name: "String" + } + }, + product: { + required: true, + serializedName: "product", + type: { + name: "String" + } + }, + promotionCode: { + serializedName: "promotionCode", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + required: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + required: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + required: true, + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + required: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + required: true, + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + readOnly: true, + serializedName: "origin", + type: { + name: "String" + } + }, + isDataAction: { + required: true, + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + properties: { + readOnly: true, + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + } + } + } +}; + +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 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 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" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const ExtendedLocation: msRest.CompositeMapper = { + serializedName: "ExtendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const OnPremiseProperty: msRest.CompositeMapper = { + serializedName: "OnPremiseProperty", + type: { + name: "Composite", + className: "OnPremiseProperty", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "Uuid" + } + }, + publicSigningKey: { + required: true, + serializedName: "publicSigningKey", + type: { + name: "String" + } + }, + signingCertificateThumbprint: { + serializedName: "signingCertificateThumbprint", + type: { + name: "String" + } + } + } + } +}; + +export const UploadWatermark: msRest.CompositeMapper = { + serializedName: "UploadWatermark", + type: { + name: "Composite", + className: "UploadWatermark", + modelProperties: { + metrics: { + serializedName: "metrics", + type: { + name: "DateTime" + } + }, + logs: { + serializedName: "logs", + type: { + name: "DateTime" + } + }, + usages: { + serializedName: "usages", + type: { + name: "DateTime" + } + } + } + } +}; + +export const BasicLoginInformation: msRest.CompositeMapper = { + serializedName: "BasicLoginInformation", + type: { + name: "Composite", + className: "BasicLoginInformation", + modelProperties: { + username: { + serializedName: "username", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const LogAnalyticsWorkspaceConfig: msRest.CompositeMapper = { + serializedName: "LogAnalyticsWorkspaceConfig", + type: { + name: "Composite", + className: "LogAnalyticsWorkspaceConfig", + modelProperties: { + workspaceId: { + serializedName: "workspaceId", + type: { + name: "Uuid" + } + }, + primaryKey: { + serializedName: "primaryKey", + type: { + name: "String" + } + } + } + } +}; + +export const UploadServicePrincipal: msRest.CompositeMapper = { + serializedName: "UploadServicePrincipal", + type: { + name: "Composite", + className: "UploadServicePrincipal", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "Uuid" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "Uuid" + } + }, + authority: { + serializedName: "authority", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "clientSecret", + type: { + name: "String" + } + } + } + } +}; + +export const DataControllerProperties: msRest.CompositeMapper = { + serializedName: "DataControllerProperties", + type: { + name: "Composite", + className: "DataControllerProperties", + modelProperties: { + infrastructure: { + serializedName: "infrastructure", + defaultValue: 'other', + type: { + name: "Enum", + allowedValues: [ + "azure", + "gcp", + "aws", + "alibaba", + "onpremises", + "other" + ] + } + }, + onPremiseProperty: { + serializedName: "onPremiseProperty", + type: { + name: "Composite", + className: "OnPremiseProperty" + } + }, + k8sRaw: { + serializedName: "k8sRaw", + type: { + name: "Object" + } + }, + uploadWatermark: { + serializedName: "uploadWatermark", + type: { + name: "Composite", + className: "UploadWatermark" + } + }, + lastUploadedDate: { + serializedName: "lastUploadedDate", + type: { + name: "DateTime" + } + }, + basicLoginInformation: { + serializedName: "basicLoginInformation", + type: { + name: "Composite", + className: "BasicLoginInformation" + } + }, + logAnalyticsWorkspaceConfig: { + serializedName: "logAnalyticsWorkspaceConfig", + type: { + name: "Composite", + className: "LogAnalyticsWorkspaceConfig" + } + }, + uploadServicePrincipal: { + serializedName: "uploadServicePrincipal", + type: { + name: "Composite", + className: "UploadServicePrincipal" + } + }, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + clusterId: { + serializedName: "clusterId", + type: { + name: "String" + } + }, + extensionId: { + serializedName: "extensionId", + type: { + name: "String" + } + } + } + } +}; + +export const DataControllerResource: msRest.CompositeMapper = { + serializedName: "DataControllerResource", + type: { + name: "Composite", + className: "DataControllerResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "DataControllerProperties" + } + } + } + } +}; + +export const DataControllerUpdate: msRest.CompositeMapper = { + serializedName: "DataControllerUpdate", + type: { + name: "Composite", + className: "DataControllerUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ResourceSku: msRest.CompositeMapper = { + serializedName: "ResourceSku", + type: { + name: "Composite", + className: "ResourceSku", + modelProperties: { + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + } + } + } +}; + +export const K8sResourceRequirements: msRest.CompositeMapper = { + serializedName: "K8sResourceRequirements", + type: { + name: "Composite", + className: "K8sResourceRequirements", + modelProperties: { + requests: { + serializedName: "requests", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + limits: { + serializedName: "limits", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const K8sSchedulingOptions: msRest.CompositeMapper = { + serializedName: "K8sSchedulingOptions", + type: { + name: "Composite", + className: "K8sSchedulingOptions", + modelProperties: { + resources: { + serializedName: "resources", + type: { + name: "Composite", + className: "K8sResourceRequirements", + additionalProperties: { + type: { + name: "Object" + } + } + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const K8sScheduling: msRest.CompositeMapper = { + serializedName: "K8sScheduling", + type: { + name: "Composite", + className: "K8sScheduling", + modelProperties: { + default: { + serializedName: "default", + type: { + name: "Composite", + className: "K8sSchedulingOptions", + additionalProperties: { + type: { + name: "Object" + } + } + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const SqlManagedInstanceK8sSpec: msRest.CompositeMapper = { + serializedName: "SqlManagedInstanceK8sSpec", + type: { + name: "Composite", + className: "SqlManagedInstanceK8sSpec", + modelProperties: { + scheduling: { + serializedName: "scheduling", + type: { + name: "Composite", + className: "K8sScheduling", + additionalProperties: { + type: { + name: "Object" + } + } + } + }, + replicas: { + serializedName: "replicas", + type: { + name: "Number" + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const SqlManagedInstanceK8sRaw: msRest.CompositeMapper = { + serializedName: "SqlManagedInstanceK8sRaw", + type: { + name: "Composite", + className: "SqlManagedInstanceK8sRaw", + modelProperties: { + spec: { + serializedName: "spec", + type: { + name: "Composite", + className: "SqlManagedInstanceK8sSpec", + additionalProperties: { + type: { + name: "Object" + } + } + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const SqlManagedInstanceProperties: msRest.CompositeMapper = { + serializedName: "SqlManagedInstanceProperties", + type: { + name: "Composite", + className: "SqlManagedInstanceProperties", + modelProperties: { + dataControllerId: { + serializedName: "dataControllerId", + type: { + name: "String" + } + }, + admin: { + serializedName: "admin", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "String" + } + }, + k8sRaw: { + serializedName: "k8sRaw", + type: { + name: "Composite", + className: "SqlManagedInstanceK8sRaw", + additionalProperties: { + type: { + name: "Object" + } + } + } + }, + basicLoginInformation: { + serializedName: "basicLoginInformation", + type: { + name: "Composite", + className: "BasicLoginInformation" + } + }, + lastUploadedDate: { + serializedName: "lastUploadedDate", + type: { + name: "DateTime" + } + }, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + licenseType: { + serializedName: "licenseType", + defaultValue: 'BasePrice', + type: { + name: "Enum", + allowedValues: [ + "BasePrice", + "LicenseIncluded" + ] + } + }, + clusterId: { + serializedName: "clusterId", + type: { + name: "String" + } + }, + extensionId: { + serializedName: "extensionId", + type: { + name: "String" + } + } + } + } +}; + +export const SqlManagedInstance: msRest.CompositeMapper = { + serializedName: "SqlManagedInstance", + type: { + name: "Composite", + className: "SqlManagedInstance", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "SqlManagedInstanceProperties" + } + }, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "SqlManagedInstanceSku" + } + } + } + } +}; + +export const SqlManagedInstanceUpdate: msRest.CompositeMapper = { + serializedName: "SqlManagedInstanceUpdate", + type: { + name: "Composite", + className: "SqlManagedInstanceUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SqlServerInstanceProperties: msRest.CompositeMapper = { + serializedName: "SqlServerInstanceProperties", + type: { + name: "Composite", + className: "SqlServerInstanceProperties", + modelProperties: { + version: { + serializedName: "version", + type: { + name: "String" + } + }, + edition: { + serializedName: "edition", + type: { + name: "String" + } + }, + containerResourceId: { + required: true, + serializedName: "containerResourceId", + type: { + name: "String" + } + }, + createTime: { + readOnly: true, + serializedName: "createTime", + type: { + name: "String" + } + }, + vCore: { + serializedName: "vCore", + type: { + name: "String" + } + }, + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + patchLevel: { + serializedName: "patchLevel", + type: { + name: "String" + } + }, + collation: { + serializedName: "collation", + type: { + name: "String" + } + }, + currentVersion: { + serializedName: "currentVersion", + type: { + name: "String" + } + }, + instanceName: { + serializedName: "instanceName", + type: { + name: "String" + } + }, + tcpDynamicPorts: { + serializedName: "tcpDynamicPorts", + type: { + name: "String" + } + }, + tcpStaticPorts: { + serializedName: "tcpStaticPorts", + type: { + name: "String" + } + }, + productId: { + serializedName: "productId", + type: { + name: "String" + } + }, + licenseType: { + serializedName: "licenseType", + type: { + name: "String" + } + }, + azureDefenderStatusLastUpdated: { + serializedName: "azureDefenderStatusLastUpdated", + type: { + name: "DateTime" + } + }, + azureDefenderStatus: { + serializedName: "azureDefenderStatus", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const SqlServerInstance: msRest.CompositeMapper = { + serializedName: "SqlServerInstance", + type: { + name: "Composite", + className: "SqlServerInstance", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "SqlServerInstanceProperties" + } + } + } + } +}; + +export const SqlServerInstanceUpdate: msRest.CompositeMapper = { + serializedName: "SqlServerInstanceUpdate", + type: { + name: "Composite", + className: "SqlServerInstanceUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ErrorResponseBody: msRest.CompositeMapper = { + serializedName: "ErrorResponseBody", + type: { + name: "Composite", + className: "ErrorResponseBody", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponseBody" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponseBody" + } + } + } + } +}; + +export const ODataError: msRest.CompositeMapper = { + serializedName: "ODataError", + type: { + name: "Composite", + className: "ODataError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ODataError" + } + } + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SqlManagedInstanceListResult: msRest.CompositeMapper = { + serializedName: "SqlManagedInstanceListResult", + type: { + name: "Composite", + className: "SqlManagedInstanceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlManagedInstance" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SqlServerInstanceListResult: msRest.CompositeMapper = { + serializedName: "SqlServerInstanceListResult", + type: { + name: "Composite", + className: "SqlServerInstanceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlServerInstance" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PageOfDataControllerResource: msRest.CompositeMapper = { + serializedName: "PageOfDataControllerResource", + type: { + name: "Composite", + className: "PageOfDataControllerResource", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataControllerResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/models/operationsMappers.ts b/sdk/azurearcdata/arm-azurearcdata/src/models/operationsMappers.ts new file mode 100644 index 000000000000..53fc76a5554f --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/models/operationsMappers.ts @@ -0,0 +1,15 @@ +/* + * 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 { + ErrorResponse, + ErrorResponseBody, + Operation, + OperationDisplay, + OperationListResult +} from "../models/mappers"; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/models/parameters.ts b/sdk/azurearcdata/arm-azurearcdata/src/models/parameters.ts new file mode 100644 index 000000000000..2a1eec19a721 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/models/parameters.ts @@ -0,0 +1,92 @@ +/* + * 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 apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +export const dataControllerName: msRest.OperationURLParameter = { + parameterPath: "dataControllerName", + mapper: { + required: true, + serializedName: "dataControllerName", + 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", + type: { + name: "String" + } + } +}; +export const sqlManagedInstanceName: msRest.OperationURLParameter = { + parameterPath: "sqlManagedInstanceName", + mapper: { + required: true, + serializedName: "sqlManagedInstanceName", + type: { + name: "String" + } + } +}; +export const sqlServerInstanceName: msRest.OperationURLParameter = { + parameterPath: "sqlServerInstanceName", + mapper: { + required: true, + serializedName: "sqlServerInstanceName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/models/sqlManagedInstancesMappers.ts b/sdk/azurearcdata/arm-azurearcdata/src/models/sqlManagedInstancesMappers.ts new file mode 100644 index 000000000000..145ca4c0e703 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/models/sqlManagedInstancesMappers.ts @@ -0,0 +1,37 @@ +/* + * 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 { + BaseResource, + BasicLoginInformation, + DataControllerProperties, + DataControllerResource, + ErrorResponse, + ErrorResponseBody, + ExtendedLocation, + K8sResourceRequirements, + K8sScheduling, + K8sSchedulingOptions, + LogAnalyticsWorkspaceConfig, + OnPremiseProperty, + ProxyResource, + Resource, + SqlManagedInstance, + SqlManagedInstanceK8sRaw, + SqlManagedInstanceK8sSpec, + SqlManagedInstanceListResult, + SqlManagedInstanceProperties, + SqlManagedInstanceSku, + SqlManagedInstanceUpdate, + SqlServerInstance, + SqlServerInstanceProperties, + SystemData, + TrackedResource, + UploadServicePrincipal, + UploadWatermark +} from "../models/mappers"; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/models/sqlServerInstancesMappers.ts b/sdk/azurearcdata/arm-azurearcdata/src/models/sqlServerInstancesMappers.ts new file mode 100644 index 000000000000..f7636da164c4 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/models/sqlServerInstancesMappers.ts @@ -0,0 +1,37 @@ +/* + * 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 { + BaseResource, + BasicLoginInformation, + DataControllerProperties, + DataControllerResource, + ErrorResponse, + ErrorResponseBody, + ExtendedLocation, + K8sResourceRequirements, + K8sScheduling, + K8sSchedulingOptions, + LogAnalyticsWorkspaceConfig, + OnPremiseProperty, + ProxyResource, + Resource, + SqlManagedInstance, + SqlManagedInstanceK8sRaw, + SqlManagedInstanceK8sSpec, + SqlManagedInstanceProperties, + SqlManagedInstanceSku, + SqlServerInstance, + SqlServerInstanceListResult, + SqlServerInstanceProperties, + SqlServerInstanceUpdate, + SystemData, + TrackedResource, + UploadServicePrincipal, + UploadWatermark +} from "../models/mappers"; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/operations/dataControllers.ts b/sdk/azurearcdata/arm-azurearcdata/src/operations/dataControllers.ts new file mode 100644 index 000000000000..7e4f4402a69f --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/operations/dataControllers.ts @@ -0,0 +1,481 @@ +/* + * 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/dataControllersMappers"; +import * as Parameters from "../models/parameters"; +import { AzureArcDataManagementClientContext } from "../azureArcDataManagementClientContext"; + +/** Class representing a DataControllers. */ +export class DataControllers { + private readonly client: AzureArcDataManagementClientContext; + + /** + * Create a DataControllers. + * @param {AzureArcDataManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureArcDataManagementClientContext) { + this.client = client; + } + + /** + * @summary List dataController resources in the subscription + * @param [options] The optional parameters + * @returns Promise + */ + listInSubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listInSubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listInSubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listInSubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listInSubscriptionOperationSpec, + callback) as Promise; + } + + /** + * @summary List dataController resources in the resource group + * @param resourceGroupName The name of the Azure resource group + * @param [options] The optional parameters + * @returns Promise + */ + listInGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group + * @param callback The callback + */ + listInGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group + * @param options The optional parameters + * @param callback The callback + */ + listInGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listInGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listInGroupOperationSpec, + callback) as Promise; + } + + /** + * Creates or replaces a dataController resource + * @param resourceGroupName The name of the Azure resource group + * @param dataControllerResource desc + * @param dataControllerName + * @param [options] The optional parameters + * @returns Promise + */ + putDataController(resourceGroupName: string, dataControllerResource: Models.DataControllerResource, dataControllerName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginPutDataController(resourceGroupName,dataControllerResource,dataControllerName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a dataController resource + * @param resourceGroupName The name of the Azure resource group + * @param dataControllerName + * @param [options] The optional parameters + * @returns Promise + */ + deleteDataController(resourceGroupName: string, dataControllerName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteDataController(resourceGroupName,dataControllerName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Retrieves a dataController resource + * @param resourceGroupName The name of the Azure resource group + * @param dataControllerName + * @param [options] The optional parameters + * @returns Promise + */ + getDataController(resourceGroupName: string, dataControllerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group + * @param dataControllerName + * @param callback The callback + */ + getDataController(resourceGroupName: string, dataControllerName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group + * @param dataControllerName + * @param options The optional parameters + * @param callback The callback + */ + getDataController(resourceGroupName: string, dataControllerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getDataController(resourceGroupName: string, dataControllerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dataControllerName, + options + }, + getDataControllerOperationSpec, + callback) as Promise; + } + + /** + * Updates a dataController resource + * @param resourceGroupName The name of the Azure resource group + * @param dataControllerName + * @param dataControllerResource The update data controller resource + * @param [options] The optional parameters + * @returns Promise + */ + patchDataController(resourceGroupName: string, dataControllerName: string, dataControllerResource: Models.DataControllerUpdate, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group + * @param dataControllerName + * @param dataControllerResource The update data controller resource + * @param callback The callback + */ + patchDataController(resourceGroupName: string, dataControllerName: string, dataControllerResource: Models.DataControllerUpdate, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group + * @param dataControllerName + * @param dataControllerResource The update data controller resource + * @param options The optional parameters + * @param callback The callback + */ + patchDataController(resourceGroupName: string, dataControllerName: string, dataControllerResource: Models.DataControllerUpdate, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + patchDataController(resourceGroupName: string, dataControllerName: string, dataControllerResource: Models.DataControllerUpdate, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dataControllerName, + dataControllerResource, + options + }, + patchDataControllerOperationSpec, + callback) as Promise; + } + + /** + * Creates or replaces a dataController resource + * @param resourceGroupName The name of the Azure resource group + * @param dataControllerResource desc + * @param dataControllerName + * @param [options] The optional parameters + * @returns Promise + */ + beginPutDataController(resourceGroupName: string, dataControllerResource: Models.DataControllerResource, dataControllerName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + dataControllerResource, + dataControllerName, + options + }, + beginPutDataControllerOperationSpec, + options); + } + + /** + * Deletes a dataController resource + * @param resourceGroupName The name of the Azure resource group + * @param dataControllerName + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteDataController(resourceGroupName: string, dataControllerName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + dataControllerName, + options + }, + beginDeleteDataControllerOperationSpec, + options); + } + + /** + * @summary List dataController resources in the subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listInSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listInSubscriptionNext(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 + */ + listInSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listInSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listInSubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * @summary List dataController resources in the resource group + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listInGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listInGroupNext(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 + */ + listInGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listInGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listInGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listInSubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.AzureArcData/dataControllers", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PageOfDataControllerResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listInGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/dataControllers", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PageOfDataControllerResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getDataControllerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/dataControllers/{dataControllerName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataControllerName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataControllerResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const patchDataControllerOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/dataControllers/{dataControllerName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataControllerName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "dataControllerResource", + mapper: { + ...Mappers.DataControllerUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataControllerResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginPutDataControllerOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/dataControllers/{dataControllerName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataControllerName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "dataControllerResource", + mapper: { + ...Mappers.DataControllerResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataControllerResource + }, + 201: { + bodyMapper: Mappers.DataControllerResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteDataControllerOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/dataControllers/{dataControllerName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dataControllerName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listInSubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PageOfDataControllerResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listInGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PageOfDataControllerResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/operations/index.ts b/sdk/azurearcdata/arm-azurearcdata/src/operations/index.ts new file mode 100644 index 000000000000..8b9d52209954 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/operations/index.ts @@ -0,0 +1,13 @@ +/* + * 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 "./sqlManagedInstances"; +export * from "./sqlServerInstances"; +export * from "./dataControllers"; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/operations/operations.ts b/sdk/azurearcdata/arm-azurearcdata/src/operations/operations.ts new file mode 100644 index 000000000000..cf6b4598f84f --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/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 { AzureArcDataManagementClientContext } from "../azureArcDataManagementClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: AzureArcDataManagementClientContext; + + /** + * Create a Operations. + * @param {AzureArcDataManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureArcDataManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available Azure Data Services on Azure Arc API 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 Azure Data Services on Azure Arc API 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.AzureArcData/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/azurearcdata/arm-azurearcdata/src/operations/sqlManagedInstances.ts b/sdk/azurearcdata/arm-azurearcdata/src/operations/sqlManagedInstances.ts new file mode 100644 index 000000000000..a99961b5223f --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/operations/sqlManagedInstances.ts @@ -0,0 +1,483 @@ +/* + * 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/sqlManagedInstancesMappers"; +import * as Parameters from "../models/parameters"; +import { AzureArcDataManagementClientContext } from "../azureArcDataManagementClientContext"; + +/** Class representing a SqlManagedInstances. */ +export class SqlManagedInstances { + private readonly client: AzureArcDataManagementClientContext; + + /** + * Create a SqlManagedInstances. + * @param {AzureArcDataManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureArcDataManagementClientContext) { + this.client = client; + } + + /** + * @summary List sqlManagedInstance resources in 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; + } + + /** + * Gets all sqlManagedInstances in a resource group. + * @summary List sqlManagedInstance resources in the resource group + * @param resourceGroupName The name of the Azure resource group + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group + * @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; + } + + /** + * Retrieves a SQL Managed Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlManagedInstanceName Name of SQL Managed Instance + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, sqlManagedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group + * @param sqlManagedInstanceName Name of SQL Managed Instance + * @param callback The callback + */ + get(resourceGroupName: string, sqlManagedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group + * @param sqlManagedInstanceName Name of SQL Managed Instance + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, sqlManagedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, sqlManagedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sqlManagedInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or replaces a SQL Managed Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlManagedInstanceName The name of SQL Managed Instances + * @param sqlManagedInstance The SQL Managed Instance to be created or updated. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, sqlManagedInstanceName: string, sqlManagedInstance: Models.SqlManagedInstance, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,sqlManagedInstanceName,sqlManagedInstance,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a SQL Managed Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlManagedInstanceName The name of Sql Managed Instances + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, sqlManagedInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,sqlManagedInstanceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates a SQL Managed Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlManagedInstanceName Name of sqlManagedInstance + * @param parameters The SQL Managed Instance. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, sqlManagedInstanceName: string, parameters: Models.SqlManagedInstanceUpdate, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group + * @param sqlManagedInstanceName Name of sqlManagedInstance + * @param parameters The SQL Managed Instance. + * @param callback The callback + */ + update(resourceGroupName: string, sqlManagedInstanceName: string, parameters: Models.SqlManagedInstanceUpdate, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group + * @param sqlManagedInstanceName Name of sqlManagedInstance + * @param parameters The SQL Managed Instance. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, sqlManagedInstanceName: string, parameters: Models.SqlManagedInstanceUpdate, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, sqlManagedInstanceName: string, parameters: Models.SqlManagedInstanceUpdate, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sqlManagedInstanceName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Creates or replaces a SQL Managed Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlManagedInstanceName The name of SQL Managed Instances + * @param sqlManagedInstance The SQL Managed Instance to be created or updated. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, sqlManagedInstanceName: string, sqlManagedInstance: Models.SqlManagedInstance, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + sqlManagedInstanceName, + sqlManagedInstance, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes a SQL Managed Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlManagedInstanceName The name of Sql Managed Instances + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, sqlManagedInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + sqlManagedInstanceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List sqlManagedInstance resources in 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; + } + + /** + * Gets all sqlManagedInstances in a resource group. + * @summary List sqlManagedInstance resources in 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.AzureArcData/sqlManagedInstances", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SqlManagedInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlManagedInstances", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SqlManagedInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlManagedInstances/{sqlManagedInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sqlManagedInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SqlManagedInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlManagedInstances/{sqlManagedInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sqlManagedInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SqlManagedInstanceUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SqlManagedInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlManagedInstances/{sqlManagedInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sqlManagedInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "sqlManagedInstance", + mapper: { + ...Mappers.SqlManagedInstance, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SqlManagedInstance + }, + 201: { + bodyMapper: Mappers.SqlManagedInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlManagedInstances/{sqlManagedInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sqlManagedInstanceName + ], + 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.SqlManagedInstanceListResult + }, + 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.SqlManagedInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/azurearcdata/arm-azurearcdata/src/operations/sqlServerInstances.ts b/sdk/azurearcdata/arm-azurearcdata/src/operations/sqlServerInstances.ts new file mode 100644 index 000000000000..10415e31b8e0 --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/src/operations/sqlServerInstances.ts @@ -0,0 +1,483 @@ +/* + * 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/sqlServerInstancesMappers"; +import * as Parameters from "../models/parameters"; +import { AzureArcDataManagementClientContext } from "../azureArcDataManagementClientContext"; + +/** Class representing a SqlServerInstances. */ +export class SqlServerInstances { + private readonly client: AzureArcDataManagementClientContext; + + /** + * Create a SqlServerInstances. + * @param {AzureArcDataManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureArcDataManagementClientContext) { + this.client = client; + } + + /** + * @summary List sqlServerInstance resources in 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; + } + + /** + * Gets all sqlServerInstances in a resource group. + * @summary List sqlServerInstance resources in the resource group + * @param resourceGroupName The name of the Azure resource group + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group + * @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; + } + + /** + * Retrieves a SQL Server Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlServerInstanceName Name of SQL Server Instance + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, sqlServerInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group + * @param sqlServerInstanceName Name of SQL Server Instance + * @param callback The callback + */ + get(resourceGroupName: string, sqlServerInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group + * @param sqlServerInstanceName Name of SQL Server Instance + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, sqlServerInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, sqlServerInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sqlServerInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or replaces a SQL Server Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlServerInstanceName The name of SQL Server Instance + * @param sqlServerInstance The SQL Server Instance to be created or updated. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, sqlServerInstanceName: string, sqlServerInstance: Models.SqlServerInstance, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,sqlServerInstanceName,sqlServerInstance,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a SQL Server Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlServerInstanceName The name of SQL Server Instance + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, sqlServerInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,sqlServerInstanceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates a SQL Server Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlServerInstanceName Name of sqlServerInstance + * @param parameters The SQL Server Instance. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, sqlServerInstanceName: string, parameters: Models.SqlServerInstanceUpdate, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Azure resource group + * @param sqlServerInstanceName Name of sqlServerInstance + * @param parameters The SQL Server Instance. + * @param callback The callback + */ + update(resourceGroupName: string, sqlServerInstanceName: string, parameters: Models.SqlServerInstanceUpdate, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Azure resource group + * @param sqlServerInstanceName Name of sqlServerInstance + * @param parameters The SQL Server Instance. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, sqlServerInstanceName: string, parameters: Models.SqlServerInstanceUpdate, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, sqlServerInstanceName: string, parameters: Models.SqlServerInstanceUpdate, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sqlServerInstanceName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Creates or replaces a SQL Server Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlServerInstanceName The name of SQL Server Instance + * @param sqlServerInstance The SQL Server Instance to be created or updated. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, sqlServerInstanceName: string, sqlServerInstance: Models.SqlServerInstance, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + sqlServerInstanceName, + sqlServerInstance, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes a SQL Server Instance resource + * @param resourceGroupName The name of the Azure resource group + * @param sqlServerInstanceName The name of SQL Server Instance + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, sqlServerInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + sqlServerInstanceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List sqlServerInstance resources in 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; + } + + /** + * Gets all sqlServerInstances in a resource group. + * @summary List sqlServerInstance resources in 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.AzureArcData/sqlServerInstances", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SqlServerInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlServerInstances", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SqlServerInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlServerInstances/{sqlServerInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sqlServerInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SqlServerInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlServerInstances/{sqlServerInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sqlServerInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SqlServerInstanceUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SqlServerInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlServerInstances/{sqlServerInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sqlServerInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "sqlServerInstance", + mapper: { + ...Mappers.SqlServerInstance, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SqlServerInstance + }, + 201: { + bodyMapper: Mappers.SqlServerInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlServerInstances/{sqlServerInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sqlServerInstanceName + ], + 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.SqlServerInstanceListResult + }, + 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.SqlServerInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/azurearcdata/arm-azurearcdata/tsconfig.json b/sdk/azurearcdata/arm-azurearcdata/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/azurearcdata/arm-azurearcdata/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"] +}