From 779b89d1e6918d4a2f30f29cb3e6478b6f4d4aa6 Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Mon, 16 Nov 2020 10:12:04 +0800 Subject: [PATCH] Generated from ba57d745611c5e95fd37dc090e5d31edd4d3511a (#11982) Updated tags Co-authored-by: SDK Automation --- .../arm-healthcareapis/LICENSE.txt | 21 + .../arm-healthcareapis/README.md | 103 ++ .../arm-healthcareapis/package.json | 58 ++ .../arm-healthcareapis/rollup.config.js | 37 + .../src/healthcareApisManagementClient.ts | 50 + .../healthcareApisManagementClientContext.ts | 62 ++ .../arm-healthcareapis/src/models/index.ts | 986 ++++++++++++++++++ .../arm-healthcareapis/src/models/mappers.ts | 916 ++++++++++++++++ .../src/models/operationResultsMappers.ts | 13 + .../src/models/operationsMappers.ts | 15 + .../src/models/parameters.ts | 122 +++ .../privateEndpointConnectionsMappers.ts | 31 + .../src/models/privateLinkResourcesMappers.ts | 31 + .../src/models/servicesMappers.ts | 34 + .../src/operations/index.ts | 15 + .../src/operations/operationResults.ts | 90 ++ .../src/operations/operations.ts | 123 +++ .../operations/privateEndpointConnections.ts | 285 +++++ .../src/operations/privateLinkResources.ts | 149 +++ .../src/operations/services.ts | 533 ++++++++++ .../arm-healthcareapis/tsconfig.json | 19 + 21 files changed, 3693 insertions(+) create mode 100644 sdk/healthcareapis/arm-healthcareapis/LICENSE.txt create mode 100644 sdk/healthcareapis/arm-healthcareapis/README.md create mode 100644 sdk/healthcareapis/arm-healthcareapis/package.json create mode 100644 sdk/healthcareapis/arm-healthcareapis/rollup.config.js create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClient.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClientContext.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/models/index.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/models/mappers.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/models/operationResultsMappers.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/models/operationsMappers.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/models/parameters.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/models/servicesMappers.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/operations/index.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/operations/operationResults.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/operations/operations.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/operations/privateEndpointConnections.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/operations/privateLinkResources.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/src/operations/services.ts create mode 100644 sdk/healthcareapis/arm-healthcareapis/tsconfig.json diff --git a/sdk/healthcareapis/arm-healthcareapis/LICENSE.txt b/sdk/healthcareapis/arm-healthcareapis/LICENSE.txt new file mode 100644 index 000000000000..ea8fb1516028 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/healthcareapis/arm-healthcareapis/README.md b/sdk/healthcareapis/arm-healthcareapis/README.md new file mode 100644 index 000000000000..dd046321d2bd --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/README.md @@ -0,0 +1,103 @@ +## Azure HealthcareApisManagementClient SDK for JavaScript + +This package contains an isomorphic SDK for HealthcareApisManagementClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-healthcareapis +``` + +### How to use + +#### nodejs - Authentication, client creation and get services as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" +``` + +##### Sample code + +```typescript +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import { HealthcareApisManagementClient, HealthcareApisManagementModels, HealthcareApisManagementMappers } from "@azure/arm-healthcareapis"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new HealthcareApisManagementClient(creds, subscriptionId); + const resourceGroupName = "testresourceGroupName"; + const resourceName = "testresourceName"; + client.services.get(resourceGroupName, resourceName).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and get services as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-healthcareapis 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/healthcareapis/arm-healthcareapis/README.png) diff --git a/sdk/healthcareapis/arm-healthcareapis/package.json b/sdk/healthcareapis/arm-healthcareapis/package.json new file mode 100644 index 000000000000..b78262a8533f --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/package.json @@ -0,0 +1,58 @@ +{ + "name": "@azure/arm-healthcareapis", + "author": "Microsoft Corporation", + "description": "HealthcareApisManagementClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-healthcareapis.js", + "module": "./esm/healthcareApisManagementClient.js", + "types": "./esm/healthcareApisManagementClient.d.ts", + "devDependencies": { + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/healthcareapis/arm-healthcareapis", + "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-healthcareapis.js.map'\" -o ./dist/arm-healthcareapis.min.js ./dist/arm-healthcareapis.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/healthcareapis/arm-healthcareapis/rollup.config.js b/sdk/healthcareapis/arm-healthcareapis/rollup.config.js new file mode 100644 index 000000000000..555d5fa9f225 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/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/healthcareApisManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-healthcareapis.js", + format: "umd", + name: "Azure.ArmHealthcareapis", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" + }, + banner: `/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */` + }, + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] +}; + +export default config; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClient.ts b/sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClient.ts new file mode 100644 index 000000000000..1668cc0472e3 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClient.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { HealthcareApisManagementClientContext } from "./healthcareApisManagementClientContext"; + + +class HealthcareApisManagementClient extends HealthcareApisManagementClientContext { + // Operation groups + services: operations.Services; + operations: operations.Operations; + operationResults: operations.OperationResults; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; + + /** + * Initializes a new instance of the HealthcareApisManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The subscription identifier. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.HealthcareApisManagementClientOptions) { + super(credentials, subscriptionId, options); + this.services = new operations.Services(this); + this.operations = new operations.Operations(this); + this.operationResults = new operations.OperationResults(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + } +} + +// Operation Specifications + +export { + HealthcareApisManagementClient, + HealthcareApisManagementClientContext, + Models as HealthcareApisManagementModels, + Mappers as HealthcareApisManagementMappers +}; +export * from "./operations"; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClientContext.ts b/sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClientContext.ts new file mode 100644 index 000000000000..6cf3bdaf6488 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClientContext.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-healthcareapis"; +const packageVersion = "1.0.0"; + +export class HealthcareApisManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + subscriptionId: string; + apiVersion?: string; + + /** + * Initializes a new instance of the HealthcareApisManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The subscription identifier. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.HealthcareApisManagementClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2020-03-30'; + 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/healthcareapis/arm-healthcareapis/src/models/index.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/index.ts new file mode 100644 index 000000000000..6ac837aab5a7 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/index.ts @@ -0,0 +1,986 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + +/** + * An access policy entry. + */ +export interface ServiceAccessPolicyEntry { + /** + * An Azure AD object ID (User or Apps) that is allowed access to the FHIR service. + */ + objectId: string; +} + +/** + * The settings for the Cosmos DB database backing the service. + */ +export interface ServiceCosmosDbConfigurationInfo { + /** + * The provisioned throughput for the backing database. + */ + offerThroughput?: number; + /** + * The URI of the customer-managed key for the backing database. + */ + keyVaultKeyUri?: string; +} + +/** + * Authentication configuration information + */ +export interface ServiceAuthenticationConfigurationInfo { + /** + * The authority url for the service + */ + authority?: string; + /** + * The audience url for the service + */ + audience?: string; + /** + * If the SMART on FHIR proxy is enabled + */ + smartProxyEnabled?: boolean; +} + +/** + * The settings for the CORS configuration of the service instance. + */ +export interface ServiceCorsConfigurationInfo { + /** + * The origins to be allowed via CORS. + */ + origins?: string[]; + /** + * The headers to be allowed via CORS. + */ + headers?: string[]; + /** + * The methods to be allowed via CORS. + */ + methods?: string[]; + /** + * The max age to be allowed via CORS. + */ + maxAge?: number; + /** + * If credentials are allowed via CORS. + */ + allowCredentials?: boolean; +} + +/** + * Export operation configuration information + */ +export interface ServiceExportConfigurationInfo { + /** + * The name of the default export storage account. + */ + storageAccountName?: string; +} + +/** + * The Private Endpoint resource. + */ +export interface PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * A collection of information about the state of the connection between service consumer and + * provider. + */ +export interface PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. Possible values include: 'Pending', 'Approved', 'Rejected' + */ + status?: PrivateEndpointServiceConnectionStatus; + /** + * The reason for approval/rejection of the connection. + */ + description?: string; + /** + * A message indicating if changes on the service provider require any updates on the consumer. + */ + actionsRequired?: string; +} + +/** + * 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; +} + +/** + * The Private Endpoint Connection resource. + */ +export interface PrivateEndpointConnection extends Resource { + /** + * The resource of private end point. + */ + privateEndpoint?: PrivateEndpoint; + /** + * A collection of information about the state of the connection between service consumer and + * provider. + */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. Possible values include: + * 'Succeeded', 'Creating', 'Deleting', 'Failed' + */ + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +/** + * The properties of a service instance. + */ +export interface ServicesProperties { + /** + * The provisioning state. Possible values include: 'Deleting', 'Succeeded', 'Creating', + * 'Accepted', 'Verifying', 'Updating', 'Failed', 'Canceled', 'Deprovisioned' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * The access policies of the service instance. + */ + accessPolicies?: ServiceAccessPolicyEntry[]; + /** + * The settings for the Cosmos DB database backing the service. + */ + cosmosDbConfiguration?: ServiceCosmosDbConfigurationInfo; + /** + * The authentication configuration for the service instance. + */ + authenticationConfiguration?: ServiceAuthenticationConfigurationInfo; + /** + * The settings for the CORS configuration of the service instance. + */ + corsConfiguration?: ServiceCorsConfigurationInfo; + /** + * The settings for the export operation of the service instance. + */ + exportConfiguration?: ServiceExportConfigurationInfo; + /** + * The list of private endpoint connections that are set up for this resource. + */ + privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * Control permission for data plane traffic coming from public networks while private endpoint + * is enabled. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; +} + +/** + * The common properties of a service. + */ +export interface ServicesResource extends BaseResource { + /** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The kind of the service. Possible values include: 'fhir', 'fhir-Stu3', 'fhir-R4' + */ + kind: Kind; + /** + * The resource location. + */ + location: string; + /** + * The resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * An etag associated with the resource, used for optimistic concurrency when editing it. + */ + etag?: string; + /** + * Setting indicating whether the service has a managed identity associated with it. + */ + identity?: ServicesResourceIdentity; +} + +/** + * The description of the service. + */ +export interface ServicesDescription extends ServicesResource { + /** + * The common properties of a service. + */ + properties?: ServicesProperties; +} + +/** + * The description of the service. + */ +export interface ServicesPatchDescription { + /** + * Instance tags + */ + tags?: { [propertyName: string]: string }; + /** + * Control permission for data plane traffic coming from public networks while private endpoint + * is enabled. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; +} + +/** + * Setting indicating whether the service has a managed identity associated with it. + */ +export interface ServicesResourceIdentity { + /** + * The principal ID of the resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant ID of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * Type of identity being specified, currently SystemAssigned and None are allowed. Possible + * values include: 'SystemAssigned', 'None' + */ + type?: ManagedServiceIdentityType; +} + +/** + * Error details. + */ +export interface ErrorDetailsInternal { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The target of the particular error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; +} + +/** + * Error details. + */ +export interface ErrorDetails { + /** + * Object containing error details. + */ + error?: ErrorDetailsInternal; +} + +/** + * The object that represents the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft.HealthcareApis + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provider?: string; + /** + * Resource Type: Services + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * Name of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; + /** + * Friendly description for the operation, + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; +} + +/** + * Service REST API operation. + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{read | write | action | delete} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Default value is 'user,system'. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly origin?: string; + /** + * The information displayed about the operation. + */ + display?: OperationDisplay; +} + +/** + * Input values. + */ +export interface CheckNameAvailabilityParameters { + /** + * The name of the service instance to check. + */ + name: string; + /** + * The fully qualified resource type which includes provider namespace. + */ + type: string; +} + +/** + * The properties indicating whether a given service name is available. + */ +export interface ServicesNameAvailabilityInfo { + /** + * The value which indicates whether the provided name is available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nameAvailable?: boolean; + /** + * The reason for unavailability. Possible values include: 'Invalid', 'AlreadyExists' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reason?: ServiceNameUnavailabilityReason; + /** + * The detailed reason message. + */ + message?: string; +} + +/** + * The properties indicating the operation result of an operation on a service. + */ +export interface OperationResultsDescription { + /** + * The ID of the operation returned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the operation result. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The status of the operation being performed. Possible values include: 'Canceled', 'Succeeded', + * 'Failed', 'Requested', 'Running' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: OperationResultStatus; + /** + * The time that the operation was started. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startTime?: string; + /** + * Additional properties of the operation result. + */ + properties?: any; +} + +/** + * 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 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; +} + +/** + * The resource model definition for a Azure Resource Manager resource with an etag. + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource extends Resource { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; +} + +/** + * A list of private link resources + */ +export interface PrivateLinkResourceListResult { + /** + * Array of private link resources + */ + value?: PrivateLinkResource[]; +} + +/** + * An interface representing HealthcareApisManagementClientOptions. + */ +export interface HealthcareApisManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * A list of service description objects with a next link. + * @extends Array + */ +export interface ServicesDescriptionListResult extends Array { + /** + * The link used to get the next page of service description objects. + */ + nextLink?: string; +} + +/** + * @interface + * A list of service operations. It contains a list of operations and a URL link to get the next + * set of results. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * The link used to get the next page of service description objects. + */ + nextLink?: string; +} + +/** + * @interface + * List of private endpoint connection associated with the specified storage account + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { +} + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Deleting', 'Succeeded', 'Creating', 'Accepted', 'Verifying', + * 'Updating', 'Failed', 'Canceled', 'Deprovisioned' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Deleting' | 'Succeeded' | 'Creating' | 'Accepted' | 'Verifying' | 'Updating' | 'Failed' | 'Canceled' | 'Deprovisioned'; + +/** + * Defines values for PrivateEndpointServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected' + * @readonly + * @enum {string} + */ +export type PrivateEndpointServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected'; + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. + * Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + * @readonly + * @enum {string} + */ +export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating' | 'Deleting' | 'Failed'; + +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; + +/** + * Defines values for Kind. + * Possible values include: 'fhir', 'fhir-Stu3', 'fhir-R4' + * @readonly + * @enum {string} + */ +export type Kind = 'fhir' | 'fhir-Stu3' | 'fhir-R4'; + +/** + * Defines values for ManagedServiceIdentityType. + * Possible values include: 'SystemAssigned', 'None' + * @readonly + * @enum {string} + */ +export type ManagedServiceIdentityType = 'SystemAssigned' | 'None'; + +/** + * Defines values for ServiceNameUnavailabilityReason. + * Possible values include: 'Invalid', 'AlreadyExists' + * @readonly + * @enum {string} + */ +export type ServiceNameUnavailabilityReason = 'Invalid' | 'AlreadyExists'; + +/** + * Defines values for OperationResultStatus. + * Possible values include: 'Canceled', 'Succeeded', 'Failed', 'Requested', 'Running' + * @readonly + * @enum {string} + */ +export type OperationResultStatus = 'Canceled' | 'Succeeded' | 'Failed' | 'Requested' | 'Running'; + +/** + * Contains response data for the get operation. + */ +export type ServicesGetResponse = ServicesDescription & { + /** + * 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: ServicesDescription; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServicesCreateOrUpdateResponse = ServicesDescription & { + /** + * 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: ServicesDescription; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ServicesUpdateResponse = ServicesDescription & { + /** + * 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: ServicesDescription; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServicesListResponse = ServicesDescriptionListResult & { + /** + * 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: ServicesDescriptionListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ServicesListByResourceGroupResponse = ServicesDescriptionListResult & { + /** + * 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: ServicesDescriptionListResult; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type ServicesCheckNameAvailabilityResponse = ServicesNameAvailabilityInfo & { + /** + * 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: ServicesNameAvailabilityInfo; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServicesBeginCreateOrUpdateResponse = ServicesDescription & { + /** + * 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: ServicesDescription; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ServicesBeginUpdateResponse = ServicesDescription & { + /** + * 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: ServicesDescription; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ServicesListNextResponse = ServicesDescriptionListResult & { + /** + * 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: ServicesDescriptionListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ServicesListByResourceGroupNextResponse = ServicesDescriptionListResult & { + /** + * 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: ServicesDescriptionListResult; + }; +}; + +/** + * 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 get operation. + */ +export type OperationResultsGetResponse = { + /** + * The parsed response body. + */ + body: any; + + /** + * 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: any; + }; +}; + +/** + * Contains response data for the listByService operation. + */ +export type PrivateEndpointConnectionsListByServiceResponse = PrivateEndpointConnectionListResult & { + /** + * 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: PrivateEndpointConnectionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByService operation. + */ +export type PrivateLinkResourcesListByServiceResponse = PrivateLinkResourceListResult & { + /** + * 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: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { + /** + * 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: PrivateLinkResource; + }; +}; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/models/mappers.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/mappers.ts new file mode 100644 index 000000000000..d94e8ac1a5e4 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/mappers.ts @@ -0,0 +1,916 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +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 ServiceAccessPolicyEntry: msRest.CompositeMapper = { + serializedName: "ServiceAccessPolicyEntry", + type: { + name: "Composite", + className: "ServiceAccessPolicyEntry", + modelProperties: { + objectId: { + required: true, + serializedName: "objectId", + constraints: { + Pattern: /^(([0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}){1})+$/ + }, + type: { + name: "String" + } + } + } + } +}; + +export const ServiceCosmosDbConfigurationInfo: msRest.CompositeMapper = { + serializedName: "ServiceCosmosDbConfigurationInfo", + type: { + name: "Composite", + className: "ServiceCosmosDbConfigurationInfo", + modelProperties: { + offerThroughput: { + serializedName: "offerThroughput", + constraints: { + InclusiveMaximum: 10000, + InclusiveMinimum: 400 + }, + type: { + name: "Number" + } + }, + keyVaultKeyUri: { + serializedName: "keyVaultKeyUri", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceAuthenticationConfigurationInfo: msRest.CompositeMapper = { + serializedName: "ServiceAuthenticationConfigurationInfo", + type: { + name: "Composite", + className: "ServiceAuthenticationConfigurationInfo", + modelProperties: { + authority: { + serializedName: "authority", + type: { + name: "String" + } + }, + audience: { + serializedName: "audience", + type: { + name: "String" + } + }, + smartProxyEnabled: { + serializedName: "smartProxyEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ServiceCorsConfigurationInfo: msRest.CompositeMapper = { + serializedName: "ServiceCorsConfigurationInfo", + type: { + name: "Composite", + className: "ServiceCorsConfigurationInfo", + modelProperties: { + origins: { + serializedName: "origins", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + headers: { + serializedName: "headers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + methods: { + serializedName: "methods", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + maxAge: { + serializedName: "maxAge", + constraints: { + InclusiveMaximum: 99999, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + allowCredentials: { + serializedName: "allowCredentials", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ServiceExportConfigurationInfo: msRest.CompositeMapper = { + serializedName: "ServiceExportConfigurationInfo", + type: { + name: "Composite", + className: "ServiceExportConfigurationInfo", + modelProperties: { + storageAccountName: { + serializedName: "storageAccountName", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +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 PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + required: true, + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const ServicesProperties: msRest.CompositeMapper = { + serializedName: "ServicesProperties", + type: { + name: "Composite", + className: "ServicesProperties", + modelProperties: { + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + accessPolicies: { + serializedName: "accessPolicies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceAccessPolicyEntry" + } + } + } + }, + cosmosDbConfiguration: { + serializedName: "cosmosDbConfiguration", + type: { + name: "Composite", + className: "ServiceCosmosDbConfigurationInfo" + } + }, + authenticationConfiguration: { + serializedName: "authenticationConfiguration", + type: { + name: "Composite", + className: "ServiceAuthenticationConfigurationInfo" + } + }, + corsConfiguration: { + serializedName: "corsConfiguration", + type: { + name: "Composite", + className: "ServiceCorsConfigurationInfo" + } + }, + exportConfiguration: { + serializedName: "exportConfiguration", + type: { + name: "Composite", + className: "ServiceExportConfigurationInfo" + } + }, + privateEndpointConnections: { + serializedName: "privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + } + } + } +}; + +export const ServicesResource: msRest.CompositeMapper = { + serializedName: "ServicesResource", + type: { + name: "Composite", + className: "ServicesResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + constraints: { + Pattern: /^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$/ + }, + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + kind: { + required: true, + serializedName: "kind", + type: { + name: "Enum", + allowedValues: [ + "fhir", + "fhir-Stu3", + "fhir-R4" + ] + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ServicesResourceIdentity" + } + } + } + } +}; + +export const ServicesDescription: msRest.CompositeMapper = { + serializedName: "ServicesDescription", + type: { + name: "Composite", + className: "ServicesDescription", + modelProperties: { + ...ServicesResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ServicesProperties" + } + } + } + } +}; + +export const ServicesPatchDescription: msRest.CompositeMapper = { + serializedName: "ServicesPatchDescription", + type: { + name: "Composite", + className: "ServicesPatchDescription", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + } + } + } +}; + +export const ServicesResourceIdentity: msRest.CompositeMapper = { + serializedName: "ServicesResource_identity", + type: { + name: "Composite", + className: "ServicesResourceIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorDetailsInternal: msRest.CompositeMapper = { + serializedName: "ErrorDetailsInternal", + type: { + name: "Composite", + className: "ErrorDetailsInternal", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorDetails: msRest.CompositeMapper = { + serializedName: "ErrorDetails", + type: { + name: "Composite", + className: "ErrorDetails", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetailsInternal" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + origin: { + readOnly: true, + serializedName: "origin", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const CheckNameAvailabilityParameters: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityParameters", + type: { + name: "Composite", + className: "CheckNameAvailabilityParameters", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ServicesNameAvailabilityInfo: msRest.CompositeMapper = { + serializedName: "ServicesNameAvailabilityInfo", + type: { + name: "Composite", + className: "ServicesNameAvailabilityInfo", + modelProperties: { + nameAvailable: { + readOnly: true, + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + readOnly: true, + serializedName: "reason", + type: { + name: "Enum", + allowedValues: [ + "Invalid", + "AlreadyExists" + ] + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const OperationResultsDescription: msRest.CompositeMapper = { + serializedName: "OperationResultsDescription", + type: { + name: "Composite", + className: "OperationResultsDescription", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "startTime", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Object" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + } + } + } +}; + +export const ServicesDescriptionListResult: msRest.CompositeMapper = { + serializedName: "ServicesDescriptionListResult", + type: { + name: "Composite", + className: "ServicesDescriptionListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServicesDescription" + } + } + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } + } + } +}; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/models/operationResultsMappers.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/operationResultsMappers.ts new file mode 100644 index 000000000000..dbd5e7895407 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/operationResultsMappers.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ErrorDetails, + ErrorDetailsInternal, + OperationResultsDescription +} from "../models/mappers"; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/models/operationsMappers.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/operationsMappers.ts new file mode 100644 index 000000000000..dad157b4e8d6 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/operationsMappers.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ErrorDetails, + ErrorDetailsInternal, + Operation, + OperationDisplay, + OperationListResult +} from "../models/mappers"; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/models/parameters.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/parameters.ts new file mode 100644 index 000000000000..f4873eee85e3 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/parameters.ts @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +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 groupName: msRest.OperationURLParameter = { + parameterPath: "groupName", + mapper: { + required: true, + serializedName: "groupName", + type: { + name: "String" + } + } +}; +export const locationName: msRest.OperationURLParameter = { + parameterPath: "locationName", + mapper: { + required: true, + serializedName: "locationName", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const operationResultId: msRest.OperationURLParameter = { + parameterPath: "operationResultId", + mapper: { + required: true, + serializedName: "operationResultId", + type: { + name: "String" + } + } +}; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1, + Pattern: /^[-\w\._\(\)]+$/ + }, + type: { + name: "String" + } + } +}; +export const resourceName: msRest.OperationURLParameter = { + parameterPath: "resourceName", + mapper: { + required: true, + serializedName: "resourceName", + constraints: { + MaxLength: 24, + MinLength: 3 + }, + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/models/privateEndpointConnectionsMappers.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..f87561bab5c5 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + ErrorDetails, + ErrorDetailsInternal, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + ServiceAccessPolicyEntry, + ServiceAuthenticationConfigurationInfo, + ServiceCorsConfigurationInfo, + ServiceCosmosDbConfigurationInfo, + ServiceExportConfigurationInfo, + ServicesDescription, + ServicesProperties, + ServicesResource, + ServicesResourceIdentity, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/models/privateLinkResourcesMappers.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..704670297f75 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + ErrorDetails, + ErrorDetailsInternal, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + ServiceAccessPolicyEntry, + ServiceAuthenticationConfigurationInfo, + ServiceCorsConfigurationInfo, + ServiceCosmosDbConfigurationInfo, + ServiceExportConfigurationInfo, + ServicesDescription, + ServicesProperties, + ServicesResource, + ServicesResourceIdentity, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/models/servicesMappers.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/servicesMappers.ts new file mode 100644 index 000000000000..0de63e86f6f6 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/servicesMappers.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + CheckNameAvailabilityParameters, + ErrorDetails, + ErrorDetailsInternal, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + Resource, + ServiceAccessPolicyEntry, + ServiceAuthenticationConfigurationInfo, + ServiceCorsConfigurationInfo, + ServiceCosmosDbConfigurationInfo, + ServiceExportConfigurationInfo, + ServicesDescription, + ServicesDescriptionListResult, + ServicesNameAvailabilityInfo, + ServicesPatchDescription, + ServicesProperties, + ServicesResource, + ServicesResourceIdentity, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/index.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/index.ts new file mode 100644 index 000000000000..0e8ba668f2c1 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/index.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./services"; +export * from "./operations"; +export * from "./operationResults"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/operationResults.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/operationResults.ts new file mode 100644 index 000000000000..8e3c2e4a5ada --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/operationResults.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationResultsMappers"; +import * as Parameters from "../models/parameters"; +import { HealthcareApisManagementClientContext } from "../healthcareApisManagementClientContext"; + +/** Class representing a OperationResults. */ +export class OperationResults { + private readonly client: HealthcareApisManagementClientContext; + + /** + * Create a OperationResults. + * @param {HealthcareApisManagementClientContext} client Reference to the service client. + */ + constructor(client: HealthcareApisManagementClientContext) { + this.client = client; + } + + /** + * Get the operation result for a long running operation. + * @param locationName The location of the operation. + * @param operationResultId The ID of the operation result to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(locationName: string, operationResultId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The location of the operation. + * @param operationResultId The ID of the operation result to get. + * @param callback The callback + */ + get(locationName: string, operationResultId: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The location of the operation. + * @param operationResultId The ID of the operation result to get. + * @param options The optional parameters + * @param callback The callback + */ + get(locationName: string, operationResultId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(locationName: string, operationResultId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + operationResultId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/locations/{locationName}/operationresults/{operationResultId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.locationName, + Parameters.operationResultId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationResultsDescription + }, + 404: { + bodyMapper: Mappers.ErrorDetails + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/operations.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/operations.ts new file mode 100644 index 000000000000..385220df48d1 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/operations.ts @@ -0,0 +1,123 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +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 { HealthcareApisManagementClientContext } from "../healthcareApisManagementClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: HealthcareApisManagementClientContext; + + /** + * Create a Operations. + * @param {HealthcareApisManagementClientContext} client Reference to the service client. + */ + constructor(client: HealthcareApisManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available Healthcare service REST 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 Healthcare service REST 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.HealthcareApis/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/privateEndpointConnections.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..315539d3c21c --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/privateEndpointConnections.ts @@ -0,0 +1,285 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +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/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { HealthcareApisManagementClientContext } from "../healthcareApisManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: HealthcareApisManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {HealthcareApisManagementClientContext} client Reference to the service client. + */ + constructor(client: HealthcareApisManagementClientContext) { + this.client = client; + } + + /** + * Lists all private endpoint connections for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param [options] The optional parameters + * @returns Promise + */ + listByService(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param callback The callback + */ + listByService(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The optional parameters + * @param callback The callback + */ + listByService(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByService(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listByServiceOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param properties The private endpoint connection properties. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,resourceName,privateEndpointConnectionName,properties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,resourceName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Update the state of the specified private endpoint connection associated with the service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param properties The private endpoint connection properties. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a private endpoint connection. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByServiceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/privateLinkResources.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..499a9f923909 --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/privateLinkResources.ts @@ -0,0 +1,149 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { HealthcareApisManagementClientContext } from "../healthcareApisManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: HealthcareApisManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {HealthcareApisManagementClientContext} client Reference to the service client. + */ + constructor(client: HealthcareApisManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param [options] The optional parameters + * @returns Promise + */ + listByService(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param callback The callback + */ + listByService(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The optional parameters + * @param callback The callback + */ + listByService(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByService(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listByServiceOperationSpec, + callback) as Promise; + } + + /** + * Gets a private link resource that need to be created for a service. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceName: string, groupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, groupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param groupName The name of the private link resource group. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + groupName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByServiceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateLinkResources/{groupName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.groupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/services.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/services.ts new file mode 100644 index 000000000000..b019fdd021ca --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/services.ts @@ -0,0 +1,533 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +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/servicesMappers"; +import * as Parameters from "../models/parameters"; +import { HealthcareApisManagementClientContext } from "../healthcareApisManagementClientContext"; + +/** Class representing a Services. */ +export class Services { + private readonly client: HealthcareApisManagementClientContext; + + /** + * Create a Services. + * @param {HealthcareApisManagementClientContext} client Reference to the service client. + */ + constructor(client: HealthcareApisManagementClientContext) { + this.client = client; + } + + /** + * Get the metadata of a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update the metadata of a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param serviceDescription The service instance metadata. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, resourceName: string, serviceDescription: Models.ServicesDescription, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,resourceName,serviceDescription,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Update the metadata of a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, resourceName: string, servicePatchDescription: Models.ServicesPatchDescription, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,resourceName,servicePatchDescription,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Get all the service instances in a 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; + } + + /** + * Get all the service instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the service instance. + * @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; + } + + /** + * Check if a service instance name is available. + * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters + * structure to the name of the service instance to check. + * @param [options] The optional parameters + * @returns Promise + */ + checkNameAvailability(checkNameAvailabilityInputs: Models.CheckNameAvailabilityParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters + * structure to the name of the service instance to check. + * @param callback The callback + */ + checkNameAvailability(checkNameAvailabilityInputs: Models.CheckNameAvailabilityParameters, callback: msRest.ServiceCallback): void; + /** + * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters + * structure to the name of the service instance to check. + * @param options The optional parameters + * @param callback The callback + */ + checkNameAvailability(checkNameAvailabilityInputs: Models.CheckNameAvailabilityParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(checkNameAvailabilityInputs: Models.CheckNameAvailabilityParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + checkNameAvailabilityInputs, + options + }, + checkNameAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * Create or update the metadata of a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param serviceDescription The service instance metadata. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, serviceDescription: Models.ServicesDescription, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + serviceDescription, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Update the metadata of a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, resourceName: string, servicePatchDescription: Models.ServicesPatchDescription, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + servicePatchDescription, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Delete a service instance. + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Get all the service instances in a 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; + } + + /** + * Get all the service instances in a 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 getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServicesDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/services", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServicesDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServicesDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/checkNameAvailability", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "checkNameAvailabilityInputs", + mapper: { + ...Mappers.CheckNameAvailabilityParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServicesNameAvailabilityInfo + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "serviceDescription", + mapper: { + ...Mappers.ServicesDescription, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServicesDescription + }, + 201: { + bodyMapper: Mappers.ServicesDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "servicePatchDescription", + mapper: { + ...Mappers.ServicesPatchDescription, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServicesDescription + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServicesDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServicesDescriptionListResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; diff --git a/sdk/healthcareapis/arm-healthcareapis/tsconfig.json b/sdk/healthcareapis/arm-healthcareapis/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/healthcareapis/arm-healthcareapis/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"] +}