From abf42056cac2407811d6bf376893565b38349669 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 17 Aug 2021 01:51:33 +0000 Subject: [PATCH] CodeGen from PR 15240 in Azure/azure-rest-api-specs Merge a227ca98136542ffc7f03cf276f56f1e5b4409b6 into 3893616381e816729ef9cdd768e87fb2845e189d --- .../arm-powerbiprivatelinks/LICENSE.txt | 21 + .../arm-powerbiprivatelinks/README.md | 106 ++ .../arm-powerbiprivatelinks/package.json | 59 ++ .../arm-powerbiprivatelinks/rollup.config.js | 37 + .../src/models/index.ts | 908 ++++++++++++++++++ .../src/models/mappers.ts | 802 ++++++++++++++++ .../src/models/operationsMappers.ts | 16 + .../src/models/parameters.ts | 114 +++ .../src/models/powerBIResourcesMappers.ts | 19 + .../privateEndpointConnectionsMappers.ts | 21 + .../src/models/privateLinkResourcesMappers.ts | 15 + ...kServiceResourceOperationResultsMappers.ts | 14 + .../privateLinkServicesForPowerBIMappers.ts | 19 + .../src/models/privateLinkServicesMappers.ts | 19 + .../src/operations/index.ts | 16 + .../src/operations/operations.ts | 125 +++ .../src/operations/powerBIResources.ts | 265 +++++ .../operations/privateEndpointConnections.ts | 319 ++++++ .../src/operations/privateLinkResources.ts | 187 ++++ ...vateLinkServiceResourceOperationResults.ts | 81 ++ .../src/operations/privateLinkServices.ts | 88 ++ .../privateLinkServicesForPowerBI.ts | 87 ++ .../privateLinkServicesForPowerBIClient.ts | 64 ++ ...vateLinkServicesForPowerBIClientContext.ts | 92 ++ .../arm-powerbiprivatelinks/tsconfig.json | 19 + 25 files changed, 3513 insertions(+) create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/LICENSE.txt create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/README.md create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/package.json create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/rollup.config.js create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/index.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/mappers.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/operationsMappers.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/parameters.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/powerBIResourcesMappers.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServiceResourceOperationResultsMappers.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServicesForPowerBIMappers.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServicesMappers.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/index.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/operations.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/powerBIResources.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateEndpointConnections.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkResources.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServiceResourceOperationResults.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServices.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServicesForPowerBI.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/privateLinkServicesForPowerBIClient.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/privateLinkServicesForPowerBIClientContext.ts create mode 100644 sdk/powerbiprivatelinks/arm-powerbiprivatelinks/tsconfig.json diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/LICENSE.txt b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/LICENSE.txt new file mode 100644 index 000000000000..2d3163745319 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/README.md b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/README.md new file mode 100644 index 000000000000..d6eff85c8073 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/README.md @@ -0,0 +1,106 @@ +## Azure PrivateLinkServicesForPowerBIClient SDK for JavaScript + +This package contains an isomorphic SDK (runs both in node.js and in browsers) for PrivateLinkServicesForPowerBIClient. + +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +### Prerequisites + +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-powerbiprivatelinks` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-powerbiprivatelinks @azure/identity +``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. + +### How to use + +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. + +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. + +##### Sample code + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { PrivateLinkServicesForPowerBIClient } = require("@azure/arm-powerbiprivatelinks"); +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PrivateLinkServicesForPowerBIClient(creds, subscriptionId); +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); +``` + +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. + +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. + +##### Sample code + +- index.html + +```html + + + + @azure/arm-powerbiprivatelinks 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/powerbiprivatelinks/arm-powerbiprivatelinks/README.png) diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/package.json b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/package.json new file mode 100644 index 000000000000..c31909ca1da8 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/package.json @@ -0,0 +1,59 @@ +{ + "name": "@azure/arm-powerbiprivatelinks", + "author": "Microsoft Corporation", + "description": "PrivateLinkServicesForPowerBIClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", + "tslib": "^1.10.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-powerbiprivatelinks.js", + "module": "./esm/privateLinkServicesForPowerBIClient.js", + "types": "./esm/privateLinkServicesForPowerBIClient.d.ts", + "devDependencies": { + "typescript": "^3.6.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/powerbiprivatelinks/arm-powerbiprivatelinks", + "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-powerbiprivatelinks.js.map'\" -o ./dist/arm-powerbiprivatelinks.min.js ./dist/arm-powerbiprivatelinks.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/rollup.config.js b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/rollup.config.js new file mode 100644 index 000000000000..cf2211db7b21 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/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/privateLinkServicesForPowerBIClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-powerbiprivatelinks.js", + format: "umd", + name: "Azure.ArmPowerbiprivatelinks", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" + }, + banner: `/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */` + }, + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] +}; + +export default config; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/index.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/index.ts new file mode 100644 index 000000000000..a38871b7ff73 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/index.ts @@ -0,0 +1,908 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * The error detail. + */ +export interface ErrorDetail { + /** + * 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 error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * An interface representing AsyncOperationDetail. + * @summary AsyncOperationDetail + */ +export interface AsyncOperationDetail { + /** + * The operation id. + */ + id?: string; + /** + * The operation name. + */ + name?: string; + /** + * The operation status. + */ + status?: string; + /** + * The operation start time. + */ + startTime?: string; + /** + * The operation end time. + */ + endTime?: string; + /** + * The error. + */ + error?: ErrorDetail; +} + +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + +/** + * An interface representing PrivateEndpoint. + * @summary PrivateEndpoint + */ +export interface PrivateEndpoint { + /** + * Specifies the id of private endpoint. + */ + id?: string; +} + +/** + * ConnectionState information. + */ +export interface ConnectionState { + /** + * Status of the connection. Possible values include: 'Pending', 'Approved', 'Rejected', + * 'Disconnected' + */ + status?: PersistedConnectionStatus; + /** + * Description of the connection state. + */ + description?: string; + /** + * Actions required (if any). + */ + actionsRequired?: string; +} + +/** + * An interface representing PrivateEndpointConnection. + * @summary PrivateEndpointConnection + */ +export interface PrivateEndpointConnection extends BaseResource { + /** + * Specifies the id of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Specifies the name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Specifies the type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; + /** + * Specifies the private endpoint. + */ + privateEndpoint?: PrivateEndpoint; + /** + * Specifies the connection state. + */ + privateLinkServiceConnectionState?: ConnectionState; + /** + * Provisioning state of the Private Endpoint Connection. Possible values include: 'Creating', + * 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + */ + provisioningState?: ResourceProvisioningState; +} + +/** + * An interface representing TenantResource. + * @summary TenantResource + */ +export interface TenantResource extends BaseResource { + /** + * Specifies the resource identifier of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Specifies the name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Specifies the type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The system metadata relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; + /** + * Specifies the location of the resource. + */ + location?: string; + /** + * Specifies the tenant id of the resource. + */ + tenantId?: string; + /** + * Specifies the private endpoint connections of the resource. + */ + privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * Specifies the tags of the resource. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * An interface representing PrivateLinkConnectionDetail. + * @summary PrivateLinkConnectionDetail + */ +export interface PrivateLinkConnectionDetail { + /** + * Specifies the type of the connection detail. + */ + id?: string; + /** + * Specifies the member name of the connection detail. + */ + memberName?: string; + /** + * Specifies the private ip address of the connection detail. + */ + privateIpAddress?: string; + /** + * Specifies the link id of the connection detail. + */ + linkIdentifier?: string; + /** + * Specifies the group id of the connection detail. + */ + groupId?: string; +} + +/** + * An interface representing GroupConnectivityInformation. + * @summary GroupConnectivityInformation + */ +export interface GroupConnectivityInformation { + /** + * Specifies the group id of the group connectivity information. + */ + groupId?: string; + /** + * Specifies the member name of the group connectivity information. + */ + memberName?: string; + /** + * Specifies the internal FQDN of the group connectivity information. + */ + internalFqdn?: string; + /** + * Specifies the customer visible FQDNs of the group connectivity information. + */ + customerVisibleFqdns?: string[]; + /** + * Specifies the ARM region of the group connectivity information. + */ + privateLinkServiceArmRegion?: string; +} + +/** + * An interface representing RemotePrivateEndpointConnection. + * @summary RemotePrivateEndpointConnection + */ +export interface RemotePrivateEndpointConnection { + /** + * Specifies the id of private endpoint connection. + */ + id?: string; +} + +/** + * An interface representing PrivateLinkServiceProxy. + * @summary PrivateLinkServiceProxy + */ +export interface PrivateLinkServiceProxy { + /** + * Specifies the id of the private link service proxy. + */ + id?: string; + /** + * Specifies the group connectivity information of the private link service proxy. + */ + groupConnectivityInformation?: GroupConnectivityInformation[]; + /** + * Specifies the connection state of the private link service proxy. + */ + remotePrivateLinkServiceConnectionState?: ConnectionState; + /** + * Specifies the private endpoint connection of the private link service proxy. + */ + remotePrivateEndpointConnection?: RemotePrivateEndpointConnection; +} + +/** + * An interface representing PrivateLinkServiceConnection. + * @summary PrivateLinkServiceConnection + */ +export interface PrivateLinkServiceConnection { + /** + * Specifies the name of the private link service connection. + */ + name?: string; + /** + * Specifies the group ids of the private link service connection. + */ + groupIds?: string[]; + /** + * Specifies the request message of the private link service connection. + */ + requestMessage?: string; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource { + /** + * 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[]; + /** + * Fully qualified identifier of the resource. + */ + id?: string; + /** + * Name of the resource. + */ + name?: string; + /** + * Type of the resource. + */ + type?: string; +} + +/** + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.). + * @summary Error response + */ +export interface ErrorResponse { + /** + * The error object. + */ + error?: ErrorDetail; +} + +/** + * Localized display information for this particular operation. + */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual + * Machines" or "Job Schedule Collections". + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create + * or Update Virtual Machine", "Restart Virtual Machine". + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and + * detailed views. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; +} + +/** + * Details of a REST API operation, returned from the Resource Provider Operations API + * @summary REST API Operation + */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and + * "false" for ARM/control-plane operations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isDataAction?: boolean; + /** + * Localized display information for this particular operation. + */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit + * logs UX. Default value is "user,system". Possible values include: 'user', 'system', + * 'user,system' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Possible values include: 'Internal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionType?: ActionType; +} + +/** + * Optional Parameters. + */ +export interface PowerBIResourcesCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * The client tenant id in header. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + */ + clientTenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface PowerBIResourcesUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The client tenant id in header. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + */ + clientTenantId?: string; +} + +/** + * An interface representing PrivateLinkServicesForPowerBIClientOptions. + */ +export interface PrivateLinkServicesForPowerBIClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for Delete operation. + */ +export interface PrivateEndpointConnectionsDeleteHeaders { + /** + * The Azure async operation id to poll on result. + */ + azureAsyncOperation: string; +} + +/** + * @interface + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link + * to get the next set of results. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * URL to get the next set of operation list results (if there are any). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Specifies list of the private link resource. + * @summary PrivateLinkResourcesListResult + * @extends Array + */ +export interface PrivateLinkResourcesListResult extends Array { + /** + * URL to get the next set of operation list results (if there are any). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * List of private endpoint connections. + * @summary PrivateEndpointConnections + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { + /** + * URL to get the next set of operation list results (if there are any). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for PersistedConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PersistedConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for ResourceProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + * @readonly + * @enum {string} + */ +export type ResourceProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; + +/** + * Defines values for Origin. + * Possible values include: 'user', 'system', 'user,system' + * @readonly + * @enum {string} + */ +export type Origin = 'user' | 'system' | 'user,system'; + +/** + * Defines values for ActionType. + * Possible values include: 'Internal' + * @readonly + * @enum {string} + */ +export type ActionType = 'Internal'; + +/** + * 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 listBySubscriptionId operation. + */ +export type PrivateLinkServicesForPowerBIListBySubscriptionIdResponse = Array & { + /** + * 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: TenantResource[]; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateLinkServiceResourceOperationResultsGetResponse = AsyncOperationDetail & { + /** + * 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: AsyncOperationDetail; + }; +}; + +/** + * Contains response data for the beginGet operation. + */ +export type PrivateLinkServiceResourceOperationResultsBeginGetResponse = AsyncOperationDetail & { + /** + * 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: AsyncOperationDetail; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type PrivateLinkServicesListByResourceGroupResponse = Array & { + /** + * 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: TenantResource[]; + }; +}; + +/** + * Contains response data for the listByResourceName operation. + */ +export type PowerBIResourcesListByResourceNameResponse = Array & { + /** + * 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: TenantResource[]; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type PowerBIResourcesCreateResponse = TenantResource & { + /** + * 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: TenantResource; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PowerBIResourcesUpdateResponse = TenantResource & { + /** + * 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: TenantResource; + }; +}; + +/** + * Contains response data for the listByResource operation. + */ +export type PrivateLinkResourcesListByResourceResponse = PrivateLinkResourcesListResult & { + /** + * 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: PrivateLinkResourcesListResult; + }; +}; + +/** + * 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; + }; +}; + +/** + * Contains response data for the listByResourceNext operation. + */ +export type PrivateLinkResourcesListByResourceNextResponse = PrivateLinkResourcesListResult & { + /** + * 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: PrivateLinkResourcesListResult; + }; +}; + +/** + * Contains response data for the listByResource operation. + */ +export type PrivateEndpointConnectionsListByResourceResponse = 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 create operation. + */ +export type PrivateEndpointConnectionsCreateResponse = 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 deleteMethod operation. + */ +export type PrivateEndpointConnectionsDeleteResponse = PrivateEndpointConnectionsDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PrivateEndpointConnectionsDeleteHeaders; + }; +}; + +/** + * Contains response data for the listByResourceNext operation. + */ +export type PrivateEndpointConnectionsListByResourceNextResponse = 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; + }; +}; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/mappers.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/mappers.ts new file mode 100644 index 000000000000..5258bb27f5b3 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/mappers.ts @@ -0,0 +1,802 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorDetail: msRest.CompositeMapper = { + serializedName: "ErrorDetail", + type: { + name: "Composite", + className: "ErrorDetail", + 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" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const AsyncOperationDetail: msRest.CompositeMapper = { + serializedName: "AsyncOperationDetail", + type: { + name: "Composite", + className: "AsyncOperationDetail", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectionState: msRest.CompositeMapper = { + serializedName: "ConnectionState", + type: { + name: "Composite", + className: "ConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + 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" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "ConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const TenantResource: msRest.CompositeMapper = { + serializedName: "TenantResource", + type: { + name: "Composite", + className: "TenantResource", + 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" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "properties.tenantId", + type: { + name: "String" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkConnectionDetail: msRest.CompositeMapper = { + serializedName: "PrivateLinkConnectionDetail", + type: { + name: "Composite", + className: "PrivateLinkConnectionDetail", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + memberName: { + serializedName: "memberName", + type: { + name: "String" + } + }, + privateIpAddress: { + serializedName: "privateIpAddress", + type: { + name: "String" + } + }, + linkIdentifier: { + serializedName: "linkIdentifier", + type: { + name: "String" + } + }, + groupId: { + serializedName: "groupId", + type: { + name: "String" + } + } + } + } +}; + +export const GroupConnectivityInformation: msRest.CompositeMapper = { + serializedName: "GroupConnectivityInformation", + type: { + name: "Composite", + className: "GroupConnectivityInformation", + modelProperties: { + groupId: { + serializedName: "groupId", + type: { + name: "String" + } + }, + memberName: { + serializedName: "memberName", + type: { + name: "String" + } + }, + internalFqdn: { + serializedName: "internalFqdn", + type: { + name: "String" + } + }, + customerVisibleFqdns: { + serializedName: "customerVisibleFqdns", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateLinkServiceArmRegion: { + serializedName: "privateLinkServiceArmRegion", + type: { + name: "String" + } + } + } + } +}; + +export const RemotePrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "RemotePrivateEndpointConnection", + type: { + name: "Composite", + className: "RemotePrivateEndpointConnection", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceProxy: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceProxy", + type: { + name: "Composite", + className: "PrivateLinkServiceProxy", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + groupConnectivityInformation: { + serializedName: "groupConnectivityInformation", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GroupConnectivityInformation" + } + } + } + }, + remotePrivateLinkServiceConnectionState: { + serializedName: "remotePrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "ConnectionState" + } + }, + remotePrivateEndpointConnection: { + serializedName: "remotePrivateEndpointConnection", + type: { + name: "Composite", + className: "RemotePrivateEndpointConnection" + } + } + } + } +}; + +export const PrivateLinkServiceConnection: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnection", + type: { + name: "Composite", + className: "PrivateLinkServiceConnection", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + groupIds: { + serializedName: "groupIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requestMessage: { + serializedName: "requestMessage", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + 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" + } + } + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + 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" + } + }, + isDataAction: { + readOnly: true, + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + readOnly: true, + serializedName: "origin", + type: { + name: "String" + } + }, + actionType: { + readOnly: true, + serializedName: "actionType", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsDeleteHeaders: msRest.CompositeMapper = { + serializedName: "privateendpointconnections-delete-headers", + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourcesListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourcesListResult", + type: { + name: "Composite", + className: "PrivateLinkResourcesListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/operationsMappers.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/operationsMappers.ts new file mode 100644 index 000000000000..fddc3077d64b --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/operationsMappers.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Operation, + OperationDisplay, + OperationListResult +} from "../models/mappers"; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/parameters.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/parameters.ts new file mode 100644 index 000000000000..042facd7d81b --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/parameters.ts @@ -0,0 +1,114 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +export const azureResourceName: msRest.OperationURLParameter = { + parameterPath: "azureResourceName", + mapper: { + required: true, + serializedName: "azureResourceName", + type: { + name: "String" + } + } +}; +export const clientTenantId: msRest.OperationParameter = { + parameterPath: [ + "options", + "clientTenantId" + ], + mapper: { + serializedName: "x-ms-client-tenant-id", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const operationId: msRest.OperationURLParameter = { + parameterPath: "operationId", + mapper: { + required: true, + serializedName: "operationId", + type: { + name: "String" + } + } +}; +export const privateEndpointName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointName", + mapper: { + required: true, + serializedName: "privateEndpointName", + type: { + name: "String" + } + } +}; +export const privateLinkResourceName: msRest.OperationURLParameter = { + parameterPath: "privateLinkResourceName", + mapper: { + required: true, + serializedName: "privateLinkResourceName", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/powerBIResourcesMappers.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/powerBIResourcesMappers.ts new file mode 100644 index 000000000000..38c4eb70d4ed --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/powerBIResourcesMappers.ts @@ -0,0 +1,19 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BaseResource, + ConnectionState, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + PrivateEndpoint, + PrivateEndpointConnection, + SystemData, + TenantResource +} from "../models/mappers"; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateEndpointConnectionsMappers.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..ce4064d86884 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BaseResource, + ConnectionState, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateEndpointConnectionsDeleteHeaders, + SystemData, + TenantResource +} from "../models/mappers"; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkResourcesMappers.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..c39824263cea --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + PrivateLinkResource, + PrivateLinkResourcesListResult +} from "../models/mappers"; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServiceResourceOperationResultsMappers.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServiceResourceOperationResultsMappers.ts new file mode 100644 index 000000000000..65b17549c2b0 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServiceResourceOperationResultsMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AsyncOperationDetail, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse +} from "../models/mappers"; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServicesForPowerBIMappers.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServicesForPowerBIMappers.ts new file mode 100644 index 000000000000..38c4eb70d4ed --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServicesForPowerBIMappers.ts @@ -0,0 +1,19 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BaseResource, + ConnectionState, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + PrivateEndpoint, + PrivateEndpointConnection, + SystemData, + TenantResource +} from "../models/mappers"; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServicesMappers.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServicesMappers.ts new file mode 100644 index 000000000000..38c4eb70d4ed --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/models/privateLinkServicesMappers.ts @@ -0,0 +1,19 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BaseResource, + ConnectionState, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + PrivateEndpoint, + PrivateEndpointConnection, + SystemData, + TenantResource +} from "../models/mappers"; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/index.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/index.ts new file mode 100644 index 000000000000..6d561c1db818 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./operations"; +export * from "./privateLinkServicesForPowerBI"; +export * from "./privateLinkServiceResourceOperationResults"; +export * from "./privateLinkServices"; +export * from "./powerBIResources"; +export * from "./privateLinkResources"; +export * from "./privateEndpointConnections"; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/operations.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/operations.ts new file mode 100644 index 000000000000..ce5100cda834 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/operations.ts @@ -0,0 +1,125 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { PrivateLinkServicesForPowerBIClientContext } from "../privateLinkServicesForPowerBIClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: PrivateLinkServicesForPowerBIClientContext; + + /** + * Create a Operations. + * @param {PrivateLinkServicesForPowerBIClientContext} client Reference to the service client. + */ + constructor(client: PrivateLinkServicesForPowerBIClientContext) { + this.client = client; + } + + /** + * Lists all of the available Power BI RP 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 Power BI RP 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.PowerBI/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/powerBIResources.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/powerBIResources.ts new file mode 100644 index 000000000000..57b1dddf87f9 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/powerBIResources.ts @@ -0,0 +1,265 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/powerBIResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { PrivateLinkServicesForPowerBIClientContext } from "../privateLinkServicesForPowerBIClientContext"; + +/** Class representing a PowerBIResources. */ +export class PowerBIResources { + private readonly client: PrivateLinkServicesForPowerBIClientContext; + + /** + * Create a PowerBIResources. + * @param {PrivateLinkServicesForPowerBIClientContext} client Reference to the service client. + */ + constructor(client: PrivateLinkServicesForPowerBIClientContext) { + this.client = client; + } + + /** + * Gets all the private link resources for the given Azure resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceName(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listByResourceName(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listByResourceName(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceName(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listByResourceNameOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a Private Link Service Resource for Power BI. + * @param body Tenant resource to be created or updated. + * @param [options] The optional parameters + * @returns Promise + */ + create(body: Models.TenantResource, options?: Models.PowerBIResourcesCreateOptionalParams): Promise; + /** + * @param body Tenant resource to be created or updated. + * @param callback The callback + */ + create(body: Models.TenantResource, callback: msRest.ServiceCallback): void; + /** + * @param body Tenant resource to be created or updated. + * @param options The optional parameters + * @param callback The callback + */ + create(body: Models.TenantResource, options: Models.PowerBIResourcesCreateOptionalParams, callback: msRest.ServiceCallback): void; + create(body: Models.TenantResource, options?: Models.PowerBIResourcesCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + body, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a Private Link Service Resource for Power BI. + * @param body Tenant resource to be created or updated. + * @param [options] The optional parameters + * @returns Promise + */ + update(body: Models.TenantResource, options?: Models.PowerBIResourcesUpdateOptionalParams): Promise; + /** + * @param body Tenant resource to be created or updated. + * @param callback The callback + */ + update(body: Models.TenantResource, callback: msRest.ServiceCallback): void; + /** + * @param body Tenant resource to be created or updated. + * @param options The optional parameters + * @param callback The callback + */ + update(body: Models.TenantResource, options: Models.PowerBIResourcesUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(body: Models.TenantResource, options?: Models.PowerBIResourcesUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + body, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a Private Link Service Resource for Power BI. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + deleteMethod(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureResourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TenantResource" + } + } + } + } + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureResourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.clientTenantId, + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.TenantResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TenantResource + }, + 201: { + bodyMapper: Mappers.TenantResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureResourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.clientTenantId, + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.TenantResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TenantResource + }, + 201: { + bodyMapper: Mappers.TenantResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureResourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateEndpointConnections.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..f660a745edce --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateEndpointConnections.ts @@ -0,0 +1,319 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { PrivateLinkServicesForPowerBIClientContext } from "../privateLinkServicesForPowerBIClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: PrivateLinkServicesForPowerBIClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {PrivateLinkServicesForPowerBIClientContext} client Reference to the service client. + */ + constructor(client: PrivateLinkServicesForPowerBIClientContext) { + this.client = client; + } + + /** + * Gets private endpoint connection for Power BI. + * @summary Lists all private endpoint connections under a resource. + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param azureResourceName The name of the powerbi resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByResource(resourceGroupName: string, azureResourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param azureResourceName The name of the powerbi resource. + * @param callback The callback + */ + listByResource(resourceGroupName: string, azureResourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param azureResourceName The name of the powerbi resource. + * @param options The optional parameters + * @param callback The callback + */ + listByResource(resourceGroupName: string, azureResourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResource(resourceGroupName: string, azureResourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + azureResourceName, + options + }, + listByResourceOperationSpec, + callback) as Promise; + } + + /** + * Get a specific private endpoint connection for Power BI by private endpoint name. + * @summary Get a specific private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + get(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + get(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + get(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the status of Private Endpoint Connection object. Used to approve or reject a + * connection. + * @summary Update a specific private endpoint connection. + * @param privateEndpointConnection Private endpoint connection object to update. + * @param [options] The optional parameters + * @returns Promise + */ + create(privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise; + /** + * @param privateEndpointConnection Private endpoint connection object to update. + * @param callback The callback + */ + create(privateEndpointConnection: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param privateEndpointConnection Private endpoint connection object to update. + * @param options The optional parameters + * @param callback The callback + */ + create(privateEndpointConnection: Models.PrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + privateEndpointConnection, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Deletes a private endpoint connection for Power BI by private endpoint name. + * @summary Asynchronous API to delete a private endpoint connection for Power BI by private + * endpoint name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a private endpoint connection for Power BI by private endpoint name. + * @summary Asynchronous API to delete a private endpoint connection for Power BI by private + * endpoint name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets private endpoint connection for Power BI. + * @summary Lists all private endpoint connections under a resource. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceNext(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 + */ + listByResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureResourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureResourceName, + Parameters.privateEndpointName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureResourceName, + Parameters.privateEndpointName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateEndpointConnection", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateEndpointConnections/{privateEndpointName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureResourceName, + Parameters.privateEndpointName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + 202: { + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + 204: { + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + } + }, + serializer +}; + +const listByResourceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkResources.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..474abe23c525 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkResources.ts @@ -0,0 +1,187 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { PrivateLinkServicesForPowerBIClientContext } from "../privateLinkServicesForPowerBIClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: PrivateLinkServicesForPowerBIClientContext; + + /** + * Create a PrivateLinkResources. + * @param {PrivateLinkServicesForPowerBIClientContext} client Reference to the service client. + */ + constructor(client: PrivateLinkServicesForPowerBIClientContext) { + this.client = client; + } + + /** + * List private link resources under a specific Power BI resource. + * @summary List private link Power BI resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByResource(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listByResource(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listByResource(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResource(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listByResourceOperationSpec, + callback) as Promise; + } + + /** + * Get properties of a private link resource. + * @summary Get a private link resource. + * @param privateLinkResourceName The name of private link resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(privateLinkResourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param privateLinkResourceName The name of private link resource. + * @param callback The callback + */ + get(privateLinkResourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param privateLinkResourceName The name of private link resource. + * @param options The optional parameters + * @param callback The callback + */ + get(privateLinkResourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(privateLinkResourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + privateLinkResourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * List private link resources under a specific Power BI resource. + * @summary List private link Power BI resource. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceNext(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 + */ + listByResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureResourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI/{azureResourceName}/privateLinkResources/{privateLinkResourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureResourceName, + Parameters.privateLinkResourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServiceResourceOperationResults.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServiceResourceOperationResults.ts new file mode 100644 index 000000000000..85a1502254c3 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServiceResourceOperationResults.ts @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkServiceResourceOperationResultsMappers"; +import * as Parameters from "../models/parameters"; +import { PrivateLinkServicesForPowerBIClientContext } from "../privateLinkServicesForPowerBIClientContext"; + +/** Class representing a PrivateLinkServiceResourceOperationResults. */ +export class PrivateLinkServiceResourceOperationResults { + private readonly client: PrivateLinkServicesForPowerBIClientContext; + + /** + * Create a PrivateLinkServiceResourceOperationResults. + * @param {PrivateLinkServicesForPowerBIClientContext} client Reference to the service client. + */ + constructor(client: PrivateLinkServicesForPowerBIClientContext) { + this.client = client; + } + + /** + * Gets operation result of Private Link Service Resources for Power BI. + * @param [options] The optional parameters + * @returns Promise + */ + get(options?: msRest.RequestOptionsBase): Promise { + return this.beginGet(options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets operation result of Private Link Service Resources for Power BI. + * @param [options] The optional parameters + * @returns Promise + */ + beginGet(options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + options + }, + beginGetOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginGetOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/operationResults/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationDetail + }, + 202: { + bodyMapper: Mappers.AsyncOperationDetail + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServices.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServices.ts new file mode 100644 index 000000000000..6235a5626b87 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServices.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkServicesMappers"; +import * as Parameters from "../models/parameters"; +import { PrivateLinkServicesForPowerBIClientContext } from "../privateLinkServicesForPowerBIClientContext"; + +/** Class representing a PrivateLinkServices. */ +export class PrivateLinkServices { + private readonly client: PrivateLinkServicesForPowerBIClientContext; + + /** + * Create a PrivateLinkServices. + * @param {PrivateLinkServicesForPowerBIClientContext} client Reference to the service client. + */ + constructor(client: PrivateLinkServicesForPowerBIClientContext) { + this.client = client; + } + + /** + * Gets all the private link resources for the given resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listByResourceGroup(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TenantResource" + } + } + } + } + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServicesForPowerBI.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServicesForPowerBI.ts new file mode 100644 index 000000000000..50dd9b59b17a --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/operations/privateLinkServicesForPowerBI.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkServicesForPowerBIMappers"; +import * as Parameters from "../models/parameters"; +import { PrivateLinkServicesForPowerBIClientContext } from "../privateLinkServicesForPowerBIClientContext"; + +/** Class representing a PrivateLinkServicesForPowerBI. */ +export class PrivateLinkServicesForPowerBI { + private readonly client: PrivateLinkServicesForPowerBIClientContext; + + /** + * Create a PrivateLinkServicesForPowerBI. + * @param {PrivateLinkServicesForPowerBIClientContext} client Reference to the service client. + */ + constructor(client: PrivateLinkServicesForPowerBIClientContext) { + this.client = client; + } + + /** + * Gets all the private link resources for the given subscription id. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionId(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscriptionId(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionId(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionId(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionIdOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listBySubscriptionIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/privateLinkServicesForPowerBI", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TenantResource" + } + } + } + } + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/privateLinkServicesForPowerBIClient.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/privateLinkServicesForPowerBIClient.ts new file mode 100644 index 000000000000..3431dacbe28d --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/privateLinkServicesForPowerBIClient.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { PrivateLinkServicesForPowerBIClientContext } from "./privateLinkServicesForPowerBIClientContext"; + + +class PrivateLinkServicesForPowerBIClient extends PrivateLinkServicesForPowerBIClientContext { + // Operation groups + operations: operations.Operations; + privateLinkServicesForPowerBI: operations.PrivateLinkServicesForPowerBI; + privateLinkServiceResourceOperationResults: operations.PrivateLinkServiceResourceOperationResults; + privateLinkServices: operations.PrivateLinkServices; + powerBIResources: operations.PowerBIResources; + privateLinkResources: operations.PrivateLinkResources; + privateEndpointConnections: operations.PrivateEndpointConnections; + + /** + * Initializes a new instance of the PrivateLinkServicesForPowerBIClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + * @param resourceGroupName The name of the resource group. + * @param azureResourceName The name of the Azure resource. + * @param privateEndpointName The name of the private endpoint. + * @param operationId The id of Azure async operation. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, resourceGroupName: string, azureResourceName: string, privateEndpointName: string, operationId: string, options?: Models.PrivateLinkServicesForPowerBIClientOptions) { + super(credentials, subscriptionId, resourceGroupName, azureResourceName, privateEndpointName, operationId, options); + this.operations = new operations.Operations(this); + this.privateLinkServicesForPowerBI = new operations.PrivateLinkServicesForPowerBI(this); + this.privateLinkServiceResourceOperationResults = new operations.PrivateLinkServiceResourceOperationResults(this); + this.privateLinkServices = new operations.PrivateLinkServices(this); + this.powerBIResources = new operations.PowerBIResources(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + } +} + +// Operation Specifications + +export { + PrivateLinkServicesForPowerBIClient, + PrivateLinkServicesForPowerBIClientContext, + Models as PrivateLinkServicesForPowerBIModels, + Mappers as PrivateLinkServicesForPowerBIMappers +}; +export * from "./operations"; diff --git a/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/privateLinkServicesForPowerBIClientContext.ts b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/privateLinkServicesForPowerBIClientContext.ts new file mode 100644 index 000000000000..e53f0464ba00 --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/src/privateLinkServicesForPowerBIClientContext.ts @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; + +const packageName = "@azure/arm-powerbiprivatelinks"; +const packageVersion = "1.0.0"; + +export class PrivateLinkServicesForPowerBIClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials | TokenCredential; + subscriptionId: string; + resourceGroupName: string; + azureResourceName: string; + privateEndpointName: string; + operationId: string; + apiVersion?: string; + + /** + * Initializes a new instance of the PrivateLinkServicesForPowerBIClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + * @param resourceGroupName The name of the resource group. + * @param azureResourceName The name of the Azure resource. + * @param privateEndpointName The name of the private endpoint. + * @param operationId The id of Azure async operation. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, resourceGroupName: string, azureResourceName: string, privateEndpointName: string, operationId: string, options?: Models.PrivateLinkServicesForPowerBIClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + if (resourceGroupName == undefined) { + throw new Error('\'resourceGroupName\' cannot be null.'); + } + if (azureResourceName == undefined) { + throw new Error('\'azureResourceName\' cannot be null.'); + } + if (privateEndpointName == undefined) { + throw new Error('\'privateEndpointName\' cannot be null.'); + } + if (operationId == undefined) { + throw new Error('\'operationId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if (!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2020-06-01'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + this.resourceGroupName = resourceGroupName; + this.azureResourceName = azureResourceName; + this.privateEndpointName = privateEndpointName; + this.operationId = operationId; + + 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/powerbiprivatelinks/arm-powerbiprivatelinks/tsconfig.json b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/powerbiprivatelinks/arm-powerbiprivatelinks/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"] +}